Project

General

Profile

sellonlatbox Latitudinal dimension is too small

Added by Jay Su over 5 years ago

Hi,

CDO version 1.6.8.

if asked
-sellonlatbox,15 15 33 33
it works.

if asked
-sellonlatbox,15 15 32 32
then
cdo sellonlatbox (Abort): Latitudinal dimension is too small!

Could you help me understand it?

Thanks,

tmp.nc4 (4.07 MB) tmp.nc4

Replies (5)

RE: sellonlatbox Latitudinal dimension is too small - Added by Karin Meier-Fleischer over 5 years ago

Hi Jay Su,

first, you use the sellonlatbox wrong this can't work anyhow.

cdo sellonlatbox,lon1,lon2,lat1,lat2 infile outfile
where lon1 < lon2 and lat1 < lat2

Try

cdo sellonlatbox,15.0,15.1,32.0,32.1 tmp.nc4 outfile.nc
-Karin

RE: sellonlatbox Latitudinal dimension is too small - Added by Jay Su over 5 years ago

Thank you Karin,

As I have tested, it does not have to be
lon1 < lon2 and lat1 < lat2

Could you take a look at the attached file and help me understand why different lat values lead to error?

RE: sellonlatbox Latitudinal dimension is too small - Added by Karin Meier-Fleischer over 5 years ago

https://code.mpimet.mpg.de/boards/2/topics/301
'It's possible to select a single grid cell with sellonlatbox but this isn't a user friedly procedure because you need to know the exact coordinates of that grid cell.'
...
'To make it short, sellonlatbox was not implemented to select only a single grid cell.'

Only if you know the exact grid cell coordinates of 1 grid cell (15.05,32.05)

cdo -f nc4 sellonlatbox,15.05,15.05,32.05,32.05 tmp.nc4 outfile.nc4

cdo sinfov outfile.nc
   File format : NetCDF4
    -1 : Institut Source   T Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  unknown  v instant       1   1         1   1  F32  : SoilTemp100_200cm_tavg
   Grid coordinates :
     1 : lonlat                   : points=1 (1x1)
                                X : 15.05 degrees_east
                                Y : 32.05 degrees_north
   Vertical coordinates :
     1 : surface                  : levels=1
   Time coordinate :  1 step
     RefTime =  1982-01-01 00:00:00  Units = days  Calendar = proleptic_gregorian  Bounds = true
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  1982-01-01 00:00:00
cdo sinfon: Processed 1 variable over 1 timestep [0.01s 22MB]

RE: sellonlatbox Latitudinal dimension is too small - Added by Jay Su over 5 years ago

Thank you Karin,

We wrote script to find the exact grid points then feed to cdo.

Issue solved.

RE: sellonlatbox Latitudinal dimension is too small - Added by Jay Su over 5 years ago

Wait, does not explain why

-sellonlatbox,15 15 33 33
works.

while
-sellonlatbox,15 15 32 32
fails.

    (1-5/5)