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

Fix use of npz before being set #279

Closed
wants to merge 1 commit into from

Conversation

mathomp4
Copy link
Member

@mathomp4 mathomp4 commented Apr 26, 2024

NOTE: View changes with whitespace off:

https://github.com/GEOS-ESM/FVdycoreCubed_GridComp/pull/279/files?w=1

as my editor cleans up trailing spaces.


This PR fixes a small bug in FV_StateMod found by @atrayano where this:

  if (FV_Atm(1)%flagstruct%npz == 1) SW_DYNAMICS = .true.

was being called before:

      call MAPL_GetResource( MAPL, FV_Atm(1)%flagstruct%npz, 'AGCM_LM:', default= 72, RC=STATUS )

This is an obvious bug as you shouldn't refer to a variable before it's set.

I will test this along with GEOS-ESM/GFDL_atmos_cubed_sphere#96 with both Intel and GCC to make sure it is zero diff.

@mathomp4 mathomp4 added the 0 diff The changes in this pull request have verified to be zero-diff with the target branch. label Apr 26, 2024
@mathomp4 mathomp4 self-assigned this Apr 26, 2024
@mathomp4 mathomp4 closed this Apr 26, 2024
@mathomp4 mathomp4 deleted the hotfix/mathomp4/fix-uninit-gcc13 branch October 30, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 diff The changes in this pull request have verified to be zero-diff with the target branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant