diff --git a/components/mpas-albany-landice/bld/build-namelist b/components/mpas-albany-landice/bld/build-namelist
index 249fa0351400..626907e47d05 100755
--- a/components/mpas-albany-landice/bld/build-namelist
+++ b/components/mpas-albany-landice/bld/build-namelist
@@ -59,6 +59,7 @@ OPTIONS
-ocn_glc_ismf_coupling methods for ocn/glc ice-shelf melt flux coupling
['none' | 'data_mpaso' | 'data_mali' | 'internal_mpaso' |
'tf' | 'coupler']
+ -glc_two_way_coupling whether GLC is coupled to LND: FALSE, TRUE
NOTE: The precedence for setting the values of namelist variables is (highest to lowest):
1. namelist values set by specific command-line options, i.e. (none right now)
@@ -106,6 +107,7 @@ my %opts = ( help => 0,
mali_prognostic_mode => undef,
glc_nzoc => 0,
ocn_glc_ismf_coupling => undef,
+ glc_two_way_coupling => undef,
);
GetOptions(
@@ -127,6 +129,7 @@ GetOptions(
"mali_prognostic_mode=s" => \$opts{'mali_prognostic_mode'},
"glc_nzoc=i" => \$opts{'glc_nzoc'},
"ocn_glc_ismf_coupling=s" => \$opts{'ocn_glc_ismf_coupling'},
+ "glc_two_way_coupling=s" => \$opts{'glc_two_way_coupling'},
) or usage();
@@ -164,6 +167,7 @@ my $NTASKS_GLC = $opts{'ntasks_glc'};
my $MALI_PROGNOSTIC_MODE = uc($opts{'mali_prognostic_mode'});
my $GLC_NZOC = $opts{'glc_nzoc'};
my $OCN_GLC_ISMF_COUPLING = $opts{'ocn_glc_ismf_coupling'};
+my $GLC_TWO_WAY_COUPLING = $opts{'glc_two_way_coupling'};
my $CIMEROOT;
if ( defined $opts{'cimeroot'} ) {
@@ -425,6 +429,7 @@ print "MALI build-namelist: MALI_PROGNOSTIC_MODE is $MALI_PROGNOSTIC_MODE \n";
print "MALI build-namelist: MALI_USE_ALBANY is $MALI_USE_ALBANY \n";
print "MALI build-namelist: GLC_NZOC is $GLC_NZOC \n";
print "MALI build-namelist: OCN_GLC_ISMF_COUPLING is $OCN_GLC_ISMF_COUPLING \n";
+print "MALI build-namelist: GLC_TWO_WAY_COUPLING is $GLC_TWO_WAY_COUPLING \n";
(-d $DIN_LOC_ROOT) or mkdir $DIN_LOC_ROOT;
if ($print>=2) { print "CESM inputdata root directory: $DIN_LOC_ROOT$eol"; }
@@ -469,6 +474,11 @@ if ($MALI_PROGNOSTIC_MODE eq 'PROGNOSTIC') {
add_default($nl, 'config_horiz_tracer_adv_order');
add_default($nl, 'config_advection_coef_3rd_order');
add_default($nl, 'config_restore_thickness_after_advection');
+if ($GLC_TWO_WAY_COUPLING eq 'True') {
+ add_default($nl, 'config_smb_source');
+} else {
+ add_default($nl, 'config_smb_source', 'val'=>"file");
+}
add_default($nl, 'config_zero_sfcMassBalApplied_over_bare_land');
##############################
diff --git a/components/mpas-albany-landice/bld/build-namelist-section b/components/mpas-albany-landice/bld/build-namelist-section
index 2af1ffa2987b..e1ac6db4cafc 100644
--- a/components/mpas-albany-landice/bld/build-namelist-section
+++ b/components/mpas-albany-landice/bld/build-namelist-section
@@ -25,6 +25,7 @@ add_default($nl, 'config_tracer_advection');
add_default($nl, 'config_horiz_tracer_adv_order');
add_default($nl, 'config_advection_coef_3rd_order');
add_default($nl, 'config_restore_thickness_after_advection');
+add_default($nl, 'config_smb_source');
add_default($nl, 'config_zero_sfcMassBalApplied_over_bare_land');
##############################
diff --git a/components/mpas-albany-landice/bld/namelist_files/namelist_defaults_mali.xml b/components/mpas-albany-landice/bld/namelist_files/namelist_defaults_mali.xml
index bc816bb07597..202d3deb720a 100644
--- a/components/mpas-albany-landice/bld/namelist_files/namelist_defaults_mali.xml
+++ b/components/mpas-albany-landice/bld/namelist_files/namelist_defaults_mali.xml
@@ -22,6 +22,7 @@
3
0.25
.false.
+'coupler'
.true.
diff --git a/components/mpas-albany-landice/bld/namelist_files/namelist_definition_mali.xml b/components/mpas-albany-landice/bld/namelist_files/namelist_definition_mali.xml
index 11b8f81b082a..da5e3dca8b61 100644
--- a/components/mpas-albany-landice/bld/namelist_files/namelist_definition_mali.xml
+++ b/components/mpas-albany-landice/bld/namelist_files/namelist_definition_mali.xml
@@ -175,6 +175,14 @@ Valid values: .true. or .false.
Default: Defined in namelist_defaults.xml
+
+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.
+
+Valid values: 'file' or 'coupler'
+Default: Defined in namelist_defaults.xml
+
+
Mask to zero out sfcMassBalApplied in regions where there is no ice at the timestep.
diff --git a/components/mpas-albany-landice/cime_config/buildnml b/components/mpas-albany-landice/cime_config/buildnml
index 9cf26ba743f0..6a0983225e8d 100755
--- a/components/mpas-albany-landice/cime_config/buildnml
+++ b/components/mpas-albany-landice/cime_config/buildnml
@@ -43,6 +43,7 @@ def buildnml(case, caseroot, compname):
mali_prognostic_mode = case.get_value("MALI_PROGNOSTIC_MODE")
glc_nzoc = case.get_value("GLC_NZOC")
ocn_glc_ismf_coupling = case.get_value("OCN_GLC_ISMF_COUPLING")
+ glc_two_way_coupling = case.get_value("GLC_TWO_WAY_COUPLING")
stream_name = 'streams.landice'
albany_input_name = 'albany_input.yaml'
@@ -71,13 +72,13 @@ def buildnml(case, caseroot, compname):
decomp_date += '150910'
decomp_prefix += 'mpasli.graph.info.'
elif glc_grid == 'mpas.ais8to30km':
- grid_date += '20250411'
+ grid_date += '20250625'
grid_prefix += 'ais_8to30km'
datamode_date += '20250121'
decomp_date += '240507'
decomp_prefix += 'mpasli.graph.info.'
elif glc_grid == 'mpas.ais4to20km':
- grid_date += '20250411'
+ grid_date += '20250625'
grid_prefix += 'ais_4to20km'
decomp_date += '240507'
decomp_prefix += 'mpasli.graph.info.'
@@ -180,6 +181,7 @@ def buildnml(case, caseroot, compname):
sysmod += " -mali_prognostic_mode '{}'".format(mali_prognostic_mode)
sysmod += " -glc_nzoc '{}'".format(glc_nzoc)
sysmod += " -ocn_glc_ismf_coupling '{}'".format(ocn_glc_ismf_coupling)
+ sysmod += " -glc_two_way_coupling '{}'".format(glc_two_way_coupling)
run_cmd_no_fail(sysmod, from_dir=maliconf_dir)
@@ -240,53 +242,31 @@ def buildnml(case, caseroot, compname):
lines.append(' filename_interval="0001-00-00_00:00:00"')
lines.append(' clobber_mode="truncate"')
lines.append(' output_interval="0000-00-01_00:00:00">')
- # Note: if output_interval is less than dt, then multiples of that interval will be checked.
- # There is some performance hit for making this too small. For now making it 1 day.
lines.append('')
lines.append(' ')
lines.append(' ')
- lines.append(' ')
- lines.append(' ')
lines.append(' ')
- lines.append(' ')
lines.append(' ')
- lines.append(' ')
lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
lines.append(' ')
- lines.append(' ')
- lines.append(' ')
lines.append(' ')
- lines.append(' ')
lines.append(' ')
- lines.append(' ')
lines.append(' ')
- lines.append(' ')
- lines.append(' ')
+ lines.append(' ')
lines.append(' ')
- lines.append(' ')
lines.append(' ')
+ lines.append(' ')
lines.append(' ')
lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
+ lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
- lines.append(' ')
lines.append(' ')
lines.append(' ')
- lines.append(' ')
lines.append('')
lines.append('')
lines.append('')
diff --git a/components/mpas-albany-landice/driver/glc_comp_mct.F b/components/mpas-albany-landice/driver/glc_comp_mct.F
index b26e79712a44..adb15801bc41 100644
--- a/components/mpas-albany-landice/driver/glc_comp_mct.F
+++ b/components/mpas-albany-landice/driver/glc_comp_mct.F
@@ -1409,11 +1409,13 @@ subroutine glc_import_mct(x2g_g, errorCode)
real (kind=RKIND), dimension(:,:), pointer :: ismip6shelfMelt_3dThermalForcing
integer, dimension(:,:), pointer :: orig3dOceanMask
real(kind=RKIND), pointer :: config_invalid_value_TF
+ character(len=StrKIND), pointer :: config_smb_source
real(kind=RKIND) :: fractionalMaskVal
errorCode = 0
call mpas_pool_get_config(domain % configs, 'config_invalid_value_TF', config_invalid_value_TF)
+ call mpas_pool_get_config(domain % configs, 'config_smb_source', config_smb_source)
n = 0
block => domain % blocklist
@@ -1443,7 +1445,14 @@ subroutine glc_import_mct(x2g_g, errorCode)
endif
do i = 1, nCellsSolve
n = n + 1
- sfcMassBal(i) = x2g_g % rAttr(index_x2g_Flgl_qice, n)
+ if (trim(config_smb_source) == 'coupler') then
+ sfcMassBal(i) = x2g_g % rAttr(index_x2g_Flgl_qice, n)
+ elseif (trim(config_smb_source) == 'file') then
+ ! do nothing, use data read-in from file
+ else
+ call mpas_log_write("Unknown value for 'config_smb_source'", MPAS_LOG_ERR)
+ errorCode = ior(errorCode, 1)
+ endif
floatingBasalMassBal(i) = x2g_g % rAttr(index_x2g_Fogx_qiceli, n)
if (nISMIP6OceanLayers > 0) then
do iLev = 1, nISMIP6OceanLayers
diff --git a/components/mpas-albany-landice/src/Registry.xml b/components/mpas-albany-landice/src/Registry.xml
index 4f007db8a01b..68c60c511678 100644
--- a/components/mpas-albany-landice/src/Registry.xml
+++ b/components/mpas-albany-landice/src/Registry.xml
@@ -128,6 +128,10 @@
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."
possible_values=".true. or .false."
/>
+