-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use explicit regrid method in HISTORY #344
Conversation
Note: perhaps @wmputman or @sdrabenh would prefer some/all of the collections here to be If so, this would go from zero-diff to non-zero-diff, so might be best done in two PRs? 🤷🏼 (@bena-nasa can explain more if there are questions in re |
Yes, @bena-nasa what is the monotonic constraint and why is it being used for GEOSIT? |
@sdrabenh They are using out of an over abundance (in my opinion) of caution. This option forces the the calculation of a destination point to go through a custom dynamic mask that as it is summing the product of the source points * weights for the destination keeps track of the minimum and maximum source points for each destination point. After the destination value is computed, it checks, is the destination greater or less than the maximum source values. If so it sets the destination point to that value. This was implemented because of numerical issues with the esmf regridding layer, it was found that all source points were identical, (like say you have a value that represents a fraction and all the source points are one) it is possible due to the vagaries of floating point math, the fact that our fields are single precision, but the weights they store are double that maybe the destination is not quite 1 but a very small amount like a few machine epsilons greater than 1. Now they were putting this through QUADS which apparently has no tolerance when checking values so even though the values were 1 for all practical purposes QUADS flagged them as out of bounds. So this just prevents that from happening. |
This PR updates
HISTORY.AGCM.rc.tmpl
to use the newregrid_method
option for MAPL History. This essentially adds:for most collections as the default regridding method for History is bilinear. For conservatively regridded collections we go from:
to:
In a way this is not exactly "important" and it is zero-diff. But I at least think it is good to have the regridding method explicit for each collection.
Still, I'll keep this draft until @sdrabenh can weigh in. And maybe @bena-nasa can add his opinion.