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

Regrid from a tripole grid to a regular grid #383

Open
mini-DONG opened this issue Jul 23, 2024 · 0 comments
Open

Regrid from a tripole grid to a regular grid #383

mini-DONG opened this issue Jul 23, 2024 · 0 comments

Comments

@mini-DONG
Copy link

Hi,
I am a new user of xESMF, and the regridding package is great.
Recently I regrided the ocean model data from the tripole grid into the regular grid. The horizontal resolution of the mode data output is about 0.1° * 0.1°,and I want to regrid them into the regular 0.1°. But I encountered difficulties:

  • The weights (regridder) file is big,
    I read the Save time by reusing regridder in the doc, and writed the weights into a nc-files.
    But when I calculated the weights,
grid_out = xe.util.grid_global(0.1, 0.1)
regridder = xe.Regridder(t, grid_out, "bilinear",periodic=True) 

It just blew up because of out of memory (My computer has 32GB).
The minimum I can use is xe.util.grid_global(0.6, 0.6), and even that the weights file also are up to 1.1 GB.
then I read the weights file and regrid, which takes 6 minutes:

fn = xr.open_dataset('regridder.nc')
regridder = xe.Regridder(t, grid_out, 'bilinear', weights=fn)
regridder(t).compute()
……
Wall time: 6min 51s

I want to know:

  • Whether the weights of the tripole grid is so complicated (big);
  • Is there a more convenient and efficient way?
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

No branches or pull requests

1 participant