Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes for configuration and namelist creation #303

Merged
merged 2 commits into from
Nov 9, 2023
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
2 changes: 2 additions & 0 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def buildnml(case, caseroot, compname):
blom_coupling = case.get_value("BLOM_COUPLING")
blom_tracer_modules = case.get_value("BLOM_TRACER_MODULES")
hamocc_ciso = case.get_value("HAMOCC_CISO")
hamocc_sedbypass = case.get_value("HAMOCC_SEDBYPASS")
hamocc_sedspinup = case.get_value("HAMOCC_SEDSPINUP")
hamocc_sedspinup_yr_start = case.get_value("HAMOCC_SEDSPINUP_YR_START")
hamocc_sedspinup_yr_end = case.get_value("HAMOCC_SEDSPINUP_YR_END")
Expand Down Expand Up @@ -181,6 +182,7 @@ def buildnml(case, caseroot, compname):
config["blom_coupling"] = blom_coupling
config["blom_tracer_modules"] = blom_tracer_modules
config["hamocc_ciso"] = "yes" if hamocc_ciso else "no"
config["hamocc_sedbypass"] = "yes" if hamocc_sedbypass else "no"
config["hamocc_sedspinup"] = "yes" if hamocc_sedspinup else "no"
config["hamocc_sedspinup_yr_start"] = hamocc_sedspinup_yr_start
config["hamocc_sedspinup_yr_end"] = hamocc_sedspinup_yr_end
Expand Down
80 changes: 49 additions & 31 deletions cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,36 @@
<desc>Name of ocean component</desc>
</entry>

<entry id="BLOM_TRACER_MODULES">
<type>char</type>
<valid_values>iage,iage ecosys</valid_values>
<default_value>iage</default_value>
<values>
<value compset="_BLOM%ECO">iage ecosys</value>
</values>
<group>build_component_blom</group>
<file>env_build.xml</file>
<desc>Optional ocean tracers. Valid values are Any combination of: iage ecosys</desc>
</entry>

<entry id="BLOM_TURBULENT_CLOSURE">
<type>char</type>
<valid_values></valid_values>
<default_value>oneeq advection</default_value>
<group>build_component_blom</group>
<file>env_build.xml</file>
<desc>Optional turbulent closure. Valid values one of: twoeq oneeq. Additional values: advection isodif</desc>
</entry>

<entry id="BLOM_UNIT">
<type>char</type>
<valid_values></valid_values>
<default_value>cgs</default_value>
<group>build_component_blom</group>
<file>env_build.xml</file>
<desc>Unit system. Valid values one of: cgs mks. </desc>
</entry>

<entry id="OCN_CO2_TYPE">
<type>char</type>
<valid_values>constant,prognostic,diagnostic</valid_values>
Expand All @@ -35,23 +65,11 @@
<type>char</type>
<valid_values>isopyc_bulkml,cntiso_hybrid</valid_values>
<default_value>isopyc_bulkml</default_value>
<group>build_component_blom</group>
<group>run_component_blom</group>
<file>env_run.xml</file>
<desc>Vertical coordinate type of BLOM</desc>
</entry>

<entry id="BLOM_TRACER_MODULES">
<type>char</type>
<valid_values>iage,iage ecosys</valid_values>
<default_value>iage</default_value>
<values>
<value compset="_BLOM%ECO">iage ecosys</value>
</values>
<group>build_component_blom</group>
<file>env_build.xml</file>
<desc>Optional ocean tracers. Valid values are Any combination of: iage ecosys</desc>
</entry>

<entry id="BLOM_COUPLING">
<type>char</type>
<valid_values>full,partial</valid_values>
Expand Down Expand Up @@ -113,6 +131,24 @@
<desc>Scenario for nitrogen deposition data. Requires module ecosys</desc>
</entry>

