Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cime_config/config_grids.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,14 +386,14 @@
<mask>WCAtl12to45E2r4</mask>
</model_grid>

<model_grid alias="T62_SOwISC12to60E2r4" compset="(DATM|XATM|SATM)">
<model_grid alias="T62_SOwISC12to60E3r3" compset="(DATM|XATM|SATM)">
<grid name="atm">T62</grid>
<grid name="lnd">T62</grid>
<grid name="ocnice">SOwISC12to60E2r4</grid>
<grid name="ocnice">SOwISC12to60E3r3</grid>
<grid name="rof">rx1</grid>
<grid name="glc">null</grid>
<grid name="wav">null</grid>
<mask>SOwISC12to60E2r4</mask>
<mask>SOwISC12to30E3r3</mask>
</model_grid>

<model_grid alias="T62_ECwISC30to60E2r1" compset="(DATM|XATM|SATM)">
Expand Down
2 changes: 1 addition & 1 deletion cime_config/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@
"inherit" : "e3sm_atm_hi_res",
"tests" : (
"SMS_Ld3.ne120pg2_r025_RRSwISC6to18E3r5.WCYCL1850NS.eam-cosplite",
"SMS.T62_SOwISC12to60E2r4.GMPAS-IAF",
"SMS.T62_SOwISC12to30E3r3.GMPAS-IAF",
)
},

Expand Down
8 changes: 8 additions & 0 deletions components/mpas-ocean/bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,13 @@ if ($OCN_ISMF eq 'coupled') {
add_default($nl, 'config_frazil_under_land_ice');
}

############################
# Namelist group: land_ice #
############################

add_default($nl, 'config_land_ice_draft_mode');
add_default($nl, 'config_land_ice_rho_ocean');

