From 2e5fa57ae634d64c1b09bc73bdb1af4fb299dd32 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Sun, 7 Jan 2024 23:20:43 -0500 Subject: [PATCH 1/7] add option to provide an ocean resolution during setup_expt.py --- parm/config/gefs/config.base.emc.dyn | 24 ++++++++--------------- parm/config/gfs/config.base.emc.dyn | 16 ++++----------- workflow/setup_expt.py | 29 ++++++++++++++++++++++++---- 3 files changed, 37 insertions(+), 32 deletions(-) diff --git a/parm/config/gefs/config.base.emc.dyn b/parm/config/gefs/config.base.emc.dyn index 64a38f669f..e1977197e3 100644 --- a/parm/config/gefs/config.base.emc.dyn +++ b/parm/config/gefs/config.base.emc.dyn @@ -154,35 +154,27 @@ export OPS_RES="C768" # Do not change export LEVS=128 export CASE="@CASECTL@" # CASE is required in GEFS to determine ocean/ice/wave resolutions export CASE_ENS="@CASEENS@" -# TODO: This should not depend on $CASE or $CASE_ENS -# These are the currently available grid-combinations +export OCNRES="@OCNRES@" +export ICERES="${OCNRES}" +# These are the currently recommended grid-combinations case "${CASE}" in "C48") - export OCNRES=500 export waveGRD='glo_500' ;; - "C96") - export OCNRES=100 - export waveGRD='glo_200' - ;; - "C192") - export OCNRES=050 + "C96" | "C192") export waveGRD='glo_200' ;; "C384") - export OCNRES=025 export waveGRD='glo_025' ;; - "C768") - export OCNRES=025 - export waveGRD='mx025' + "C768" | "C1152") + export waveGRD='mx025' ;; *) - export OCNRES=025 - export waveGRD='glo_025' + echo "FATAL ERROR: Unrecognized CASE ${CASE}, ABORT!" + exit 1 ;; esac -export ICERES=${OCNRES} case "${APP}" in ATM) diff --git a/parm/config/gfs/config.base.emc.dyn b/parm/config/gfs/config.base.emc.dyn index 08925c397e..95a22369f3 100644 --- a/parm/config/gfs/config.base.emc.dyn +++ b/parm/config/gfs/config.base.emc.dyn @@ -170,27 +170,20 @@ export OPS_RES="C768" # Do not change # TODO: Why is this needed and where is it export LEVS=128 export CASE="@CASECTL@" export CASE_ENS="@CASEENS@" -# TODO: This should not depend on $CASE or $CASE_ENS -# These are the currently available grid-combinations +export OCNRES="@OCNRES@" +export ICERES="${OCNRES}" +# These are the currently recommended grid-combinations case "${CASE}" in "C48") - export OCNRES=500 export waveGRD='glo_500' ;; - "C96") - export OCNRES=500 - export waveGRD='glo_200' - ;; - "C192") - export OCNRES=050 + "C96" | "C192") export waveGRD='glo_200' ;; "C384") - export OCNRES=025 export waveGRD='glo_025' ;; "C768" | "C1152") - export OCNRES=025 export waveGRD='mx025' ;; *) @@ -198,7 +191,6 @@ case "${CASE}" in exit 1 ;; esac -export ICERES=${OCNRES} case "${APP}" in ATM) diff --git a/workflow/setup_expt.py b/workflow/setup_expt.py index b1fa439052..f254a0e337 100755 --- a/workflow/setup_expt.py +++ b/workflow/setup_expt.py @@ -309,7 +309,8 @@ def edit_baseconfig(host, inputs, yaml_dict): "@PSLOT@": inputs.pslot, "@SDATE@": datetime_to_YMDH(inputs.idate), "@EDATE@": datetime_to_YMDH(inputs.edate), - "@CASECTL@": f'C{inputs.resdet}', + "@CASECTL@": f'C{inputs.resdetatm}', + "@OCNRES@": f"{int(100.*inputs.resdetocean):03d}", "@EXPDIR@": inputs.expdir, "@ROTDIR@": inputs.comrot, "@EXP_WARM_START@": is_warm_start, @@ -387,8 +388,10 @@ def input_args(*argv): def _common_args(parser): parser.add_argument('--pslot', help='parallel experiment name', type=str, required=False, default='test') - parser.add_argument('--resdet', help='resolution of the deterministic model forecast', + parser.add_argument('--resdetatm', help='atmosphere resolution of the deterministic model forecast', type=int, required=False, default=384) + parser.add_argument('--resdetocean', help='ocean resolution of the deterministic model forecast', + type=float, required=False, default=-1.0) # -1.0 means determine from resdetatm (limited combinations will be available) parser.add_argument('--comrot', help='full path to COMROT', type=str, required=False, default=os.getenv('HOME')) parser.add_argument('--expdir', help='full path to EXPDIR', @@ -418,7 +421,7 @@ def _gfs_cycled_args(parser): return parser def _gfs_or_gefs_ensemble_args(parser): - parser.add_argument('--resens', help='resolution of the ensemble model forecast', + parser.add_argument('--resensatm', help='atmosphere esolution of the ensemble model forecast', type=int, required=False, default=192) parser.add_argument('--nens', help='number of ensemble members', type=int, required=False, default=20) @@ -512,7 +515,7 @@ def query_and_clean(dirname): def validate_user_request(host, inputs): supp_res = host.info['SUPPORTED_RESOLUTIONS'] machine = host.machine - for attr in ['resdet', 'resens']: + for attr in ['resdetatm', 'resensatm']: try: expt_res = f'C{getattr(inputs, attr)}' except AttributeError: @@ -521,6 +524,20 @@ def validate_user_request(host, inputs): raise NotImplementedError(f"Supported resolutions on {machine} are:\n{', '.join(supp_res)}") +def get_ocean_resolution(resdetatm): + """ + Method to determine the ocean resolution based on the atmosphere resolution + Limited options are going to be available + """ + atm_to_ocean_map = { + 1152: 0.25, 768: 0.25, 384: 0.25, + 192: 1.0, + 96: 5.0, 48: 5.0} + try: + return atm_to_ocean_map[resdetatm] + except KeyError: + raise KeyError(f"Ocean resolution for {resdetatm} is not implemented") + def main(*argv): user_inputs = input_args(*argv) @@ -528,6 +545,10 @@ def main(*argv): validate_user_request(host, user_inputs) + # Determine ocean resolution if not provided + if user_inputs.resdetocean < 0: + user_inputs.resdetocean = get_ocean_resolution(user_inputs.resdetatm) + comrot = os.path.join(user_inputs.comrot, user_inputs.pslot) expdir = os.path.join(user_inputs.expdir, user_inputs.pslot) From 740ef66c4dac7d038bc8c2f7eb4c963468c897bb Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Mon, 8 Jan 2024 10:00:42 -0500 Subject: [PATCH 2/7] fix pynorm error --- workflow/setup_expt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/workflow/setup_expt.py b/workflow/setup_expt.py index f254a0e337..35b8e8276d 100755 --- a/workflow/setup_expt.py +++ b/workflow/setup_expt.py @@ -538,6 +538,7 @@ def get_ocean_resolution(resdetatm): except KeyError: raise KeyError(f"Ocean resolution for {resdetatm} is not implemented") + def main(*argv): user_inputs = input_args(*argv) From 52876b91e1c59f4a5b3a33b6c4d75413ae90bfd3 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Tue, 9 Jan 2024 11:23:28 -0500 Subject: [PATCH 3/7] update yamls for ci tests --- ci/cases/pr/C48_ATM.yaml | 2 +- ci/cases/pr/C48_S2SW.yaml | 3 ++- ci/cases/pr/C48_S2SWA_gefs.yaml | 5 +++-- ci/cases/pr/C96C48_hybatmDA.yaml | 5 +++-- ci/cases/pr/C96_atm3DVar.yaml | 4 ++-- ci/cases/weekly/C384C192_hybatmda.yaml | 5 +++-- ci/cases/weekly/C384_S2SWA.yaml | 3 ++- ci/cases/weekly/C384_atm3DVar.yaml | 5 +++-- ci/platforms/gefs_ci_defaults.yaml | 2 +- ci/platforms/gfs_defaults_ci.yaml | 2 +- workflow/setup_expt.py | 22 +++++++++++----------- 11 files changed, 32 insertions(+), 26 deletions(-) diff --git a/ci/cases/pr/C48_ATM.yaml b/ci/cases/pr/C48_ATM.yaml index fc0b729af6..dfe0c51ba2 100644 --- a/ci/cases/pr/C48_ATM.yaml +++ b/ci/cases/pr/C48_ATM.yaml @@ -5,7 +5,7 @@ experiment: arguments: pslot: {{ 'pslot' | getenv }} app: ATM - resdet: 48 + resdetatmos: 48 comrot: {{ 'RUNTESTS' | getenv }}/COMROT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR idate: 2021032312 diff --git a/ci/cases/pr/C48_S2SW.yaml b/ci/cases/pr/C48_S2SW.yaml index f4b50ead22..d92159efbe 100644 --- a/ci/cases/pr/C48_S2SW.yaml +++ b/ci/cases/pr/C48_S2SW.yaml @@ -5,7 +5,8 @@ experiment: arguments: pslot: {{ 'pslot' | getenv }} app: S2SW - resdet: 48 + resdetatmos: 48 + resdetocean: 5.0 comrot: {{ 'RUNTESTS' | getenv }}/COMROT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR idate: 2021032312 diff --git a/ci/cases/pr/C48_S2SWA_gefs.yaml b/ci/cases/pr/C48_S2SWA_gefs.yaml index 5eb99d9c1e..b4bde62feb 100644 --- a/ci/cases/pr/C48_S2SWA_gefs.yaml +++ b/ci/cases/pr/C48_S2SWA_gefs.yaml @@ -5,8 +5,9 @@ experiment: arguments: pslot: {{ 'pslot' | getenv }} app: S2SWA - resdet: 48 - resens: 48 + resdetatmos: 48 + resdetocean: 5.0 + resensatmos: 48 nens: 2 gfs_cyc: 1 start: cold diff --git a/ci/cases/pr/C96C48_hybatmDA.yaml b/ci/cases/pr/C96C48_hybatmDA.yaml index c3aa6e8892..7b074b883e 100644 --- a/ci/cases/pr/C96C48_hybatmDA.yaml +++ b/ci/cases/pr/C96C48_hybatmDA.yaml @@ -5,8 +5,9 @@ experiment: arguments: pslot: {{ 'pslot' | getenv }} app: ATM - resdet: 96 - resens: 48 + resdetatmos: 96 + resdetocean: 5.0 + resensatmos: 48 comrot: {{ 'RUNTESTS' | getenv }}/COMROT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48 diff --git a/ci/cases/pr/C96_atm3DVar.yaml b/ci/cases/pr/C96_atm3DVar.yaml index 5215cb0d90..b068ebda27 100644 --- a/ci/cases/pr/C96_atm3DVar.yaml +++ b/ci/cases/pr/C96_atm3DVar.yaml @@ -5,10 +5,10 @@ experiment: arguments: pslot: {{ 'pslot' | getenv }} app: ATM - resdet: 96 + resdetatmos: 96 comrot: {{ 'RUNTESTS' | getenv }}/COMROT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR - icsdir: ${ICSDIR_ROOT}/C96C48 + icsdir: {{ 'ICSDIR_ROOT' | getenv ]}/C96C48 idate: 2021122018 edate: 2021122106 nens: 0 diff --git a/ci/cases/weekly/C384C192_hybatmda.yaml b/ci/cases/weekly/C384C192_hybatmda.yaml index 4c14018e2d..3102ec850b 100644 --- a/ci/cases/weekly/C384C192_hybatmda.yaml +++ b/ci/cases/weekly/C384C192_hybatmda.yaml @@ -5,8 +5,9 @@ experiment: arguments: pslot: {{ 'pslot' | getenv }} app: ATM - resdet: 384 - resens: 192 + resdetatmos: 384 + resdetocean: 0.25 + resensatmos: 192 comrot: {{ 'RUNTESTS' | getenv }}/COMROT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C384C192 diff --git a/ci/cases/weekly/C384_S2SWA.yaml b/ci/cases/weekly/C384_S2SWA.yaml index 6c624f5698..a80263fac0 100644 --- a/ci/cases/weekly/C384_S2SWA.yaml +++ b/ci/cases/weekly/C384_S2SWA.yaml @@ -5,7 +5,8 @@ experiment: arguments: pslot: {{ 'pslot' | getenv }} app: S2SWA - resdet: 384 + resdetatmos: 384 + resdetocean: 0.5 comrot: {{ 'RUNTESTS' | getenv }}/COMROT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR idate: 2016070100 diff --git a/ci/cases/weekly/C384_atm3DVar.yaml b/ci/cases/weekly/C384_atm3DVar.yaml index e7986ef097..194d66c8ce 100644 --- a/ci/cases/weekly/C384_atm3DVar.yaml +++ b/ci/cases/weekly/C384_atm3DVar.yaml @@ -5,8 +5,9 @@ experiment: arguments: pslot: {{ 'pslot' | getenv }} app: ATM - resdet: 384 - resens: 192 + resdetatmos: 384 + resdetocean: 0.25 + resensatmos: 192 comrot: {{ 'RUNTESTS' | getenv }}/COMROT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C384C192 diff --git a/ci/platforms/gefs_ci_defaults.yaml b/ci/platforms/gefs_ci_defaults.yaml index 2aa30d6be4..dfb1626cdd 100644 --- a/ci/platforms/gefs_ci_defaults.yaml +++ b/ci/platforms/gefs_ci_defaults.yaml @@ -1,4 +1,4 @@ defaults: !INC {{ HOMEgfs }}/parm/config/gefs/yaml/defaults.yaml base: - ACCOUNT: ${SLURM_ACCOUNT} + ACCOUNT: {{ 'SLURM_ACCOUNT' | getenv }} diff --git a/ci/platforms/gfs_defaults_ci.yaml b/ci/platforms/gfs_defaults_ci.yaml index 5e57e617ec..b66be2a366 100644 --- a/ci/platforms/gfs_defaults_ci.yaml +++ b/ci/platforms/gfs_defaults_ci.yaml @@ -1,4 +1,4 @@ defaults: !INC {{ HOMEgfs }}/parm/config/gfs/yaml/defaults.yaml base: - ACCOUNT: ${SLURM_ACCOUNT} + ACCOUNT: {{ 'SLURM_ACCOUNT' | getenv }} diff --git a/workflow/setup_expt.py b/workflow/setup_expt.py index 35b8e8276d..fe94c9ca3d 100755 --- a/workflow/setup_expt.py +++ b/workflow/setup_expt.py @@ -309,7 +309,7 @@ def edit_baseconfig(host, inputs, yaml_dict): "@PSLOT@": inputs.pslot, "@SDATE@": datetime_to_YMDH(inputs.idate), "@EDATE@": datetime_to_YMDH(inputs.edate), - "@CASECTL@": f'C{inputs.resdetatm}', + "@CASECTL@": f'C{inputs.resdetatmos}', "@OCNRES@": f"{int(100.*inputs.resdetocean):03d}", "@EXPDIR@": inputs.expdir, "@ROTDIR@": inputs.comrot, @@ -323,7 +323,7 @@ def edit_baseconfig(host, inputs, yaml_dict): extend_dict = dict() if getattr(inputs, 'nens', 0) > 0: extend_dict = { - "@CASEENS@": f'C{inputs.resens}', + "@CASEENS@": f'C{inputs.resensatmos}', "@NMEM_ENS@": inputs.nens, } tmpl_dict = dict(tmpl_dict, **extend_dict) @@ -388,10 +388,10 @@ def input_args(*argv): def _common_args(parser): parser.add_argument('--pslot', help='parallel experiment name', type=str, required=False, default='test') - parser.add_argument('--resdetatm', help='atmosphere resolution of the deterministic model forecast', + parser.add_argument('--resdetatmos', help='atmosphere resolution of the deterministic model forecast', type=int, required=False, default=384) parser.add_argument('--resdetocean', help='ocean resolution of the deterministic model forecast', - type=float, required=False, default=-1.0) # -1.0 means determine from resdetatm (limited combinations will be available) + type=float, required=False, default=-1.0) # -1.0 means determine from resdetatmos (limited combinations will be available) parser.add_argument('--comrot', help='full path to COMROT', type=str, required=False, default=os.getenv('HOME')) parser.add_argument('--expdir', help='full path to EXPDIR', @@ -421,7 +421,7 @@ def _gfs_cycled_args(parser): return parser def _gfs_or_gefs_ensemble_args(parser): - parser.add_argument('--resensatm', help='atmosphere esolution of the ensemble model forecast', + parser.add_argument('--resensatmos', help='atmosphere resolution of the ensemble model forecast', type=int, required=False, default=192) parser.add_argument('--nens', help='number of ensemble members', type=int, required=False, default=20) @@ -515,7 +515,7 @@ def query_and_clean(dirname): def validate_user_request(host, inputs): supp_res = host.info['SUPPORTED_RESOLUTIONS'] machine = host.machine - for attr in ['resdetatm', 'resensatm']: + for attr in ['resdetatmos', 'resensatmos']: try: expt_res = f'C{getattr(inputs, attr)}' except AttributeError: @@ -524,19 +524,19 @@ def validate_user_request(host, inputs): raise NotImplementedError(f"Supported resolutions on {machine} are:\n{', '.join(supp_res)}") -def get_ocean_resolution(resdetatm): +def get_ocean_resolution(resdetatmos): """ Method to determine the ocean resolution based on the atmosphere resolution Limited options are going to be available """ - atm_to_ocean_map = { + atmos_to_ocean_map = { 1152: 0.25, 768: 0.25, 384: 0.25, 192: 1.0, 96: 5.0, 48: 5.0} try: - return atm_to_ocean_map[resdetatm] + return atmos_to_ocean_map[resdetatmos] except KeyError: - raise KeyError(f"Ocean resolution for {resdetatm} is not implemented") + raise KeyError(f"Ocean resolution for {resdetatmos} is not implemented") def main(*argv): @@ -548,7 +548,7 @@ def main(*argv): # Determine ocean resolution if not provided if user_inputs.resdetocean < 0: - user_inputs.resdetocean = get_ocean_resolution(user_inputs.resdetatm) + user_inputs.resdetocean = get_ocean_resolution(user_inputs.resdetatmos) comrot = os.path.join(user_inputs.comrot, user_inputs.pslot) expdir = os.path.join(user_inputs.expdir, user_inputs.pslot) From f8da86558e1bda763e1eda8937ad7d2b1b341f3a Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Tue, 9 Jan 2024 11:42:04 -0500 Subject: [PATCH 4/7] update documentation instances of resdet and resens; add resdetocean --- docs/doxygen/mainpage.h | 10 ++++++---- docs/source/setup.rst | 26 ++++++++++++++------------ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/docs/doxygen/mainpage.h b/docs/doxygen/mainpage.h index 40e8e6f946..5d8ca87550 100644 --- a/docs/doxygen/mainpage.h +++ b/docs/doxygen/mainpage.h @@ -23,7 +23,7 @@ To setup an experiment, a python script \c setup_expt.py (located in \ $> setup_expt.py -h usage: setup_expt.py [-h] --pslot PSLOT [--configdir CONFIGDIR] [--idate IDATE] [--icsdir ICSDIR] - [--resdet RESDET] [--resens RESENS] [--comrot COMROT] + [--resdetatmos RESDET] [--resensatmos RESENS] [--comrot COMROT] [--expdir EXPDIR] [--nens NENS] [--cdump CDUMP] Setup files and directories to start a GFS parallel. Create EXPDIR, copy @@ -40,9 +40,11 @@ To setup an experiment, a python script \c setup_expt.py (located in \ (default: 2016100100) --icsdir full path to initial condition directory (default: /scratch4/NCEPDEV/da/noscrub/Rahul.Mahajan/ICS) - --resdet resolution of the deterministic model forecast + --resdetatmos atmosphere resolution of the deterministic model forecast (default: 384) - --resens resolution of the ensemble model forecast + --resdetocean ocean resolution of the deterministic model forecast + (default: 0. [determined automatically based on atmosphere resolution]]]) + --resensatmos resolution of the ensemble model forecast (default: 192) --comrot full path to COMROT (default: None) @@ -53,7 +55,7 @@ To setup an experiment, a python script \c setup_expt.py (located in \ --cdump CDUMP to start the experiment (default: gdas) -The above script creates directories \c EXPDIR and \c COMROT. It will make links for initial conditions from a location provided via the \c --icsdir argument for a chosen resolution for the control \c --resdet and the ensemble \c --resens. Experiment name is controlled by the input argument \c --pslot. The script will ask user input in case any of the directories already exist. It will copy experiment configuration files into the \c EXPDIR from \c CONFIGDIR. +The above script creates directories \c EXPDIR and \c COMROT. It will make links for initial conditions from a location provided via the \c --icsdir argument for a chosen resolution for the control \c --resdetatmos and the ensemble \c --resensatmos. Experiment name is controlled by the input argument \c --pslot. The script will ask user input in case any of the directories already exist. It will copy experiment configuration files into the \c EXPDIR from \c CONFIGDIR. Sample initial conditions for a few resolutions are available at:
Hera: TODO: /path/here/for/initial/conditions
diff --git a/docs/source/setup.rst b/docs/source/setup.rst index be04aa5d96..eaf42b18e0 100644 --- a/docs/source/setup.rst +++ b/docs/source/setup.rst @@ -28,7 +28,7 @@ The following command examples include variables for reference but users should :: cd workflow - ./setup_expt.py gfs forecast-only --idate $IDATE --edate $EDATE [--app $APP] [--start $START] [--gfs_cyc $GFS_CYC] [--resdet $RESDET] + ./setup_expt.py gfs forecast-only --idate $IDATE --edate $EDATE [--app $APP] [--start $START] [--gfs_cyc $GFS_CYC] [--resdetatmos $RESDETATMOS] [--resdetocean $RESDETOCEAN] [--pslot $PSLOT] [--configdir $CONFIGDIR] [--comrot $COMROT] [--expdir $EXPDIR] where: @@ -50,7 +50,8 @@ where: * ``$EDATE`` is the ending date of your run (YYYYMMDDCC) and is the last cycle that will complete * ``$PSLOT`` is the name of your experiment [default: test] * ``$CONFIGDIR`` is the path to the ``/config`` folder under the copy of the system you're using [default: $TOP_OF_CLONE/parm/config/] - * ``$RESDET`` is the FV3 resolution (i.e. 768 for C768) [default: 384] + * ``$RESDETATMOS`` is the resolution of the atmosphere component of the system (i.e. 768 for C768) [default: 384] + * ``$RESDETOCEAN`` is the resolution of the ocean component of the system (i.e. 0.25 for 1/4 degree) [default: 0.; determined based on atmosphere resolution] * ``$GFS_CYC`` is the forecast frequency (0 = none, 1 = 00z only [default], 2 = 00z & 12z, 4 = all cycles) * ``$COMROT`` is the path to your experiment output directory. DO NOT include PSLOT folder at end of path, it’ll be built for you. [default: $HOME (but do not use default due to limited space in home directories normally, provide a path to a larger scratch space)] * ``$EXPDIR`` is the path to your experiment directory where your configs will be placed and where you will find your workflow monitoring files (i.e. rocoto database and xml file). DO NOT include PSLOT folder at end of path, it will be built for you. [default: $HOME] @@ -62,21 +63,21 @@ Atm-only: :: cd workflow - ./setup_expt.py gfs forecast-only --pslot test --idate 2020010100 --edate 2020010118 --resdet 384 --gfs_cyc 4 --comrot /some_large_disk_area/Joe.Schmo/comrot --expdir /some_safe_disk_area/Joe.Schmo/expdir + ./setup_expt.py gfs forecast-only --pslot test --idate 2020010100 --edate 2020010118 --resdetatmos 384 --gfs_cyc 4 --comrot /some_large_disk_area/Joe.Schmo/comrot --expdir /some_safe_disk_area/Joe.Schmo/expdir Coupled: :: cd workflow - ./setup_expt.py gfs forecast-only --app S2SW --pslot coupled_test --idate 2013040100 --edate 2013040100 --resdet 384 --comrot /some_large_disk_area/Joe.Schmo/comrot --expdir /some_safe_disk_area/Joe.Schmo/expdir + ./setup_expt.py gfs forecast-only --app S2SW --pslot coupled_test --idate 2013040100 --edate 2013040100 --resdetatmos 384 --comrot /some_large_disk_area/Joe.Schmo/comrot --expdir /some_safe_disk_area/Joe.Schmo/expdir Coupled with aerosols: :: cd workflow - ./setup_expt.py gfs forecast-only --app S2SWA --pslot coupled_test --idate 2013040100 --edate 2013040100 --resdet 384 --comrot /some_large_disk_area/Joe.Schmo/comrot --expdir /some_safe_disk_area/Joe.Schmo/expdir + ./setup_expt.py gfs forecast-only --app S2SWA --pslot coupled_test --idate 2013040100 --edate 2013040100 --resdetatmos 384 --comrot /some_large_disk_area/Joe.Schmo/comrot --expdir /some_safe_disk_area/Joe.Schmo/expdir **************************************** Step 2: Set user and experiment settings @@ -134,13 +135,13 @@ Scripts that will be used: Step 1) Run experiment generator script *************************************** -The following command examples include variables for reference but users should not use environmental variables but explicit values to submit the commands. Exporting variables like EXPDIR to your environment causes an error when the python scripts run. Please explicitly include the argument inputs when running both setup scripts: +The following command examples include variables for reference but users should not use environment variables but explicit values to submit the commands. Exporting variables like EXPDIR to your environment causes an error when the python scripts run. Please explicitly include the argument inputs when running both setup scripts: :: cd workflow ./setup_expt.py gfs cycled --idate $IDATE --edate $EDATE [--app $APP] [--start $START] [--gfs_cyc $GFS_CYC] - [--resdet $RESDET] [--resens $RESENS] [--nens $NENS] [--cdump $CDUMP] + [--resdetatmos $RESDETATMOS] [--resdetocean $RESDETOCEAN] [--resensatmos $RESENSATMOS] [--nens $NENS] [--cdump $CDUMP] [--pslot $PSLOT] [--configdir $CONFIGDIR] [--comrot $COMROT] [--expdir $EXPDIR] [--icsdir $ICSDIR] where: @@ -161,8 +162,9 @@ where: * ``$EDATE`` is the ending date of your run (YYYYMMDDCC) and is the last cycle that will complete * ``$START`` is the start type (warm or cold [default]) * ``$GFS_CYC`` is the forecast frequency (0 = none, 1 = 00z only [default], 2 = 00z & 12z, 4 = all cycles) - * ``$RESDET`` is the FV3 resolution of the deterministic forecast [default: 384] - * ``$RESENS`` is the FV3 resolution of the ensemble (EnKF) forecast [default: 192] + * ``$RESDETATMOS`` is the resolution of the atmosphere component of the deterministic forecast [default: 384] + * ``$RESDETOCEAN`` is the resolution of the ocean component of the deterministic forecast [default: 0.; determined based on atmosphere resolution] + * ``$RESENSATMOS`` is the resolution of the atmosphere component of the ensemble forecast [default: 192] * ``$NENS`` is the number of ensemble members [default: 20] * ``$CDUMP`` is the starting phase [default: gdas] * ``$PSLOT`` is the name of your experiment [default: test] @@ -178,13 +180,13 @@ Example: :: cd workflow - ./setup_expt.py gfs cycled --pslot test --configdir /home/Joe.Schmo/git/global-workflow/parm/config --idate 2020010100 --edate 2020010118 --comrot /some_large_disk_area/Joe.Schmo/comrot --expdir /some_safe_disk_area/Joe.Schmo/expdir --resdet 384 --resens 192 --nens 80 --gfs_cyc 4 + ./setup_expt.py gfs cycled --pslot test --configdir /home/Joe.Schmo/git/global-workflow/parm/config --idate 2020010100 --edate 2020010118 --comrot /some_large_disk_area/Joe.Schmo/comrot --expdir /some_safe_disk_area/Joe.Schmo/expdir --resdetatmos 384 --resensatmos 192 --nens 80 --gfs_cyc 4 Example ``setup_expt.py`` on Orion: :: - Orion-login-3$ ./setup_expt.py gfs cycled --pslot test --idate 2022010118 --edate 2022010200 --resdet 192 --resens 96 --nens 80 --comrot /work/noaa/stmp/jschmo/comrot --expdir /work/noaa/global/jschmo/expdir + Orion-login-3$ ./setup_expt.py gfs cycled --pslot test --idate 2022010118 --edate 2022010200 --resdetatmos 192 --resensatmos 96 --nens 80 --comrot /work/noaa/stmp/jschmo/comrot --expdir /work/noaa/global/jschmo/expdir EDITED: /work/noaa/global/jschmo/expdir/test/config.base as per user input. EDITED: /work/noaa/global/jschmo/expdir/test/config.aeroanl as per user input. EDITED: /work/noaa/global/jschmo/expdir/test/config.ocnanal as per user input. @@ -195,7 +197,7 @@ What happens if I run ``setup_expt.py`` again for an experiment that already exi :: - Orion-login-3$ ./setup_expt.py gfs cycled --pslot test --idate 2022010118 --edate 2022010200 --resdet 192 --resens 96 --nens 80 --comrot /work/noaa/stmp/jschmo/comrot --expdir /work/noaa/global/jschmo/expdir + Orion-login-3$ ./setup_expt.py gfs cycled --pslot test --idate 2022010118 --edate 2022010200 --resdetatmos 192 --resensatmos 96 --nens 80 --comrot /work/noaa/stmp/jschmo/comrot --expdir /work/noaa/global/jschmo/expdir directory already exists in /work/noaa/stmp/jschmo/comrot/test From 31502f40138eadd74412eac14e3b28298d33b5dc Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Tue, 9 Jan 2024 12:44:04 -0500 Subject: [PATCH 5/7] update default resdetocean --- workflow/setup_expt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/setup_expt.py b/workflow/setup_expt.py index fe94c9ca3d..b42c6630e1 100755 --- a/workflow/setup_expt.py +++ b/workflow/setup_expt.py @@ -391,7 +391,7 @@ def _common_args(parser): parser.add_argument('--resdetatmos', help='atmosphere resolution of the deterministic model forecast', type=int, required=False, default=384) parser.add_argument('--resdetocean', help='ocean resolution of the deterministic model forecast', - type=float, required=False, default=-1.0) # -1.0 means determine from resdetatmos (limited combinations will be available) + type=float, required=False, default=0.0) # 0.0 (or lower) means determine from resdetatmos (limited combinations will be available) parser.add_argument('--comrot', help='full path to COMROT', type=str, required=False, default=os.getenv('HOME')) parser.add_argument('--expdir', help='full path to EXPDIR', @@ -547,7 +547,7 @@ def main(*argv): validate_user_request(host, user_inputs) # Determine ocean resolution if not provided - if user_inputs.resdetocean < 0: + if user_inputs.resdetocean <= 0: user_inputs.resdetocean = get_ocean_resolution(user_inputs.resdetatmos) comrot = os.path.join(user_inputs.comrot, user_inputs.pslot) From 15845c3daa791535d6cf237531b6b29c7f4f69e8 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 10 Jan 2024 17:00:00 -0500 Subject: [PATCH 6/7] Update docs/doxygen/mainpage.h --- docs/doxygen/mainpage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/doxygen/mainpage.h b/docs/doxygen/mainpage.h index 5d8ca87550..884dfddac9 100644 --- a/docs/doxygen/mainpage.h +++ b/docs/doxygen/mainpage.h @@ -43,7 +43,7 @@ To setup an experiment, a python script \c setup_expt.py (located in \ --resdetatmos atmosphere resolution of the deterministic model forecast (default: 384) --resdetocean ocean resolution of the deterministic model forecast - (default: 0. [determined automatically based on atmosphere resolution]]]) + (default: 0. [determined automatically based on atmosphere resolution]) --resensatmos resolution of the ensemble model forecast (default: 192) --comrot full path to COMROT From 19131b6d9bd308c90e4adf559c641a0ac0ef728b Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Thu, 11 Jan 2024 11:17:27 -0500 Subject: [PATCH 7/7] Update ci/cases/pr/C96_atm3DVar.yaml --- ci/cases/pr/C96_atm3DVar.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/cases/pr/C96_atm3DVar.yaml b/ci/cases/pr/C96_atm3DVar.yaml index b068ebda27..c1006479af 100644 --- a/ci/cases/pr/C96_atm3DVar.yaml +++ b/ci/cases/pr/C96_atm3DVar.yaml @@ -8,7 +8,7 @@ arguments: resdetatmos: 96 comrot: {{ 'RUNTESTS' | getenv }}/COMROT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR - icsdir: {{ 'ICSDIR_ROOT' | getenv ]}/C96C48 + icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48 idate: 2021122018 edate: 2021122106 nens: 0