Skip to content

Fix bug in aerinterp read routines that break 32-bit physics and pass NetCDF errors up through errflg&errmsg#85

Merged
dustinswales merged 4 commits into
ufs-community:ufs/devfrom
SamuelTrahanNOAA:rrfs-32bit-physics
Jul 10, 2023
Merged

Fix bug in aerinterp read routines that break 32-bit physics and pass NetCDF errors up through errflg&errmsg#85
dustinswales merged 4 commits into
ufs-community:ufs/devfrom
SamuelTrahanNOAA:rrfs-32bit-physics

Conversation

@SamuelTrahanNOAA
Copy link
Copy Markdown
Collaborator

@SamuelTrahanNOAA SamuelTrahanNOAA commented Jun 15, 2023

The aerinterp routines use real*4 arrays to read real*8 data when compiled with 32-bit physics. This causes a crash because of the NetCDF Fortran 77 interface, which does not know which datatype it has. These changes:

  1. Switch to the Fortran 90 interface which can do type conversion when reading.
  2. Detects NetCDF errors and returns them in errflg and errmsg.

@SamuelTrahanNOAA SamuelTrahanNOAA changed the title Fix bug in aerinterp read routines that break 32-bit physics Fix bug in aerinterp read routines that break 32-bit physics and pass NetCDF errors up through errflg&errmsg Jun 15, 2023
Copy link
Copy Markdown
Collaborator

@grantfirl grantfirl left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@AnningCheng-NOAA
Copy link
Copy Markdown
Collaborator

looks good to me. Approved

Copy link
Copy Markdown
Collaborator

@dustinswales dustinswales left a comment

Choose a reason for hiding this comment

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

@SamuelTrahanNOAA Thanks for these changes.

@SamuelTrahanNOAA
Copy link
Copy Markdown
Collaborator Author

@AnningCheng-NOAA

looks good to me. Approved

You didn't actually approve the PR. You just typed the word "Approved." To approve the pull request, you need to submit an approving review.

Copy link
Copy Markdown
Collaborator

@AnningCheng-NOAA AnningCheng-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 good. @SamuelTrahanNOAA, Thanks.

@grantfirl
Copy link
Copy Markdown
Collaborator

@SamuelTrahanNOAA Please merge in the latest ufs/dev branch in preparation for the merge queue.

@SamuelTrahanNOAA
Copy link
Copy Markdown
Collaborator Author

Please merge in the latest ufs/dev branch in preparation for the merge queue.

I already did that. Also, I validated against the baseline after merging ufs/dev.

@grantfirl
Copy link
Copy Markdown
Collaborator

Please merge in the latest ufs/dev branch in preparation for the merge queue.

I already did that. Also, I validated against the baseline after merging ufs/dev.

@SamuelTrahanNOAA Ah, I see that now. Sorry for spamming and thanks for being on top of it.

@zach1221
Copy link
Copy Markdown

Testing is now complete on UFS-WM PR #1797. @SamuelTrahanNOAA @grantfirl as this ccpp-physics sub-component PR is approved, please feel free to merge it.

@dustinswales dustinswales merged commit c4ae129 into ufs-community:ufs/dev Jul 10, 2023
drnimbusrain pushed a commit to noaa-oar-arl/ccpp-physics that referenced this pull request Mar 28, 2024
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.

aerinterp routines do not pass NetCDF errors up through errmsg and errflg 32-bit physics crashes in aerinterp due to type mismatch in NetCDF calls.

6 participants