Project

General

Profile

problems with sellonlatbox

Added by M Mengel over 11 years ago

Hey,

I use cdo sellonlatbox to extract data from the cmip5 archive. This works great for most of the models. However, for some models I get strange behaviour.

cdo sellonlatbox,-10,175,-90,-50
-misses out the -10..0 longitudes for the ACCESS1-0 model
-takes the full longitude range (-279.5..79.5) for the GFDL-CM3 model
-leads to data doubling for the IPSL-CM5A-LR model (78..360 + 0..174)
cdo sellonlatbox,-60,-10,-90,-50
-does not restrict longitudes for the CCSM4 model (lon=319.438..360 + 0..319.438)
However, sellonlatbox,300,350,-90,-50 seems to work.

What am I doing wrong here?
Can you suggest a workaround on that problem?
Find example files and the shell script to reproduce the results attached.

Thanks for your help and this great tool you created!
Matthias

cdo -V
Climate Data Operators version 1.5.5 (http://code.zmaw.de/projects/cdo)
Compiler: icc -std=gnu99 -openmp -g -O3 -fPIC
version: Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 12.0.0.084 Build 20101006
with: PTHREADS OpenMP NC4 OPeNDAP SZ Z
Compiled: by buechner on login02 (x86_64-unknown-linux-gnu) Jul 4 2012 13:45:12
CDI library version : 1.5.5 of Jul 4 2012 13:44:54
CGRIBEX library version : 1.5.2 of May 11 2012 14:32:49
netCDF library version : 4.2 of Jul 4 2012 10:23:56 $
HDF5 library version : 1.8.9
SERVICE library version : 1.3.0 of Jul 4 2012 13:44:50
EXTRA library version : 1.3.0 of Jul 4 2012 13:44:47
IEG library version : 1.3.0 of Jul 4 2012 13:44:49
FILE library version : 1.8.0 of Jul 4 2012 13:44:47


Replies (4)

RE: problems with sellonlatbox - Added by Jaison-Thomas Ambadan over 11 years ago

Hi,

I think it has to do with the grid type. All the input data you provided are "curvilinear" grid. I think "sellonlatbox" operator expects a lat-lon grid but I'm not sure. You mentioned that it work with other model data: did you managed get the correct output on a "curvilinear" grid? It may work well if you remap to regular lat-lon grid.

Cheers,
J.

RE: problems with sellonlatbox - Added by M Mengel over 11 years ago

Hi J.,
thanks for your reply. You are right, the well processed models have lon and lat as coordinates. Still, for many regions, especially if they do not include lon=0, sellonlat works fine even for the curvilinear grids. Remapping to a regular lat-lon grid may work but would blow up computation cost because my regions are rather small. Is there a way to avoid this? Can I pipe the remapping, cdo sellonlatbox -remapbil ... ?

Thanks for your help,
Matthias

RE: problems with sellonlatbox - Added by Jaison-Thomas Ambadan over 11 years ago

Hi,

you can try like: "cdo -sellonlatbox,-10,175,-90,-50 -rempbil,r360x300 ACCESS1-0_alllonlat.nc outfile.nc" (I used r360x300 since your ACCESS1-0_alllonlat.nc has nx=360 and ny=300 but you may change it accordingly)

But global remapping is computationally expensive! The other option would be, to create a template [only once] of the desired lonlat box, and then do the remap which is computationally faster:

1) cdo -f nc -sellonlatbox,-10,175,-90,-50 -random,r360x300 template.nc
2) cdo -f nc remapbil,template.nc ACCESS1-0_alllonlat.nc outfile.nc

Cheers,
J.

RE: problems with sellonlatbox - Added by M Mengel over 11 years ago

Hey J.,

your suggestion works perfectly for me and is very fast still.
Thanks so much!

Matthias

    (1-4/4)