Skip to content

Commit

Permalink
Dust fluxes output and add descriptions in the xml-namelist file (#420)
Browse files Browse the repository at this point in the history
* Introduce dust flux output and add descriptions to iHAMOCC namelist definitions; fix preformed Si units in output

* Introduce HAMOCC_SINKING_SCHEME xml-switch [WLIN,AGG,M4AGO,CONST] to enable selection of sinking scheme - default: WLIN
  • Loading branch information
jmaerz authored Oct 24, 2024
1 parent 0886dda commit f1cc379
Show file tree
Hide file tree
Showing 9 changed files with 335 additions and 99 deletions.
29 changes: 24 additions & 5 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def buildnml(case, caseroot, compname):
hamocc_extncycle = case.get_value("HAMOCC_EXTNCYCLE")
hamocc_n2oc = case.get_value("HAMOCC_N2OC")
hamocc_atmndepc = case.get_value("HAMOCC_ATMNDEPC")
hamocc_m4ago = case.get_value("HAMOCC_M4AGO")
hamocc_sinking_scheme = case.get_value("HAMOCC_SINKING_SCHEME")
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")
Expand Down Expand Up @@ -192,7 +192,6 @@ def buildnml(case, caseroot, compname):
config["hamocc_extncycle"] = "yes" if hamocc_extncycle else "no"
config["hamocc_n2oc"] = "yes" if hamocc_n2oc else "no"
config["hamocc_atmndepc"] = "yes" if hamocc_atmndepc else "no"
config["hamocc_m4ago"] = "yes" if hamocc_m4ago 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
Expand All @@ -201,9 +200,29 @@ def buildnml(case, caseroot, compname):
config["is_test"] = "yes" if is_test else "no"
config["comp_interface"] = comp_interface

# TODO: the following needs to have new ways to turn this to "yes"
config["use_agg"] = "no"
config["use_wlin"] = "yes"
# Set the sinking scheme in iHAMOCC
# Note: the following part requires to have set options for no/yes
# in the namelist_definition_blom.xml for the 'use_XXX' switches
if hamocc_sinking_scheme == 'WLIN': # current default
config['use_wlin'] = 'yes'
config['use_agg'] = 'no'
config['use_m4ago'] = 'no'
elif hamocc_sinking_scheme == 'M4AGO':
config['use_wlin'] = 'no'
config['use_agg'] = 'no'
config['use_m4ago'] = 'yes'
elif hamocc_sinking_scheme == 'AGG':
config['use_wlin'] = 'no'
config['use_agg'] = 'yes'
config['use_m4ago'] = 'no'
elif hamocc_sinking_scheme == 'CONST':
# if all options are 'no' iHAMOCC falls back to constant sinking velocities
config['use_wlin'] = 'no'
config['use_agg'] = 'no'
config['use_m4ago'] = 'no'
else: # likely doesn't enter here due to previous cime checkings for available options
print('Unknown sinking scheme option in BLOM buildnml- exit now')
exit

if is_test:
testcase = case.get_value("TESTCASE")
Expand Down
10 changes: 5 additions & 5 deletions cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@
<desc>N2O and NH3 fluxes coupled from atmosphere. Requires module ecosys and extncycle</desc>
</entry>

<entry id="HAMOCC_M4AGO">
<type>logical</type>
<valid_values>TRUE,FALSE</valid_values>
<default_value>FALSE</default_value>
<entry id="HAMOCC_SINKING_SCHEME">
<type>char</type>
<valid_values>WLIN,M4AGO,AGG,CONST</valid_values>
<default_value>WLIN</default_value>
<group>run_component_blom</group>
<file>env_run.xml</file>
<desc>Set namelist option to activate the M4AGO sinking scheme. Requires module ecosys</desc>
<desc>Namelist option to set sinking scheme. Requires module ecosys</desc>
</entry>

<entry id="HAMOCC_PREF_TRACERS">
Expand Down
Loading

0 comments on commit f1cc379

Please sign in to comment.