Skip to content
Open
Show file tree
Hide file tree
Changes from 86 commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
e47fa99
chore(ecflow): Add ECF scripts and workflow utilities for GFS forecas…
AntonMFernando-NOAA Sep 17, 2026
01565f9
Merge branch 'NOAA-EMC:develop' into feature/ecflow-c48-atm
AntonMFernando-NOAA Sep 17, 2026
a91692b
fix(ecflow): Escape printf format string in atmos_prod.ecf
AntonMFernando-NOAA Sep 17, 2026
42ea946
feat(ecflow): Add cleanup status tracking and conditional experiment …
AntonMFernando-NOAA Sep 17, 2026
58eebed
docs(ecflow): Update documentation from symlink to script directory a…
AntonMFernando-NOAA Sep 18, 2026
85e340a
feat(ecflow): Add C48_ATM test case loader and generalize ecFlow case…
AntonMFernando-NOAA Sep 18, 2026
3f56beb
feat(ecflow): Add C48_ATM ecFlow suite with task mappings and triggers
AntonMFernando-NOAA Sep 21, 2026
8fc8005
refactor(ecflow): Restructure task definitions into modular factory p…
AntonMFernando-NOAA Sep 21, 2026
2c32c1b
feat(ecflow): Add CLI overrides for pslot, expdir, and comroot
AntonMFernando-NOAA Sep 21, 2026
f6520eb
feat(ecflow): Add CLI override for STMP path
AntonMFernando-NOAA Sep 21, 2026
1879715
Merge branch 'NOAA-EMC:develop' into feature/ecflow-c48-atm
AntonMFernando-NOAA Sep 21, 2026
2b77f19
refactor(ecflow): Rename symlink_map to copy_map for clarity
AntonMFernando-NOAA Sep 22, 2026
b29762a
fix(gfs): Add Ursa machine support and improve ecflow error handling
AntonMFernando-NOAA Sep 22, 2026
8fd30b8
feat(ecflow): Add ECF_HOME requirement and improve suite loading UX
AntonMFernando-NOAA Sep 22, 2026
436542b
fix(ecflow): Improve suite deletion with suspension and timeout handling
AntonMFernando-NOAA Sep 22, 2026
53f6f84
fix(ecflow): Improve suite deletion with forced kill and streamlined …
AntonMFernando-NOAA Sep 22, 2026
6598032
docs(ecflow): Add comprehensive guide for running C48_ATM with ecFlow
AntonMFernando-NOAA Sep 22, 2026
c8e2b7c
fix(ecflow): Fix sys.path resolution for ecflow package imports
AntonMFernando-NOAA Sep 23, 2026
e4b7f43
fix(ecflow): Remove --load-only flag and always defer suite start
AntonMFernando-NOAA Sep 23, 2026
169815d
fix(ecflow): Add suite deletion command to post-load instructions
AntonMFernando-NOAA Sep 23, 2026
543291f
docs(ecflow): Simplify ecFlow server configuration to use per-user in…
AntonMFernando-NOAA Sep 23, 2026
5c5f575
fix(ecflow): Add STMP, PTMP, HOMEDIR, and NOSCRUB to environment vari…
AntonMFernando-NOAA Sep 23, 2026
378c660
docs(ecflow): Remove --load-only flag and clarify suite loading behavior
AntonMFernando-NOAA Sep 23, 2026
1b83de9
refactor(ecflow): Replace static slurm.h include with dynamic ecf_sba…
AntonMFernando-NOAA Sep 24, 2026
2cde914
refactor(ecflow): Simplify cycle family naming to use hour only
AntonMFernando-NOAA Sep 24, 2026
653af92
fix(ecflow): Add PDY and cyc stub variables to ecf_sbatch.sh
AntonMFernando-NOAA Sep 24, 2026
4cc25f4
fix(ecflow): Update PDY stub variable default value in ecf_sbatch.sh
AntonMFernando-NOAA Sep 24, 2026
137f85e
refactor(ecflow): Restructure suite family hierarchy to cycle-then-ru…
AntonMFernando-NOAA Sep 24, 2026
a734d07
fix(ecflow): Create job output directory before submitting batch job
AntonMFernando-NOAA Sep 24, 2026
c5f0df8
fix(ecflow): Create ECF_HOME subdirectories before suite submission
AntonMFernando-NOAA Sep 24, 2026
7932507
fix(ecflow): Reorder ecf_sbatch.sh arguments to move ECF_JOB last
AntonMFernando-NOAA Sep 24, 2026
a395234
fix(ecflow): Add shebang to head.h utility script
AntonMFernando-NOAA Sep 24, 2026
722b2b5
fix(ecflow): Add fallback logic for ACCOUNT variable in ecf_sbatch.sh
AntonMFernando-NOAA Sep 24, 2026
f988847
fix(ecflow): Remove ACCOUNT and QUEUE from ecf_sbatch.sh arguments
AntonMFernando-NOAA Sep 24, 2026
f99a5be
fix(ecflow): Remove -u from set -eu in ecf_sbatch.sh and add fcst con…
AntonMFernando-NOAA Sep 24, 2026
bd11657
fix(ecflow): Rename TASK to STEP for consistency with config.resources
AntonMFernando-NOAA Sep 24, 2026
d1bea2d
docs(ecflow): Add machine detection workaround and clarify HOMEglobal…
AntonMFernando-NOAA Sep 25, 2026
b382602
fix(detect_machine.sh): Improve machine detection logic with hostname…
AntonMFernando-NOAA Sep 25, 2026
e2c01cd
docs(ecflow): Update README with dedicated ecFlow node requirement
AntonMFernando-NOAA Sep 25, 2026
e698161
docs(ecflow): Add comprehensive process flow documentation for C48_AT…
AntonMFernando-NOAA Sep 25, 2026
0378d98
Merge branch 'NOAA-EMC:develop' into feature/ecflow-c48-atm
AntonMFernando-NOAA Sep 28, 2026
7d60635
fix(ecflow): Consolidate Slurm configuration into dedicated header file
AntonMFernando-NOAA Sep 28, 2026
73c185a
fix(ecflow): Remove hardcoded ecFlow server connection settings from …
AntonMFernando-NOAA Sep 28, 2026
5ffb0c9
refactor(ecflow): Reorganize scripts and headers into category-based …
AntonMFernando-NOAA Sep 28, 2026
e0fd718
feat(ecflow): Switch trigger references from relative to absolute paths
AntonMFernando-NOAA Sep 28, 2026
21bb26c
refactor(ecflow): Move tracker and genesis scripts to dedicated track…
AntonMFernando-NOAA Sep 28, 2026
a363ef1
refactor(ecflow): Remove slurm.h header and embed Slurm directives in…
AntonMFernando-NOAA Sep 28, 2026
3b25851
refactor(ecflow): Separate #SBATCH headers from ecf scripts for sync …
AntonMFernando-NOAA Sep 28, 2026
4cffd47
refactor(ecflow): Decouple source and destination paths in script cop…
AntonMFernando-NOAA Sep 28, 2026
c8a366a
feat(ecflow): Scale forecast task resources by forecast group size
AntonMFernando-NOAA Sep 28, 2026
2e0b7d6
style(ecflow): Suppress shellcheck warnings for ecFlow preprocessor d…
AntonMFernando-NOAA Sep 28, 2026
1417d0b
style(ecflow): Improve readability of copy map assignment
AntonMFernando-NOAA Sep 28, 2026
782bc8c
style(ecflow): Normalize indentation in sync_ecf_scripts.sh
AntonMFernando-NOAA Sep 28, 2026
39c7854
refactor(ecflow): Improve readability of ROTDIR default path assignment
AntonMFernando-NOAA Sep 28, 2026
5c3ca60
docs(ecflow): Update README with accurate login node and workflow set…
AntonMFernando-NOAA Sep 28, 2026
aa0edc0
docs(ecflow): Add guidance for starting server if ping fails
AntonMFernando-NOAA Sep 28, 2026
e5cc612
docs(ecflow): Add MACHINE_ID export to prevent misdetection on ufe nodes
AntonMFernando-NOAA Sep 28, 2026
8772aab
docs(ecflow): Remove outdated reference to Rocoto comparison document
AntonMFernando-NOAA Sep 28, 2026
0a56ecd
docs(ecflow): Add troubleshooting guidance for Python import errors
AntonMFernando-NOAA Sep 28, 2026
1b2502f
docs(ecflow): Add Slurm job cancellation guidance
AntonMFernando-NOAA Sep 28, 2026
4b9bc88
docs(ecflow): Add RUNDIRS cleanup to removal instructions
AntonMFernando-NOAA Sep 28, 2026
11d0fbf
docs(ecflow): Fix RUNDIRS path to use STMP instead of RUNTESTS
AntonMFernando-NOAA Sep 28, 2026
7da0f61
docs(ecflow): Add guidance for resuming partial runs with preserved o…
AntonMFernando-NOAA Sep 28, 2026
1510c9d
Merge branch 'develop' into feature/ecflow-c48-atm
AntonMFernando-NOAA Sep 29, 2026
b9b78e8
fix(detect_machine): refine hostname detection for Ursa nodes
AntonMFernando-NOAA Sep 30, 2026
ee50d6a
docs(ecflow): Update README to clarify Ursa-specific paths and settings
AntonMFernando-NOAA Sep 30, 2026
0f77507
fix(ecflow): update 'wavepostpnt' task type from 'verf' to 'product'
AntonMFernando-NOAA Oct 1, 2026
eb3c7c7
Merge branch 'NOAA-EMC:develop' into feature/ecflow-c48-atm
AntonMFernando-NOAA Oct 2, 2026
394a5a1
fix(gfs_cycled): update task names to conditionally include 'earc_tars'
AntonMFernando-NOAA Oct 5, 2026
d965228
feat(ecflow): Enable arch_tars on Ursa in the C48_ATM_ecflow test
AntonMFernando-NOAA Oct 5, 2026
d09a6d2
fix(ecflow): update YAML reference to use gfs_defaults_ci.yaml and re…
AntonMFernando-NOAA Oct 5, 2026
29197c3
feat(ecflow): update ecFlow tasks and configurations for improved wor…
AntonMFernando-NOAA Oct 5, 2026
8402484
feat(ecflow): add icsdir configuration for C48_ATM experiment
AntonMFernando-NOAA Oct 5, 2026
40b8b90
fix(ecflow): remove 'yaml' from skip_keys in create_experiment function
AntonMFernando-NOAA Oct 5, 2026
8469790
feat(ecflow): implement metatask for arch_tars and update task handling
AntonMFernando-NOAA Oct 5, 2026
90d5f2a
refactor(ecflow): rename _metatask to _tarball_task and update parame…
AntonMFernando-NOAA Oct 5, 2026
38bf38d
refactor(ecflow): rename metatask to tarball_task for clarity and upd…
AntonMFernando-NOAA Oct 5, 2026
21855b3
feat(ecflow): add check_host_supported function to validate host comp…
AntonMFernando-NOAA Oct 5, 2026
3749232
refactor(ecflow): update copy options for PSLOT files in expdir.yaml.j2
AntonMFernando-NOAA Oct 6, 2026
2a2dbbd
Merge branch 'NOAA-EMC:develop' into feature/ecflow-c48-atm
AntonMFernando-NOAA Oct 6, 2026
89492f2
feat(gfs): add dependency for enkfonly_atm ensemble post-processing
AntonMFernando-NOAA Oct 6, 2026
36b27c1
Merge branch 'NOAA-EMC:develop' into feature/ecflow-c48-atm
AntonMFernando-NOAA Oct 6, 2026
984d0ca
refactor(ecflow): rename entry point script to run_ecflow_case.py and…
AntonMFernando-NOAA Oct 6, 2026
90df4dc
refactor(ecflow): remove ecflow_workflow_tasks.py as it is no longer …
AntonMFernando-NOAA Oct 6, 2026
024b132
Merge branch 'NOAA-EMC:develop' into feature/ecflow-c48-atm
AntonMFernando-NOAA Oct 8, 2026
cefe253
Merge branch 'NOAA-EMC:develop' into feature/ecflow-c48-atm
AntonMFernando-NOAA Oct 9, 2026
af12164
Remove C48_ATM_ecflow.yaml configuration file
AntonMFernando-NOAA Oct 15, 2026
d577e56
Add C48_ATM_ecflow.yaml configuration and update related documentation
AntonMFernando-NOAA Oct 15, 2026
8171678
Update usage instructions for load_ecflow_case.py to include alternat…
AntonMFernando-NOAA Oct 15, 2026
d4512af
Merge branch 'NOAA-EMC:develop' into feature/ecflow-c48-atm
AntonMFernando-NOAA Oct 16, 2026
e30ca32
Refactor ecFlow setup and client commands to eliminate environment va…
AntonMFernando-NOAA Oct 16, 2026
3da7ec2
Update ecFlow paths to use HOME directory instead of hardcoded paths
AntonMFernando-NOAA Oct 16, 2026
81a085f
Enhance run_ecflow_case.py usage by adding optional parameters for YA…
AntonMFernando-NOAA Oct 16, 2026
7020013
Update documentation to use placeholder for port in ecFlow commands a…
AntonMFernando-NOAA Oct 16, 2026
8d5ddc8
Refactor README to clarify ecFlow server startup process and log file…
AntonMFernando-NOAA Oct 16, 2026
dcad543
Add C48_ATM ecFlow configuration and update references in documentation
AntonMFernando-NOAA Oct 16, 2026
b7c5ef5
Update log file handling in ecFlow configuration and scripts for cycl…
AntonMFernando-NOAA Oct 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev/ci/cases/pr/C48_ATM_ecflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ experiment:
resdetatmos: 48
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ BASE_IC }}/C48mx500/20250808
idate: 2021032312
edate: 2021032312
yaml: {{ HOMEglobal }}/dev/ci/cases/yamls/gfs_defaults_ci.yaml

skip_ci_on_hosts:
- wcoss2
- hera
- ursa

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generate_workflows.py will not work with this test activated on Ursa. Suggest keeping this skip in place and removing from the gitlab hosts yaml for the time being.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TravisElless-NOAA This YAML file is intended for the ecFlow test only. A duplicate YAML file is currently used for Rocoto runs, but I’ll eliminate the duplication in the next PR for the Rocoto GEFS case.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @AntonMFernando-NOAA, but I think we will need to address this here. As shown below running the generate_workflows script causes an error to occur and prevents things from running with the way things are currently setup. I don't want this to bring down the whole test system on Ursa

[Travis.J.Elless@ufe02 workflow]$ ./generate_workflows.sh -c -t test_5302 -GESC -A fv3-cpu /scratch4/NCEPDEV/stmp/Travis.J.Elless/tests/pr5302
Running all GEFS cases in /scratch3/NCEPDEV/global/Travis.J.Elless/global-workflow/pr5302/global-workflow/dev/ci/cases/pr

Running all GFS cases in /scratch3/NCEPDEV/global/Travis.J.Elless/global-workflow/pr5302/global-workflow/dev/ci/cases/pr

Running all SFS cases in /scratch3/NCEPDEV/global/Travis.J.Elless/global-workflow/pr5302/global-workflow/dev/ci/cases/pr

