Skip to content

Commit f50d263

Browse files
committed
Merge branch 'irenavankova/ocn/add-subglacial-runoff' (PR #6508)
Add subglacial discharge at grounding line This introduces subglacial discharge (at the moment a fixed file interpolated from MALI output) at the grounding line as a freshwater volume flux at local freezing point. It follows closely what river runoff does. [NML] [BFB]
2 parents ec9da4b + 624d9ac commit f50d263

26 files changed

+1315
-55
lines changed

cime_config/tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@
274274
"ERS_P480_Ld5.TL319_IcoswISC30E3r5.GMPAS-JRA1p5-DIB-PISMF.mpaso-jra_1958",
275275
"PEM_P480_Ld5.TL319_IcoswISC30E3r5.GMPAS-JRA1p5-DIB-PISMF.mpaso-jra_1958",
276276
"SMS_P480_Ld5.TL319_IcoswISC30E3r5.GMPAS-JRA1p5-DIB-PISMF-TMIX.mpaso-jra_1958",
277+
"SMS_P480_Ld5.TL319_IcoswISC30E3r5.GMPAS-JRA1p5-DIB-PISMF-DSGR.mpaso-jra_1958",
277278
)
278279
},
279280

components/mpas-ocean/bld/build-namelist

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ OPTIONS
5454
-ocn_ismf variable for defining how the ocn model will handle ice shelf melt
5555
fluxes
5656
Options are: none, data, internal, coupled
57+
-ocn_sgr variable for defining how the ocn model will handle subglacial
58+
runoff
59+
Options are: none, data
5760
-decomp_prefix decomp_prefix variable
5861
-date_stamp date_stamp variable
5962
-cfg_grid Directory containing MPASO configuration scripts.
@@ -111,6 +114,7 @@ my %opts = ( help => 0,
111114
ocn_forcing => undef,
112115
ocn_iceberg => undef,
113116
ocn_ismf => undef,
117+
ocn_sgr => undef,
114118
decomp_prefix => undef,
115119
date_stamp => undef,
116120
ocn_bgc => undef,
@@ -137,6 +141,7 @@ GetOptions(
137141
"ocn_forcing=s" => \$opts{'ocn_forcing'},
138142
"ocn_iceberg=s" => \$opts{'ocn_iceberg'},
139143
"ocn_ismf=s" => \$opts{'ocn_ismf'},
144+
"ocn_sgr=s" => \$opts{'ocn_sgr'},
140145
"decomp_prefix=s" => \$opts{'decomp_prefix'},
141146
"date_stamp=s" => \$opts{'date_stamp'},
142147
"ocn_bgc=s" => \$opts{'ocn_bgc'},
@@ -180,6 +185,7 @@ my $OCN_GRID = $opts{'ocn_grid'};
180185
my $OCN_FORCING = $opts{'ocn_forcing'};
181186
my $OCN_ICEBERG = $opts{'ocn_iceberg'};
182187
my $OCN_ISMF = $opts{'ocn_ismf'};
188+
my $OCN_SGR = $opts{'ocn_sgr'};
183189
my $decomp_prefix = $opts{'decomp_prefix'};
184190
my $date_stamp = $opts{'date_stamp'};
185191
my $ocn_bgc = $opts{'ocn_bgc'};
@@ -702,6 +708,18 @@ add_default($nl, 'config_use_bulk_wind_stress');
702708
add_default($nl, 'config_use_bulk_thickness_flux');
703709
add_default($nl, 'config_flux_attenuation_coefficient');
704710
add_default($nl, 'config_flux_attenuation_coefficient_runoff');
711+
if ($OCN_SGR eq 'data') {
712+
add_default($nl, 'config_subglacial_runoff_mode', 'val'=>"data");
713+
} else {
714+
add_default($nl, 'config_subglacial_runoff_mode');
715+
}
716+
add_default($nl, 'config_flux_attenuation_coefficient_subglacial_runoff');
717+
add_default($nl, 'config_sgr_flux_vertical_location');
718+
add_default($nl, 'config_use_sgr_opt_kpp');
719+
add_default($nl, 'config_use_sgr_opt_temp_prescribed');
720+
add_default($nl, 'config_use_sgr_opt_salt_prescribed');
721+
add_default($nl, 'config_sgr_temperature_prescribed');
722+
add_default($nl, 'config_sgr_salinity_prescribed');
705723

706724
############################
707725
# Namelist group: coupling #

components/mpas-ocean/bld/build-namelist-section

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,14 @@ add_default($nl, 'config_use_bulk_wind_stress');
224224
add_default($nl, 'config_use_bulk_thickness_flux');
225225
add_default($nl, 'config_flux_attenuation_coefficient');
226226
add_default($nl, 'config_flux_attenuation_coefficient_runoff');
227+
add_default($nl, 'config_subglacial_runoff_mode');
228+
add_default($nl, 'config_flux_attenuation_coefficient_subglacial_runoff');
229+
add_default($nl, 'config_sgr_flux_vertical_location');
230+
add_default($nl, 'config_use_sgr_opt_kpp');
231+
add_default($nl, 'config_use_sgr_opt_temp_prescribed');
232+
add_default($nl, 'config_use_sgr_opt_salt_prescribed');
233+
add_default($nl, 'config_sgr_temperature_prescribed');
234+
add_default($nl, 'config_sgr_salinity_prescribed');
227235

228236
############################
229237
# Namelist group: coupling #

components/mpas-ocean/bld/namelist_files/namelist_defaults_mpaso.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,14 @@
342342
<config_use_bulk_thickness_flux>.true.</config_use_bulk_thickness_flux>
343343
<config_flux_attenuation_coefficient>0.001</config_flux_attenuation_coefficient>
344344
<config_flux_attenuation_coefficient_runoff>10.0</config_flux_attenuation_coefficient_runoff>
345+
<config_subglacial_runoff_mode>'off'</config_subglacial_runoff_mode>
346+
<config_flux_attenuation_coefficient_subglacial_runoff>0.001</config_flux_attenuation_coefficient_subglacial_runoff>
347+
<config_sgr_flux_vertical_location>'bottom'</config_sgr_flux_vertical_location>
348+
<config_use_sgr_opt_kpp>.true.</config_use_sgr_opt_kpp>
349+
<config_use_sgr_opt_temp_prescribed>.false.</config_use_sgr_opt_temp_prescribed>
350+
<config_use_sgr_opt_salt_prescribed>.false.</config_use_sgr_opt_salt_prescribed>
351+
<config_sgr_temperature_prescribed>0.0</config_sgr_temperature_prescribed>
352+
<config_sgr_salinity_prescribed>0.0</config_sgr_salinity_prescribed>
345353

346354
<!-- coupling -->
347355
<config_remove_ais_river_runoff>.false.</config_remove_ais_river_runoff>

components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,70 @@ Valid values: Any positive real number.
11881188
Default: Defined in namelist_defaults.xml
11891189
</entry>
11901190

1191+
<entry id="config_subglacial_runoff_mode" type="char*1024"
1192+
category="forcing" group="forcing">
1193+
Selects the mode in which subglacial runoff fluxes are implemented.
1194+
1195+
Valid values: 'off', 'data'
1196+
Default: Defined in namelist_defaults.xml
1197+
</entry>
1198+
1199+
<entry id="config_flux_attenuation_coefficient_subglacial_runoff" type="real"
1200+
category="forcing" group="forcing">
1201+
The length scale of exponential decay of subglacial runoff, used when config_sgr_flux_vertical_location is 'top' or 'bottom'. Fluxes are multiplied by $e^{z/\gamma}$, where this coefficient is $\gamma$.
1202+
1203+
Valid values: Any positive real number.
1204+
Default: Defined in namelist_defaults.xml
1205+
</entry>
1206+
1207+
<entry id="config_sgr_flux_vertical_location" type="char*1024"
1208+
category="forcing" group="forcing">
1209+
Selects the vertical location where subglacial runoff is fluxed.
1210+
1211+
Valid values: 'top','uniform', 'bottom'
1212+
Default: Defined in namelist_defaults.xml
1213+
</entry>
1214+
1215+
<entry id="config_use_sgr_opt_kpp" type="logical"
1216+
category="forcing" group="forcing">
1217+
If true, include subglacial runoff (sgr) contribution in kpp calculation.
1218+
1219+
Valid values: .true. or .false.
1220+
Default: Defined in namelist_defaults.xml
1221+
</entry>
1222+
1223+
<entry id="config_use_sgr_opt_temp_prescribed" type="logical"
1224+
category="forcing" group="forcing">
1225+
If true, subglacial runoff temperature is set to config_sgr_temperature_prescribed. If false, the temperature is set to local freezing point.
1226+
1227+
Valid values: .true. or .false.
1228+
Default: Defined in namelist_defaults.xml
1229+
</entry>
1230+
1231+
<entry id="config_use_sgr_opt_salt_prescribed" type="logical"
1232+
category="forcing" group="forcing">
1233+
If true, subglacial runoff salinity is set to config_sgr_salinity_prescribed. If false, the salinity is set to 0 PSU.
1234+
1235+
Valid values: .true. or .false.
1236+
Default: Defined in namelist_defaults.xml
1237+
</entry>
1238+
1239+
<entry id="config_sgr_temperature_prescribed" type="real"
1240+
category="forcing" group="forcing">
1241+
Prescribed subglacial runoff temperature value, applied when config_use_sgr_opt_temp_prescribed = .true.
1242+
1243+
Valid values: Any real number.
1244+
Default: Defined in namelist_defaults.xml
1245+
</entry>
1246+
1247+
<entry id="config_sgr_salinity_prescribed" type="real"
1248+
category="forcing" group="forcing">
1249+
Prescribed subglacial runoff salinity value, applied when config_use_sgr_opt_salt_prescribed = .true.
1250+
1251+
Valid values: Any positive real number
1252+
Default: Defined in namelist_defaults.xml
1253+
</entry>
1254+
11911255

11921256
<!-- coupling -->
11931257

components/mpas-ocean/cime_config/buildnml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def buildnml(case, caseroot, compname):
3535
ocn_forcing = case.get_value("MPASO_FORCING")
3636
ocn_iceberg = case.get_value("MPASO_ICEBERG")
3737
ocn_ismf = case.get_value("MPASO_ISMF")
38+
ocn_sgr = case.get_value("MPASO_SGR")
3839
ocn_bgc = case.get_value("MPASO_BGC")
3940
ocn_wave = case.get_value("MPASO_WAVE")
4041
ocn_tidal_mixing = case.get_value("MPASO_TIDAL_MIXING")
@@ -76,6 +77,7 @@ def buildnml(case, caseroot, compname):
7677
analysis_mask_file = ''
7778
eco_forcing_file = ''
7879
u_tidal_rms_file = ''
80+
data_sgr_file = ''
7981

8082
if ocn_grid == 'oEC60to30v3':
8183
decomp_date = '230424'
@@ -140,6 +142,8 @@ def buildnml(case, caseroot, compname):
140142
data_ismf_file = 'prescribed_ismf_paolo2023.oQU240wLI.20240404.nc'
141143
if ocn_tidal_mixing == 'true':
142144
u_tidal_rms_file = 'velocityTidalRMS_CATS2008.oQU240wLI.20240221.nc'
145+
if ocn_sgr == 'data':
146+
data_sgr_file = 'DSGR.massFlux.MALI.out2055.oQU240wLI.20240328.nc'
143147

144148
elif ocn_grid == 'oQU120':
145149
decomp_date = '230424'
@@ -277,6 +281,8 @@ def buildnml(case, caseroot, compname):
277281
data_ismf_file = 'prescribed_ismf_adusumilli2020.SOwISC12to60E2r4.230516.nc'
278282
if ocn_tidal_mixing == 'true':
279283
u_tidal_rms_file = 'velocityTidalRMS_CATS2008.SOwISC12to60E2r4.20210114.nc'
284+
if ocn_sgr == 'data':
285+
data_sgr_file = 'DSGR.massFlux.MALI.out2055.SOwISC12to60E2r4.20240328.nc'
280286

281287
elif ocn_grid == 'FRISwISC08to60E3r1':
282288
decomp_date = '20230913' # changed to date of partiotions in ../files_for_e3sm/assembled_files/inputdata/ocn/mpas-o/FRISwISC08to60E3r1/partitions
@@ -352,6 +358,8 @@ def buildnml(case, caseroot, compname):
352358
data_ismf_file = 'prescribed_ismf_adusumilli2020.ECwISC30to60E2r1.230429.nc'
353359
if ocn_tidal_mixing == 'true':
354360
u_tidal_rms_file = 'velocityTidalRMS_CATS2008.ECwISC30to60E2r1.20240221.nc'
361+
if ocn_sgr == 'data':
362+
data_sgr_file = 'DSGR.massFlux.MALI.out2055.ECwISC30to60E2r1.20240328.nc'
355363

356364
elif ocn_grid == 'IcoswISC30E3r5':
357365
decomp_date = '20231120'
@@ -371,6 +379,8 @@ def buildnml(case, caseroot, compname):
371379
data_ismf_file = 'prescribed_ismf_paolo2023.IcoswISC30E3r5.20240227.nc'
372380
if ocn_tidal_mixing == 'true':
373381
u_tidal_rms_file = 'velocityTidalRMS_CATS2008.IcoswISC30E3r5.20231120.nc'
382+
if ocn_sgr == 'data':
383+
data_sgr_file = 'DSGR.massFlux.MALI.out2055.IcoswISC30E3r5.20240328.nc'
374384

375385
elif ocn_grid == 'IcosXISC30E3r7':
376386
decomp_date = '20240314'
@@ -396,7 +406,6 @@ def buildnml(case, caseroot, compname):
396406
if ocn_ismf == 'data':
397407
data_ismf_file = 'prescribed_ismf_paolo2023.RRSwISC6to18E3r5.20240327.nc'
398408

399-
400409
#--------------------------------------------------------------------
401410
# Set OCN_FORCING = datm_forced_restoring if restoring file is available
402411
#--------------------------------------------------------------------
@@ -436,6 +445,9 @@ def buildnml(case, caseroot, compname):
436445
if u_tidal_rms_file != '':
437446
input_list.write("u_tidal_rms = {}/ocn/mpas-o/{}/{}\n".format(din_loc_root, ocn_mask, u_tidal_rms_file))
438447

448+
if data_sgr_file != '':
449+
input_list.write("subglacial_runoff = {}/ocn/mpas-o/{}/{}\n".format(din_loc_root, ocn_mask, data_sgr_file))
450+
439451
#--------------------------------------------------------------------
440452
# Invoke mpas build-namelist - output will go in $CASEBUILD/mpasoconf
441453
#--------------------------------------------------------------------
@@ -495,6 +507,7 @@ def buildnml(case, caseroot, compname):
495507
sysmod += " -ocn_forcing '{}'".format(ocn_forcing)
496508
sysmod += " -ocn_iceberg '{}'".format(ocn_iceberg)
497509
sysmod += " -ocn_ismf '{}'".format(ocn_ismf)
510+
sysmod += " -ocn_sgr '{}'".format(ocn_sgr)
498511
sysmod += " -ocn_bgc '{}'".format(ocn_bgc)
499512
sysmod += " -ocn_wave '{}'".format(ocn_wave)
500513
sysmod += " -ocn_tidal_mixing '{}'".format(ocn_tidal_mixing)
@@ -702,6 +715,19 @@ def buildnml(case, caseroot, compname):
702715
lines.append('</stream>')
703716
lines.append('')
704717

718+
if data_sgr_file != '':
719+
lines.append('<stream name="prescribed_subglacial_runoff"')
720+
lines.append(' type="input"')
721+
lines.append(' io_type="{}"'.format(ocn_pio_typename))
722+
lines.append(
723+
' filename_template="{}/ocn/mpas-o/{}/{}"'.format(din_loc_root, ocn_mask, data_sgr_file))
724+
lines.append(' input_interval="initial_only" ')
725+
lines.append(' packages="landIceFluxesPKG">')
726+
lines.append('')
727+
lines.append(' <var name="subglacialRunoffFlux"/>')
728+
lines.append('</stream>')
729+
lines.append('')
730+
705731
if analysis_mask_file != '':
706732
lines.append('<stream name="transectMasksInput"')
707733
lines.append(' type="input"')
@@ -1169,12 +1195,14 @@ def buildnml(case, caseroot, compname):
11691195
lines.append('<var name="accumulatedEvapTemperatureFlux"/>')
11701196
lines.append('<var name="accumulatedSeaIceTemperatureFlux"/>')
11711197
lines.append('<var name="accumulatedRiverRunoffTemperatureFlux"/>')
1198+
lines.append('<var name="accumulatedSubglacialRunoffTemperatureFlux"/>')
11721199
lines.append('<var name="accumulatedIcebergTemperatureFlux"/>')
11731200
lines.append('<var name="accumulatedRainFlux"/>')
11741201
lines.append('<var name="accumulatedSnowFlux"/>')
11751202
lines.append('<var name="accumulatedEvaporationFlux"/>')
11761203
lines.append('<var name="accumulatedSeaIceFlux"/>')
11771204
lines.append('<var name="accumulatedRiverRunoffFlux"/>')
1205+
lines.append('<var name="accumulatedSubglacialRunoffFlux"/>')
11781206
lines.append('<var name="accumulatedIceRunoffFlux"/>')
11791207
lines.append('<var name="accumulatedRemovedRiverRunoffFlux"/>')
11801208
lines.append('<var name="accumulatedRemovedIceRunoffFlux"/>')
@@ -1183,6 +1211,7 @@ def buildnml(case, caseroot, compname):
11831211
lines.append('<var name="accumulatedLandIceFlux"/>')
11841212
lines.append('<var name="accumulatedLandIceFrazilFlux"/>')
11851213
lines.append('<var name="accumulatedSeaIceSalinityFlux"/>')
1214+
lines.append('<var name="accumulatedSubglacialRunoffSalinityFlux"/>')
11861215
lines.append('<var name="initialCarbon"/>')
11871216
lines.append('<var name="finalCarbon"/>')
11881217
lines.append('<var name="carbonChange"/>')
@@ -1331,6 +1360,7 @@ def buildnml(case, caseroot, compname):
13311360
lines.append(' <var name="seaIceSalinityFlux"/>')
13321361
lines.append(' <var name="seaIceFreshWaterFlux"/>')
13331362
lines.append(' <var name="riverRunoffFlux"/>')
1363+
lines.append(' <var name="subglacialRunoffFlux"/>')
13341364
lines.append(' <var name="iceRunoffFlux"/>')
13351365
lines.append(' <var name="rainFlux"/>')
13361366
lines.append(' <var name="snowFlux"/>')
@@ -1533,6 +1563,7 @@ def buildnml(case, caseroot, compname):
15331563
lines.append(' <var name="icebergFreshWaterFlux"/>')
15341564

15351565
lines.append(' <var name="riverRunoffFlux"/>')
1566+
lines.append(' <var name="subglacialRunoffFlux"/>')
15361567
lines.append(' <var name="iceRunoffFlux"/>')
15371568
lines.append(' <var name="rainFlux"/>')
15381569
lines.append(' <var name="snowFlux"/>')
@@ -1598,6 +1629,7 @@ def buildnml(case, caseroot, compname):
15981629
lines.append(' <var name="icebergFreshWaterFlux"/>')
15991630

16001631
lines.append(' <var name="riverRunoffFlux"/>')
1632+
lines.append(' <var name="subglacialRunoffFlux"/>')
16011633
lines.append(' <var name="iceRunoffFlux"/>')
16021634
lines.append(' <var name="rainFlux"/>')
16031635
lines.append(' <var name="snowFlux"/>')
@@ -1812,6 +1844,7 @@ def buildnml(case, caseroot, compname):
18121844
lines.append(' <var name="seaIceSalinityFlux"/>')
18131845
lines.append(' <var name="seaIceFreshWaterFlux"/>')
18141846
lines.append(' <var name="riverRunoffFlux"/>')
1847+
lines.append(' <var name="subglacialRunoffFlux"/>')
18151848
lines.append(' <var name="iceRunoffFlux"/>')
18161849
lines.append(' <var name="rainFlux"/>')
18171850
lines.append(' <var name="snowFlux"/>')

components/mpas-ocean/cime_config/config_component.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@
3939
<desc>Option to describe the MPASO prescribed tidal mixing</desc>
4040
</entry>
4141

42+
<entry id="MPASO_SGR">
43+
<type>char</type>
44+
<valid_values>none,data</valid_values>
45+
<default_value>none</default_value>
46+
<values>
47+
<value compset="MPASO_">none</value>
48+
<value compset="_MPASO%.*DSGR">data</value>
49+
</values>
50+
<group>case_comp</group>
51+
<file>env_case.xml</file>
52+
<desc>Option to describe how MPASO will handle subglacial runoff fluxes</desc>
53+
</entry>
54+
4255
<entry id="MPASO_ICEBERG">
4356
<type>char</type>
4457
<valid_values>false,true</valid_values>

components/mpas-ocean/cime_config/config_compsets.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
<lname>2000_DATM%NYF_SLND_MPASSI_MPASO%PISMFDATMFORCED_DROF%NYFAIS45_SGLC_SWAV</lname>
3838
</compset>
3939

40+
<compset>
41+
<alias>GMPAS-NYF-PISMF-DSGR</alias>
42+
<lname>2000_DATM%NYF_SLND_MPASSI_MPASO%PISMFDATMFORCEDDSGR_DROF%NYFAIS45_SGLC_SWAV</lname>
43+
</compset>
44+
4045
<compset>
4146
<alias>GMPAS-NYF-DISMF</alias>
4247
<lname>2000_DATM%NYF_SLND_MPASSI_MPASO%DISMFDATMFORCED_DROF%NYFAIS45_SGLC_SWAV</lname>
@@ -87,6 +92,16 @@
8792
<lname>2000_DATM%JRA-1p5_SLND_MPASSI%DIB_MPASO%IBPISMFDATMFORCED_DROF%JRA-1p5-AIS0ROF_SGLC_SWAV</lname>
8893
</compset>
8994

95+
<compset>
96+
<alias>GMPAS-JRA1p5-DIB-PISMF-DSGR</alias>
97+
<lname>2000_DATM%JRA-1p5_SLND_MPASSI%DIB_MPASO%IBPISMFDATMFORCEDDSGR_DROF%JRA-1p5-AIS0ROF_SGLC_SWAV</lname>
98+
</compset>
99+
100+
<compset>
101+
<alias>GMPAS-JRA1p5-DIB-PISMF-DSGR-TMIX</alias>
102+
<lname>2000_DATM%JRA-1p5_SLND_MPASSI%DIB_MPASO%IBPISMFDATMFORCEDDSGRTMIX_DROF%JRA-1p5-AIS0ROF_SGLC_SWAV</lname>
103+
</compset>
104+
90105
<compset>
91106
<alias>GMPAS-JRA1p5-DIB-DISMF</alias>
92107
<lname>2000_DATM%JRA-1p5_SLND_MPASSI%DIB_MPASO%IBDISMFDATMFORCED_DROF%JRA-1p5-AIS0ROF_SGLC_SWAV</lname>

0 commit comments

Comments
 (0)