xESMF icon indicating copy to clipboard operation
xESMF copied to clipboard

Regrid from a tripole grid to a regular grid

Open mini-DONG opened this issue 7 months ago • 0 comments

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?

mini-DONG avatar Jul 23 '24 07:07 mini-DONG