From 513db190d21f9ede0724a2cd5606372b1d7605de Mon Sep 17 00:00:00 2001 From: "Henry R. Winterbottom" <49202169+HenryWinterbottom-NOAA@users.noreply.github.com> Date: Tue, 21 Nov 2023 22:52:58 -0700 Subject: [PATCH] Adds NPOESS support to global-workflow (#2083) This PR addresses issue #1225. The following was accomplished: - A new Rocoto job is added; `jobs/rocoto/npoess.sh`; - `workflow/applications/gfs_cycled.py` is updated to include the `npoess` task; - `workflow/applications/gfs_forecast_only.py` is updated to include the `npoess` task; - A new function is added to `workflow/rocoto/gfs_tasks.py`, `npoess` is added as new GFS (only) task; - `workflow/rocoto/tasks.py` is updated to include the `npoess` task. Resolves #1225 --- jobs/rocoto/npoess.sh | 17 +++++++++++++++++ parm/config/gfs/config.base.emc.dyn | 1 + parm/config/gfs/config.npoess | 11 +++++++++++ parm/config/gfs/config.resources | 10 +++++++++- workflow/applications/applications.py | 1 + workflow/applications/gfs_cycled.py | 6 ++++++ workflow/rocoto/gfs_tasks.py | 12 ++++++++++++ workflow/rocoto/tasks.py | 3 ++- 8 files changed, 59 insertions(+), 2 deletions(-) create mode 100755 jobs/rocoto/npoess.sh create mode 100644 parm/config/gfs/config.npoess diff --git a/jobs/rocoto/npoess.sh b/jobs/rocoto/npoess.sh new file mode 100755 index 0000000000..9e9b816451 --- /dev/null +++ b/jobs/rocoto/npoess.sh @@ -0,0 +1,17 @@ +#! /usr/bin/env bash + +source "${HOMEgfs}/ush/preamble.sh" + +############################################################### +. "${HOMEgfs}/ush/load_fv3gfs_modules.sh" +status=$? +if (( status != 0 )); then exit "${status}"; fi + +export job="npoess" +export jobid="${job}.$$" + +# Execute the JJOB +"${HOMEgfs}/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS" + +status=$? +exit "${status}" diff --git a/parm/config/gfs/config.base.emc.dyn b/parm/config/gfs/config.base.emc.dyn index 48a5befc00..35495ed9df 100644 --- a/parm/config/gfs/config.base.emc.dyn +++ b/parm/config/gfs/config.base.emc.dyn @@ -56,6 +56,7 @@ export BASE_GIT="@BASE_GIT@" export DO_BUFRSND="NO" # BUFR sounding products export DO_GEMPAK="NO" # GEMPAK products export DO_AWIPS="NO" # AWIPS products +export DO_NPOESS="NO" # NPOESS products export DO_TRACKER="YES" # Hurricane track verification export DO_GENESIS="YES" # Cyclone genesis verification export DO_GENESIS_FSU="NO" # Cyclone genesis verification (FSU) diff --git a/parm/config/gfs/config.npoess b/parm/config/gfs/config.npoess new file mode 100644 index 0000000000..9a388d2e6b --- /dev/null +++ b/parm/config/gfs/config.npoess @@ -0,0 +1,11 @@ +#! /usr/bin/env bash + +########## config.npoess ########## +# GFS NPOESS step specific + +echo "BEGIN: config.npoess" + +# Get task specific resources +. "${EXPDIR}/config.resources" npoess + +echo "END: config.npoess" diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 2bd73d0a2f..4d975c6003 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -21,7 +21,7 @@ if [[ $# -ne 1 ]]; then echo "init_chem mom6ic ocnpost" echo "waveinit waveprep wavepostsbs wavepostbndpnt wavepostbndpntbll wavepostpnt" echo "wavegempak waveawipsbulls waveawipsgridded" - echo "postsnd awips gempak" + echo "postsnd awips gempak npoess" echo "ocnanalprep prepoceanobs ocnanalbmat ocnanalrun ocnanalchkpt ocnanalpost ocnanalvrfy" exit 1 @@ -1013,6 +1013,14 @@ elif [[ ${step} = "awips" ]]; then export nth_awips=1 export memory_awips="3GB" +elif [[ ${step} = "npoess" ]]; then + + export wtime_npoess="03:30:00" + export npe_npoess=1 + export npe_node_npoess=1 + export nth_npoess=1 + export memory_npoess="3GB" + elif [[ ${step} = "gempak" ]]; then export wtime_gempak="03:00:00" diff --git a/workflow/applications/applications.py b/workflow/applications/applications.py index 620a79cf48..2a7b8d249f 100644 --- a/workflow/applications/applications.py +++ b/workflow/applications/applications.py @@ -62,6 +62,7 @@ def __init__(self, conf: Configuration) -> None: self.do_genesis = _base.get('DO_GENESIS', True) self.do_genesis_fsu = _base.get('DO_GENESIS_FSU', False) self.do_metp = _base.get('DO_METP', False) + self.do_npoess = _base.get('DO_NPOESS', False) self.do_hpssarch = _base.get('HPSSARCH', False) diff --git a/workflow/applications/gfs_cycled.py b/workflow/applications/gfs_cycled.py index e3dc651409..dbb945225c 100644 --- a/workflow/applications/gfs_cycled.py +++ b/workflow/applications/gfs_cycled.py @@ -89,6 +89,9 @@ def _get_app_configs(self): if self.do_awips: configs += ['awips'] + if self.do_npoess: + configs += ['npoess'] + if self.do_wave: configs += ['waveinit', 'waveprep', 'wavepostsbs', 'wavepostpnt'] if self.do_wave_bnd: @@ -233,6 +236,9 @@ def get_task_names(self): if self.do_awips: gfs_tasks += ['awips'] + if self.do_npoess: + gfs_tasks += ['npoess'] + if self.do_wafs: gfs_tasks += ['wafs', 'wafsgcip', 'wafsgrib2', 'wafsgrib20p25', 'wafsblending', 'wafsblending0p25'] diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index e8b5ab4611..b4635f4a04 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -868,6 +868,18 @@ def gempak(self): return task + def npoess(self): + + deps = [] + dep_dict = {'type': 'task', 'name': f'{self.cdump}postanl'} + deps.append(rocoto.add_dependency(dep_dict)) + dependencies = rocoto.create_dependency(dep=deps) + + resources = self.get_resource('npoess') + task = create_wf_task('npoess', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies) + + return task + def verfozn(self): deps = [] dep_dict = {'type': 'task', 'name': f'{self.cdump}analdiag'} diff --git a/workflow/rocoto/tasks.py b/workflow/rocoto/tasks.py index 845fd35937..21f8af85bb 100644 --- a/workflow/rocoto/tasks.py +++ b/workflow/rocoto/tasks.py @@ -24,7 +24,8 @@ class Tasks: 'tracker', 'genesis', 'genesis_fsu', 'postsnd', 'awips', 'gempak', 'waveawipsbulls', 'waveawipsgridded', 'wavegempak', 'waveinit', - 'wavepostbndpnt', 'wavepostbndpntbll', 'wavepostpnt', 'wavepostsbs', 'waveprep'] + 'wavepostbndpnt', 'wavepostbndpntbll', 'wavepostpnt', 'wavepostsbs', 'waveprep', + 'npoess'] def __init__(self, app_config: AppConfig, cdump: str) -> None: