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

longitude wrap satellite level 3 pairing #304

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

mbruckner-work
Copy link
Collaborator

Add periodic=True for regridding model data to level 3 satellite data to allow regrid function to handle longitude wrap.

This is a temporary work around as it assumes the model is a global model. To properly allow for flexible comparison of satellite level 3 products and any model domain (regional or global), need a function to subset satellite observations to the model domain and/or associate a model domain type flag with the model object.

Add periodic=True for regridding model data to level 3 satellite data to allow regrid function to handle longitude wrap.
@blychs
Copy link
Collaborator

blychs commented Oct 29, 2024

If I'm not wrong, reading the docs, it shouldn't do anything if the model isn't global, should it?
In that case, it wouldn't be detrimental, and I can't find any disadvantage to your approach.

Otherwise, a different workaround would be defining a function which, just in pseudocode, does the check :

#PSEUDOCODE, not working
def isglobal(modobj: xr.Dataset) -> Boolean:
     return test_isglobal
grid_adjust = xe.Regridder(model_obstime[['latitude','longitude']],obs_data[['lat','lon']],'bilinear',periodic=test_isglobal)

@rschwant rschwant requested a review from blychs November 4, 2024 18:11
Copy link
Collaborator

@blychs blychs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks right to me.
According to the docs, I don't think that the periodic=True parameter should be a problem, but we might still need to test it.

@blychs
Copy link
Collaborator

blychs commented Nov 19, 2024

If this gets merged, we could add an issue to add it to the YAML file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants