Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance safeguards in getsigensmeanp_smooth and recentersigp #41

Merged
merged 2 commits into from
May 14, 2024

Conversation

RussTreadon-NOAA
Copy link
Contributor

CI testing of g-w PR #2592 identified sections of unsafe coding in getsigensmeanp_smooth_ncep.f90 and recentersigp.f90. This PR adds safeguards these source code files which

  • initialize variables before being used
  • check allocate status before deallocating
  • check the correct error return codes from subroutines

Resolves #40

@RussTreadon-NOAA RussTreadon-NOAA self-assigned this May 14, 2024
Copy link
Contributor

@CoryMartin-NOAA CoryMartin-NOAA left a comment

Choose a reason for hiding this comment

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

Did not test/compile but the changes look good to me. It's always dangerous to deallocate without checking to ensure it is allocated already.

@RussTreadon-NOAA RussTreadon-NOAA merged commit 0cdc3b4 into develop May 14, 2024
4 checks passed
@RussTreadon-NOAA RussTreadon-NOAA deleted the feature/safeguard branch May 14, 2024 17:00
@RussTreadon-NOAA
Copy link
Contributor Author

Thank you @CoryMartin-NOAA for the quick review and approval.

@RussTreadon-NOAA RussTreadon-NOAA restored the feature/safeguard branch May 15, 2024 09:44
WalterKolczynski-NOAA pushed a commit to NOAA-EMC/global-workflow that referenced this pull request May 15, 2024
This PR updates the `gsi_utils.fd` hash to bring in updates which add
safeguards to
-
`src/EnKF/gfs/src/getsigensmeanp_smooth.fd/getsigensmeanp_smooth_ncep.f90`
- `src/EnKF/gfs/src/recentersigp.fd/recentersigp.f90`

The safeguards are described in GSI-utils PR
[#41](NOAA-EMC/GSI-utils#41) and the associated
issue.

Resolves #2597
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.

add safeguards to getsigensmeanp_smooth and recentersigp
2 participants