Project

General

Profile

Problems with remapbil: Unknown units [deg] supplied for grid reg2d center lon

Added by Anna marra about 6 years ago

Hi,
I am trying to use remapbil to remap data. Unfortunately, when I run remapbil I get the following error:
cdo remapbil (Warning): Unknown units [deg] supplied for grid reg2d center lon; proceeding assuming radians!
cdo remapbil (Warning): Unknown units [deg] supplied for grid reg2d center lat; proceeding assuming radians!
and at the end I get the new remapped file that contains only NaN.
I tried other interpolation methods and results are always the same.
This is what I get with griddes on the input file #
gridtype = lonlat
gridsize = 55384
xname = x
xlongname = longitude (centre of grid cell)
xunits = deg
yname = y
ylongname = latitude (centre of grid cell)
yunits = deg
xsize = 322
ysize = 172
xfirst = 6.86135
xinc = 0.00636108
yfirst = 44.0401
yinc = 0.0063591

gridID 1

Could anyone help me in understanding this issue?
Thank you
Anna


Replies (7)

RE: Problems with remapbil: Unknown units [deg] supplied for grid reg2d center lon - Added by Karin Meier-Fleischer about 6 years ago

Hi Anna,

whithout the data it is not possible to say what is going wrong. Can you upload a test file, one timestep is enough.

-Karin

RE: Problems with remapbil: Unknown units [deg] supplied for grid reg2d center lon - Added by Anna marra about 6 years ago

Hi Karin,
thank you very much.
Attached you will find a test file.
Thank you again.
Anna

test.nc (436 KB) test.nc

RE: Problems with remapbil: Unknown units [deg] supplied for grid reg2d center lon - Added by Karin Meier-Fleischer about 6 years ago

Your coordinate variables x and y have the units 'deg' but it should be e.g. 'degrees_east' or rather 'degrees_north'. To change these attributes for coordinate variables you can use NCO's ncatted.

ncatted -O -a units,x,o,c,"degrees_east" -a units,y,o,c,"degrees_north" test.nc tmp.nc

and using tmp.nc as input file to remap it for example to a 1x1 degrees grid with

cdo remapbil,r360x180 tmp.nc outfile.nc

-Karin

RE: Problems with remapbil: Unknown units [deg] supplied for grid reg2d center lon - Added by Anna marra about 6 years ago

Thank you Karin! I really did not know that deg was not fine. In my many tests I had already used nco ncatted to change name x to lon and y to lat, but I never thought about "deg".
Thank you so much.
Anna

RE: Problems with remapbil: Unknown units [deg] supplied for grid reg2d center lon - Added by Anna marra about 6 years ago

Hi Ralf,
thank you for the clarification!
Regards,
Anna

RE: Problems with remapbil: Unknown units [deg] supplied for grid reg2d center lon - Added by Ralf Mueller about 6 years ago

nco programms support all types of netcdf file structures since they are general netcdf tool. that's why you can change almost every detail with them like adding arbitrary attributes to a data avariable. CDO in constrast concentrates on gridded data along the lines of climate and weather prediction use cases. Therefore the CF-convention is used as a basic standard for netcdf files in order to identify things like grids, vertical coordinates and different time axis. CDO also supports the WMO standard for weather prediction called GRIB.

    (1-7/7)