chain "selname" and "sellonlatbox"
Added by Bidyut Goswami over 3 years ago
Hi, I want to extract a variable for for a region from global data. In order to do that I tried combining "selname" and "sellonlatbox". But when I am trying to use "selname" and "sellonlatbox" together I am getting core dumped.
Here is what I did: cdo -selname,T500 -sellonlatbox,40,100,-15,5 infile.nc outfile.nc
The reason I want to do this is: my input file is very large (in the attachment I am only sharing only the first 100 time-steps of it). So if I do selecting the variable in one step and cropping in the next step, then it is taking a long time and space.
Kindly suggest how can do it properly.
As I have mentioned, my goal is to extract a variable over a cropped region from global data. If there is any other way of doing it efficiently, please suggest.
Thanks.
Replies (1)
RE: chain "selname" and "sellonlatbox" - Added by Karin Meier-Fleischer over 3 years ago
Hi Bidyut,
I'm not able to reproduce your core dump. Which version are you using ('cdo -V')?
To extract a sub-region from selected variables you should reverse the operators as follows:
cdo -sellonlatbox,40,100,-15,5 -selname,T500 infile.nc outfile.nc
cdo executes the operators from right to left, also first extract variable then extract the sub-region.
-Karin