Skip to content

Commit

Permalink
Merge branch 'irenavankova/ocn/add-subglacial-runoff' (PR #6508)
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
jonbob committed Aug 29, 2024
2 parents ec9da4b + 624d9ac commit f50d263
Show file tree
Hide file tree
Showing 26 changed files with 1,315 additions and 55 deletions.
1 change: 1 addition & 0 deletions cime_config/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@
"ERS_P480_Ld5.TL319_IcoswISC30E3r5.GMPAS-JRA1p5-DIB-PISMF.mpaso-jra_1958",
"PEM_P480_Ld5.TL319_IcoswISC30E3r5.GMPAS-JRA1p5-DIB-PISMF.mpaso-jra_1958",
"SMS_P480_Ld5.TL319_IcoswISC30E3r5.GMPAS-JRA1p5-DIB-PISMF-TMIX.mpaso-jra_1958",
"SMS_P480_Ld5.TL319_IcoswISC30E3r5.GMPAS-JRA1p5-DIB-PISMF-DSGR.mpaso-jra_1958",
)
},

Expand Down
18 changes: 18 additions & 0 deletions components/mpas-ocean/bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ OPTIONS
-ocn_ismf variable for defining how the ocn model will handle ice shelf melt
fluxes
Options are: none, data, internal, coupled
-ocn_sgr variable for defining how the ocn model will handle subglacial
runoff
Options are: none, data
-decomp_prefix decomp_prefix variable
-date_stamp date_stamp variable
-cfg_grid Directory containing MPASO configuration scripts.
Expand Down Expand Up @@ -111,6 +114,7 @@ my %opts = ( help => 0,
ocn_forcing => undef,
ocn_iceberg => undef,
ocn_ismf => undef,
ocn_sgr => undef,
decomp_prefix => undef,
date_stamp => undef,
ocn_bgc => undef,
Expand All @@ -137,6 +141,7 @@ GetOptions(
"ocn_forcing=s" => \$opts{'ocn_forcing'},
"ocn_iceberg=s" => \$opts{'ocn_iceberg'},
"ocn_ismf=s" => \$opts{'ocn_ismf'},
"ocn_sgr=s" => \$opts{'ocn_sgr'},
"decomp_prefix=s" => \$opts{'decomp_prefix'},
"date_stamp=s" => \$opts{'date_stamp'},
"ocn_bgc=s" => \$opts{'ocn_bgc'},
Expand Down Expand Up @@ -180,6 +185,7 @@ my $OCN_GRID = $opts{'ocn_grid'};
my $OCN_FORCING = $opts{'ocn_forcing'};
my $OCN_ICEBERG = $opts{'ocn_iceberg'};
my $OCN_ISMF = $opts{'ocn_ismf'};
my $OCN_SGR = $opts{'ocn_sgr'};
my $decomp_prefix = $opts{'decomp_prefix'};
my $date_stamp = $opts{'date_stamp'};
my $ocn_bgc = $opts{'ocn_bgc'};
Expand Down Expand Up @@ -702,6 +708,18 @@ add_default($nl, 'config_use_bulk_wind_stress');
add_default($nl, 'config_use_bulk_thickness_flux');
add_default($nl, 'config_flux_attenuation_coefficient');
add_default($nl, 'config_flux_attenuation_coefficient_runoff');
if ($OCN_SGR eq 'data') {
add_default($nl, 'config_subglacial_runoff_mode', 'val'=>"data");
} else {
add_default($nl, 'config_subglacial_runoff_mode');
}
add_default($nl, 'config_flux_attenuation_coefficient_subglacial_runoff');
add_default($nl, 'config_sgr_flux_vertical_location');
add_default($nl, 'config_use_sgr_opt_kpp');
add_default($nl, 'config_use_sgr_opt_temp_prescribed');
add_default($nl, 'config_use_sgr_opt_salt_prescribed');
add_default($nl, 'config_sgr_temperature_prescribed');
add_default($nl, 'config_sgr_salinity_prescribed');

############################
# Namelist group: coupling #
Expand Down
8 changes: 8 additions & 0 deletions components/mpas-ocean/bld/build-namelist-section
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,14 @@ add_default($nl, 'config_use_bulk_wind_stress');
add_default($nl, 'config_use_bulk_thickness_flux');
add_default($nl, 'config_flux_attenuation_coefficient');
add_default($nl, 'config_flux_attenuation_coefficient_runoff');
add_default($nl, 'config_subglacial_runoff_mode');
add_default($nl, 'config_flux_attenuation_coefficient_subglacial_runoff');
add_default($nl, 'config_sgr_flux_vertical_location');
add_default($nl, 'config_use_sgr_opt_kpp');
add_default($nl, 'config_use_sgr_opt_temp_prescribed');
add_default($nl, 'config_use_sgr_opt_salt_prescribed');
add_default($nl, 'config_sgr_temperature_prescribed');
add_default($nl, 'config_sgr_salinity_prescribed');

############################
# Namelist group: coupling #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,14 @@
<config_use_bulk_thickness_flux>.true.</config_use_bulk_thickness_flux>
<config_flux_attenuation_coefficient>0.001</config_flux_attenuation_coefficient>
<config_flux_attenuation_coefficient_runoff>10.0</config_flux_attenuation_coefficient_runoff>
<config_subglacial_runoff_mode>'off'</config_subglacial_runoff_mode>
<config_flux_attenuation_coefficient_subglacial_runoff>0.001</config_flux_attenuation_coefficient_subglacial_runoff>
<config_sgr_flux_vertical_location>'bottom'</config_sgr_flux_vertical_location>
<config_use_sgr_opt_kpp>.true.</config_use_sgr_opt_kpp>
<config_use_sgr_opt_temp_prescribed>.false.</config_use_sgr_opt_temp_prescribed>
<config_use_sgr_opt_salt_prescribed>.false.</config_use_sgr_opt_salt_prescribed>
<config_sgr_temperature_prescribed>0.0</config_sgr_temperature_prescribed>
<config_sgr_salinity_prescribed>0.0</config_sgr_salinity_prescribed>

<!-- coupling -->
<config_remove_ais_river_runoff>.false.</config_remove_ais_river_runoff>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,70 @@ Valid values: Any positive real number.
Default: Defined in namelist_defaults.xml
</entry>

<entry id="config_subglacial_runoff_mode" type="char*1024"
category="forcing" group="forcing">
Selects the mode in which subglacial runoff fluxes are implemented.

Valid values: 'off', 'data'
Default: Defined in namelist_defaults.xml
</entry>

<entry id="config_flux_attenuation_coefficient_subglacial_runoff" type="real"
category="forcing" group="forcing">
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$.

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

<entry id="config_sgr_flux_vertical_location" type="char*1024"
category="forcing" group="forcing">
Selects the vertical location where subglacial runoff is fluxed.

Valid values: 'top','uniform', 'bottom'
Default: Defined in namelist_defaults.xml
</entry>

<entry id="config_use_sgr_opt_kpp" type="logical"
category="forcing" group="forcing">
If true, include subglacial runoff (sgr) contribution in kpp calculation.

Valid values: .true. or .false.
Default: Defined in namelist_defaults.xml
</entry>

<entry id="config_use_sgr_opt_temp_prescribed" type="logical"
category="forcing" group="forcing">
If true, subglacial runoff temperature is set to config_sgr_temperature_prescribed. If false, the temperature is set to local freezing point.

Valid values: .true. or .false.
Default: Defined in namelist_defaults.xml
</entry>

<entry id="config_use_sgr_opt_salt_prescribed" type="logical"
category="forcing" group="forcing">
If true, subglacial runoff salinity is set to config_sgr_salinity_prescribed. If false, the salinity is set to 0 PSU.

Valid values: .true. or .false.
Default: Defined in namelist_defaults.xml
</entry>

<entry id="config_sgr_temperature_prescribed" type="real"
category="forcing" group="forcing">
Prescribed subglacial runoff temperature value, applied when config_use_sgr_opt_temp_prescribed = .true.

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

<entry id="config_sgr_salinity_prescribed" type="real"
category="forcing" group="forcing">
Prescribed subglacial runoff salinity value, applied when config_use_sgr_opt_salt_prescribed = .true.

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


<!-- coupling -->

Expand Down
35 changes: 34 additions & 1 deletion components/mpas-ocean/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def buildnml(case, caseroot, compname):
ocn_forcing = case.get_value("MPASO_FORCING")
ocn_iceberg = case.get_value("MPASO_ICEBERG")
ocn_ismf = case.get_value("MPASO_ISMF")
ocn_sgr = case.get_value("MPASO_SGR")
ocn_bgc = case.get_value("MPASO_BGC")
ocn_wave = case.get_value("MPASO_WAVE")
ocn_tidal_mixing = case.get_value("MPASO_TIDAL_MIXING")
Expand Down Expand Up @@ -76,6 +77,7 @@ def buildnml(case, caseroot, compname):
analysis_mask_file = ''
eco_forcing_file = ''
u_tidal_rms_file = ''
data_sgr_file = ''

if ocn_grid == 'oEC60to30v3':
decomp_date = '230424'
Expand Down Expand Up @@ -140,6 +142,8 @@ def buildnml(case, caseroot, compname):
data_ismf_file = 'prescribed_ismf_paolo2023.oQU240wLI.20240404.nc'
if ocn_tidal_mixing == 'true':
u_tidal_rms_file = 'velocityTidalRMS_CATS2008.oQU240wLI.20240221.nc'
if ocn_sgr == 'data':
data_sgr_file = 'DSGR.massFlux.MALI.out2055.oQU240wLI.20240328.nc'

elif ocn_grid == 'oQU120':
decomp_date = '230424'
Expand Down Expand Up @@ -277,6 +281,8 @@ def buildnml(case, caseroot, compname):
data_ismf_file = 'prescribed_ismf_adusumilli2020.SOwISC12to60E2r4.230516.nc'
if ocn_tidal_mixing == 'true':
u_tidal_rms_file = 'velocityTidalRMS_CATS2008.SOwISC12to60E2r4.20210114.nc'
if ocn_sgr == 'data':
data_sgr_file = 'DSGR.massFlux.MALI.out2055.SOwISC12to60E2r4.20240328.nc'

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

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

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


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

if data_sgr_file != '':
input_list.write("subglacial_runoff = {}/ocn/mpas-o/{}/{}\n".format(din_loc_root, ocn_mask, data_sgr_file))

#--------------------------------------------------------------------
# Invoke mpas build-namelist - output will go in $CASEBUILD/mpasoconf
#--------------------------------------------------------------------
Expand Down Expand Up @@ -495,6 +507,7 @@ def buildnml(case, caseroot, compname):
sysmod += " -ocn_forcing '{}'".format(ocn_forcing)
sysmod += " -ocn_iceberg '{}'".format(ocn_iceberg)
sysmod += " -ocn_ismf '{}'".format(ocn_ismf)
sysmod += " -ocn_sgr '{}'".format(ocn_sgr)
sysmod += " -ocn_bgc '{}'".format(ocn_bgc)
sysmod += " -ocn_wave '{}'".format(ocn_wave)
sysmod += " -ocn_tidal_mixing '{}'".format(ocn_tidal_mixing)
Expand Down Expand Up @@ -702,6 +715,19 @@ def buildnml(case, caseroot, compname):
lines.append('</stream>')
lines.append('')

if data_sgr_file != '':
lines.append('<stream name="prescribed_subglacial_runoff"')
lines.append(' type="input"')
lines.append(' io_type="{}"'.format(ocn_pio_typename))
lines.append(
' filename_template="{}/ocn/mpas-o/{}/{}"'.format(din_loc_root, ocn_mask, data_sgr_file))
lines.append(' input_interval="initial_only" ')
lines.append(' packages="landIceFluxesPKG">')
lines.append('')
lines.append(' <var name="subglacialRunoffFlux"/>')
lines.append('</stream>')
lines.append('')

if analysis_mask_file != '':
lines.append('<stream name="transectMasksInput"')
lines.append(' type="input"')
Expand Down Expand Up @@ -1169,12 +1195,14 @@ def buildnml(case, caseroot, compname):
lines.append('<var name="accumulatedEvapTemperatureFlux"/>')
lines.append('<var name="accumulatedSeaIceTemperatureFlux"/>')
lines.append('<var name="accumulatedRiverRunoffTemperatureFlux"/>')
lines.append('<var name="accumulatedSubglacialRunoffTemperatureFlux"/>')
lines.append('<var name="accumulatedIcebergTemperatureFlux"/>')
lines.append('<var name="accumulatedRainFlux"/>')
lines.append('<var name="accumulatedSnowFlux"/>')
lines.append('<var name="accumulatedEvaporationFlux"/>')
lines.append('<var name="accumulatedSeaIceFlux"/>')
lines.append('<var name="accumulatedRiverRunoffFlux"/>')
lines.append('<var name="accumulatedSubglacialRunoffFlux"/>')
lines.append('<var name="accumulatedIceRunoffFlux"/>')
lines.append('<var name="accumulatedRemovedRiverRunoffFlux"/>')
lines.append('<var name="accumulatedRemovedIceRunoffFlux"/>')
Expand All @@ -1183,6 +1211,7 @@ def buildnml(case, caseroot, compname):
lines.append('<var name="accumulatedLandIceFlux"/>')
lines.append('<var name="accumulatedLandIceFrazilFlux"/>')
lines.append('<var name="accumulatedSeaIceSalinityFlux"/>')
lines.append('<var name="accumulatedSubglacialRunoffSalinityFlux"/>')
lines.append('<var name="initialCarbon"/>')
lines.append('<var name="finalCarbon"/>')
lines.append('<var name="carbonChange"/>')
Expand Down Expand Up @@ -1331,6 +1360,7 @@ def buildnml(case, caseroot, compname):
lines.append(' <var name="seaIceSalinityFlux"/>')
lines.append(' <var name="seaIceFreshWaterFlux"/>')
lines.append(' <var name="riverRunoffFlux"/>')
lines.append(' <var name="subglacialRunoffFlux"/>')
lines.append(' <var name="iceRunoffFlux"/>')
lines.append(' <var name="rainFlux"/>')
lines.append(' <var name="snowFlux"/>')
Expand Down Expand Up @@ -1533,6 +1563,7 @@ def buildnml(case, caseroot, compname):
lines.append(' <var name="icebergFreshWaterFlux"/>')

lines.append(' <var name="riverRunoffFlux"/>')
lines.append(' <var name="subglacialRunoffFlux"/>')
lines.append(' <var name="iceRunoffFlux"/>')
lines.append(' <var name="rainFlux"/>')
lines.append(' <var name="snowFlux"/>')
Expand Down Expand Up @@ -1598,6 +1629,7 @@ def buildnml(case, caseroot, compname):
lines.append(' <var name="icebergFreshWaterFlux"/>')

lines.append(' <var name="riverRunoffFlux"/>')
lines.append(' <var name="subglacialRunoffFlux"/>')
lines.append(' <var name="iceRunoffFlux"/>')
lines.append(' <var name="rainFlux"/>')
lines.append(' <var name="snowFlux"/>')
Expand Down Expand Up @@ -1812,6 +1844,7 @@ def buildnml(case, caseroot, compname):
lines.append(' <var name="seaIceSalinityFlux"/>')
lines.append(' <var name="seaIceFreshWaterFlux"/>')
lines.append(' <var name="riverRunoffFlux"/>')
lines.append(' <var name="subglacialRunoffFlux"/>')
lines.append(' <var name="iceRunoffFlux"/>')
lines.append(' <var name="rainFlux"/>')
lines.append(' <var name="snowFlux"/>')
Expand Down
13 changes: 13 additions & 0 deletions components/mpas-ocean/cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@
<desc>Option to describe the MPASO prescribed tidal mixing</desc>
</entry>

<entry id="MPASO_SGR">
<type>char</type>
<valid_values>none,data</valid_values>
<default_value>none</default_value>
<values>
<value compset="MPASO_">none</value>
<value compset="_MPASO%.*DSGR">data</value>
</values>
<group>case_comp</group>
<file>env_case.xml</file>
<desc>Option to describe how MPASO will handle subglacial runoff fluxes</desc>
</entry>

<entry id="MPASO_ICEBERG">
<type>char</type>
<valid_values>false,true</valid_values>
Expand Down
15 changes: 15 additions & 0 deletions components/mpas-ocean/cime_config/config_compsets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<lname>2000_DATM%NYF_SLND_MPASSI_MPASO%PISMFDATMFORCED_DROF%NYFAIS45_SGLC_SWAV</lname>
</compset>

<compset>
<alias>GMPAS-NYF-PISMF-DSGR</alias>
<lname>2000_DATM%NYF_SLND_MPASSI_MPASO%PISMFDATMFORCEDDSGR_DROF%NYFAIS45_SGLC_SWAV</lname>
</compset>

<compset>
<alias>GMPAS-NYF-DISMF</alias>
<lname>2000_DATM%NYF_SLND_MPASSI_MPASO%DISMFDATMFORCED_DROF%NYFAIS45_SGLC_SWAV</lname>
Expand Down Expand Up @@ -87,6 +92,16 @@
<lname>2000_DATM%JRA-1p5_SLND_MPASSI%DIB_MPASO%IBPISMFDATMFORCED_DROF%JRA-1p5-AIS0ROF_SGLC_SWAV</lname>
</compset>

<compset>
<alias>GMPAS-JRA1p5-DIB-PISMF-DSGR</alias>
<lname>2000_DATM%JRA-1p5_SLND_MPASSI%DIB_MPASO%IBPISMFDATMFORCEDDSGR_DROF%JRA-1p5-AIS0ROF_SGLC_SWAV</lname>
</compset>

<compset>
<alias>GMPAS-JRA1p5-DIB-PISMF-DSGR-TMIX</alias>
<lname>2000_DATM%JRA-1p5_SLND_MPASSI%DIB_MPASO%IBPISMFDATMFORCEDDSGRTMIX_DROF%JRA-1p5-AIS0ROF_SGLC_SWAV</lname>
</compset>

<compset>
<alias>GMPAS-JRA1p5-DIB-DISMF</alias>
<lname>2000_DATM%JRA-1p5_SLND_MPASSI%DIB_MPASO%IBDISMFDATMFORCED_DROF%JRA-1p5-AIS0ROF_SGLC_SWAV</lname>
Expand Down
Loading

0 comments on commit f50d263

Please sign in to comment.