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

Fixes user nl generator and adds Prandtl_bckgrd #59

Merged
merged 2 commits into from
Feb 14, 2020
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: 0 additions & 2 deletions cime_config/MOM_RPS/FType_MOM_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ def _write_MOM_input(self, output_path, case):

def _write_MOM_override(self, output_path, def_params):

assert self.input_format=="MOM_input", "MOM_override file can only be generated from a user_nl_mom file."
# ^ Note: user_nl_mom is assumed to have the same input syntax as MOM_input
str_type = get_str_type()

MOM_override_header =\
Expand Down
2 changes: 1 addition & 1 deletion cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def process_user_nl_mom(case):
raise SystemExit("ERROR: Cannot provide parameter changes via both SourceMods and user_nl_mom!")

# parse the MOM_input file staged in rundir:
MOM_input_rundir = FType_MOM_params(os.path.join(rundir,"MOM_input"),input_format="MOM_input")
MOM_input_rundir = FType_MOM_params.from_MOM_input(os.path.join(rundir,"MOM_input"))

# Write MOM_override (based on data from user_nl_mom)
user_nl_mom.write(output_path = os.path.join(rundir,"MOM_override"),
Expand Down
13 changes: 12 additions & 1 deletion param_templates/MOM_input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1329,8 +1329,19 @@ Global:
units: m2 s-1
value:
$OCN_GRID == "tx0.25v1": 1.5E-05
$OCN_GRID == "MISOMIP": 5.0E-5
$OCN_GRID == "MISOMIP": 5.0E-05
else: 2.0E-05
PRANDTL_BKGND:
description: |
"[nondim] default = 1.0
Turbulent Prandtl number used to convert vertical background diffusivities
into viscosities."
datatype: real
units: m2 s-1
value: # KV/KD:
$OCN_GRID == "tx0.25v1": = 1.0E-04 / 1.5E-05
$OCN_GRID == "MISOMIP": = 1.0E-04 / 5.0E-05
else: = 1.0E-04 / 2.0E-05
KD_MIN:
description: |
"[m2 s-1] default = 2.0E-07
Expand Down
12 changes: 11 additions & 1 deletion param_templates/json/MOM_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,16 @@
"else": 2e-05
}
},
"PRANDTL_BKGND": {
"description": "\"[nondim] default = 1.0\nTurbulent Prandtl number used to convert vertical background diffusivities\ninto viscosities.\"\n",
"datatype": "real",
"units": "m2 s-1",
"value": {
"$OCN_GRID == \"tx0.25v1\"": "= 1.0E-04 / 1.5E-05",
"$OCN_GRID == \"MISOMIP\"": "= 1.0E-04 / 5.0E-05",
"else": "= 1.0E-04 / 2.0E-05"
}
},
"KD_MIN": {
"description": "\"[m2 s-1] default = 2.0E-07\nThe minimum diapycnal diffusivity.\nIf true, use an internal tidal dissipation scheme to\ndrive diapycnal mixing, along the lines of St. Laurent\net al. (2002) and Simmons et al. (2004).\"\n",
"datatype": "real",
Expand Down Expand Up @@ -2403,4 +2413,4 @@
}
}
}
}
}