<entry id="HAMOCC_CISO">
<type>logical</type>
<valid_values>TRUE,FALSE</valid_values>
<default_value>FALSE</default_value>
<group>run_component_blom</group>
<file>env_run.xml</file>
<desc>Set preprocessor option to activate the carbon isotope code. Requires module ecosys</desc>
</entry>

<entry id="HAMOCC_SEDBYPASS">
<type>logical</type>
<valid_values>TRUE,FALSE</valid_values>
<default_value>FALSE</default_value>
<group>run_component_blom</group>
<file>env_run.xml</file>
<desc>Set preprocessor option to bypass the sediment code. Requires module ecosys</desc>
</entry>

<entry id="HAMOCC_SEDSPINUP">
<type>logical</type>
<valid_values>TRUE,FALSE</valid_values>
Expand Down Expand Up @@ -153,24 +189,6 @@
Requires module ecosys</desc>
</entry>

<entry id="BLOM_TURBULENT_CLOSURE">
<type>char</type>
<valid_values></valid_values>
<default_value>oneeq advection</default_value>
<group>build_component_blom</group>
<file>env_build.xml</file>
<desc>Optional turbulent closure. Valid values one of: twoeq oneeq. Additional values: advection isodif</desc>
</entry>

<entry id="BLOM_UNIT">
<type>char</type>
<valid_values></valid_values>
<default_value>cgs</default_value>
<group>build_component_blom</group>
<file>env_build.xml</file>
<desc>Unit system. Valid values one of: cgs mks. </desc>
</entry>

<description>
<desc compset="_BLOM" >BLOM default:</desc>
<desc compset="_BLOM%ECO">BLOM/Ecosystem:</desc>
Expand Down
54 changes: 28 additions & 26 deletions cime_config/namelist_definition_blom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3502,7 +3502,7 @@
<category>bgcnml</category>
<group>bgcnml</group>
<values>
<value>UNSET</value>
<value>''</value>
<value ocn_grid="tnx2v1">$DIN_LOC_ROOT/ocn/blom/bndcon/dustdep_mhw2006_tnx2v1_20130506.nc</value>
<value ocn_grid="tnx1v4">$DIN_LOC_ROOT/ocn/blom/bndcon/dustdep_mhw2006_tnx1v4_20171107.nc</value>
<value ocn_grid="tnx0.25v4">$DIN_LOC_ROOT/ocn/blom/bndcon/dustdep_mhw2006_tnx0.25v4_20181004.nc</value>
Expand All @@ -3522,7 +3522,7 @@
<desc>File name (incl. full path) for swa climatology field (needed if bromoform scheme is activated)</desc>
</entry>

<entry id="do_rivinpt">
<entry id="do_rivinpt" modify_via_xml="BLOM_RIVER_NUTRIENTS">
<type>logical</type>
<category>bgcnml</category>
<group>bgcnml</group>
Expand All @@ -3538,7 +3538,7 @@
<category>bgcnml</category>
<group>bgcnml</group>
<values>
<value>UNSET</value>
<value>''</value>
<value blom_river_nutrients="yes" ocn_grid="tnx2v1">$DIN_LOC_ROOT/ocn/blom/bndcon/river_nutrients_GNEWS2000_tnx2v1_20170915.nc</value>
<value blom_river_nutrients="yes" ocn_grid="tnx1v4">$DIN_LOC_ROOT/ocn/blom/bndcon/river_nutrients_GNEWS2000_tnx1v4_20170820.nc</value>
<value blom_river_nutrients="yes" ocn_grid="tnx0.25v4">$DIN_LOC_ROOT/ocn/blom/bndcon/river_nutrients_GNEWS2000_tnx0.25v4_20170821.nc</value>
Expand All @@ -3547,7 +3547,7 @@
<desc>File name (incl. full path) for riverine input data</desc>
</entry>

