Project

General

Profile

Remapping problems with cdo

Added by Juliana Freitas Santos over 2 years ago

Hello,

I am trying to remap the Land Use Harmonized Dataset, version 2 (LUH2) used in the CMIP6 models. I want to plot the changes in Land Use over time, therefore wanted to the LUH2 dataset have the same sample size and type as the climate variables dataset (e.g. Tas, Pr). When I try to resample (remapbil and remapnn), I receive the following error:
cdo remapbil (Abort): Unsupported generic coordinates (Variable: Lat_bounds)!
Can someone help me with resampling it I have tried several different ways (including some posted previously here in the forum > [[https://code.mpimet.mpg.de/boards/1/topics/55]] AND [[https://code.mpimet.mpg.de/boards/1/topics/8479]] ).
I also have tried to delete the grid information then use “cdo setgrid” to set the grid from the climate dataset. Please, see below the screenshot (Screen_Tas) of the grid information, using “cdo griddes”, from the Climate Variable dataset and the screenshot from the LUH2 (Screen_LUH2).
I have also attached a sample of the LUH2 dataset and a sample of the Tas variable dataset.

Thank you in advance, any help is appreciated!
Juliana


Replies (1)

RE: Remapping problems with cdo - Added by Ralf Mueller over 2 years ago

hi Juliana!

for easier debugging it would be very helpful to know the exact CDO call you used. But I think I can figure it out without it. I t should lookelike

cdo remapbil,sample_Tas.nc sample_LUH2.nc outout.nc

your input file sample_LUH2.nc has an error regarding the usage of netcdf-attributes: the coordinate bounds variables (lat_bounds, lon_bounds) are not links to the main coordinate variables (lon,lat). thats why CDO recognizes them has normal data variables. But as data variables, they both lack certain attributes. So I fixed the input by adding the needed attributes with

ncatted -a bounds,lat,c,c,'lat_bounds' -a bounds,lon,c,c,'lon_bounds' sample_LUH2.nc 

After this I could run the above CDO command, but also with remapcon for conservative remapping without problem. I uploaded the fixed version of your input. you can compare the output of

cdo sinfov samepl_LUH2.nc
with your original one.

hope-that-helps
ralf

sample_LUH2.nc (55.5 MB) sample_LUH2.nc fixed input - added 'bounds' attribute to lon/lat
    (1-1/1)