Project

General

Profile

assistance with selindexbox

Added by Steve Rego almost 2 years ago

Greetings - Im trying to extract a specific area from the attached raster using selindexbox. I cant seem to get the coordinate / index listing in the command line correct [cdo selindexbox, ... in.nc out.nc]. I believe the raster is 10980x10980 according the ncdump -h header information. Im trying to extract the upper left 1/2 of the image using the convention below. I was going to post the raster but it is too large of a file upload.

X2.....Y2
. .
. .
. .
. .
Y1.....X1

If anyone has used this tool and can help it would be greatly appreciated or recommend another option in CDO or package !

Thanks in advance!
Steve


Replies (3)

RE: assistance with selindexbox - Added by Estanislao Gavilan almost 2 years ago

Hi Steve,

you need to be more specific. What exact command are you using? Why the selected area is wrong? You mentioned that you want to extract the upper left. So assuming that the coordinates are properly orientated. It should be something like this.

selindexbox,1,10980/2,10980/2,10980 infile outfile

if you are not sure that the command is doing the correct thing, you can always try with a low resolution file.
Kind regards,

Estanislao

RE: assistance with selindexbox - Added by Steve Rego almost 2 years ago

Greetings - thank you for the reply! So far Ive tried the following below.

cdo selindexbox,0,100,400,500 test.nc testout.nc
cdo selindexbox,1000,2000,4000,6000 test.nc testout.nc
cdo selindexbox,10000,5000,2500,5000 test.nc testout.nc

Also have tried 'sellonlatbox' as well
cdo sellonlatbox,39.736,-75.458,39.218,-76.140 testnc testout.nc

Also the process appears to work it isnt selecting the correct location box.

Ive attached a copy of my ncdump file output as well hopefully that helps.

Thank you again!

RE: assistance with selindexbox - Added by Estanislao Gavilan almost 2 years ago

hi,

the sellonlatbox command looks a bit odd to me. Did you input the values following this format?

sellonlatbox,lon1,lon2,lat1,lat2  infile outfile
selindexbox,idx1,idx2,idy1,idy2 infile outfile

Regards,

Estanislao

    (1-3/3)