<entry id="do_ndep">
<entry id="do_ndep" modify_via_xml="BLOM_N_DEPOSITION">
<type>logical</type>
<category>bgcnml</category>
<group>bgcnml</group>
Expand All @@ -3564,7 +3564,7 @@
<category>bgcnml</category>
<group>bgcnml</group>
<values>
<value blom_n_deposition="no">''</value>
<value>''</value>
<value blom_n_deposition="yes" blom_ndep_scenario="1850" ocn_grid="tnx2v1">$DIN_LOC_ROOT/ocn/blom/bndcon/ndep_1850_CMIP6_tnx2v1_20180321.nc</value>
<value blom_n_deposition="yes" blom_ndep_scenario="2000" ocn_grid="tnx2v1">$DIN_LOC_ROOT/ocn/blom/bndcon/ndep_2000_CMIP6_tnx2v1_20200826.nc</value>
<value blom_n_deposition="yes" blom_ndep_scenario="hist" ocn_grid="tnx2v1">$DIN_LOC_ROOT/ocn/blom/bndcon/ndep_185001-201412_tnx2v1_20190702.nc</value>
Expand All @@ -3587,7 +3587,7 @@
<values>
<value>.false.</value>
</values>
<desc>add desc</desc>
<desc>Logical switch to activate ocean alkalinization, for expert users only, further options are set in the namelist group bgcoafx</desc>
</entry>

<entry id="do_sedspinup" modify_via_xml="HAMOCC_SEDSPINUP">
Expand Down Expand Up @@ -3631,14 +3631,14 @@
<desc>Number of subcyles per time-step for sediment spinup</desc>
</entry>

<entry id="inidic">
<entry id="inidic" is_inputdata="yes">
<type>char</type>
<category>bgcnml</category>
<group>bgcnml</group>
<values>
<value>$DIN_LOC_ROOT/ocn/blom/inicon/glodapv2_Ct_preind_OMIPinit_20171107.nc</value>
</values>
<desc>add desc</desc>
<desc>Filename (incl. full path) to DIC initial values</desc>
</entry>

<entry id="inialk" is_inputdata="yes">
Expand All @@ -3648,7 +3648,7 @@
<values>
<value>$DIN_LOC_ROOT/ocn/blom/inicon/glodapv2_At_OMIPinit_20171107.nc</value>
</values>
<desc>add desc</desc>
<desc>Filename (incl. full path) to alaklinity initial values</desc>
</entry>

<entry id="inipo4" is_inputdata="yes">
Expand All @@ -3658,7 +3658,7 @@
<values>
<value>$DIN_LOC_ROOT/ocn/blom/inicon/woa13_phosphate_OMIPinit_20171107.nc</value>
</values>
<desc>add desc</desc>
<desc>Filename (incl. full path) to phosphate initial values</desc>
</entry>

<entry id="inioxy" is_inputdata="yes">
Expand All @@ -3668,7 +3668,7 @@
<values>
<value>$DIN_LOC_ROOT/ocn/blom/inicon/woa13_oxygen_OMIPinit_20171107.nc</value>
</values>
<desc>add desc</desc>
<desc>Filename (incl. full path) to oxigen initial values</desc>
</entry>

<entry id="inino3" is_inputdata="yes">
Expand All @@ -3678,7 +3678,7 @@
<values>
<value>$DIN_LOC_ROOT/ocn/blom/inicon/woa13_nitrate_OMIPinit_20171107.nc</value>
</values>
<desc>add desc</desc>
<desc>Filename (incl. full path) to nitrate initial values</desc>
</entry>

<entry id="inisil" is_inputdata="yes">
Expand All @@ -3688,27 +3688,29 @@
<values>
<value>$DIN_LOC_ROOT/ocn/blom/inicon/woa13_silicate_OMIPinit_20171107.nc</value>
</values>
<desc>add desc</desc>
<desc>Filename (incl. full path) to silicate initial values</desc>
</entry>