Running all GCAFS cases in /scratch3/NCEPDEV/global/Travis.J.Elless/global-workflow/pr5302/global-workflow/dev/ci/cases/pr

Running create_experiment.py for 18 cases
C48_S2SWA_gefs
C48_ATM
C48_ATM_ecflow
Could not find a crontab file for case C48_ATM_ecflow_test_5302!
Expected to find /scratch4/NCEPDEV/stmp/Travis.J.Elless/tests/pr5302/EXPDIR/C48_ATM_ecflow_test_5302/C48_ATM_ecflow_test_5302.crontab

@AntonMFernando-NOAA AntonMFernando-NOAA Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @AntonMFernando-NOAA, but I think we will need to address this here. As shown below running the generate_workflows script causes an error to occur and prevents things from running with the way things are currently setup. I don't want this to bring down the whole test system on Ursa

[Travis.J.Elless@ufe02 workflow]$ ./generate_workflows.sh -c -t test_5302 -GESC -A fv3-cpu /scratch4/NCEPDEV/stmp/Travis.J.Elless/tests/pr5302
Running all GEFS cases in /scratch3/NCEPDEV/global/Travis.J.Elless/global-workflow/pr5302/global-workflow/dev/ci/cases/pr

Running all GFS cases in /scratch3/NCEPDEV/global/Travis.J.Elless/global-workflow/pr5302/global-workflow/dev/ci/cases/pr

Running all SFS cases in /scratch3/NCEPDEV/global/Travis.J.Elless/global-workflow/pr5302/global-workflow/dev/ci/cases/pr

Running all GCAFS cases in /scratch3/NCEPDEV/global/Travis.J.Elless/global-workflow/pr5302/global-workflow/dev/ci/cases/pr

Running create_experiment.py for 18 cases
C48_S2SWA_gefs
C48_ATM
C48_ATM_ecflow
Could not find a crontab file for case C48_ATM_ecflow_test_5302!
Expected to find /scratch4/NCEPDEV/stmp/Travis.J.Elless/tests/pr5302/EXPDIR/C48_ATM_ecflow_test_5302/C48_ATM_ecflow_test_5302.crontab

@TravisElless-NOAA Sorry, I think I misunderstood your concern. You are completely right. However, since we’re using the YAML files in dev/ci/cases/pr directly to run cases with generate_workflow, it would be better to move the YAML files used for this purpose to a separate directory, at least for the time being. Let me know if you have any other concerns. Made the changes.

- gaeac6
- orion
- hercules
Expand Down
2 changes: 1 addition & 1 deletion dev/ci/gitlab-ci-hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
- caseName: ["C48_ATM", "C48_S2SW", "C48_S2SWA_gefs", "C48mx500_3DVarAOWCDA", "C48mx500_hybAOWCDA", "C96C48_hybatmDA", "C96C48mx500_S2SW_cyc_gfs", "C96_atm3DVar", "C96mx100_S2S", "C96_gcafs_cycled"]

.ursa_cases_matrix: &ursa_cases
- caseName: ["C48_ATM", "C48_S2SW", "C48_S2SWA_gefs", "C48mx500_3DVarAOWCDA", "C48mx500_hybAOWCDA", "C96C48_hybatmDA", "C96C48_hybatmsnowDA", "C96C48_hybatmsoilDA", "C96C48_ufsgsi_hybatmDA", "C96C48_ufs_hybatmDA", "C96C48mx500_S2SW_cyc_gfs", "C96_atm3DVar", "C96mx100_S2S", "C96_gcafs_cycled", "C96_gcafs_cycled_noDA", "C48_gsienkf_atmDA", "C48_ufsenkf_atmDA"]
- caseName: ["C48_ATM", "C48_ATM_ecflow", "C48_S2SW", "C48_S2SWA_gefs", "C48mx500_3DVarAOWCDA", "C48mx500_hybAOWCDA", "C96C48_hybatmDA", "C96C48_hybatmsnowDA", "C96C48_hybatmsoilDA", "C96C48_ufsgsi_hybatmDA", "C96C48_ufs_hybatmDA", "C96C48mx500_S2SW_cyc_gfs", "C96_atm3DVar", "C96mx100_S2S", "C96_gcafs_cycled", "C96_gcafs_cycled_noDA", "C48_gsienkf_atmDA", "C48_ufsenkf_atmDA"]

.derecho_cases_matrix: &derecho_cases
- caseName: ["C48_ATM", "C48_S2SW", "C48_S2SWA_gefs", "C48mx500_3DVarAOWCDA", "C48mx500_hybAOWCDA", "C96C48_hybatmDA", "C96C48_hybatmsnowDA", "C96C48_hybatmsoilDA", "C96C48_ufsgsi_hybatmDA", "C96C48_ufs_hybatmDA", "C96C48mx500_S2SW_cyc_gfs", "C96_atm3DVar", "C96mx100_S2S", "C96_gcafs_cycled", "C96_gcafs_cycled_noDA"]
Expand Down
8 changes: 8 additions & 0 deletions dev/ecflow/include/envir.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Slurm-compatible environment header for Ursa
# Replaces envir-p1.h (PBS_JOBNAME/PBS_JOBID → Slurm equivalents)
export job=${job:-${SLURM_JOB_NAME:-$(basename "${ECF_JOB:-.}")}}
export jobid=${jobid:-${job}.${SLURM_JOB_ID:-$$}}

export RUN_ENVIR=${RUN_ENVIR:-emc}
export envir=%ENVIR%
export RUN=%RUN%
43 changes: 43 additions & 0 deletions dev/ecflow/include/head.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
date
hostname
set -xe

export PS4='+ $SECONDS + '

# Load ecflow module first so variable exports below take precedence
module load ecflow

# ecFlow communication variables
export ECF_NAME=%ECF_NAME%
export ECF_HOST=%ECF_HOST%
export ECF_PORT=%ECF_PORT%
export ECF_PASS=%ECF_PASS%
export ECF_TRYNO=%ECF_TRYNO%
export ECF_RID=${ECF_RID:-${SLURM_JOB_ID:-$(hostname -s).$$}}
export ECF_JOB=%ECF_JOB%
export ECF_JOBOUT=%ECF_JOBOUT%

# Preserve ECF_HOST/ECF_PORT for use after load_modules.sh resets modules
readonly _ECF_HOST_SAVED=%ECF_HOST%
readonly _ECF_PORT_SAVED=%ECF_PORT%

# Notify ecFlow that the task has started
timeout 300 ecflow_client --init=${ECF_RID}

# Error handler — restores ecflow_client and server coordinates
ERROR() {
set +ex
module load ecflow 2> /dev/null || true
export ECF_HOST="${_ECF_HOST_SAVED}"
export ECF_PORT="${_ECF_PORT_SAVED}"
if [ "$1" -eq 0 ]; then
msg="Killed by signal (likely via scancel)"
else
msg="Killed by signal $1"
fi
ecflow_client --abort="$msg"
echo "$msg"
trap 0
exit $1
}
trap 'ERROR $?' ERR EXIT
6 changes: 6 additions & 0 deletions dev/ecflow/include/tail.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module load ecflow 2> /dev/null || true
export ECF_HOST="${_ECF_HOST_SAVED}"
export ECF_PORT="${_ECF_PORT_SAVED}"
timeout 300 ecflow_client --complete
trap 0
exit 0
35 changes: 35 additions & 0 deletions dev/ecflow/scripts/forecast/fcst.ecf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
# shellcheck disable=SC1009,SC1072,SC1073
%include <head.h>
%include <envir.h>

set -x

export HOMEglobal=%HOMEglobal%
export EXPDIR=%EXPDIR%
export COMROOT=%COMROOT%
export DATAROOT=%DATAROOT%
export NET=%NET%
export PDY=%PDY%
export cyc=%CYC%
export machine=URSA

source "${HOMEglobal}/dev/ush/load_modules.sh" run

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would work on all machines - but this still means for operations we have to go through and do the module loads for each job, etc. Is that just something we're accepting?

@AntonMFernando-NOAA AntonMFernando-NOAA Oct 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JessicaMeixner-NOAA Since the module update hasn’t been brought into develop yet, I kept it as is for now. This is probably better handled as a separate PR to update all the ecFlow scripts accordingly?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be fair, this might be pretty hard to do without this and it work for all machines - but this is something that we should maybe think about moving forward for how we can have something that's ready for ops and that is machine portable for all machines.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JessicaMeixner-NOAA Thanks for the insight. We can discuss this further and come up with a plan for how to proceed.

status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR loading modules***"
exit "${status}"
fi

export job="fcst"
export jobid="${job}.${SLURM_JOB_ID:-$$}"
export FCST_SEGMENT=0

"${HOMEglobal}/dev/jobs/JGLOBAL_FCST"
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR RUNNING J-SCRIPT***"
exit "${status}"
fi

%include <tail.h>
34 changes: 34 additions & 0 deletions dev/ecflow/scripts/init/stage_ic.ecf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
# shellcheck disable=SC1009,SC1072,SC1073
%include <head.h>
%include <envir.h>

set -x

export HOMEglobal=%HOMEglobal%
export EXPDIR=%EXPDIR%
export COMROOT=%COMROOT%
export DATAROOT=%DATAROOT%
export NET=%NET%
export PDY=%PDY%
export cyc=%CYC%
export machine=URSA

source "${HOMEglobal}/dev/ush/load_modules.sh" run
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR loading modules***"
exit "${status}"
fi

export job="stage_ic"
export jobid="${job}.${SLURM_JOB_ID:-$$}"

"${HOMEglobal}/dev/jobs/JGLOBAL_STAGE_IC"
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR RUNNING J-SCRIPT***"
exit "${status}"
Comment on lines +30 to +31

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this in several .ecf scripts.
I could be wrong, but I think trap 'ERROR $?' ERR EXIT from head.h will also fire on exit, calling ecflow_client --abort a second time. A redundant abort call should be harmless. Is this an NCO convention?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AnnaSmoot-NOAA Corrected.

fi

%include <tail.h>
35 changes: 35 additions & 0 deletions dev/ecflow/scripts/post/arch_tars.ecf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
# shellcheck disable=SC1009,SC1072,SC1073
%include <head.h>
%include <envir.h>

set -x

export HOMEglobal=%HOMEglobal%
export EXPDIR=%EXPDIR%
export COMROOT=%COMROOT%
export DATAROOT=%DATAROOT%
export NET=%NET%
export PDY=%PDY%
export cyc=%CYC%
export TARBALL_TYPE=%TARBALL_TYPE%
export machine=URSA

source "${HOMEglobal}/dev/ush/load_modules.sh" run
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR loading modules***"
exit "${status}"
fi

export job="arch_tars"
export jobid="${job}.${SLURM_JOB_ID:-$$}"

"${HOMEglobal}/dev/jobs/JGLOBAL_ARCHIVE_TARS"
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR RUNNING J-SCRIPT***"
exit "${status}"
fi

%include <tail.h>
34 changes: 34 additions & 0 deletions dev/ecflow/scripts/post/arch_vrfy.ecf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
# shellcheck disable=SC1009,SC1072,SC1073
%include <head.h>
%include <envir.h>

set -x

export HOMEglobal=%HOMEglobal%
export EXPDIR=%EXPDIR%
export COMROOT=%COMROOT%
export DATAROOT=%DATAROOT%
export NET=%NET%
export PDY=%PDY%
export cyc=%CYC%
export machine=URSA

source "${HOMEglobal}/dev/ush/load_modules.sh" run
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR loading modules***"
exit "${status}"
fi

export job="arch_vrfy"
export jobid="${job}.${SLURM_JOB_ID:-$$}"

"${HOMEglobal}/dev/jobs/JGLOBAL_ARCHIVE_VRFY"
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR RUNNING J-SCRIPT***"
exit "${status}"
fi

%include <tail.h>
34 changes: 34 additions & 0 deletions dev/ecflow/scripts/post/cleanup.ecf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
# shellcheck disable=SC1009,SC1072,SC1073
%include <head.h>
%include <envir.h>

set -x

export HOMEglobal=%HOMEglobal%
export EXPDIR=%EXPDIR%
export COMROOT=%COMROOT%
export DATAROOT=%DATAROOT%
export NET=%NET%
export PDY=%PDY%
export cyc=%CYC%
export machine=URSA

source "${HOMEglobal}/dev/ush/load_modules.sh" run
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR loading modules***"
exit "${status}"
fi

export job="cleanup"
export jobid="${job}.${SLURM_JOB_ID:-$$}"

"${HOMEglobal}/dev/jobs/JGLOBAL_CLEANUP"
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR RUNNING J-SCRIPT***"
exit "${status}"
fi

%include <tail.h>
38 changes: 38 additions & 0 deletions dev/ecflow/scripts/post/metp.ecf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
# shellcheck disable=SC1009,SC1072,SC1073
%include <head.h>
%include <envir.h>

set -x

export HOMEglobal=%HOMEglobal%
export EXPDIR=%EXPDIR%
export COMROOT=%COMROOT%
export DATAROOT=%DATAROOT%
export NET=%NET%
export PDY=%PDY%
export cyc=%CYC%
export machine=URSA

source "${HOMEglobal}/dev/ush/load_modules.sh" run
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR loading modules***"
exit "${status}"
fi

# Rocoto runs one metp task per METplus use case; run them in sequence here
for METPCASE in g2g1 g2o1 pcp1; do
export METPCASE
export job="metp${METPCASE}"
export jobid="${job}.${SLURM_JOB_ID:-$$}"

"${HOMEglobal}/dev/jobs/JGFS_ATMOS_VERIFICATION"
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR RUNNING J-SCRIPT (${METPCASE})***"
exit "${status}"
fi
done

