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 bug in aerinterp read routines that break 32-bit physics and pass NetCDF errors up through errflg&errmsg #85

Merged

Conversation

SamuelTrahanNOAA
Copy link
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
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
Collaborator

looks good to me. Approved

Copy link
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
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
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
Collaborator

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

@SamuelTrahanNOAA
Copy link
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
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

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
6 participants