diff --git a/components/mpas-ocean/src/Registry.xml b/components/mpas-ocean/src/Registry.xml
index f7ff1ea8293d..f6700fce0327 100644
--- a/components/mpas-ocean/src/Registry.xml
+++ b/components/mpas-ocean/src/Registry.xml
@@ -1078,6 +1078,10 @@
description="The density of land ice."
possible_values="Any positive real number"
/>
+
-
@@ -1943,7 +1946,6 @@
-
@@ -2043,7 +2045,6 @@
-
@@ -2197,7 +2198,6 @@
-
@@ -3457,6 +3457,10 @@
packages="topographicWaveDragPKG"
/>
+
-
-
diff --git a/components/mpas-ocean/src/analysis_members/mpas_ocn_mixed_layer_depths.F b/components/mpas-ocean/src/analysis_members/mpas_ocn_mixed_layer_depths.F
index 41f2d7d6d0a4..ab9b678628d6 100644
--- a/components/mpas-ocean/src/analysis_members/mpas_ocn_mixed_layer_depths.F
+++ b/components/mpas-ocean/src/analysis_members/mpas_ocn_mixed_layer_depths.F
@@ -174,7 +174,7 @@ subroutine ocn_compute_mixed_layer_depths(domain, timeLevel, err)!{{{
! real (kind=RKIND), dimension(:), pointer :: areaCell
real (kind=RKIND), dimension(:,:), allocatable :: pressureAdjustedForLandIce
- real (kind=RKIND), dimension(:), pointer :: tThreshMLD, tGradientMLD, landIceDraft
+ real (kind=RKIND), dimension(:), pointer :: tThreshMLD, tGradientMLD
real (kind=RKIND), dimension(:), pointer :: dGradientMLD, landIcePressure
real (kind=RKIND), dimension(:,:,:), pointer :: tracers
integer :: interp_local
@@ -212,7 +212,6 @@ subroutine ocn_compute_mixed_layer_depths(domain, timeLevel, err)!{{{
call mpas_pool_get_array(tracersPool, 'activeTracers', tracers, timeLevel)
call mpas_pool_get_array(forcingPool, 'landIcePressure', landIcePressure)
- call mpas_pool_get_array(forcingPool, 'landIceDraft', landIceDraft)
call mpas_pool_get_array(meshPool, 'latCell', latCell)
call mpas_pool_get_array(meshPool, 'lonCell', lonCell)
diff --git a/components/mpas-ocean/src/mode_analysis/mpas_ocn_analysis_mode.F b/components/mpas-ocean/src/mode_analysis/mpas_ocn_analysis_mode.F
index 6154f416914f..64477c8e3e41 100644
--- a/components/mpas-ocean/src/mode_analysis/mpas_ocn_analysis_mode.F
+++ b/components/mpas-ocean/src/mode_analysis/mpas_ocn_analysis_mode.F
@@ -288,7 +288,7 @@ function ocn_analysis_mode_run(domain) result(ierr)!{{{
seaIcePressure, atmosphericPressure
real (kind=RKIND), dimension(:), pointer :: &
- frazilSurfacePressure, landIcePressure, landIceDraft
+ frazilSurfacePressure, landIcePressure
real (kind=RKIND), dimension(:), pointer :: &
layerThickness, normalVelocity
@@ -325,7 +325,6 @@ function ocn_analysis_mode_run(domain) result(ierr)!{{{
if (landIcePressureOn) then
call mpas_pool_get_array(forcingPool, 'landIcePressure', landIcePressure)
- call mpas_pool_get_array(forcingPool, 'landIceDraft', landIceDraft)
endif
call mpas_pool_get_array(statePool, 'layerThickness', layerThickness, 1)
diff --git a/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_rk4.F b/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_rk4.F
index 9c4cda353dff..225dff119c65 100644
--- a/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_rk4.F
+++ b/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_rk4.F
@@ -196,7 +196,7 @@ subroutine ocn_time_integrator_rk4(domain, dt)!{{{
seaIcePressure, atmosphericPressure
real (kind=RKIND), dimension(:), pointer :: &
- frazilSurfacePressure, landIcePressure, landIceDraft
+ frazilSurfacePressure, landIcePressure
real (kind=RKIND), dimension(:,:,:), pointer :: activeTracersCur, activeTracersNew
@@ -731,7 +731,6 @@ subroutine ocn_time_integrator_rk4(domain, dt)!{{{
if (landIcePressureOn) then
call mpas_pool_get_array(forcingPool, 'landIcePressure', landIcePressure)
- call mpas_pool_get_array(forcingPool, 'landIceDraft', landIceDraft)
endif
#ifdef MPAS_OPENACC
@@ -752,7 +751,6 @@ subroutine ocn_time_integrator_rk4(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc enter data copyin(landIcePressure)
- !$acc enter data copyin(landIceDraft)
endif
#endif
call ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, verticalMeshPool, scratchPool, tracersPool, 2)
@@ -790,7 +788,6 @@ subroutine ocn_time_integrator_rk4(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc exit data delete(landIcePressure)
- !$acc exit data delete(landIceDraft)
endif
!$acc exit data delete(layerThicknessNew, normalVelocityNew)
!$acc update host(density, potentialDensity, displacedDensity)
@@ -1193,7 +1190,7 @@ subroutine ocn_time_integrator_rk4_diagnostic_update(block, dt, rkSubstepWeight,
seaIcePressure, atmosphericPressure
real (kind=RKIND), dimension(:), pointer :: &
- frazilSurfacePressure, landIcePressure, landIceDraft
+ frazilSurfacePressure, landIcePressure
real (kind=RKIND), dimension(:), pointer :: sshCur
@@ -1331,7 +1328,6 @@ subroutine ocn_time_integrator_rk4_diagnostic_update(block, dt, rkSubstepWeight,
if (landIcePressureOn) then
call mpas_pool_get_array(forcingPool, 'landIcePressure', landIcePressure)
- call mpas_pool_get_array(forcingPool, 'landIceDraft', landIceDraft)
endif
#ifdef MPAS_OPENACC
@@ -1352,7 +1348,6 @@ subroutine ocn_time_integrator_rk4_diagnostic_update(block, dt, rkSubstepWeight,
endif
if (landIcePressureOn) then
!$acc enter data copyin(landIcePressure)
- !$acc enter data copyin(landIceDraft)
endif
#endif
call ocn_diagnostic_solve(dt, provisStatePool, forcingPool, meshPool, verticalMeshPool, scratchPool, tracersPool, 1)
@@ -1385,7 +1380,6 @@ subroutine ocn_time_integrator_rk4_diagnostic_update(block, dt, rkSubstepWeight,
endif
if (landIcePressureOn) then
!$acc exit data delete(landIcePressure)
- !$acc exit data delete(landIceDraft)
endif
!$acc exit data delete(layerThicknessCur, normalVelocityCur)
!$acc update host(density, potentialDensity, displacedDensity)
@@ -1581,7 +1575,7 @@ subroutine ocn_time_integrator_rk4_cleanup(domain, block, dt, err)!{{{
seaIcePressure, atmosphericPressure
real (kind=RKIND), dimension(:), pointer :: &
- frazilSurfacePressure, landIcePressure, landIceDraft
+ frazilSurfacePressure, landIcePressure
real (kind=RKIND), dimension(:), pointer :: sshNew
@@ -1616,7 +1610,6 @@ subroutine ocn_time_integrator_rk4_cleanup(domain, block, dt, err)!{{{
if (landIcePressureOn) then
call mpas_pool_get_array(forcingPool, 'landIcePressure', landIcePressure)
- call mpas_pool_get_array(forcingPool, 'landIceDraft', landIceDraft)
endif
call mpas_pool_begin_iteration(tracersPool)
@@ -1656,7 +1649,6 @@ subroutine ocn_time_integrator_rk4_cleanup(domain, block, dt, err)!{{{
endif
if (landIcePressureOn) then
!$acc enter data copyin(landIcePressure)
- !$acc enter data copyin(landIceDraft)
endif
#endif
call ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, verticalMeshPool, scratchPool, tracersPool, 2)
@@ -1691,7 +1683,6 @@ subroutine ocn_time_integrator_rk4_cleanup(domain, block, dt, err)!{{{
endif
if (landIcePressureOn) then
!$acc exit data delete(landIcePressure)
- !$acc exit data delete(landIceDraft)
endif
!$acc exit data delete (layerThicknessNew, normalVelocityNew)
!$acc update host(density, potentialDensity, displacedDensity)
diff --git a/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_si.F b/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_si.F
index 77bf1331d3d1..f00a669b77bc 100644
--- a/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_si.F
+++ b/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_si.F
@@ -376,7 +376,7 @@ subroutine ocn_time_integrator_si(domain, dt)!{{{
seaIcePressure, atmosphericPressure
real (kind=RKIND), dimension(:), pointer :: &
- frazilSurfacePressure, landIcePressure, landIceDraft
+ frazilSurfacePressure, landIcePressure
real (kind=RKIND), dimension(:,:,:), pointer :: activeTracersNew
@@ -703,7 +703,6 @@ subroutine ocn_time_integrator_si(domain, dt)!{{{
if (landIcePressureOn) then
call mpas_pool_get_array(forcingPool, 'landIcePressure', landIcePressure)
- call mpas_pool_get_array(forcingPool, 'landIceDraft', landIceDraft)
endif
#ifdef MPAS_OPENACC
@@ -2203,7 +2202,6 @@ subroutine ocn_time_integrator_si(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc enter data copyin(landIcePressure)
- !$acc enter data copyin(landIceDraft)
endif
if (config_use_freq_filtered_thickness) then
!$acc enter data copyin(highFreqThicknessNew)
@@ -2773,7 +2771,6 @@ subroutine ocn_time_integrator_si(domain, dt)!{{{
!$acc update host(montgomeryPotential, pressure)
if (landIcePressureOn) then
!$acc exit data delete(landIcePressure)
- !$acc exit data delete(landIceDraft)
endif
if (config_use_freq_filtered_thickness) then
!$acc exit data copyout(highFreqThicknessNew)
@@ -2840,7 +2837,6 @@ subroutine ocn_time_integrator_si(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc enter data copyin(landIcePressure)
- !$acc enter data copyin(landIceDraft)
endif
#endif
call ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, verticalMeshPool, &
@@ -2889,7 +2885,6 @@ subroutine ocn_time_integrator_si(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc exit data delete(landIcePressure)
- !$acc exit data delete(landIceDraft)
endif
!$acc exit data delete(layerThicknessNew, normalVelocityNew)
#endif
@@ -2989,7 +2984,6 @@ subroutine ocn_time_integrator_si(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc enter data copyin(landIcePressure)
- !$acc enter data copyin(landIceDraft)
endif
#endif
@@ -3111,7 +3105,6 @@ subroutine ocn_time_integrator_si(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc exit data delete(landIcePressure)
- !$acc exit data delete(landIceDraft)
endif
!$acc exit data copyout(layerThicknessNew, normalVelocityNew)
!$acc update host(density, potentialDensity, displacedDensity)
diff --git a/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_split.F b/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_split.F
index 5c1069f4e3b4..5cd255a4336f 100644
--- a/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_split.F
+++ b/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_split.F
@@ -276,7 +276,7 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
seaIcePressure, atmosphericPressure
real (kind=RKIND), dimension(:), pointer :: &
- frazilSurfacePressure, landIcePressure, landIceDraft
+ frazilSurfacePressure, landIcePressure
real (kind=RKIND), dimension(:,:,:), pointer :: activeTracersNew
@@ -587,7 +587,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
if (landIcePressureOn) then
call mpas_pool_get_array(forcingPool, 'landIcePressure', landIcePressure)
- call mpas_pool_get_array(forcingPool, 'landIceDraft', landIceDraft)
endif
#ifdef MPAS_OPENACC
@@ -1841,7 +1840,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc enter data copyin(landIcePressure)
- !$acc enter data copyin(landIceDraft)
endif
if (config_use_freq_filtered_thickness) then
!$acc enter data copyin(highFreqThicknessNew)
@@ -2411,7 +2409,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
!$acc update host(montgomeryPotential, pressure)
if (landIcePressureOn) then
!$acc exit data delete(landIcePressure)
- !$acc exit data delete(landIceDraft)
endif
if (config_use_freq_filtered_thickness) then
!$acc exit data copyout(highFreqThicknessNew)
@@ -2471,7 +2468,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc enter data copyin(landIcePressure)
- !$acc enter data copyin(landIceDraft)
endif
#endif
call ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, verticalMeshPool, &
@@ -2519,7 +2515,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc exit data delete(landIcePressure)
- !$acc exit data delete(landIceDraft)
endif
!$acc exit data delete(layerThicknessNew, normalVelocityNew)
#endif
@@ -2619,7 +2614,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc enter data copyin(landIcePressure)
- !$acc enter data copyin(landIceDraft)
endif
#endif
if (config_prescribe_velocity) then
@@ -2764,7 +2758,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc exit data delete(landIcePressure)
- !$acc exit data delete(landIceDraft)
endif
!$acc exit data copyout(layerThicknessNew, normalVelocityNew)
!$acc update host(density, potentialDensity, displacedDensity)
diff --git a/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_split_ab2.F b/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_split_ab2.F
index 0693d00a72fd..b1624449f3e8 100644
--- a/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_split_ab2.F
+++ b/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_split_ab2.F
@@ -280,7 +280,7 @@ subroutine ocn_time_integrator_split_ab2(domain, dt)!{{{
seaIcePressure, atmosphericPressure
real (kind=RKIND), dimension(:), pointer :: &
- frazilSurfacePressure, landIcePressure, landIceDraft
+ frazilSurfacePressure, landIcePressure
real (kind=RKIND), dimension(:,:,:), pointer :: activeTracersNew
@@ -590,7 +590,6 @@ subroutine ocn_time_integrator_split_ab2(domain, dt)!{{{
if (landIcePressureOn) then
call mpas_pool_get_array(forcingPool, 'landIcePressure', landIcePressure)
- call mpas_pool_get_array(forcingPool, 'landIceDraft', landIceDraft)
endif
#ifdef MPAS_OPENACC
@@ -1824,7 +1823,6 @@ subroutine ocn_time_integrator_split_ab2(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc enter data copyin(landIcePressure)
- !$acc enter data copyin(landIceDraft)
endif
if (config_use_freq_filtered_thickness) then
!$acc enter data copyin(highFreqThicknessNew)
@@ -2584,7 +2582,6 @@ subroutine ocn_time_integrator_split_ab2(domain, dt)!{{{
!$acc update host(montgomeryPotential, pressure)
if (landIcePressureOn) then
!$acc exit data delete(landIcePressure)
- !$acc exit data delete(landIceDraft)
endif
if (config_use_freq_filtered_thickness) then
!$acc exit data copyout(highFreqThicknessNew)
@@ -2644,7 +2641,6 @@ subroutine ocn_time_integrator_split_ab2(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc enter data copyin(landIcePressure)
- !$acc enter data copyin(landIceDraft)
endif
#endif
call ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, verticalMeshPool, &
@@ -2692,7 +2688,6 @@ subroutine ocn_time_integrator_split_ab2(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc exit data delete(landIcePressure)
- !$acc exit data delete(landIceDraft)
endif
!$acc exit data delete(layerThicknessNew, normalVelocityNew)
#endif
@@ -2792,7 +2787,6 @@ subroutine ocn_time_integrator_split_ab2(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc enter data copyin(landIcePressure)
- !$acc enter data copyin(landIceDraft)
endif
#endif
if (config_prescribe_velocity) then
@@ -2912,7 +2906,6 @@ subroutine ocn_time_integrator_split_ab2(domain, dt)!{{{
endif
if (landIcePressureOn) then
!$acc exit data delete(landIcePressure)
- !$acc exit data delete(landIceDraft)
endif
!$acc exit data copyout(layerThicknessNew, normalVelocityNew)
!$acc update host(density, potentialDensity, displacedDensity)
diff --git a/components/mpas-ocean/src/mode_init/mpas_ocn_init_global_ocean.F b/components/mpas-ocean/src/mode_init/mpas_ocn_init_global_ocean.F
index ae6e1c5c0523..2b473badb813 100644
--- a/components/mpas-ocean/src/mode_init/mpas_ocn_init_global_ocean.F
+++ b/components/mpas-ocean/src/mode_init/mpas_ocn_init_global_ocean.F
@@ -958,13 +958,11 @@ subroutine ocn_init_setup_global_ocean_interpolate_land_ice_topography(domain, i
statePool
real (kind=RKIND), dimension(:), pointer :: latCell, lonCell
- real (kind=RKIND), dimension(:), pointer :: landIceDraftObserved, &
- landIcePressureObserved, &
+ real (kind=RKIND), dimension(:), pointer :: landIcePressureObserved, &
landIceFracObserved, &
landIceFloatingFracObserved
- real (kind=RKIND), dimension(:), pointer :: landIceDraft, &
- landIcePressure, &
+ real (kind=RKIND), dimension(:), pointer :: landIcePressure, &
landIceFraction, &
landIceFloatingFraction
@@ -972,15 +970,13 @@ subroutine ocn_init_setup_global_ocean_interpolate_land_ice_topography(domain, i
integer, dimension(:), pointer :: maxLevelCell, landIceMask, landIceFloatingMask
integer :: iCell
+ real(kind=RKIND) :: rho_floatation
iErr = 0
+ rho_floatation = config_land_ice_flux_rho_ocean
! Iteratively smooth land ice topography variables
if (config_global_ocean_topography_smooth_weight > 0) then
- call ocn_init_smooth_field(domain, 'landIceDraftObserved', 'landIceInit', &
- config_global_ocean_topography_smooth_iterations, &
- config_global_ocean_topography_smooth_weight)
-
call ocn_init_smooth_field(domain, 'landIcePressureObserved', 'landIceInit', &
config_global_ocean_topography_smooth_iterations, &
config_global_ocean_topography_smooth_weight)
@@ -1004,13 +1000,11 @@ subroutine ocn_init_setup_global_ocean_interpolate_land_ice_topography(domain, i
call mpas_pool_get_dimension(meshPool, 'nCells', nCells)
call mpas_pool_get_array(meshPool, 'maxLevelCell', maxLevelCell)
- call mpas_pool_get_array(landIceInitPool, 'landIceDraftObserved', landIceDraftObserved)
call mpas_pool_get_array(landIceInitPool, 'landIcePressureObserved', landIcePressureObserved)
call mpas_pool_get_array(landIceInitPool, 'landIceFracObserved', landIceFracObserved)
call mpas_pool_get_array(landIceInitPool, 'landIceFloatingFracObserved', landIceFloatingFracObserved)
call mpas_pool_get_array(forcingPool, 'landIceMask', landIceMask)
call mpas_pool_get_array(forcingPool, 'landIceFloatingMask', landIceFloatingMask)
- call mpas_pool_get_array(forcingPool, 'landIceDraft', landIceDraft)
call mpas_pool_get_array(forcingPool, 'landIcePressure', landIcePressure)
call mpas_pool_get_array(forcingPool, 'landIceFraction', landIceFraction)
call mpas_pool_get_array(forcingPool, 'landIceFloatingFraction', landIceFloatingFraction)
@@ -1033,11 +1027,11 @@ subroutine ocn_init_setup_global_ocean_interpolate_land_ice_topography(domain, i
landIceFraction(iCell) = landIceFracObserved(iCell)
landIceFloatingFraction(iCell) = landIceFloatingFracObserved(iCell)
- landIceDraft(iCell) = landIceDraftObserved(iCell)
landIcePressure(iCell) = landIcePressureObserved(iCell)
if (landIcePressure(iCell) > 0.0_RKIND) then
sshAdjustmentMask(iCell) = 1
end if
+ landIceDraft(iCell) = landIcePressure(iCell) / (rho_floatation * gravity)
end do
block_ptr => block_ptr % next
diff --git a/components/mpas-ocean/src/mode_init/mpas_ocn_init_ssh_and_landIcePressure.F b/components/mpas-ocean/src/mode_init/mpas_ocn_init_ssh_and_landIcePressure.F
index 09e1db7333f8..1a9b0c316c2b 100644
--- a/components/mpas-ocean/src/mode_init/mpas_ocn_init_ssh_and_landIcePressure.F
+++ b/components/mpas-ocean/src/mode_init/mpas_ocn_init_ssh_and_landIcePressure.F
@@ -96,7 +96,7 @@ subroutine ocn_init_ssh_and_landIcePressure_balance(domain, iErr)!{{{
real (kind=RKIND), dimension(:), pointer :: ssh
- real (kind=RKIND), dimension(:), pointer :: landIcePressure, landIceDraft, &
+ real (kind=RKIND), dimension(:), pointer :: landIcePressure, &
effectiveDensityInLandIce
integer, dimension(:), pointer :: minLevelCell
@@ -142,7 +142,6 @@ subroutine ocn_init_ssh_and_landIcePressure_balance(domain, iErr)!{{{
call mpas_pool_get_array(forcingPool, 'landIcePressure', landIcePressure)
- call mpas_pool_get_array(forcingPool, 'landIceDraft', landIceDraft)
call mpas_pool_get_array(statePool, 'ssh', ssh, 1)
call mpas_pool_get_array(statePool, 'effectiveDensityInLandIce', effectiveDensityInLandIce, 1)
diff --git a/components/mpas-ocean/src/shared/Makefile b/components/mpas-ocean/src/shared/Makefile
index 27c3db10fee1..92019f57efe8 100644
--- a/components/mpas-ocean/src/shared/Makefile
+++ b/components/mpas-ocean/src/shared/Makefile
@@ -85,7 +85,7 @@ mpas_ocn_init_routines.o: mpas_ocn_constants.o mpas_ocn_config.o mpas_ocn_mesh.o
mpas_ocn_tendency.o: mpas_ocn_high_freq_thickness_hmix_del2.o mpas_ocn_tracer_surface_restoring.o mpas_ocn_thick_surface_flux.o mpas_ocn_tracer_short_wave_absorption.o mpas_ocn_tracer_advection.o mpas_ocn_tracer_hmix.o mpas_ocn_tracer_nonlocalflux.o mpas_ocn_surface_bulk_forcing.o mpas_ocn_surface_land_ice_fluxes.o mpas_ocn_tracer_surface_flux_to_tend.o mpas_ocn_tracer_interior_restoring.o mpas_ocn_tracer_exponential_decay.o mpas_ocn_tracer_ideal_age.o mpas_ocn_tracer_TTD.o mpas_ocn_vmix.o mpas_ocn_constants.o mpas_ocn_config.o mpas_ocn_frazil_forcing.o mpas_ocn_tidal_forcing.o mpas_ocn_tracer_ecosys.o mpas_ocn_tracer_DMS.o mpas_ocn_tracer_MacroMolecules.o mpas_ocn_tracer_CFC.o mpas_ocn_diagnostics.o mpas_ocn_wetting_drying.o mpas_ocn_vel_self_attraction_loading.o mpas_ocn_vel_tidal_potential.o mpas_ocn_mesh.o mpas_ocn_diagnostics_variables.o mpas_ocn_thick_hadv.o mpas_ocn_thick_vadv.o mpas_ocn_vel_hadv_coriolis.o mpas_ocn_vel_pressure_grad.o mpas_ocn_vel_vadv.o mpas_ocn_vel_hmix.o mpas_ocn_vel_forcing.o mpas_ocn_manufactured_solution.o
-mpas_ocn_diagnostics.o: mpas_ocn_thick_ale.o mpas_ocn_equation_of_state.o mpas_ocn_gm.o mpas_ocn_constants.o mpas_ocn_config.o mpas_ocn_mesh.o mpas_ocn_diagnostics_variables.o mpas_ocn_surface_land_ice_fluxes.o mpas_ocn_vertical_advection.o mpas_ocn_submesoscale_eddies.o mpas_ocn_subgrid.o
+mpas_ocn_diagnostics.o: mpas_ocn_thick_ale.o mpas_ocn_equation_of_state.o mpas_ocn_gm.o mpas_ocn_constants.o mpas_ocn_config.o mpas_ocn_mesh.o mpas_ocn_diagnostics_variables.o mpas_ocn_surface_land_ice_fluxes.o mpas_ocn_vertical_advection.o mpas_ocn_submesoscale_eddies.o mpas_ocn_subgrid.o mpas_ocn_wetting_drying.o
mpas_ocn_diagnostics_variables.o: mpas_ocn_config.o
@@ -219,7 +219,7 @@ mpas_ocn_framework_forcing.o:
mpas_ocn_time_varying_forcing.o: mpas_ocn_framework_forcing.o mpas_ocn_diagnostics_variables.o mpas_ocn_constants.o mpas_ocn_config.o
-mpas_ocn_wetting_drying.o: mpas_ocn_diagnostics.o mpas_ocn_gm.o mpas_ocn_diagnostics_variables.o mpas_ocn_constants.o mpas_ocn_config.o mpas_ocn_gm.o mpas_ocn_mesh.o
+mpas_ocn_wetting_drying.o: mpas_ocn_gm.o mpas_ocn_diagnostics_variables.o mpas_ocn_constants.o mpas_ocn_config.o mpas_ocn_gm.o mpas_ocn_mesh.o mpas_ocn_vel_pressure_grad.o
mpas_ocn_tidal_potential_forcing.o: mpas_ocn_constants.o mpas_ocn_config.o mpas_ocn_mesh.o mpas_ocn_diagnostics_variables.o
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_config.F b/components/mpas-ocean/src/shared/mpas_ocn_config.F
index 04db8d666bd7..e4858a78afc8 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_config.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_config.F
@@ -47,6 +47,36 @@ subroutine ocn_config_init(configPool)!{{{
end subroutine ocn_config_init!}}}
+ function ocn_build_log_filename(prefix, identifier) result(filename)!{{{
+ character (len=*), intent(in) :: prefix
+ integer, intent(in) :: identifier
+
+ character (len=StrKIND) :: filename
+
+ character (len=StrKIND) :: identifierString
+
+ if ( identifier .lt. 10 ) then
+ write(identifierString, '(I1)') identifier
+ else if ( identifier .lt. 100 ) then
+ write(identifierString, '(I2)') identifier
+ else if ( identifier .lt. 1000 ) then
+ write(identifierString, '(I3)') identifier
+ else if ( identifier .lt. 10000 ) then
+ write(identifierString, '(I4)') identifier
+ else if ( identifier .lt. 100000 ) then
+ write(identifierString, '(I5)') identifier
+ else if ( identifier .lt. 1000000 ) then
+ write(identifierString, '(I6)') identifier
+ else if ( identifier .lt. 10000000 ) then
+ write(identifierString, '(I7)') identifier
+ else
+ write(identifierString, '(I99)') identifier
+ end if
+
+ filename = trim(prefix) // trim(identifierString)
+
+ end function ocn_build_log_filename!}}}
+
!***********************************************************************
end module ocn_config
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F b/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F
index 691bfe70b589..52c02c5d6bc3 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F
@@ -39,6 +39,7 @@ module ocn_diagnostics
use ocn_surface_land_ice_fluxes
use ocn_vertical_advection
use ocn_subgrid
+ use ocn_wetting_drying, only: ocn_wetting_drying_update_land_ice
implicit none
private
@@ -78,6 +79,7 @@ module ocn_diagnostics
integer :: ke_cell_flag, ke_vertex_flag
real (kind=RKIND) :: fCoef
real (kind=RKIND) :: landIceTopDragCoeff
+ real (kind=RKIND) :: rho_floatation
real (kind=RKIND), pointer :: coef_3rd_order
! Methods for computing thickness at edges for flux calculations
@@ -141,7 +143,7 @@ subroutine ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, verticalMe
logical :: full_compute = .true.
real (kind=RKIND), dimension(:), pointer :: &
- frazilSurfacePressure, landIcePressure, landIceDraft, landIceFraction
+ frazilSurfacePressure, landIcePressure, landIceFraction, landIceFloatingFraction
integer, dimension(:), pointer :: &
landIceFloatingMask
@@ -179,8 +181,8 @@ subroutine ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, verticalMe
if (landIcePressureOn) then
call mpas_pool_get_array(forcingPool, 'landIcePressure', landIcePressure)
- call mpas_pool_get_array(forcingPool, 'landIceDraft', landIceDraft)
call mpas_pool_get_array(forcingPool, 'landIceFloatingMask', landIceFloatingMask)
+ call mpas_pool_get_array(forcingPool, 'landIceFloatingFraction', landIceFloatingFraction)
call mpas_pool_get_array(forcingPool, 'landIceFraction', landIceFraction)
if (nCellsAll.gt.0 .AND. landIceFloatingMask(1) == -1) then
call mpas_log_write('landIceFloatingMask contains the default value which likely indicates that this field is missing in the initial condition file (e.g. because it is meant for an older E3SM version).', &
@@ -468,11 +470,14 @@ subroutine ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, verticalMe
!
! compute fields needed to compute land-ice fluxes, either in the ocean model or in the coupler
!
- ! inputs: layerThickness, normalVelocity, landIceFraction, landIceFloatingMask
+ ! inputs: layerThickness, normalVelocity, landIcePressure, landIceFraction, landIceFloatingMask
! outputs:
if (landIcePressureOn) then
call ocn_compute_land_ice_flux_input_fields(layerThickness, normalVelocity, activeTracers, &
- landIceFraction, landIceFloatingMask, timeLevel, indexTemperature, indexSalinity)
+ landIcePressure, landIceFraction, landIceFloatingMask, timeLevel, indexTemperature, indexSalinity)
+ end if
+ if (landIcePressureOn .and. config_use_wetting_drying) then
+ call ocn_wetting_drying_update_land_ice(landIceFloatingMask, landIceFloatingFraction, err)
end if
if ( full_compute ) then
@@ -3641,7 +3646,7 @@ end subroutine ocn_compute_mixing_input_fields!}}}
!-----------------------------------------------------------------------
subroutine ocn_compute_land_ice_flux_input_fields(layerThickness, normalVelocity, &
- activeTracers, landIceFraction, landIceFloatingMask, &
+ activeTracers, landIcePressure, landIceFraction, landIceFloatingMask, &
timeLevel, indexTval, indexSval)!{{{
!-----------------------------------------------------------------
@@ -3656,7 +3661,7 @@ subroutine ocn_compute_land_ice_flux_input_fields(layerThickness, normalVelocity
layerThickness, normalVelocity
real (kind=RKIND), dimension(:), intent(in) :: &
- landIceFraction
+ landIcePressure, landIceFraction
real (kind=RKIND), dimension(:,:,:), intent(in) :: &
activeTracers
@@ -3690,11 +3695,23 @@ subroutine ocn_compute_land_ice_flux_input_fields(layerThickness, normalVelocity
!-----------------------------------------------------------------
- if (( trim(config_land_ice_flux_mode) == "off" ) .or. &
- ( trim(config_land_ice_flux_mode) == "pressure_only")) then
- ! nothing to do here
- return
- end if
+ if ( trim(config_land_ice_flux_mode) == "off" ) return
+
+#ifdef MPAS_OPENACC
+ !$acc parallel loop present(landIceDraft, landIcePressure)
+#else
+ !$omp parallel
+ !$omp do schedule(runtime)
+#endif
+ do iCell = 1, nCellsAll
+ landIceDraft(iCell) = -landIcePressure(iCell) / (rho_floatation * gravity)
+ end do
+#ifndef MPAS_OPENACC
+ !$omp end do
+ !$omp end parallel
+#endif
+
+ if ( trim(config_land_ice_flux_mode) == "pressure_only") return
call mpas_timer_start("land_ice_diagnostic_fields", .false.)
@@ -4587,36 +4604,6 @@ subroutine ocn_validate_state(domain, timeLevel)!{{{
end subroutine ocn_validate_state!}}}
- function ocn_build_log_filename(prefix, identifier) result(filename)!{{{
- character (len=*), intent(in) :: prefix
- integer, intent(in) :: identifier
-
- character (len=StrKIND) :: filename
-
- character (len=StrKIND) :: identifierString
-
- if ( identifier .lt. 10 ) then
- write(identifierString, '(I1)') identifier
- else if ( identifier .lt. 100 ) then
- write(identifierString, '(I2)') identifier
- else if ( identifier .lt. 1000 ) then
- write(identifierString, '(I3)') identifier
- else if ( identifier .lt. 10000 ) then
- write(identifierString, '(I4)') identifier
- else if ( identifier .lt. 100000 ) then
- write(identifierString, '(I5)') identifier
- else if ( identifier .lt. 1000000 ) then
- write(identifierString, '(I6)') identifier
- else if ( identifier .lt. 10000000 ) then
- write(identifierString, '(I7)') identifier
- else
- write(identifierString, '(I99)') identifier
- end if
-
- filename = trim(prefix) // trim(identifierString)
-
- end function ocn_build_log_filename!}}}
-
subroutine ocn_write_field_statistics(unitNumber, fieldName, minValue, maxValue)
integer, intent(in) :: unitNumber
character (len=*), intent(in) :: fieldName
@@ -4697,6 +4684,8 @@ subroutine ocn_diagnostics_init(domain, err)!{{{
landIceTopDragCoeff = config_land_ice_flux_explicit_topDragCoeff
endif
+ rho_floatation = config_land_ice_flux_rho_ocean
+
if (trim(config_thickness_drag_type) == 'centered') then
thickEdgeDragChoice = thickEdgeDragCenter
elseif (trim(config_thickness_drag_type) == 'harmonic-mean') then
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_diagnostics_variables.F b/components/mpas-ocean/src/shared/mpas_ocn_diagnostics_variables.F
index 38f32f88e17c..128a73909a82 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_diagnostics_variables.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_diagnostics_variables.F
@@ -87,6 +87,7 @@ module ocn_diagnostics_variables
real (kind=RKIND), dimension(:), pointer :: surfaceFluxAttenuationCoefficientRunoff
real (kind=RKIND), dimension(:), pointer :: surfaceFluxAttenuationCoefficientSubglacialRunoff
+ real (kind=RKIND), dimension(:), pointer :: landIceDraft
real (kind=RKIND), dimension(:), pointer :: landIceFrictionVelocity
real (kind=RKIND), dimension(:), pointer :: velocityTidalRMS
@@ -355,6 +356,7 @@ subroutine ocn_diagnostics_variables_init(domain, jenkinsOn, hollandJenkinsOn, e
! Retrieve pointers for configurations where land_ice_flux_mode is enabled
if ( trim(config_land_ice_flux_mode) /= 'off' ) then
call mpas_pool_get_array(diagnosticsPool, 'topDrag', topDrag)
+ call mpas_pool_get_array(diagnosticsPool, 'landIceDraft', landIceDraft)
call mpas_pool_get_array(diagnosticsPool, 'topDragMagnitude', topDragMag)
call mpas_pool_get_dimension(diagnosticsPool, &
'index_landIceBoundaryLayerTemperature', indexBLTPtr)
@@ -751,6 +753,7 @@ subroutine ocn_diagnostics_variables_init(domain, jenkinsOn, hollandJenkinsOn, e
!$acc landIceBoundaryLayerTracers, &
!$acc landIceTracerTransferVelocities, &
!$acc landIceFrictionVelocity, &
+ !$acc landIceDraft, &
!$acc velocityTidalRMS)
end if
if (config_use_topographic_wave_drag) then
@@ -1010,6 +1013,7 @@ subroutine ocn_diagnostics_variables_destroy(err) !{{{
!$acc topDragMag, &
!$acc landIceBoundaryLayerTracers, &
!$acc landIceTracerTransferVelocities, &
+ !$acc landIceDraft, &
!$acc landIceFrictionVelocity, &
!$acc velocityTidalRMS)
end if
@@ -1239,6 +1243,7 @@ subroutine ocn_diagnostics_variables_destroy(err) !{{{
landIceBoundaryLayerTracers, &
landIceTracerTransferVelocities, &
landIceFrictionVelocity, &
+ landIceDraft, &
velocityTidalRMS)
end if
if ( trim(config_ocean_run_mode) == 'init' ) then
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_eddy_parameterization_helpers.F b/components/mpas-ocean/src/shared/mpas_ocn_eddy_parameterization_helpers.F
index 360fa2c7082d..61160c2dc08f 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_eddy_parameterization_helpers.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_eddy_parameterization_helpers.F
@@ -198,7 +198,7 @@ subroutine ocn_eddy_compute_mixed_layer_depth(statePool, forcingPool)
real(kind=RKIND) :: dDenThres, den_ref_lev
real(kind=RKIND),dimension(:), allocatable :: depth
real (kind=RKIND), dimension(:,:), pointer :: layerThickness
- real (kind=RKIND), dimension(:), pointer :: landIceDraft, landIcePressure
+ real (kind=RKIND), dimension(:), pointer :: landIcePressure
logical :: found_den_mld
real (kind=RKIND) :: dV, dVp1, refDepth, coeffs(2), mldTemp, dz
real (kind=RKIND), dimension(:,:), allocatable :: pressureAdjustedForLandIce
@@ -207,7 +207,6 @@ subroutine ocn_eddy_compute_mixed_layer_depth(statePool, forcingPool)
if ( config_eddyMLD_use_old ) then
call mpas_pool_get_array(forcingPool, 'landIcePressure', landIcePressure)
- call mpas_pool_get_array(forcingPool, 'landIceDraft', landIceDraft)
allocate(pressureAdjustedForLandIce(nVertLevels, size(pressure,2)))
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_time_varying_forcing.F b/components/mpas-ocean/src/shared/mpas_ocn_time_varying_forcing.F
index 2afa3064050f..8100239bbea9 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_time_varying_forcing.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_time_varying_forcing.F
@@ -32,6 +32,7 @@ module ocn_time_varying_forcing
ocn_time_varying_forcing_init, &
ocn_time_varying_forcing_get, &
ocn_time_varying_forcing_write_restart_times
+ real(kind=RKIND) :: rho_floatation
contains
@@ -70,6 +71,8 @@ subroutine ocn_time_varying_forcing_init(domain)!{{{
! call init_****_forcing(domain)
!endif
+ rho_floatation = config_land_ice_flux_rho_ocean
+
end subroutine ocn_time_varying_forcing_init!}}}
!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
@@ -469,10 +472,6 @@ subroutine init_land_ice_forcing(domain)!{{{
"landIceFloatingFraction", "land_ice_forcing", "timeVaryingForcing", "landIceFloatingFractionForcing", "linear", &
config_time_varying_land_ice_forcing_reference_time, config_time_varying_land_ice_forcing_interval)
- call mpas_forcing_init_field(domain % streamManager, forcingGroupHead, "ocn_land_ice_forcing", &
- "landIceDraft", "land_ice_forcing", "timeVaryingForcing", "landIceDraftForcing", "linear", &
- config_time_varying_land_ice_forcing_reference_time, config_time_varying_land_ice_forcing_interval)
-
call mpas_forcing_init_field_data(&
forcingGroupHead, & ! forcingGroupHead
"ocn_land_ice_forcing", & ! forcingGroupName
@@ -519,6 +518,7 @@ subroutine land_ice_forcing(streamManager, domain, simulationClock)!{{{
type (mpas_pool_type), pointer :: &
mesh, &
forcingPool, &
+ diagnosticsPool, &
timeVaryingForcingPool
real(kind=RKIND), dimension(:), pointer :: &
@@ -528,7 +528,6 @@ subroutine land_ice_forcing(streamManager, domain, simulationClock)!{{{
landIceFloatingFraction, &
landIcePressureForcing, &
landIcePressure, &
- landIceDraftForcing, &
landIceDraft
integer, pointer :: &
@@ -578,6 +577,7 @@ subroutine land_ice_forcing(streamManager, domain, simulationClock)!{{{
call MPAS_pool_get_subpool(block % structs, "mesh", mesh)
call MPAS_pool_get_subpool(block % structs, "forcing", forcingPool)
+ call MPAS_pool_get_subpool(block % structs, "diagnostics", diagnosticsPool)
call MPAS_pool_get_subpool(block % structs, "timeVaryingForcing", timeVaryingForcingPool)
call MPAS_pool_get_dimension(mesh, "nCells", nCells)
@@ -585,18 +585,18 @@ subroutine land_ice_forcing(streamManager, domain, simulationClock)!{{{
call MPAS_pool_get_array(timeVaryingForcingPool, "landIceFractionForcing", landIceFractionForcing)
call MPAS_pool_get_array(timeVaryingForcingPool, "landIceFloatingFractionForcing", landIceFloatingFractionForcing)
call MPAS_pool_get_array(timeVaryingForcingPool, "landIcePressureForcing", landIcePressureForcing)
- call MPAS_pool_get_array(timeVaryingForcingPool, "landIceDraftForcing", landIceDraftForcing)
call MPAS_pool_get_array(forcingPool, "landIceFraction", landIceFraction)
call MPAS_pool_get_array(forcingPool, "landIceFloatingFraction", landIceFloatingFraction)
call MPAS_pool_get_array(forcingPool, "landIcePressure", landIcePressure)
- call MPAS_pool_get_array(forcingPool, "landIceDraft", landIceDraft)
+ call MPAS_pool_get_array(diagnosticsPool, "landIceDraft", landIceDraft)
do iCell = 1, nCells
landIceFraction(iCell) = landIceFractionForcing(iCell)
landIceFloatingFraction(iCell) = landIceFloatingFractionForcing(iCell)
landIcePressure(iCell) = landIcePressureForcing(iCell)
- landIceDraft(iCell) = landIceDraftForcing(iCell)
+ ! TODO it may not be necessary to set this here
+ landIceDraft(iCell) = landIcePressure(iCell) / (rho_floatation * gravity)
enddo
block => block % next
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_wetting_drying.F b/components/mpas-ocean/src/shared/mpas_ocn_wetting_drying.F
index 16d052df0288..de5edddf185f 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_wetting_drying.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_wetting_drying.F
@@ -29,7 +29,6 @@ module ocn_wetting_drying
use ocn_constants
use ocn_config
- use ocn_diagnostics
use ocn_diagnostics_variables
use ocn_gm
use ocn_mesh
@@ -54,6 +53,7 @@ module ocn_wetting_drying
public :: ocn_wetting_drying_verify, ocn_prevent_drying_rk4
public :: ocn_wetting_velocity_factor_on_cell_edges
+ public :: ocn_wetting_drying_update_land_ice
!--------------------------------------------------------------------
!
@@ -637,6 +637,57 @@ subroutine ocn_wetting_velocity_factor_on_cell_edges(wettingVelocityFactor, laye
end subroutine ocn_wetting_velocity_factor_on_cell_edges!}}}
+ subroutine ocn_wetting_drying_update_land_ice(landIceFloatingMask, landIceFloatingFraction, err)
+
+ !-----------------------------------------------------------------
+ !
+ ! input/output variables
+ !
+ !-----------------------------------------------------------------
+
+ ! landIceDraft is supplied by diagnostic_variables
+
+ integer, dimension(:), intent(inout) :: &
+ landIceFloatingMask !< Input/Output: land ice floating mask
+
+ real (kind=RKIND), dimension(:), intent(inout) :: &
+ landIceFloatingFraction !< Input/Output: land ice floating fraction
+
+ !-----------------------------------------------------------------
+ !
+ ! output variables
+ !
+ !-----------------------------------------------------------------
+
+ integer, intent(out) :: err !< Output: error flag
+
+ !-----------------------------------------------------------------
+ !
+ ! local variables
+ !
+ !-----------------------------------------------------------------
+
+ integer :: iCell
+
+ err = 0
+
+ !$omp parallel
+ !$omp do schedule(runtime)
+ do iCell = 1, nCellsAll
+ if (landIceDraft(iCell) < -bottomDepth(iCell)) then
+ landIceFloatingMask(iCell) = 0
+ landIceFloatingFraction(iCell) = 0.0_RKIND
+ else
+ landIceFloatingMask(iCell) = 1
+ ! For a simulation with wetting and drying, we do not retain fractional floating areas
+ landIceFloatingFraction(iCell) = 1.0_RKIND
+ endif
+ enddo
+ !$omp end do
+ !$omp end parallel
+
+ end subroutine ocn_wetting_drying_update_land_ice
+
end module ocn_wetting_drying
!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||