selregion fails on CMIP6 GISS ocean grid
Added by Brendan DeTracey about 3 years ago
As the title says. The selregion
command fails on the ocean model grid for GISS-E2-1-G:
$ cdo -O -V selregion,"cdo_region_nwa.txt" zos_Omon_GISS-E2-1-G_historical_r1i1p1f2_gn_200101.nc test.nc Climate Data Operators version 2.0.4 (https://mpimet.mpg.de/cdo) System: x86_64-conda-linux-gnu CXX Compiler: /home/conda/feedstock_root/build_artifacts/cdo_1645612593230/_build_env/bin/x86_64-conda-linux-gnu-c++ -std=gnu++14 -fPIC -DPIC -g -O2 -std=c++14 -fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/brendan/miniconda3/envs/cmip6_2/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/cdo_1645612593230/work=/usr/local/src/conda/cdo-2.0.4 -fdebug-prefix-map=/home/brendan/miniconda3/envs/cmip6_2=/usr/local/src/conda-prefix -fopenmp -pthread CXX version : unknown C Compiler: /home/conda/feedstock_root/build_artifacts/cdo_1645612593230/_build_env/bin/x86_64-conda-linux-gnu-cc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/brendan/miniconda3/envs/cmip6_2/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/cdo_1645612593230/work=/usr/local/src/conda/cdo-2.0.4 -fdebug-prefix-map=/home/brendan/miniconda3/envs/cmip6_2=/usr/local/src/conda-prefix -fopenmp -pthread -pthread C version : unknown F77 Compiler: /home/conda/feedstock_root/build_artifacts/cdo_1645612593230/_build_env/bin/x86_64-conda-linux-gnu-gfortran -fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/brendan/miniconda3/envs/cmip6_2/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/cdo_1645612593230/work=/usr/local/src/conda/cdo-2.0.4 -fdebug-prefix-map=/home/brendan/miniconda3/envs/cmip6_2=/usr/local/src/conda-prefix F77 version : GNU Fortran (GCC) 9.4.0 Features: 62GB 24threads C++14 OpenMP45 Fortran PTHREADS HDF5 NC4/HDF5/threadsafe OPeNDAP UDUNITS2 PROJ XML2 MAGICS CURL FFTW3 SSE3 Libraries: HDF5/1.12.1 proj/8.2.1 xml2/2.9.12 curl/7.81.0 magics/4.10.0 CDI data types: SizeType=size_t DateType=int64_t CDI file types: srv ext ieg grb1 grb2 nc1 nc2 nc4 nc4c nc5 CDI library version : 2.0.4 cgribex library version : 2.0.1 ecCodes library version : 2.24.2 NetCDF library version : 4.8.1 of Aug 31 2021 00:05:39 $ hdf5 library version : 1.12.1 threadsafe exse library version : 1.4.2 FILE library version : 1.9.1 cdo selregion (Abort): No grid points found! $ cdo verifygrid zos_Omon_GISS-E2-1-G_historical_r1i1p1f2_gn_200101.nc cdo verifygrid: Grid consists of 51840 (288x180) cells (type: lonlat), of which cdo verifygrid: 51840 cells have 4 vertices cdo verifygrid: 576 cells have duplicate vertices cdo verifygrid: 526 cells have their center point located outside their boundaries cdo verifygrid: lon : 0.625 to 359.375 degrees cdo verifygrid: lat : -90 to 90 degrees cdo verifygrid: Processed 1 variable [0.05s 41MB]. $ cdo sellonlatbox,-180,180,-90,90 zos_Omon_GISS-E2-1-G_historical_r1i1p1f2_gn_200101.nc zos_Omon_GISS-E2-1-G_historical_r1i1p1f2_gn_200101_lon_-180to180.nc cdo sellonlatbox: Processed 51840 values from 1 variable over 1 timestep [0.00s 33MB]. $ cdo verifygrid zos_Omon_GISS-E2-1-G_historical_r1i1p1f2_gn_200101_lon_-180to180.nc cdo verifygrid: Grid consists of 51840 (288x180) cells (type: lonlat), of which cdo verifygrid: 51840 cells have 4 vertices cdo verifygrid: 576 cells have duplicate vertices cdo verifygrid: 524 cells have their center point located outside their boundaries cdo verifygrid: lon : -179.375 to 179.375 degrees cdo verifygrid: lat : -90 to 90 degrees cdo verifygrid: Processed 1 variable [0.05s 41MB]. $ cdo -O selregion,"cdo_region_nwa.txt" zos_Omon_GISS-E2-1-G_historical_r1i1p1f2_gn_200101_lon_-180to180.nc test.nc cdo selregion (Abort): No grid points found!
Replies (4)
RE: selregion fails on CMIP6 GISS ocean grid - Added by Uwe Schulzweida almost 3 years ago
Hi Brendan,
I guess the points of the polygon must be arranged in a counter clockwise order. The points in the file cdo_region_nwa.txt are arranged in the clockwise order. I will check this again and document if necessary.
Cheers,
Uwe
RE: selregion fails on CMIP6 GISS ocean grid - Added by Brendan DeTracey almost 3 years ago
Thanks Uwe. The region file works for all other CMIP6 ocean grids I have tried. I changed the polygon orientation but selregion
still fails on the GISS-E2-1-G grid. (And if I may be so bold I would suggest that cdo
should verify polygon orientation for region files and for scrip grids and omit emit an error when they fail. Would not the function for polygon orientation already exist in the verifygrid
command?)
cdo_region_nwa_cc.txt (2.95 KB) cdo_region_nwa_cc.txt |
RE: selregion fails on CMIP6 GISS ocean grid - Added by Uwe Schulzweida almost 3 years ago
The polygon orientation does not seem to play a role here.
There is a numerical inaccuracy in the method used. The latitudes in the data file are exactly on the points of the polygon. This problem will be fixed in CDO version 2.0.5.
RE: selregion fails on CMIP6 GISS ocean grid - Added by Brendan DeTracey almost 3 years ago
Great. Thanks.