From 7ec0e4059f2f08c8d236f7305542e724082b276d Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Wed, 25 Sep 2024 13:54:33 -0500 Subject: [PATCH 1/2] Set default model for mpas_to_yaml to mpas-ocean --- polaris/yaml.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/polaris/yaml.py b/polaris/yaml.py index 065397b3c..0950efd96 100644 --- a/polaris/yaml.py +++ b/polaris/yaml.py @@ -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] @@ -204,7 +204,7 @@ def main_mpas_to_yaml(): 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() @@ -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] From fe99ce13f86334607adfc182a426930b2aaaa058 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Wed, 25 Sep 2024 14:09:19 -0500 Subject: [PATCH 2/2] Fix namelist template filename --- polaris/yaml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polaris/yaml.py b/polaris/yaml.py index 0950efd96..0df2264f9 100644 --- a/polaris/yaml.py +++ b/polaris/yaml.py @@ -200,7 +200,7 @@ 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")