From a29f751aed05312da3d80d396159bb5a906d6ce4 Mon Sep 17 00:00:00 2001 From: "Henry R. Winterbottom" <49202169+HenryWinterbottom-NOAA@users.noreply.github.com> Date: Wed, 6 Dec 2023 13:45:56 -0700 Subject: [PATCH] Adds GEMPAK and related jobs to rocoto task mesh (#2127) --- jobs/rocoto/gempak.sh | 6 +-- jobs/rocoto/gempakmeta.sh | 17 ++++++++ jobs/rocoto/gempakmetancdc.sh | 17 ++++++++ jobs/rocoto/gempakncdcupapgif.sh | 17 ++++++++ jobs/rocoto/gempakpgrb2spec.sh | 17 ++++++++ jobs/rocoto/npoess.sh | 2 +- workflow/applications/applications.py | 1 - workflow/applications/gfs_cycled.py | 15 +++---- workflow/applications/gfs_forecast_only.py | 2 +- workflow/rocoto/gfs_tasks.py | 47 +++++++++++++++++++++- workflow/rocoto/tasks.py | 3 +- 11 files changed, 128 insertions(+), 16 deletions(-) create mode 100755 jobs/rocoto/gempakmeta.sh create mode 100755 jobs/rocoto/gempakmetancdc.sh create mode 100755 jobs/rocoto/gempakncdcupapgif.sh create mode 100755 jobs/rocoto/gempakpgrb2spec.sh diff --git a/jobs/rocoto/gempak.sh b/jobs/rocoto/gempak.sh index 14950535c8..82ea1175d8 100755 --- a/jobs/rocoto/gempak.sh +++ b/jobs/rocoto/gempak.sh @@ -5,13 +5,13 @@ source "${HOMEgfs}/ush/preamble.sh" ############################################################### . "${HOMEgfs}/ush/load_fv3gfs_modules.sh" status=$? -[[ ${status} -ne 0 ]] && exit ${status} +if (( status != 0 )); then exit "${status}"; fi export job="gempak" export jobid="${job}.$$" # Execute the JJOB -${HOMEgfs}/jobs/JGFS_ATMOS_GEMPAK +"${HOMEgfs}/jobs/J${RUN^^}_ATMOS_GEMPAK" status=$? -exit ${status} +exit "${status}" diff --git a/jobs/rocoto/gempakmeta.sh b/jobs/rocoto/gempakmeta.sh new file mode 100755 index 0000000000..0babf7bbbf --- /dev/null +++ b/jobs/rocoto/gempakmeta.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="gempakmeta" +export jobid="${job}.$$" + +# Execute the JJOB +"${HOMEgfs}/jobs/JGFS_ATMOS_GEMPAK_META" + +status=$? +exit "${status}" diff --git a/jobs/rocoto/gempakmetancdc.sh b/jobs/rocoto/gempakmetancdc.sh new file mode 100755 index 0000000000..cfd51cf58a --- /dev/null +++ b/jobs/rocoto/gempakmetancdc.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="gempakmetancdc" +export jobid="${job}.$$" + +# Execute the JJOB +"${HOMEgfs}/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC" + +status=$? +exit "${status}" diff --git a/jobs/rocoto/gempakncdcupapgif.sh b/jobs/rocoto/gempakncdcupapgif.sh new file mode 100755 index 0000000000..2cc84cd47d --- /dev/null +++ b/jobs/rocoto/gempakncdcupapgif.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="gempakncdcupapgif" +export jobid="${job}.$$" + +# Execute the JJOB +"${HOMEgfs}/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF" + +status=$? +exit "${status}" diff --git a/jobs/rocoto/gempakpgrb2spec.sh b/jobs/rocoto/gempakpgrb2spec.sh new file mode 100755 index 0000000000..f76c33ecdb --- /dev/null +++ b/jobs/rocoto/gempakpgrb2spec.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="gempakpgrb2spec" +export jobid="${job}.$$" + +# Execute the JJOB +"${HOMEgfs}/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC" + +status=$? +exit "${status}" diff --git a/jobs/rocoto/npoess.sh b/jobs/rocoto/npoess.sh index 9e9b816451..3599ca26bd 100755 --- a/jobs/rocoto/npoess.sh +++ b/jobs/rocoto/npoess.sh @@ -7,7 +7,7 @@ source "${HOMEgfs}/ush/preamble.sh" status=$? if (( status != 0 )); then exit "${status}"; fi -export job="npoess" +export job="npoess_pgrb2_0p5deg" export jobid="${job}.$$" # Execute the JJOB diff --git a/workflow/applications/applications.py b/workflow/applications/applications.py index 9d9bf52595..441dbe4c19 100644 --- a/workflow/applications/applications.py +++ b/workflow/applications/applications.py @@ -61,7 +61,6 @@ 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_upp = not _base.get('WRITE_DOPOST', True) self.do_hpssarch = _base.get('HPSSARCH', False) diff --git a/workflow/applications/gfs_cycled.py b/workflow/applications/gfs_cycled.py index 894a551721..63332c0cf6 100644 --- a/workflow/applications/gfs_cycled.py +++ b/workflow/applications/gfs_cycled.py @@ -81,7 +81,7 @@ def _get_app_configs(self): configs += ['metp'] if self.do_gempak: - configs += ['gempak'] + configs += ['gempak', 'npoess'] if self.do_bufrsnd: configs += ['postsnd'] @@ -89,9 +89,6 @@ 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: @@ -187,6 +184,9 @@ def get_task_names(self): if self.do_vminmon: gdas_tasks += ['vminmon'] + if self.do_gempak: + gdas_tasks += ['gempak', 'gempakmetancdc'] + gdas_tasks += gdas_gfs_common_cleanup_tasks # Collect "gfs" cycle tasks @@ -230,13 +230,14 @@ def get_task_names(self): if self.do_gempak: gfs_tasks += ['gempak'] + gfs_tasks += ['gempakmeta'] + gfs_tasks += ['gempakncdcupapgif'] + gfs_tasks += ['npoess_pgrb2_0p5deg'] + gfs_tasks += ['gempakpgrb2spec'] if self.do_awips: gfs_tasks += ['awips_20km_1p0deg', 'awips_g2', 'fbwinds'] - if self.do_npoess: - gfs_tasks += ['npoess'] - gfs_tasks += gdas_gfs_common_cleanup_tasks tasks = dict() diff --git a/workflow/applications/gfs_forecast_only.py b/workflow/applications/gfs_forecast_only.py index 6de6cbe79e..87da4f5841 100644 --- a/workflow/applications/gfs_forecast_only.py +++ b/workflow/applications/gfs_forecast_only.py @@ -112,7 +112,7 @@ def get_task_names(self): tasks += ['postsnd'] if self.do_gempak: - tasks += ['gempak'] + tasks += ['gempak', 'gempakmeta', 'gempakncdcupagif', 'gempakpgrb2spec'] if self.do_awips: tasks += ['awips_20km_1p0deg', 'awips_g2', 'fbwinds'] diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index 9c69240a0e..047c174cdb 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -935,7 +935,50 @@ def gempak(self): return task - def npoess(self): + def gempakmeta(self): + deps = [] + dep_dict = {'type': 'metatask', 'name': f'{self.cdump}atmprod'} + deps.append(rocoto.add_dependency(dep_dict)) + dependencies = rocoto.create_dependency(dep=deps) + + resources = self.get_resource('gempak') + task = create_wf_task('gempakmeta', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies) + + return task + + def gempakmetancdc(self): + deps = [] + dep_dict = {'type': 'metatask', 'name': f'{self.cdump}atmprod'} + deps.append(rocoto.add_dependency(dep_dict)) + dependencies = rocoto.create_dependency(dep=deps) + + resources = self.get_resource('gempak') + task = create_wf_task('gempakmetancdc', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies) + + return task + + def gempakncdcupapgif(self): + deps = [] + dep_dict = {'type': 'metatask', 'name': f'{self.cdump}atmprod'} + deps.append(rocoto.add_dependency(dep_dict)) + dependencies = rocoto.create_dependency(dep=deps) + + resources = self.get_resource('gempak') + task = create_wf_task('gempakncdcupapgif', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies) + + return task + + def gempakpgrb2spec(self): + deps = [] + dep_dict = {'type': 'task', 'name': f'{self.cdump}npoess_pgrb2_0p5deg'} + dependencies = rocoto.create_dependency(dep=deps) + + resources = self.get_resource('gempak') + task = create_wf_task('gempakpgrb2spec', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies) + + return task + + def npoess_pgrb2_0p5deg(self): deps = [] dep_dict = {'type': 'task', 'name': f'{self.cdump}atmanlprod'} @@ -943,7 +986,7 @@ def npoess(self): 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) + task = create_wf_task('npoess_pgrb2_0p5deg', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies) return task diff --git a/workflow/rocoto/tasks.py b/workflow/rocoto/tasks.py index 7fb42b73e8..06000338be 100644 --- a/workflow/rocoto/tasks.py +++ b/workflow/rocoto/tasks.py @@ -25,7 +25,8 @@ class Tasks: 'verfozn', 'verfrad', 'vminmon', 'metp', 'tracker', 'genesis', 'genesis_fsu', - 'postsnd', 'awips_g2', 'awips_20km_1p0deg', 'fbwinds', 'gempak', + 'postsnd', 'awips_g2', 'awips_20km_1p0deg', 'fbwinds', + 'gempak', 'gempakmeta', 'gempakmetancdc', 'gempakncdcupapgif', 'gempakpgrb2spec', 'npoess_pgrb2_0p5deg' 'waveawipsbulls', 'waveawipsgridded', 'wavegempak', 'waveinit', 'wavepostbndpnt', 'wavepostbndpntbll', 'wavepostpnt', 'wavepostsbs', 'waveprep', 'npoess']