-
Notifications
You must be signed in to change notification settings - Fork 35
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
Extrapolation seems to only work if input mask is set? #263
Comments
Sadly, extrapolation indeed only works if the mask is set. This is a consequence on how adaptive masking is an addition from xESMF whereas extrapolation is a feature from ESMF itself. Regridding in xESMF is two step process : compute the regridding weights first and then apply them to the data. The adaptive masking occurs in the latter step, while the extrapolation occurs in the former. Extrapolation needs to know which points are "unmapped", which is done through masking. at weight compuation time. Adaptive masking is implemented as an on-the-fly modification of the pre-computed weights at regridding time. I fear that making extrapolation work with adaptive masking would either necessitate to reimplement extrapolation within xESMF OR implement adaptative masking within ESMF. Both solutions are out-of-scope for xESMF, as far as I understand... |
Pascal
Thank you for this explanation and reply. I think I found a work around by making a constant mask which is the superset of all the time varying masks. This then yields a few unnecessary inter/extrapolations but in my case that’s tolerable.
Axel
From: Pascal Bourgault ***@***.***>
Sent: Wednesday, May 10, 2023 13:03
To: pangeo-data/xESMF ***@***.***>
Cc: Axel J Schweiger ***@***.***>; Author ***@***.***>
Subject: Re: [pangeo-data/xESMF] Extrapolation seems to only work if input mask is set? (Issue #263)
Sadly, extrapolation indeed only works if the mask are set. This is a consequence on how adaptive masking is an addition from xESMF whereas extrapolation is a feature from ESMF itself.
Regridding in xESMF is two step process : compute the regridding weights first and then apply them to the data. The adaptive masking occurs in the latter step, while the extrapolation occurs in the former. Extrapolation needs to know which points are "unmapped", which is done through masking. at weight compuation time. Adaptive masking is implemented as an on-the-fly modification of the pre-computed weights at regridding time.
I fear that making extrapolation work with adaptive masking would either necessitate to reimplement extrapolation within xESMF OR implement adaptative masking within ESMF. Both solutions are out-of-scope for xESMF, as far as I understand...
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/pangeo-data/xESMF/issues/263*issuecomment-1542735734__;Iw!!K-Hz7m0Vt54!mdjeutmqLP7kId5aPWwVU70Lq-C-Fl9-XtiB7rqZKhPiJiYqs1ltPo89IEI6pM4rWD9JGGeVl87l9gAVG6h6O4c$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ALJTXMJ53YDLDOTTEUHBYITXFPX53ANCNFSM6AAAAAAX34RHY4__;!!K-Hz7m0Vt54!mdjeutmqLP7kId5aPWwVU70Lq-C-Fl9-XtiB7rqZKhPiJiYqs1ltPo89IEI6pM4rWD9JGGeVl87l9gAVgQbt0qc$>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Ah true, this can be reasonable solution depending on the data! I'll keep this issue open as a reminder that this should be explained in the doc. For example, the "extrapolation" section could mention that this is requires a mask and is unavailable with adaptive masking. |
I'm regridding some 2D grids (time,lat,lon) that requires some extrapolation. It works fine when I specify a mask for both input and output for each time. However, since my input mask varies slightly over time that doesn't work. The documentation suggests that an input mask isn't necessary if the data to be regridded that correspond to the mask are already set to "nan". Since it is a pretty large grid/time recomputing weights doesn't work. I'm a bit confused if I can use adaptive masking for this and how?
Since the input data are sizable, creating a working sample is a bit hard so I'm trying to see if somebody has maybe found a solution already.
Thanks
Axel
The text was updated successfully, but these errors were encountered: