jgfs_wave_gempak_master ecf (v17) Analysis - TerrenceMcGuinness-NOAA/global-workflow GitHub Wiki
Branch / tenant: dev/gfs.v17 (gw_v17)
Path: ecf/scripts/gfs/product/wave/gempak/jgfs_wave_gempak_master.ecf
Analysis date: 2026-06-11
Method: AWS Bedrock AgentCore agentcore-mcp-rag MCP (graph traversal, GraphRAG,
code-context) cross-checked against the on-disk v17 worktree.
jgfs_wave_gempak_master.ecf is the NCO production ecFlow task template that converts
GFS wave model gridded output (GRIB2) into GEMPAK format for NAWIPS display and
distribution. It is a _master template deployed per forecast hour. At runtime it calls
the shared JGLOBAL_WAVE_GEMPAK J-Job, which drives exgfs_wave_nawips.sh to process
all configured wave grids for the given forecast hour.
#PBS -S /bin/bash
#PBS -N gfs_wave_gempak_%CYC%_f%FHR%
#PBS -j oe
#PBS -q %QUEUE%
#PBS -A %PROJ%-%PROJENVIR%
#PBS -l walltime=00:20:00
#PBS -l select=1:mpiprocs=128:ompthreads=1:ncpus=128:mem=1GB
#PBS -l place=vscatter:shared
#PBS -l debug=true
model=gfs
export cyc="%CYC%"
%include <head.h>
%include <envir-p1.h>
############################################################
# Load modules
############################################################
source ${HOMEgfs}/dev/ush/load_modules.sh run
module list
export WGF="%WGF%"
export FHR="%FHR%"
export FHR_LIST="%FHR_LIST%"
export FORECAST_HOUR="${FHR_LIST}"
export COMPONENT=${WGF}
############################################################
# CALL executable job script here
############################################################
export CDATE=${PDY}${cyc}
export HOMEglobal=${HOMEgfs}
#### ${HOMEgfs}/dev/job_cards/rocoto/wavegempak.sh
${HOMEgfs}/jobs/JGLOBAL_WAVE_GEMPAK
if [ $? -ne 0 ]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR RUNNING J-SCRIPT ***"
ecflow_client --abort
exit
fi
%include <tail.h>
%manual
%end| Section | Role |
|---|---|
#PBS directives |
PBS Pro: 1 node, 128 mpiprocs/cpus, 1 GB, 20-min wall. High CPU count for parallel GEMPAK nagrib processing across multiple wave grids. Low memory reflects simple grid-format conversions. |
%include <head.h> / <envir-p1.h>
|
NCO boilerplate. |
load_modules.sh run |
v17 centralized module loading. |
WGF, FHR, FHR_LIST, FORECAST_HOUR, COMPONENT
|
ecFlow placeholders. WGF = wave. FHR = forecast hour. |
${HOMEgfs}/jobs/JGLOBAL_WAVE_GEMPAK |
Shared global wave GEMPAK J-Job. |
Single .ecf backs per-forecast-hour ecFlow tasks (jgfs_wave_gempak_f000.ecf,
jgfs_wave_gempak_f003.ecf, etc.). Each task overrides FHR and FHR_LIST.
ecf/defs/gfs_prod.def : task jgfs_wave_gempak_fNNN
+-- jgfs_wave_gempak_master.ecf (PBS submit; deployed as *_fNNN.ecf)
+-- ${HOMEgfs}/jobs/JGLOBAL_WAVE_GEMPAK (J-Job, shared GFS/GDAS)
+-- wave_domain_grid.sh (sourced: grid config helper)
+-- ${SCRglobal}/exgfs_wave_nawips.sh (ex-script)
+-- nagrib2_nc per wave grid (GRIB2 to GEMPAK conversion)
Confirmed via MCP graph (tenant gw_v17): JGLOBAL_WAVE_GEMPAK is a suite leaf
with 0 direct dependents.
The J-Job iterates over all configured wave grids (GEMPAK_GRIDS from config.wavegempak)
and converts their GRIB2 output into GEMPAK grid files:
| Input | Output | Location |
|---|---|---|
| Wave gridded GRIB2 per region/resolution | GEMPAK .gem grid files |
${COMOUT_WAVE_GEMPAK}/ |
The wave_domain_grid.sh helper is sourced to resolve each grid ID into region/resolution
metadata used to construct dynamic COMIN paths (COMIN_WAVE_GRID_${REGION}_${RES}).
DBN alert type: GFS_WAVE_GEMPAK
Uses the EE2-correct pattern: "${SCRglobal}/exgfs_wave_nawips.sh" && true followed by
err_exit on non-zero.
| Variable | Origin | Meaning |
|---|---|---|
WGF / COMPONENT
|
suite edit (wave) |
Wave component identifier. |
FHR / FORECAST_HOUR
|
per-task edit
|
Forecast hour. |
GEMPAK_GRIDS |
config.wavegempak | Space-separated list of wave grid IDs to process. |
COMOUT_WAVE_GEMPAK |
J-Job (declare -rx) |
Output COM directory for wave GEMPAK grids. |
COMIN_WAVE_GRID_* |
J-Job (dynamic declare -rx) |
Per-grid input COM paths. |
DBN_ALERT_TYPE |
J-Job (GFS_WAVE_GEMPAK) |
DBNet alert type. |
The J-Job sources jjob_header.sh -e "wavegempak" -c "base wave wavegempak", loading:
-
config.base— fundamental paths. -
config.wave— wave model settings. -
config.wavegempak— wave GEMPAK-specific grid list and settings.
-
Shared J-Job:
JGLOBAL_WAVE_GEMPAKis used by both GFS and GDAS wave GEMPAK tasks. -
Dynamic grid iteration: uses
wave_domain_grid.shto resolve grid IDs into structured metadata, allowing flexible grid configuration without code changes. - High CPU / low memory: 128 cpus for parallel nagrib across multiple grids but only 1 GB memory (wave grid conversion is compute-bound, not memory-bound).
-
_mastertemplate with per-hour deployment. -
Centralized module loading via
load_modules.sh run. -
HOMEglobalshim bridges v17 naming to NCO.
| Symbol | Change type | Risk | Direct dependents |
|---|---|---|---|
JGLOBAL_WAVE_GEMPAK |
behavior | LOW (0.10) | 0 (suite leaf) |
exgfs_wave_nawips.sh |
signature | LOW | Single J-Job caller per system |
wave_domain_grid.sh |
behavior | MEDIUM | Shared across multiple wave J-Jobs |
The J-Job is a suite leaf. However, wave_domain_grid.sh is shared by many wave
processing jobs — changes there have broader impact.
- On-disk v17 worktree:
ecf/scripts/gfs/product/wave/gempak/jgfs_wave_gempak_master.ecf,dev/jobs/JGLOBAL_WAVE_GEMPAK. -
agentcore-mcp-ragMCP (tenantgw_v17):get_change_impact.