###################################
# Namelist group: land_ice_fluxes #
###################################
Expand Down Expand Up @@ -1866,6 +1873,7 @@ my @groups = qw(run_modes
self_attraction_loading
tidal_potential_forcing
frazil_ice
land_ice
land_ice_fluxes
advection
bottom_drag
Expand Down
1 change: 1 addition & 0 deletions components/mpas-ocean/bld/build-namelist-group-list
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ my @groups = qw(run_modes
self_attraction_loading
tidal_potential_forcing
frazil_ice
land_ice
land_ice_fluxes
advection
bottom_drag
Expand Down
7 changes: 7 additions & 0 deletions components/mpas-ocean/bld/build-namelist-section
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,13 @@ add_default($nl, 'config_frazil_sea_ice_reference_salinity');
add_default($nl, 'config_frazil_maximum_freezing_temperature');
add_default($nl, 'config_frazil_use_surface_pressure');

############################
# Namelist group: land_ice #
############################

add_default($nl, 'config_land_ice_draft_mode');
add_default($nl, 'config_land_ice_rho_ocean');

###################################
# Namelist group: land_ice_fluxes #
###################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,20 @@
<config_frazil_maximum_freezing_temperature>0.0</config_frazil_maximum_freezing_temperature>
<config_frazil_use_surface_pressure>.false.</config_frazil_use_surface_pressure>

<!-- land_ice -->
<config_land_ice_draft_mode>'pressure-dependent'</config_land_ice_draft_mode>
<config_land_ice_draft_mode ocn_grid="oQU240wLI">'data'</config_land_ice_draft_mode>
<config_land_ice_draft_mode ocn_grid="ECwISC30to60E1r2">'data'</config_land_ice_draft_mode>
<config_land_ice_draft_mode ocn_grid="SOwISC12to60E2r4">'data'</config_land_ice_draft_mode>
<config_land_ice_draft_mode ocn_grid="ECwISC30to60E2r1">'data'</config_land_ice_draft_mode>
<config_land_ice_draft_mode ocn_grid="IcoswISC30E3r5">'data'</config_land_ice_draft_mode>
<config_land_ice_draft_mode ocn_grid="FRISwISC08to60E3r1">'data'</config_land_ice_draft_mode>
<config_land_ice_draft_mode ocn_grid="FRISwISC04to60E3r1">'data'</config_land_ice_draft_mode>
<config_land_ice_draft_mode ocn_grid="FRISwISC02to60E3r1">'data'</config_land_ice_draft_mode>
<config_land_ice_draft_mode ocn_grid="FRISwISC01to60E3r1">'data'</config_land_ice_draft_mode>
<config_land_ice_draft_mode ocn_grid="RRSwISC6to18E3r5">'data'</config_land_ice_draft_mode>
<config_land_ice_rho_ocean>1028</config_land_ice_rho_ocean>

Comment thread
cbegeman marked this conversation as resolved.
<!-- land_ice_fluxes -->
<config_land_ice_flux_mode>'off'</config_land_ice_flux_mode>
<config_land_ice_flux_mode ocn_grid="oQU240wLI">'pressure_only'</config_land_ice_flux_mode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1644,6 +1644,25 @@ Default: Defined in namelist_defaults.xml
</entry>


<!-- land_ice -->

<entry id="config_land_ice_draft_mode" type="character"
category="land_ice" group="land_ice">
Selects the mode in which land-ice draft is computed.

Valid values= 'data,'pressure-dependent'
Default: Defined in namelist_defaults.xml
</entry>

<entry id="config_land_ice_rho_ocean" type="real"
category="land_ice" group="land_ice">
ocean density used to calculate landIceDraft at floatation (assumed constant and uniform). Should be consistent with MALI's config_ocean_density when used to determine grounding line location. This is an alternative to the coupler variable effectiveDensityInLandIce which is not currently used.

Valid values: Any positive real number
Default: Defined in namelist_defaults.xml
</entry>


<!-- land_ice_fluxes -->

<entry id="config_land_ice_flux_mode" type="char*1024"
Expand Down
14 changes: 14 additions & 0 deletions components/mpas-ocean/src/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,16 @@
possible_values=".true. or .false."
/>
</nml_record>
<nml_record name="land_ice" mode="init;forward">
<nml_option name="config_land_ice_draft_mode" type="character" default_value="pressure-dependent"
description="Selects the mode in which land-ice draft is computed."
possible_values="'data,'pressure-dependent'"
/>
<nml_option name="config_land_ice_rho_ocean" type="real" default_value="1028.0" units="kg m^-3"
description="ocean density used to calculate landIceDraft at floatation (assumed constant and uniform). Should be consistent with MALI's config_ocean_density when used to determine grounding line location. This is an alternative to the coupler variable effectiveDensityInLandIce which is not currently used."
possible_values="Any positive real number"
/>
</nml_record>
<nml_record name="land_ice_fluxes" mode="init;forward">
<nml_option name="config_land_ice_flux_mode" type="character" default_value="off"
description="Selects the mode in which land-ice fluxes are computed."
Expand Down Expand Up @@ -3457,6 +3467,10 @@
packages="topographicWaveDragPKG"
/>
<!-- diagnostic fields for land-ice fluxes -->
<var name="landIceDraftForSsh" type="real" dimensions="nCells Time" units="m"
description="The elevation of the interface between land ice and the ocean that is used to correct the SSH gradient passed to MPAS-SeaIce and may be used for wetting-and-drying."
packages="landIcePressurePKG"
/>
<var name="landIceFrictionVelocity" type="real" dimensions="nCells Time" units="m s^-1"
description="The friction velocity $u_*$ under land ice"
packages="landIceFluxesPKG"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -212,7 +212,7 @@ 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)
! landIceDraftForSsh is present in diagnostics variables
call mpas_pool_get_array(meshPool, 'latCell', latCell)
call mpas_pool_get_array(meshPool, 'lonCell', lonCell)

Expand Down Expand Up @@ -284,11 +284,11 @@ subroutine ocn_compute_mixed_layer_depths(domain, timeLevel, err)!{{{
!$omp end do
!$omp end parallel

if (associated(landIceDraft) ) then
if (associated(landIceDraftForSsh) ) then
Comment thread
cbegeman marked this conversation as resolved.
!$omp parallel
!$omp do schedule(runtime)
do iCell = 1, nCells
tThreshMLD(iCell) = tThreshMLD(iCell) - abs(landIceDraft(iCell))
tThreshMLD(iCell) = tThreshMLD(iCell) - abs(landIceDraftForSsh(iCell))
end do
!$omp end do
!$omp end parallel
Expand Down Expand Up @@ -350,11 +350,11 @@ subroutine ocn_compute_mixed_layer_depths(domain, timeLevel, err)!{{{
!$omp end parallel

!normalize MLD to top of ice cavity
if (associated(landIceDraft) ) then
if (associated(landIceDraftForSsh) ) then
Comment thread
cbegeman marked this conversation as resolved.
!$omp parallel
!$omp do schedule(runtime)
do iCell = 1, nCells
tGradientMLD(iCell) = tGradientMLD(iCell) - abs(landIceDraft(iCell))
tGradientMLD(iCell) = tGradientMLD(iCell) - abs(landIceDraftForSsh(iCell))
end do
!$omp end do
!$omp end parallel
Expand Down Expand Up @@ -415,11 +415,11 @@ subroutine ocn_compute_mixed_layer_depths(domain, timeLevel, err)!{{{
!$omp end do
!$omp end parallel

if (associated(landIceDraft) ) then
if (associated(landIceDraftForSsh) ) then
Comment thread
cbegeman marked this conversation as resolved.
!$omp parallel
!$omp do schedule(runtime)
do iCell = 1, nCells
dGradientMLD(iCell) = dGradientMLD(iCell) - abs(landIceDraft(iCell))
dGradientMLD(iCell) = dGradientMLD(iCell) - abs(landIceDraftForSsh(iCell))
end do
!$omp end do
!$omp end parallel
Expand Down
4 changes: 2 additions & 2 deletions components/mpas-ocean/src/shared/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
30 changes: 30 additions & 0 deletions components/mpas-ocean/src/shared/mpas_ocn_config.F
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading