0

I have a netCDF file which I would like to regrid to a coarser grid and a smaller area. I used cdo remapcon in order to conserve the mass of my variables and the output netCDF file looks promising so far. However, I would like to make sure that the cdo function really worked as I hope it does and verify the mass conservation using python. Does somebody know how best to do that? Many thanks in advance!

ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86
Maja
  • 56
  • 1
  • If you have the grid area of the old and the new grid you can use `da.weighted(gridcell_area).sum()` . The method of rempconis described in "Jones, P. W. (1999). First‐ and second‐order conservative remapping schemes for grids in spherical coordinates." – mathause Nov 20 '20 at 13:52
  • Thank you very much for you comment and the article, it was very helpful! But I'm not sure if I understood correctly for the implementation, should `da_old.weighted(gridcell_area_old).sum()` = `da_new.weighted(gridcell_area_new).sum()` or rather `da_new.weighted(gridcell_area_old)` = `da_new.weighted(gridcell_area_new)` ? – Maja Nov 23 '20 at 20:41
  • The first one should do it. – mathause Nov 24 '20 at 10:30
  • It does indeed, thanks a lot! – Maja Nov 24 '20 at 12:46

0 Answers0