diff --git a/Makefile b/Makefile
index 296013999a..ddc04acea5 100644
--- a/Makefile
+++ b/Makefile
@@ -454,6 +454,58 @@ intel-nersc:
"OPENMP = $(OPENMP)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" )
+intel-cori-knl:
+ ( $(MAKE) all \
+ "FC_PARALLEL = ftn" \
+ "CC_PARALLEL = cc" \
+ "CXX_PARALLEL = CC" \
+ "FC_SERIAL = ftn" \
+ "CC_SERIAL = cc" \
+ "CXX_SERIAL = CC" \
+ "FFLAGS_PROMOTION = -real-size 64" \
+ "FFLAGS_OPT = -O3 -convert big_endian -free -align array64byte" \
+ "CFLAGS_OPT = -O3" \
+ "CXXFLAGS_OPT = -O3, -xMIC-AVX512" \
+ "LDFLAGS_OPT = -O3" \
+ "FFLAGS_OMP = -qopenmp" \
+ "CFLAGS_OMP = -qopenmp" \
+ "FFLAGS_DEBUG = -real-size 64 -g -convert big_endian -free -CU -CB -check all -gen-interfaces -warn interfaces -traceback" \
+ "CFLAGS_DEBUG = -g -traceback" \
+ "CXXFLAGS_DEBUG = -g -traceback, -xMIC-AVX512" \
+ "LDFLAGS_DEBUG = -g -traceback" \
+ "BUILD_TARGET = $(@)" \
+ "CORE = $(CORE)" \
+ "DEBUG = $(DEBUG)" \
+ "USE_PAPI = $(USE_PAPI)" \
+ "OPENMP = $(OPENMP)" \
+ "CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" )
+
+intel-cori-haswell:
+ ( $(MAKE) all \
+ "FC_PARALLEL = ftn" \
+ "CC_PARALLEL = cc" \
+ "CXX_PARALLEL = CC" \
+ "FC_SERIAL = ftn" \
+ "CC_SERIAL = cc" \
+ "CXX_SERIAL = CC" \
+ "FFLAGS_PROMOTION = -real-size 64" \
+ "FFLAGS_OPT = -O3 -convert big_endian -free -align array64byte" \
+ "CFLAGS_OPT = -O3" \
+ "CXXFLAGS_OPT = -O3, -xCORE-AVX2" \
+ "LDFLAGS_OPT = -O3" \
+ "FFLAGS_OMP = -qopenmp" \
+ "CFLAGS_OMP = -qopenmp" \
+ "FFLAGS_DEBUG = -real-size 64 -g -convert big_endian -free -CU -CB -check all -gen-interfaces -warn interfaces -traceback" \
+ "CFLAGS_DEBUG = -g -traceback" \
+ "CXXFLAGS_DEBUG = -g -traceback, -xCORE-AVX2" \
+ "LDFLAGS_DEBUG = -g -traceback" \
+ "BUILD_TARGET = $(@)" \
+ "CORE = $(CORE)" \
+ "DEBUG = $(DEBUG)" \
+ "USE_PAPI = $(USE_PAPI)" \
+ "OPENMP = $(OPENMP)" \
+ "CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" )
+
bluegene:
( $(MAKE) all \
"FC_PARALLEL = mpixlf95_r" \
diff --git a/src/core_landice/Registry.xml b/src/core_landice/Registry.xml
index af70c9f57d..8ba24d5831 100644
--- a/src/core_landice/Registry.xml
+++ b/src/core_landice/Registry.xml
@@ -100,6 +100,10 @@
description="If true, nonconvergence of the velocity solver results in a fatal error. If false, it is a warning."
possible_values=".true. or .false."
/>
+
>& marineBdyExtensionMap, dou
}
bool floating = rho_ice * thicknessData[iv] + rho_ocean * bedTopographyData[iv] < 0;
- if (floating && (effecPress_F != 0))
- effecPressData[iv] = 0.0;
}
}
diff --git a/src/core_landice/mode_forward/mpas_li_velocity.F b/src/core_landice/mode_forward/mpas_li_velocity.F
index 64abf5e08f..76a7f8b157 100644
--- a/src/core_landice/mode_forward/mpas_li_velocity.F
+++ b/src/core_landice/mode_forward/mpas_li_velocity.F
@@ -808,13 +808,20 @@ subroutine calculate_beta(block, err)
type (mpas_pool_type), pointer :: thermalPool
type (mpas_pool_type), pointer :: meshPool
real (kind=RKIND), dimension(:), pointer :: betaSolve, beta
+ real (kind=RKIND), dimension(:), pointer :: effectivePressure, effectivePressureLimited
real (kind=RKIND), dimension(:), pointer :: basalTemperature, basalPmpTemperature
+ real (kind=RKIND), dimension(:), pointer :: muFriction
integer, dimension(:), pointer :: cellMask
logical, pointer :: config_use_glp
logical, pointer :: config_beta_thawed_only
+ logical, pointer :: config_extend_effective_pressure
+ real (kind=RKIND), pointer :: config_effective_pressure_max
logical, pointer :: hydroActive
real (kind=RKIND) :: betaAccum
integer :: nBetaValues
+ real (kind=RKIND) :: NAccum
+ real (kind=RKIND) :: Nmin
+ integer :: nNValues
integer :: iCell, iCell2
integer :: neighbor
integer, pointer :: nCells
@@ -825,15 +832,25 @@ subroutine calculate_beta(block, err)
call mpas_pool_get_config(liConfigs, 'config_use_glp', config_use_glp)
call mpas_pool_get_config(liConfigs, 'config_beta_thawed_only', config_beta_thawed_only)
+ call mpas_pool_get_config(liConfigs, 'config_extend_effective_pressure', config_extend_effective_pressure)
+ call mpas_pool_get_config(liConfigs, 'config_effective_pressure_max', config_effective_pressure_max)
call mpas_pool_get_subpool(block % structs, 'geometry', geometryPool)
call mpas_pool_get_subpool(block % structs, 'velocity', velocityPool)
call mpas_pool_get_subpool(block % structs, 'thermal', thermalPool)
+ call mpas_pool_get_subpool(block % structs, 'hydro', hydroPool)
call mpas_pool_get_subpool(block % structs, 'mesh', meshPool)
call mpas_pool_get_array(velocityPool, 'betaSolve', betaSolve)
call mpas_pool_get_array(velocityPool, 'beta', beta)
+ call mpas_pool_get_array(velocityPool, 'muFriction', muFriction)
call mpas_pool_get_array(geometryPool, 'cellMask', cellMask)
+ call mpas_pool_get_array(hydroPool, 'effectivePressure', effectivePressure)
+ call mpas_pool_get_array(velocityPool, 'effectivePressureLimited', effectivePressureLimited)
+
+ call mpas_pool_get_dimension(meshPool, 'nCells', nCells)
+ call mpas_pool_get_array(meshPool, 'nEdgesOnCell', nEdgesOnCell)
+ call mpas_pool_get_array(meshPool, 'cellsOnCell', cellsOnCell)
betaSolve = beta
@@ -846,6 +863,40 @@ subroutine calculate_beta(block, err)
end where
endif
+ ! Effective pressure adjustments for velocity solver
+ effectivePressureLimited(:) = effectivePressure(:)
+
+ if (config_extend_effective_pressure) then
+ do iCell = 1, nCells
+ if ( .not. li_mask_is_grounded_ice(cellMask(iCell)) ) then
+ nNValues = 0
+ NAccum = 0.0_RKIND
+ Nmin = 1.0e20
+ do iCell2 = 1, nEdgesOnCell(iCell)
+ neighbor = cellsOnCell(iCell2, iCell)
+ if (li_mask_is_grounded_ice(cellMask(neighbor))) then
+ NAccum = NAccum + effectivePressureLimited(neighbor)
+ nNValues = nNValues + 1
+ Nmin = min(Nmin, effectivePressureLimited(neighbor))
+ endif
+ enddo
+ if (nNValues > 0) then
+! effectivePressureLimited(iCell) = NAccum / real(nNValues, kind=RKIND) ! take average of neighboring effectivePressure values
+ ! < TODO: could do this in log space
+ effectivePressureLimited(iCell) = Nmin
+ endif
+ endif ! if iCell is floating
+ enddo ! cell loop
+ endif
+
+ ! Apply limits to N
+ do iCell = 1, nCells
+ effectivePressureLimited(iCell) = max(0.0_RKIND, effectivePressureLimited(iCell)) ! Never pass a negative N
+ effectivePressureLimited(iCell) = min(config_effective_pressure_max, effectivePressureLimited(iCell))
+ enddo
+ effectivePressureLimited(:) = effectivePressureLimited(:) * muFriction(:)
+
+
!--------------------------------------------------------------------
end subroutine calculate_beta
diff --git a/src/core_landice/mode_forward/mpas_li_velocity_external.F b/src/core_landice/mode_forward/mpas_li_velocity_external.F
index 10d3b38914..519dbeb66c 100644
--- a/src/core_landice/mode_forward/mpas_li_velocity_external.F
+++ b/src/core_landice/mode_forward/mpas_li_velocity_external.F
@@ -449,7 +449,6 @@ subroutine li_velocity_external_solve(meshPool, geometryPool, thermalPool, hydro
normalVelocity, uReconstructX, uReconstructY, uReconstructZ
real (kind=RKIND), dimension(:,:), pointer :: temperature
real (kind=RKIND), dimension(:), pointer :: stiffnessFactor
- real (kind=RKIND), dimension(:), pointer :: effectivePressure
real (kind=RKIND), dimension(:), pointer :: effectivePressureLimited
real (kind=RKIND), dimension(:), pointer :: muFriction
real (kind=RKIND), pointer :: deltat
@@ -460,7 +459,6 @@ subroutine li_velocity_external_solve(meshPool, geometryPool, thermalPool, hydro
logical, pointer :: config_output_external_velocity_solver_data
logical, pointer :: config_nonconvergence_error
real (kind=RKIND), pointer :: config_ice_density
- real (kind=RKIND), pointer :: config_effective_pressure_max
integer, pointer :: anyDynamicVertexMaskChanged
integer, pointer :: dirichletMaskChanged
integer, pointer :: nEdges
@@ -486,7 +484,6 @@ subroutine li_velocity_external_solve(meshPool, geometryPool, thermalPool, hydro
config_output_external_velocity_solver_data)
call mpas_pool_get_config(liConfigs, 'config_nonconvergence_error', config_nonconvergence_error)
call mpas_pool_get_config(liConfigs, 'config_ice_density', config_ice_density)
- call mpas_pool_get_config(liConfigs, 'config_effective_pressure_max', config_effective_pressure_max)
! Mesh variables
call mpas_pool_get_array(meshPool, 'layerThicknessFractions', layerThicknessFractions)
@@ -524,7 +521,6 @@ subroutine li_velocity_external_solve(meshPool, geometryPool, thermalPool, hydro
call mpas_pool_get_array(velocityPool, 'stiffnessFactor', stiffnessFactor)
! Hydro variables
- call mpas_pool_get_array(hydroPool, 'effectivePressure', effectivePressure)
call mpas_pool_get_array(velocityPool, 'effectivePressureLimited', effectivePressureLimited)
#if defined(USE_EXTERNAL_L1L2) || defined(USE_EXTERNAL_FIRSTORDER) || defined(USE_EXTERNAL_STOKES)
@@ -532,11 +528,6 @@ subroutine li_velocity_external_solve(meshPool, geometryPool, thermalPool, hydro
call interface_redirect_stdout(timestepNumber)
#endif
- ! Create version of effectivePressure field with limits applied
- do iCell = 1, nCells
- effectivePressureLimited(iCell) = max(0.0_RKIND, effectivePressure(iCell)) ! Never pass a negative N
- effectivePressureLimited(iCell) = min(config_effective_pressure_max, effectivePressureLimited(iCell))
- enddo
! ==================================================================
! External dycore calls to be made only when vertex mask changes