Project

General

Profile

resampling with bicubic method

Added by nazanin tavakoli almost 4 years ago

Hello, I want to resample relative humidity data from 0.25 degrees to 0.021 degrees in cdo in windows.So, my code is this:
cdo genbic,gridfile.txt rh_1jan_2001.nc rhwbic.nc
cdo remap,gridfile.txt,rhwbic.nc rh_1jan_2001.nc rh_0.021D_bic.nc

and the gridfilel is:
gridtype = lonlat
gridsize = 4800337
xname = longitude
xlongname = longitude
xunits = degrees_east
yname = latitude
ylongname = latitude
yunits = degrees_north
xsize = 2203
ysize = 2179
xfirst = 112.91
xinc = 0.021
yfirst = -9.36
yinc = -0.021

but I have this error:
cdo remap (Warning): Some data values (min=-32821 max=32851) are outside the
valid range (-32768 - 32767) of the used output precision!
Use the CDO option -b 32 or -b 64 to increase the output precision.
cdf_put_vara_double: name=r type=NC_SHORT minval=-32821.000000 maxval=32851.000000

Error (cdf_put_vara_double): NetCDF: Numeric conversion not representabl
could you please help me? I have sent my NetCDF file below.


Replies (3)

RE: resampling with bicubic method - Added by Karin Meier-Fleischer almost 4 years ago

Hi Nazanin,

during to the interpolation the short values are converted to float. Interpolated values are less/greater the min/max of short which causes the error.

In CDO's error message you can get the answer, you have to use the -b F32 option.

cdo -b F32 -remap,gridfile.txt,rhwbic.nc rh_1jan_2001.nc rh_0.021D_bic.nc

-Karin

RE: resampling with bicubic method - Added by nazanin tavakoli almost 4 years ago

Thank you for your response. I have a question. Can we calculate Kolmogorov-Smirnov statistic (KS), root mean square error (RMSE), and linear correlation coefficient (r)in CDO for netCDF data?

RE: resampling with bicubic method - Added by Brendan DeTracey almost 4 years ago

Please download the manual from the wiki page here: (https://code.mpimet.mpg.de/projects/cdo/wiki)
You can then search for some of your answers e.g.: (https://code.mpimet.mpg.de/projects/cdo/embedded/index.html#x1-5710002.9)
CDO can probably calculate anything, but you must take the time to understand its syntax.
For example, daily RMS:

$ cdo sqrt -ydayavg -sqr -ydaysub in_file.nc -ydayavg in_file.nc out_file.nc

    (1-3/3)