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

Use explicit regrid method in HISTORY #344

Merged
merged 5 commits into from
Sep 8, 2022

Conversation

mathomp4
Copy link
Member

This PR updates HISTORY.AGCM.rc.tmpl to use the new regrid_method option for MAPL History. This essentially adds:

collection.regrid_method: 'BILINEAR',

for most collections as the default regridding method for History is bilinear. For conservatively regridded collections we go from:

conscoll.conservative: 1,

to:

conscoll.regrid_method: 'CONSERVE'

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.

@mathomp4 mathomp4 added the 0 diff The changes in this pull request have verified to be zero-diff with the target branch. label Aug 12, 2022
@mathomp4 mathomp4 self-assigned this Aug 12, 2022
@mathomp4
Copy link
Member Author

Note: perhaps @wmputman or @sdrabenh would prefer some/all of the collections here to be BILINEAR_MONOTONIC and/or CONSERVE_MONOTONIC similar to efforts being explored by @rtodling in GEOS-IT work?

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 MONOTONIC regridding.)

@sdrabenh
Copy link
Collaborator

Note: perhaps @wmputman or @sdrabenh would prefer some/all of the collections here to be BILINEAR_MONOTONIC and/or CONSERVE_MONOTONIC similar to efforts being explored by @rtodling in GEOS-IT work?

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 MONOTONIC regridding.)

Yes, @bena-nasa what is the monotonic constraint and why is it being used for GEOSIT?

@bena-nasa
Copy link
Collaborator

Note: perhaps @wmputman or @sdrabenh would prefer some/all of the collections here to be BILINEAR_MONOTONIC and/or CONSERVE_MONOTONIC similar to efforts being explored by @rtodling in GEOS-IT work?
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 MONOTONIC regridding.)

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.

@mathomp4 mathomp4 marked this pull request as ready for review September 7, 2022 17:03
@mathomp4 mathomp4 requested a review from a team as a code owner September 7, 2022 17:03
@sdrabenh sdrabenh merged commit 4387f93 into develop Sep 8, 2022
@sdrabenh sdrabenh deleted the feature/mathomp4/explicit-regrid-method branch September 8, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 diff The changes in this pull request have verified to be zero-diff with the target branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants