Skip to content

Source set_strict rather than call it as a function (#4690)#4697

Merged
CoryMartin-NOAA merged 2 commits into
NOAA-EMC:dev/gcafs.v1from
CoryMartin-NOAA:feature/strict-gcafs
Mar 24, 2026
Merged

Source set_strict rather than call it as a function (#4690)#4697
CoryMartin-NOAA merged 2 commits into
NOAA-EMC:dev/gcafs.v1from
CoryMartin-NOAA:feature/strict-gcafs

Conversation

@CoryMartin-NOAA
Copy link
Copy Markdown
Contributor

Description

To adhere to NWS operational standards, we must, rather than define and execute bash functions to set and unset strict mode, source ush scripts that set and unset strict mode. This PR removes the functions and instead creates simplified bash that can be sourced, and all places that previously called the functions have been replaced by a source of the scripts.

Additionally, the set_strict has been removed from jjob_shell_setup and is now explicitly called at the top of every j-job.

Resolves ##4682

Type of change

  • Bug fix (fixes something broken)
  • New feature (adds functionality)
  • Maintenance (code refactor, clean-up, new CI test, etc.)

Change characteristics

  • Is this change expected to change outputs (e.g. value changes to existing outputs, new files stored in COM, files removed from COM, filename changes, additions/subtractions to archives)? NO
  • Is this a breaking change (a change in existing functionality)? NO
  • Does this change require a documentation update? NO
  • Does this change require an update to any of the following submodules? No - [ ] EMC verif-global
    • GDAS
    • GFS-utils
    • GSI
    • GSI-monitor
    • GSI-utils
    • UFS-utils
    • UFS-weather-model
    • wxflow

How has this been tested?

On Ursa:

############################### C48_ATM ################################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103231200        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:20:05
############################### C48_S2SW ###############################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103231200        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:20:05
########################## C48_gsienkf_atmDA ###########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:30:07
202402240000        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:25:06
202402240600        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:10:05
########################## C48_ufsenkf_atmDA ###########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:30:07
202402240000        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:40:07
202402240600        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:30:08
######################### C48mx500_3DVarAOWCDA #########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103241800        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:25:06
202103250000        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:05:07
########################## C48mx500_hybAOWCDA ##########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103241800        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:40:06
202103250000        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:45:07
########################### C96C48_hybatmDA ############################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201800        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:35:07
202112210000        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:05:07
202112210600        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:40:07
######################### C96C48_hybatmsnowDA ##########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:40:06
202112201800        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:10:05
202112210000        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:30:08
######################### C96C48_hybatmsoilDA ##########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202205150600        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:40:06
202205151200        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:20:06
202205151800        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:45:08
######################### C96C48_ufs_hybatmDA ##########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:40:05
202402240000        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:25:07
202402240600        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:30:08
######################## C96C48_ufsgsi_hybatmDA ########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:40:05
202402240000        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:25:07
202402240600        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:35:06
####################### C96C48mx500_S2SW_cyc_gfs #######################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:50:07
202112201800        Done    Mar 20 2026 19:10:07    Mar 20 2026 22:10:06
202112210000        Done    Mar 20 2026 19:10:07    Mar 20 2026 22:35:06
############################# C96_atm3DVar #############################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201800        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:35:07
202112210000        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:15:07
202112210600        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:40:07
########################### C96_gcafs_cycled ###########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:30:06
202112201800        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:20:06
202112210000        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:05:07
######################## C96_gcafs_cycled_noDA #########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:30:06
202112201800        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:00:08
202112210000        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:40:07

Checklist

  • Any dependent changes have been merged and published
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have documented my code, including function, input, and output descriptions
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • This change is covered by an existing CI test or a new one has been added
  • Any new scripts have been added to the .github/CODEOWNERS file with owners
  • I have made corresponding changes to the system documentation if necessary

Description

Type of change

  • Bug fix (fixes something broken)
  • New feature (adds functionality)
  • Maintenance (code refactor, clean-up, new CI test, etc.)

Change characteristics

  • Is this change expected to change outputs (e.g. value changes to existing outputs, new files stored in COM, files removed from COM, filename changes, additions/subtractions to archives)? YES/NO (If YES, please indicate to which system(s))
    • GFS
    • GEFS
    • SFS
    • GCAFS
  • Is this a breaking change (a change in existing functionality)? YES/NO
  • Does this change require a documentation update? YES/NO
  • Does this change require an update to any of the following submodules? YES/NO (If YES, please add a link to any PRs that are pending.)
    • EMC verif-global
    • GDAS
    • GFS-utils
    • GSI
    • GSI-monitor
    • GSI-utils
    • UFS-utils
    • UFS-weather-model
    • wxflow

How has this been tested?

Checklist

  • Any dependent changes have been merged and published
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have documented my code, including function, input, and output descriptions
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • This change is covered by an existing CI test or a new one has been added
  • Any new scripts have been added to the .github/CODEOWNERS file with owners
  • I have made corresponding changes to the system documentation if necessary

CoryMartin-NOAA and others added 2 commits March 24, 2026 15:33
# Description
To adhere to NWS operational standards, we must, rather than define and
execute bash functions to set and unset strict mode, source `ush`
scripts that set and unset strict mode. This PR removes the functions
and instead creates simplified bash that can be sourced, and all places
that previously called the functions have been replaced by a source of
the scripts.

Additionally, the set_strict has been removed from jjob_shell_setup and
is now explicitly called at the top of every j-job.

  Resolves #NOAA-EMC#4682

# Type of change
- [ ] Bug fix (fixes something broken)
- [ ] New feature (adds functionality)
- [x] Maintenance (code refactor, clean-up, new CI test, etc.)

# Change characteristics
<!-- Choose YES or NO from each of the following and delete the other
-->
- Is this change expected to change outputs (e.g. value changes to
existing outputs, new files stored in COM, files removed from COM,
filename changes, additions/subtractions to archives)? NO
- Is this a breaking change (a change in existing functionality)? NO
- Does this change require a documentation update? NO
- Does this change require an update to any of the following submodules?
No - [ ] EMC verif-global <!-- NOAA-EMC/EMC_verif-global#1234 -->
  - [ ] GDAS <!-- NOAA-EMC/GDASApp#1234 -->
  - [ ] GFS-utils <!-- NOAA-EMC/gfs-utils#1234 -->
  - [ ] GSI <!-- NOAA-EMC/GSI#1234 -->
  - [ ] GSI-monitor <!-- NOAA-EMC/GSI-Monitor#1234 -->
  - [ ] GSI-utils <!-- NOAA-EMC/GSI-Utils#1234 -->
  - [ ] UFS-utils <!-- ufs-community/UFS_UTILS#1234 -->
  - [ ] UFS-weather-model <!-- ufs-community/ufs-weather-model#1234 -->
  - [ ] wxflow <!-- NOAA-EMC/wxflow#1234 -->

# How has this been tested?
<!-- Please list any test you conducted, including the machine.

Include the output of `gw_cistat -r /path/to/RUNTESTS/directory` for the
tests you ran.
`gw_cistat` is available after sourcing the `gw_setup.sh` script in
`dev/ush/`.

Example:
- Clone and build on WCOSS
- Cycled test on Orion
- Forecast-only on Hera
-->
On Ursa:
```
############################### C48_ATM ################################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103231200        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:20:05
############################### C48_S2SW ###############################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103231200        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:20:05
########################## C48_gsienkf_atmDA ###########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:30:07
202402240000        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:25:06
202402240600        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:10:05
########################## C48_ufsenkf_atmDA ###########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:30:07
202402240000        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:40:07
202402240600        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:30:08
######################### C48mx500_3DVarAOWCDA #########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103241800        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:25:06
202103250000        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:05:07
########################## C48mx500_hybAOWCDA ##########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103241800        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:40:06
202103250000        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:45:07
########################### C96C48_hybatmDA ############################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201800        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:35:07
202112210000        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:05:07
202112210600        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:40:07
######################### C96C48_hybatmsnowDA ##########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:40:06
202112201800        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:10:05
202112210000        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:30:08
######################### C96C48_hybatmsoilDA ##########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202205150600        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:40:06
202205151200        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:20:06
202205151800        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:45:08
######################### C96C48_ufs_hybatmDA ##########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:40:05
202402240000        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:25:07
202402240600        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:30:08
######################## C96C48_ufsgsi_hybatmDA ########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:40:05
202402240000        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:25:07
202402240600        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:35:06
####################### C96C48mx500_S2SW_cyc_gfs #######################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:50:07
202112201800        Done    Mar 20 2026 19:10:07    Mar 20 2026 22:10:06
202112210000        Done    Mar 20 2026 19:10:07    Mar 20 2026 22:35:06
############################# C96_atm3DVar #############################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201800        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:35:07
202112210000        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:15:07
202112210600        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:40:07
########################### C96_gcafs_cycled ###########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:30:06
202112201800        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:20:06
202112210000        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:05:07
######################## C96_gcafs_cycled_noDA #########################
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Mar 20 2026 19:10:07    Mar 20 2026 19:30:06
202112201800        Done    Mar 20 2026 19:10:07    Mar 20 2026 21:00:08
202112210000        Done    Mar 20 2026 19:10:07    Mar 20 2026 20:40:07
```

# Checklist
- [x] Any dependent changes have been merged and published
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have documented my code, including function, input, and output
descriptions
- [x] My changes generate no new warnings
- [x] New and existing tests pass with my changes
- [x] This change is covered by an existing CI test or a new one has
been added
- [x] Any new scripts have been added to the .github/CODEOWNERS file
with owners
- [x] I have made corresponding changes to the system documentation if
necessary
@CoryMartin-NOAA CoryMartin-NOAA self-assigned this Mar 24, 2026
@CoryMartin-NOAA CoryMartin-NOAA marked this pull request as ready for review March 24, 2026 15:38
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

shellcheck

⚠️ [shellcheck] reported by reviewdog 🐶
This } is literal. Check expression (missing ;/\n?) or quote it. SC1083


🚫 [shellcheck] reported by reviewdog 🐶
Couldn't parse this brace group. Fix to allow more checks. SC1073


🚫 [shellcheck] reported by reviewdog 🐶
You need a space after the '{'. SC1054


⚠️ [shellcheck] reported by reviewdog 🐶
This } is literal. Check expression (missing ;/\n?) or quote it. SC1083


🚫 [shellcheck] reported by reviewdog 🐶
Expected a '}'. If you have one, try a ; or \n in front of it. SC1056

https://github.com/NOAA-EMC/global-workflow/blob/295f47cb75b0341a8f548593a0ba11f18347f43e/dev/jobs/JGLOBAL_OFFLINE_ATMOS_ANALYSIS.j2#L74


🚫 [shellcheck] reported by reviewdog 🐶
Missing '}'. Fix any mentioned problems and try again. SC1072

https://github.com/NOAA-EMC/global-workflow/blob/295f47cb75b0341a8f548593a0ba11f18347f43e/dev/jobs/JGLOBAL_OFFLINE_ATMOS_ANALYSIS.j2#L74

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

shellcheck

⚠️ [shellcheck] reported by reviewdog 🐶
This } is literal. Check expression (missing ;/\n?) or quote it. SC1083


🚫 [shellcheck] reported by reviewdog 🐶
Couldn't parse this brace group. Fix to allow more checks. SC1073


🚫 [shellcheck] reported by reviewdog 🐶
You need a space after the '{'. SC1054


⚠️ [shellcheck] reported by reviewdog 🐶
This } is literal. Check expression (missing ;/\n?) or quote it. SC1083


🚫 [shellcheck] reported by reviewdog 🐶
Expected a '}'. If you have one, try a ; or \n in front of it. SC1056

https://github.com/NOAA-EMC/global-workflow/blob/4c10e9b9cb67c6e0823baca86996ef1a97a17774/dev/jobs/JGLOBAL_OFFLINE_ATMOS_ANALYSIS.j2#L77


🚫 [shellcheck] reported by reviewdog 🐶
Missing '}'. Fix any mentioned problems and try again. SC1072

https://github.com/NOAA-EMC/global-workflow/blob/4c10e9b9cb67c6e0823baca86996ef1a97a17774/dev/jobs/JGLOBAL_OFFLINE_ATMOS_ANALYSIS.j2#L77

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [shellcheck] reported by reviewdog 🐶
You need a space after the '{'. SC1054

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [shellcheck] reported by reviewdog 🐶
This } is literal. Check expression (missing ;/\n?) or quote it. SC1083

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [shellcheck] reported by reviewdog 🐶
You need a space after the '{'. SC1054

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [shellcheck] reported by reviewdog 🐶
This } is literal. Check expression (missing ;/\n?) or quote it. SC1083

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [shellcheck] reported by reviewdog 🐶
You need a space after the '{'. SC1054

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [shellcheck] reported by reviewdog 🐶
This } is literal. Check expression (missing ;/\n?) or quote it. SC1083

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [shellcheck] reported by reviewdog 🐶
You need a space after the '{'. SC1054

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [shellcheck] reported by reviewdog 🐶
This } is literal. Check expression (missing ;/\n?) or quote it. SC1083

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 [shellcheck] reported by reviewdog 🐶
The mentioned syntax error was in this brace group. SC1009

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [shellcheck] reported by reviewdog 🐶
You need a space after the '{'. SC1054

Copy link
Copy Markdown
Contributor

@TravisElless-NOAA TravisElless-NOAA left a comment

Choose a reason for hiding this comment

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

Looks fine to me

@CoryMartin-NOAA CoryMartin-NOAA merged commit c71e84d into NOAA-EMC:dev/gcafs.v1 Mar 24, 2026
4 of 5 checks passed
@CoryMartin-NOAA CoryMartin-NOAA deleted the feature/strict-gcafs branch March 24, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants