-
Notifications
You must be signed in to change notification settings - Fork 19
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
by pass missing value of NaN #1576
Conversation
This PR is addressing the issue ufs-community/ufs-weather-model#1259 |
I can say this is zero-diff for a C24 run of GEOSgcm. I'll let @tclune or someone more knowledgable than I comment on the code change. |
I don't see how this change has anything to do with NaN. The change merely verifies that if a fill is specified then it is of a numeric type. (I.e., it will ignore fills that are strings or bools.) What am I missing? |
@bena-nasa , I think it is fine to bypass the Nan values even there is Nan. Any calculation relults that Nan is involved would be Nan too. |
This line crashes without the fix. Line 1092 in d46c2ed
I suspect this is a bug from ESMF. Just two lines above, I test the return type of the '_FillValue', it is ESMF_TYPEKIND_R4 , but ESMF crashes when trying to get it. |
|
I don't see how your change would affect that case. R4 matches so |
Our Metadata does not take "Nan" as a numerical type. So there is no missing data if it is Nan. I think it is fine because the results would be Nan if Nan is involved in the calculation |
I have another theory. When ESMF checks the type of attribute '_FillValue', it actually checks the type of the variable. They are supposed to be the same type anyway. Whey trying to get it, it crashes because it is a string ( Nan or Nanf) |
Your theory is plausible, but I still don't see how the changes here have any effect. |
After my change, our program thinks there is no missing value if it is "Nan". So the above crashing line I showed you would not be executed. |
pfio can set and get Nan attribute, but ESMF does not seem to work. But I think it is safe to by pass Nan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comment.
If regrid gets trouble when there is Nan, this PR won't work. Nan needs to be replaced somewhere. |
I have verified this PR resolves the Nan issue from ufs @bena-nasa @tclune |
…ESM/MAPL into feature/wjiang/by_pass_nan_missing
@mathomp4 This CMakeLists.txt is working on Orion. If it is working here, lets merge it. |
Okay. Let me make an update to CMakeLists.txt with a comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tclune has approved. This is just a "re-approval" after my CMake comment.
@mathomp4 are you going to release a new patched version of the mapl-2.21.3 out of this pr? |
If the missing values is Nan, all the calculation will be Nan. It is not necessary to swap or test
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: