-
Notifications
You must be signed in to change notification settings - Fork 22
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
Axis and Field labels not allocated properly when appended to IO handle lists. #261
Comments
Thanks for working out the problem, Alper. Leaving I guess the simplest fix is to also set |
Actually, I thought It would be better to set %label in |
Sorry, I mistyped, I agree with what you wrote 😅 |
Oh, just to clarify, the |
When running MOM6 in DEBUG mode with the intel compiler, we get the following error:
forrtl: severe (408): fort: (8): Attempt to fetch from allocatable variable LABEL when it is not allocated
Upon closer look, it seems that the issue results from the way
register_axis_nc
andregister_netcdf_axis
work. Theregister_axis_nc
function acts as a wrapper for theregister_netcdf_axis
function. Whileregister_axis_nc
sets theaxis%label
member, the latter function does not. Whenregister_axis_nc
appends a copy of the provided axis to thehandle%axes
list, this appended copy lacks an allocated and assigned%label
member, as it is constructed through theregister_netcdf_axis
function. Consequently, when the%get
method is invoked to retrieve an axis instance, the returned axis does not possess an allocated and assigned label member.This issue applies to the field instances as well, since
register_field_nc
andregister_netcdf_field
functions exhibit the same behavior.This may be one of (many?) issues contributing to the recent memory-related issues.
I am currently testing a fix and will follow up with a PR.
The text was updated successfully, but these errors were encountered: