Skip to content

Commit

Permalink
Merge pull request #227 from xylar/fix-mpas-to-yaml
Browse files Browse the repository at this point in the history
Set default model for mpas_to_yaml to mpas-ocean
  • Loading branch information
xylar authored Sep 25, 2024
2 parents d9f7cc4 + fe99ce1 commit 5caa4d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions polaris/yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def read(cls, filename, package=None, replacements=None, model=None):
keys = list(configs)
if len(keys) > 1:
raise ValueError(
f'Config yaml file contains unexpected sections:\n '
f'Config yaml file contains unexpected sections: \n '
f'{keys[1:]}')
model = keys[0]

Expand Down Expand Up @@ -200,11 +200,11 @@ def main_mpas_to_yaml():
help="MPAS namelist template file (with all namelist "
"options). For MPAS-Ocean, this will typically be"
" ${PATH_TO_MPASO}/default_inputs/"
"namelist.forward.ocean")
"namelist.ocean.forward")
parser.add_argument("-y", "--yaml", dest="yaml",
required=True,
help="Output yaml file")
parser.add_argument("-m", "--model", dest="model", default='omega',
parser.add_argument("-m", "--model", dest="model", default='mpas-ocean',
help="Model name for the yaml")

args = parser.parse_args()
Expand Down Expand Up @@ -286,7 +286,7 @@ def _update_section(src, dst, quiet, print_section=None):
if name not in dst:
raise ValueError(
f'Attempting to modify a nonexistent config '
f'options:{print_section}: {name}')
f'options: {print_section}: {name}')
if not quiet:
print(f' {print_section}: {name} = {src[name]}')
dst[name] = src[name]
Expand Down

0 comments on commit 5caa4d2

Please sign in to comment.