netcdfcdo-climate

How to regrid variables in a netcdf file to another grid such that the fluxes, mass and other fields remain conserved


I want to regrid my variable to a file in such a way that the fluxes and other important conservation fields remain conserved and there is no violation of conservation laws.


Solution

  • You can use cdo in the following way

    cdo remapcon,newgrid.nc input_file.nc output_file.nc
    

    where newgrid.nc can be any file which has the target grid and input_file is the file which is to be regridded. The result obtained is output_file.nc, one thing to note in this is that the metadata/attributes should be CF compliant for cdo to understand the files and data.

    remapcon ensures that conservation laws are not violated.