Skip to content

Commit

Permalink
Apply patch of latest commit in master for the dustflux output PR Nor…
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaerz committed Oct 24, 2024
1 parent 5395a2d commit d0e258c
Show file tree
Hide file tree
Showing 9 changed files with 338 additions and 101 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
15 changes: 8 additions & 7 deletions cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,14 @@
<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>
<group>run_component_blom</group>
<file>env_run.xml</file>
<desc>Set preprocessor option to activate the M4AGO sinking scheme. Requires module ecosys</desc>
<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_CISO">
Expand Down
Loading

0 comments on commit d0e258c

Please sign in to comment.