-
Notifications
You must be signed in to change notification settings - Fork 162
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 memory errors: uninitialized variables, and NetCDF writes to arrays that are too small #668
Fix memory errors: uninitialized variables, and NetCDF writes to arrays that are too small #668
Conversation
…fv3atm into refactor-restart
…estart into fv3atm_restart_io.F90
@SamuelTrahanNOAA It looks to me the error-check in ufs-community/ccpp-physics#83 is to prevent the error of read(4) array from reading real(8) data. I am wondering what the solution is, so you will need a new netcdf file with real(4) data in order to run the 32bit physics? |
My fix for the type conversion error was to use the NetCDF Fortran 90 interface. The Fortran 90 interface does automatic type conversion. Previously, that code used the Fortran 77 NetCDF interface. |
Got it, thanks |
Quoting the documentation of
They define "external type of a variable" as the type it has in the file. An exception to this rule is string arrays, which have no automatic type conversion. |
The ccpp-physics PR has been merged. I have update the submodule pointer and reverted the .gitmodules. We're waiting for this PR to be merged so we can finish ufs-community/ufs-weather-model#1797 |
@jkbk2004 can you merge this PR, please? I'm not authorized in this case. |
Description
This fixes two memory errors detected with valgrind, and one missing error check (errmsg, errflg). See the "issues addressed" for details.
Issue(s) addressed
Testing
How were these changes tested?
A 32-bit physics version of the RRFS conus13km regression tests, using valgrind.
What compilers / HPCs was it tested with?
Hera gnu and intel
Are the changes covered by regression tests? (If not, why? Do new tests need to be added?)
There are new regression tests
Have the ufs-weather-model regression test been run? On what platform?
Yes. Hera.
Will the code updates change regression test baseline? If yes, why? Please show the baseline directory below.
No, but there are new tests.
Please commit the regression test log files in your ufs-weather-model branch
Will do.
Dependencies