Skip to content

Commit fa2a3e4

Browse files
committed
Merge branch 'matthewhoffman/mali/smb-data-option' (PR #7463)
Adjust MALI SMB in G-cases and update hist fields This branch updates a number of details about MALI coupling in preparation of production runs: * When ELM is not active (e.g. G-cases), MALI will now use a data SMB from the MALI initial file * The data volume of MALI history files is vastly reduced [NML] only for configurations with MALI [non-BFB] only for configurations with MALI
2 parents 995e756 + ab3b0bb commit fa2a3e4

File tree

7 files changed

+41
-28
lines changed

7 files changed

+41
-28
lines changed

components/mpas-albany-landice/bld/build-namelist

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ OPTIONS
5959
-ocn_glc_ismf_coupling methods for ocn/glc ice-shelf melt flux coupling
6060
['none' | 'data_mpaso' | 'data_mali' | 'internal_mpaso' |
6161
'tf' | 'coupler']
62+
-glc_two_way_coupling whether GLC is coupled to LND: FALSE, TRUE
6263
6364
NOTE: The precedence for setting the values of namelist variables is (highest to lowest):
6465
1. namelist values set by specific command-line options, i.e. (none right now)
@@ -106,6 +107,7 @@ my %opts = ( help => 0,
106107
mali_prognostic_mode => undef,
107108
glc_nzoc => 0,
108109
ocn_glc_ismf_coupling => undef,
110+
glc_two_way_coupling => undef,
109111
);
110112

111113
GetOptions(
@@ -127,6 +129,7 @@ GetOptions(
127129
"mali_prognostic_mode=s" => \$opts{'mali_prognostic_mode'},
128130
"glc_nzoc=i" => \$opts{'glc_nzoc'},
129131
"ocn_glc_ismf_coupling=s" => \$opts{'ocn_glc_ismf_coupling'},
132+
"glc_two_way_coupling=s" => \$opts{'glc_two_way_coupling'},
130133

131134
) or usage();
132135

@@ -164,6 +167,7 @@ my $NTASKS_GLC = $opts{'ntasks_glc'};
164167
my $MALI_PROGNOSTIC_MODE = uc($opts{'mali_prognostic_mode'});
165168
my $GLC_NZOC = $opts{'glc_nzoc'};
166169
my $OCN_GLC_ISMF_COUPLING = $opts{'ocn_glc_ismf_coupling'};
170+
my $GLC_TWO_WAY_COUPLING = $opts{'glc_two_way_coupling'};
167171

168172
my $CIMEROOT;
169173
if ( defined $opts{'cimeroot'} ) {
@@ -425,6 +429,7 @@ print "MALI build-namelist: MALI_PROGNOSTIC_MODE is $MALI_PROGNOSTIC_MODE \n";
425429
print "MALI build-namelist: MALI_USE_ALBANY is $MALI_USE_ALBANY \n";
426430
print "MALI build-namelist: GLC_NZOC is $GLC_NZOC \n";
427431
print "MALI build-namelist: OCN_GLC_ISMF_COUPLING is $OCN_GLC_ISMF_COUPLING \n";
432+
print "MALI build-namelist: GLC_TWO_WAY_COUPLING is $GLC_TWO_WAY_COUPLING \n";
428433

429434
(-d $DIN_LOC_ROOT) or mkdir $DIN_LOC_ROOT;
430435
if ($print>=2) { print "CESM inputdata root directory: $DIN_LOC_ROOT$eol"; }
@@ -469,6 +474,11 @@ if ($MALI_PROGNOSTIC_MODE eq 'PROGNOSTIC') {
469474
add_default($nl, 'config_horiz_tracer_adv_order');
470475
add_default($nl, 'config_advection_coef_3rd_order');
471476
add_default($nl, 'config_restore_thickness_after_advection');
477+
if ($GLC_TWO_WAY_COUPLING eq 'True') {
478+
add_default($nl, 'config_smb_source');
479+
} else {
480+
add_default($nl, 'config_smb_source', 'val'=>"file");
481+
}
472482
add_default($nl, 'config_zero_sfcMassBalApplied_over_bare_land');
473483

474484
##############################

components/mpas-albany-landice/bld/build-namelist-section

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ add_default($nl, 'config_tracer_advection');
2525
add_default($nl, 'config_horiz_tracer_adv_order');
2626
add_default($nl, 'config_advection_coef_3rd_order');
2727
add_default($nl, 'config_restore_thickness_after_advection');
28+
add_default($nl, 'config_smb_source');
2829
add_default($nl, 'config_zero_sfcMassBalApplied_over_bare_land');
2930

3031
##############################

components/mpas-albany-landice/bld/namelist_files/namelist_defaults_mali.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<config_horiz_tracer_adv_order>3</config_horiz_tracer_adv_order>
2323
<config_advection_coef_3rd_order>0.25</config_advection_coef_3rd_order>
2424
<config_restore_thickness_after_advection>.false.</config_restore_thickness_after_advection>
25+
<config_smb_source>'coupler'</config_smb_source>
2526
<config_zero_sfcMassBalApplied_over_bare_land>.true.</config_zero_sfcMassBalApplied_over_bare_land>
2627

2728
<!-- solidearth -->

components/mpas-albany-landice/bld/namelist_files/namelist_definition_mali.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,14 @@ Valid values: .true. or .false.
175175
Default: Defined in namelist_defaults.xml
176176
</entry>
177177

178+
<entry id="config_smb_source" type="char*1024"
179+
category="advection" group="advection">
180+
Source of surface mass balance used by sfcMassBal variable. 'file' uses whatever value has been read into the sfcMassBal field from an input or forcing file. 'coupler' uses a value passed from the E3SM coupler. The option 'coupler' behaves the same as 'file' when MALI is run in standalone mode.
181+
182+
Valid values: 'file' or 'coupler'
183+
Default: Defined in namelist_defaults.xml
184+
</entry>
185+
178186
<entry id="config_zero_sfcMassBalApplied_over_bare_land" type="logical"
179187
category="advection" group="advection">
180188
Mask to zero out sfcMassBalApplied in regions where there is no ice at the timestep.

components/mpas-albany-landice/cime_config/buildnml

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def buildnml(case, caseroot, compname):
4343
mali_prognostic_mode = case.get_value("MALI_PROGNOSTIC_MODE")
4444
glc_nzoc = case.get_value("GLC_NZOC")
4545
ocn_glc_ismf_coupling = case.get_value("OCN_GLC_ISMF_COUPLING")
46+
glc_two_way_coupling = case.get_value("GLC_TWO_WAY_COUPLING")
4647
stream_name = 'streams.landice'
4748
albany_input_name = 'albany_input.yaml'
4849

@@ -71,13 +72,13 @@ def buildnml(case, caseroot, compname):
7172
decomp_date += '150910'
7273
decomp_prefix += 'mpasli.graph.info.'
7374
elif glc_grid == 'mpas.ais8to30km':
74-
grid_date += '20250411'
75+
grid_date += '20250625'
7576
grid_prefix += 'ais_8to30km'
7677
datamode_date += '20250121'
7778
decomp_date += '240507'
7879
decomp_prefix += 'mpasli.graph.info.'
7980
elif glc_grid == 'mpas.ais4to20km':
80-
grid_date += '20250411'
81+
grid_date += '20250625'
8182
grid_prefix += 'ais_4to20km'
8283
decomp_date += '240507'
8384
decomp_prefix += 'mpasli.graph.info.'
@@ -180,6 +181,7 @@ def buildnml(case, caseroot, compname):
180181
sysmod += " -mali_prognostic_mode '{}'".format(mali_prognostic_mode)
181182
sysmod += " -glc_nzoc '{}'".format(glc_nzoc)
182183
sysmod += " -ocn_glc_ismf_coupling '{}'".format(ocn_glc_ismf_coupling)
184+
sysmod += " -glc_two_way_coupling '{}'".format(glc_two_way_coupling)
183185

184186
run_cmd_no_fail(sysmod, from_dir=maliconf_dir)
185187

@@ -240,53 +242,31 @@ def buildnml(case, caseroot, compname):
240242
lines.append(' filename_interval="0001-00-00_00:00:00"')
241243
lines.append(' clobber_mode="truncate"')
242244
lines.append(' output_interval="0000-00-01_00:00:00">')
243-
# Note: if output_interval is less than dt, then multiples of that interval will be checked.
244-
# There is some performance hit for making this too small. For now making it 1 day.
245245
lines.append('')
246246
lines.append(' <stream name="basicmesh"/>')
247247
lines.append(' <var name="xtime"/>')
248-
lines.append(' <var name="layerCenterSigma"/>')
249-
lines.append(' <var name="layerInterfaceSigma"/>')
250248
lines.append(' <var name="thickness"/>')
251-
lines.append(' <var name="bedTopography"/>')
252249
lines.append(' <var name="lowerSurface"/>')
253-
lines.append(' <var name="upperSurface"/>')
254250
lines.append(' <var name="cellMask"/>')
255-
lines.append(' <var name="edgeMask"/>')
256-
lines.append(' <var name="uReconstructX"/>')
257-
lines.append(' <var name="uReconstructY"/>')
258251
lines.append(' <var name="surfaceSpeed"/>')
259-
lines.append(' <var name="basalSpeed"/>')
260-
lines.append(' <var name="sfcMassBal"/>')
261252
lines.append(' <var name="sfcMassBalApplied"/>')
262-
lines.append(' <var name="basalMassBalApplied"/>')
263253
lines.append(' <var name="bareIceAblationApplied"/>')
264-
lines.append(' <var name="avgBareIceAblation"/>')
265254
lines.append(' <var name="avgBareIceAblationApplied"/>')
266-
lines.append(' <var name="floatingBasalMassBal"/>')
267-
lines.append(' <var name="floatingBasalMassBalApplied"/>')
255+
lines.append(' <var name="avgFloatingBMBFlux"/>')
268256
lines.append(' <var name="groundedBasalMassBalApplied"/>')
269-
lines.append(' <var name="calvingThickness"/>')
270257
lines.append(' <var name="avgCalvingFlux"/>')
258+
lines.append(' <var name="avgFaceMeltFlux"/>')
271259
lines.append(' <var name="restoreThickness"/>')
272260
lines.append(' <var name="dHdt"/>')
273-
lines.append(' <var name="ismip6_2dThermalForcing"/>')
274-
lines.append(' <var name="ismip6shelfMelt_3dThermalForcing"/>')
275-
lines.append(' <var name="orig3dOceanMask"/>')
276261
lines.append(' <var name="ismip6shelfMelt_TFdraft"/>')
277-
lines.append(' <var name="ismip6shelfMelt_zOcean"/>')
278-
lines.append(' <var name="ismip6shelfMelt_zBndsOcean"/>')
279-
lines.append(' <var name="faceMeltSpeed"/>')
280-
lines.append(' <var name="faceMeltingThickness"/>')
262+
lines.append(' <var name="ismip6_2dThermalForcing"/>')
281263
lines.append(' <var name="deltat"/>')
282264
lines.append(' <var name="daysSinceStart"/>')
283265
lines.append(' <var name="simulationStartTime"/>')
284266
lines.append(' <var name="allowableDtACFL"/>')
285267
lines.append(' <var name="allowableDtDCFL"/>')
286-
lines.append(' <var name="temperature"/>')
287268
lines.append(' <var name="basalTemperature"/>')
288269
lines.append(' <var name="surfaceTemperature"/>')
289-
lines.append(' <var name="surfaceAirTemperature"/>')
290270
lines.append('')
291271
lines.append('</stream>')
292272
lines.append('')

components/mpas-albany-landice/driver/glc_comp_mct.F

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,11 +1409,13 @@ subroutine glc_import_mct(x2g_g, errorCode)
14091409
real (kind=RKIND), dimension(:,:), pointer :: ismip6shelfMelt_3dThermalForcing
14101410
integer, dimension(:,:), pointer :: orig3dOceanMask
14111411
real(kind=RKIND), pointer :: config_invalid_value_TF
1412+
character(len=StrKIND), pointer :: config_smb_source
14121413
real(kind=RKIND) :: fractionalMaskVal
14131414

14141415
errorCode = 0
14151416

14161417
call mpas_pool_get_config(domain % configs, 'config_invalid_value_TF', config_invalid_value_TF)
1418+
call mpas_pool_get_config(domain % configs, 'config_smb_source', config_smb_source)
14171419

14181420
n = 0
14191421
block => domain % blocklist
@@ -1443,7 +1445,14 @@ subroutine glc_import_mct(x2g_g, errorCode)
14431445
endif
14441446
do i = 1, nCellsSolve
14451447
n = n + 1
1446-
sfcMassBal(i) = x2g_g % rAttr(index_x2g_Flgl_qice, n)
1448+
if (trim(config_smb_source) == 'coupler') then
1449+
sfcMassBal(i) = x2g_g % rAttr(index_x2g_Flgl_qice, n)
1450+
elseif (trim(config_smb_source) == 'file') then
1451+
! do nothing, use data read-in from file
1452+
else
1453+
call mpas_log_write("Unknown value for 'config_smb_source'", MPAS_LOG_ERR)
1454+
errorCode = ior(errorCode, 1)
1455+
endif
14471456
floatingBasalMassBal(i) = x2g_g % rAttr(index_x2g_Fogx_qiceli, n)
14481457
if (nISMIP6OceanLayers > 0) then
14491458
do iLev = 1, nISMIP6OceanLayers

components/mpas-albany-landice/src/Registry.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@
128128
description="If true, reset thickness to values at previous timestep after advection occurs. This is used for spinning up tracer fields such as damage. When this is true, geometry changes from surface and basal mass balance (grounded or floating) and facemelting are not retained, but changes from calving are."
129129
possible_values=".true. or .false."
130130
/>
131+
<nml_option name="config_smb_source" type="character" default_value="file" units="unitless"
132+
description="Source of surface mass balance used by sfcMassBal variable. 'file' uses whatever value has been read into the sfcMassBal field from an input or forcing file. 'coupler' uses a value passed from the E3SM coupler. The option 'coupler' behaves the same as 'file' when MALI is run in standalone mode."
133+
possible_values="'file' or 'coupler'"
134+
/>
131135
<nml_option name="config_zero_sfcMassBalApplied_over_bare_land" type="logical" default_value=".true." units="unitless"
132136
description="Mask to zero out sfcMassBalApplied in regions where there is no ice at the timestep."
133137
possible_values=".true. or .false."

0 commit comments

Comments
 (0)