Skip to content

Commit

Permalink
Adds GEMPAK and related jobs to rocoto task mesh (NOAA-EMC#2127)
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryRWinterbottom authored Dec 6, 2023
1 parent 1fc8b5b commit a29f751
Show file tree
Hide file tree
Showing 11 changed files with 128 additions and 16 deletions.
6 changes: 3 additions & 3 deletions jobs/rocoto/gempak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
17 changes: 17 additions & 0 deletions jobs/rocoto/gempakmeta.sh
Original file line number Diff line number Diff line change
@@ -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}"
17 changes: 17 additions & 0 deletions jobs/rocoto/gempakmetancdc.sh
Original file line number Diff line number Diff line change
@@ -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}"
17 changes: 17 additions & 0 deletions jobs/rocoto/gempakncdcupapgif.sh
Original file line number Diff line number Diff line change
@@ -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}"
17 changes: 17 additions & 0 deletions jobs/rocoto/gempakpgrb2spec.sh
Original file line number Diff line number Diff line change
@@ -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}"
2 changes: 1 addition & 1 deletion jobs/rocoto/npoess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion workflow/applications/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 8 additions & 7 deletions workflow/applications/gfs_cycled.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,14 @@ def _get_app_configs(self):
configs += ['metp']

if self.do_gempak:
configs += ['gempak']
configs += ['gempak', 'npoess']

if self.do_bufrsnd:
configs += ['postsnd']

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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion workflow/applications/gfs_forecast_only.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
47 changes: 45 additions & 2 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,15 +935,58 @@ 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'}
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)
task = create_wf_task('npoess_pgrb2_0p5deg', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies)

return task

Expand Down
3 changes: 2 additions & 1 deletion workflow/rocoto/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit a29f751

Please sign in to comment.