Skip to content

Commit

Permalink
Adds NPOESS support to global-workflow (#2083)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
HenryRWinterbottom authored Nov 22, 2023
1 parent 62d8e99 commit 513db19
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 2 deletions.
17 changes: 17 additions & 0 deletions jobs/rocoto/npoess.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="npoess"
export jobid="${job}.$$"

# Execute the JJOB
"${HOMEgfs}/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS"

status=$?
exit "${status}"
1 change: 1 addition & 0 deletions parm/config/gfs/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 11 additions & 0 deletions parm/config/gfs/config.npoess
Original file line number Diff line number Diff line change
@@ -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"
10 changes: 9 additions & 1 deletion parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions workflow/applications/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 6 additions & 0 deletions workflow/applications/gfs_cycled.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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']

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

Expand Down

0 comments on commit 513db19

Please sign in to comment.