%include <tail.h>
45 changes: 45 additions & 0 deletions dev/ecflow/scripts/product/atmos_prod.ecf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
# shellcheck disable=SC1009,SC1072,SC1073
%include <head.h>
%include <envir.h>

set -x

export HOMEglobal=%HOMEglobal%
export EXPDIR=%EXPDIR%
export COMROOT=%COMROOT%
export DATAROOT=%DATAROOT%
export NET=%NET%
export PDY=%PDY%
export cyc=%CYC%
export machine=URSA

source "${HOMEglobal}/dev/ush/load_modules.sh" run
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR loading modules***"
exit "${status}"
fi

export job="atmos_products"

# Process the forecast hours assigned to this task via FHR_LIST.
# When run as a family child (generator .def), FHR_LIST is a
# comma-separated subset like "0,1,2,3,4". When run as a single
# task (static .def), set FHR_LIST to the full range externally.
export FORECAST_HOUR jobid
IFS=',' read -ra _fhrs <<< "%FHR_LIST%"
for fhr in "${_fhrs[@]}"; do
fhr3=$(printf '%%03d' "${fhr}")
export FORECAST_HOUR="${fhr}"
jobid="${job}_f${fhr3}.${SLURM_JOB_ID:-$$}"

"${HOMEglobal}/dev/jobs/JGLOBAL_ATMOS_PRODUCTS"
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR at f${fhr3}***"
exit "${status}"
fi
done
Comment on lines +31 to +43

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suite generator groups forecast hours (e.g. f004_f007 = "4,5,6,7") and scales the Slurm walltime by the group size in _scaled_resources(). That scaling assumes the J-Job is called once per group and processes all the hours together.

What this script actually does is the opposite: it calls JGLOBAL_ATMOS_PRODUCTS once per hour, serially, inside a single Slurm job, and each call sees FHR_LIST set to just one hour. That has a few downsides:

  1. The J-Job never sees the group. It only ever sees one hour at a time, so any internal parallelism or batching it might do is bypassed.
  2. Walltime was scaled for a group running together, so serializing wastes budget (or risks timeouts if the group grows).
  3. It diverges from how Rocoto drives the same J-Job (Rocoto passes the whole FHR_LIST / FHR_GRP range).
  4. On failure, the abort message points at a single hour (e.g. "aborted at f005") rather than the group, which makes triage harder.

Was the per-hour loop intentional, like is JGLOBAL_ATMOS_PRODUCTS unable to accept a comma-separated FHR_LIST?

An alternative could look like:

export job="atmos_products"
export FHR_LIST="%FHR_LIST%"
export jobid="${job}_group.${SLURM_JOB_ID:-$$}"

"${HOMEglobal}/dev/jobs/JGLOBAL_ATMOS_PRODUCTS"
status=$?
if [[ ${status} -ne 0 ]]; then
  ecflow_client --msg="***JOB ${ECF_NAME} ERROR on FHR_LIST=${FHR_LIST}***"
  ecflow_client --abort
  exit "${status}"
fi

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AnnaSmoot-NOAA Good catch. All of these issues were caused by setting FH_LIST=$fhr inside the loop, which was incorrect. Once that is set, it follows the Rocoto system. I corrected the issue and ran a test to confirm that everything works as expected.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!


%include <tail.h>
34 changes: 34 additions & 0 deletions dev/ecflow/scripts/track/genesis.ecf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
# shellcheck disable=SC1009,SC1072,SC1073
%include <head.h>
%include <envir.h>

set -x

export HOMEglobal=%HOMEglobal%
export EXPDIR=%EXPDIR%
export COMROOT=%COMROOT%
export DATAROOT=%DATAROOT%
export NET=%NET%
export PDY=%PDY%
export cyc=%CYC%
export machine=URSA

source "${HOMEglobal}/dev/ush/load_modules.sh" run
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR loading modules***"
exit "${status}"
fi

export job="genesis"
export jobid="${job}.${SLURM_JOB_ID:-$$}"

"${HOMEglobal}/dev/jobs/JGFS_ATMOS_CYCLONE_GENESIS"
status=$?
if [[ ${status} -ne 0 ]]; then
ecflow_client --msg="***JOB ${ECF_NAME} ERROR RUNNING J-SCRIPT***"
exit "${status}"
fi

%include <tail.h>
Loading
Loading