<entry id="inid13c" is_inputdata="yes">
<type>char</type>
<category>bgcnml</category>
<group>bgcnml</group>
<values>
<value>$DIN_LOC_ROOT/ocn/blom/inicon/d13C_permil_20180609.nc</value>
<value hamocc_ciso="no">''</value>
<value hamocc_ciso="yes">$DIN_LOC_ROOT/ocn/blom/inicon/d13C_permil_20180609.nc</value>
</values>
<desc>add desc</desc>
<desc>Filename (incl. full path) to delta 13C initial values (used if C-isotope code is activated)</desc>
</entry>

<entry id="inid14c" is_inputdata="yes">
<type>char</type>
<category>bgcnml</category>
<group>bgcnml</group>
<values>
<value>$DIN_LOC_ROOT/ocn/blom/inicon/d14C_permil_20180609.nc</value>
<value hamocc_ciso="no">''</value>
<value hamocc_ciso="yes">$DIN_LOC_ROOT/ocn/blom/inicon/d14C_permil_20180609.nc</value>
</values>
<desc>add desc</desc>
<desc>Filename (incl. full path) to delta 14C initial values (used if C-isotope code is activated)</desc>
</entry>

<entry id="with_dmsph">
Expand All @@ -3718,7 +3720,7 @@
<values>
<value>.false.</value>
</values>
<desc>add desc</desc>
<desc>Assume pH dependency of DMS production if set to .true.</desc>
</entry>

<entry id="pi_ph_file" is_inputdata="yes">
Expand All @@ -3728,9 +3730,7 @@
<values>
<value>''</value>
</values>
<desc>
File name (incl. full path) for surface PI pH input data.
</desc>
<desc>File name (incl. full path) for surface PI pH input data (needed if with_dmsph=.true.)</desc>
</entry>

<entry id="l_3dvarsedpor">
Expand Down Expand Up @@ -3774,7 +3774,7 @@
<values>
<value>.true.</value>
</values>
<desc>add desc</desc>
<desc>Use POC sinking scheme with increasing sinking velocity with depth</desc>
</entry>

<entry id="use_cfc">
Expand All @@ -3796,7 +3796,7 @@
<values>
<value>.false.</value>
<value compset="HIST_CAM60%NORESM.*">.true.</value>
<value compset="20TR_DATM.*">.true.</value>
<value compset="20TR_DATM.*_BLOM%ECO">.true.</value>
</values>
<desc>activates HAMOCC natural tracer code</desc>
</entry>
Expand Down Expand Up @@ -3833,22 +3833,24 @@
(no swa-climatology has been created for other grid configurations)</desc>
</entry>

<entry id="use_sedbypass">
<entry id="use_sedbypass" modify_via_xml="HAMOCC_SEDBYPASS">
<type>logical</type>
<category>config_bgc</category>
<group>config_bgc</group>
<values>
<value>.false.</value>
<value hamocc_sedbypass="yes">.true.</value>
</values>
<desc>Bypass the HAMOCC sediment code</desc>
</entry>

<entry id="use_cisonew">
<entry id="use_cisonew" modify_via_xml="HAMOCC_CISO">
<type>logical</type>
<category>config_bgc</category>
<group>config_bgc</group>
<values>
<value>.false.</value>
<value hamocc_ciso="yes">.true.</value>
</values>
<desc>activate the HAMOCC carbon isotope code</desc>
</entry>
Expand All @@ -3870,7 +3872,7 @@
<values>
<value>.false.</value>
</values>
<desc>add desc</desc>
<desc>Use aggregation scheme for sinking of particles</desc>
</entry>

<entry id="use_fb_bgc_oce">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./xmlchange HAMOCC_CISO=TRUE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use_cfc = .true.
use_wlin = .true.
use_cisonew = .true.
use_natdic = .true.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
./xmlchange HAMOCC_CISO=TRUE
./xmlchange HAMOCC_SEDBYPASS=TRUE

2 changes: 0 additions & 2 deletions cime_config/testdefs/testmods_dirs/blom/hamocc2/user_nl_blom
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use_cfc = .true.
use_wlin = .true.
use_cisonew = .true.
use_natdic = .true.
use_sedbypass = .true.
Loading