Project

General

Profile

problem with o96 grid in combination with cmor

Added by Klaus Wyser almost 2 years ago

For the ECE4 project we are switching from linearly reduced Gauss grids to cubic reduced Gauss grids. We use setgridtype,regular to go from reduced to full Gauss grid, e.g.

cdo -L setgridtype,regular -setgrid,o96-grid.txt -daymean ECE4_atm_tas_1ts_1990.nc x-regular.nc

This works well, but when I then try to make the output CMIP6 compliant with

cdo cmor,cmip6-cmor-tables/Tables/CMIP6_Amon.json,i=infofile.txt x-regular.nc

I get an error with the lon_bnds:

! Error: axis longitude has bounds values spanning
! more 360 degrees -0.450000, 359.550000

I tried with different remapping:

cdo -L remapdis,o96 -setgrid,o96-grid.txt -daymean ECE4_atm_tas_1ts_1990.nc x-o96.nc
cdo -L remapdis,o96 -setgrid,n96-grid.txt -daymean ECE4_atm_tas_1ts_1990.nc x-n96.nc

The first line is creating the same grid as I get with setgridtype,regular while the 2nd line gives a slightly smaller grid (4 longitudes less). When doing the cdo cmor command with x-o96.nc I get the same lon_bnds error, yet with x-n96.nc everything works fine!

The error message tells that the longitudes span more than 360 degrees, but actually the shown values sum up to 360 degrees. I could imagine that this simply is a rounding error with the o96 grid. Nasty, is there anything we or you can do about it?

Interestingly, I tried remapping to the o159 and o200 grids and with these cdo cmor works flawlessly. It's just the o96 grid that causes problems, but unfortunately that's the grid we are using for ECE4.

Any suggestions?


Replies (4)

RE: problem with o96 grid in combination with cmor - Added by Klaus Wyser almost 2 years ago

Sorry, meant the o160 grid in the last sentence, not o159. And the cdo version that I'm using is

Climate Data Operators version 1.9.10 (https://mpimet.mpg.de/cdo)
System: x86_64-pc-linux-gnu
CXX Compiler: mpiicpc -g -O2 -fopenmp -pthread
CXX version : icpc (ICC) 18.0.1 20171018
C Compiler: mpiicc -O2 -fopenmp -pthread -pthread
C version : icc (ICC) 18.0.1 20171018
F77 Compiler: mpiifort -O2
F77 version : ifort (IFORT) 18.0.1 20171018
Features: 251GB 16threads C++14 OpenMP45 Fortran PTHREADS HDF5 NC4/HDF5 OPeNDAP UDUNITS2 PROJ CMOR SSE2
Libraries: HDF5/1.8.19 proj/7.2.0 CMOR/3.4.0
Filetypes: srv ext ieg grb1 grb2 nc1 nc2 nc4 nc4c nc5 
     CDI library version : 1.9.10
 cgribex library version : 1.9.5
 ecCodes library version : 2.18.0
  NetCDF library version : 4.4.1.1 of Jun 24 2020 16:43:34 $
    hdf5 library version : 1.8.19
    exse library version : 1.4.2
    FILE library version : 1.9.1

RE: problem with o96 grid in combination with cmor - Added by Uwe Schulzweida almost 2 years ago

The error message comes directly from the CMOR library. The code line can be found in cmor_axis.c:

            if (fabs(values[length - 1] - values[0]) > 360.) { ... }
I think there is a rounding problem here. So the problem must be solved in the CMOR library. Unfortunately we can't do anything in CDO to solve the problem.

RE: problem with o96 grid in combination with cmor - Added by Klaus Wyser almost 2 years ago

Thanks for coming back to me so quickly. Indeed, it's a stupid way of checking in CMOR because of possible rouding errors but I guess we cannot change cmor. However, the lon_bnds are computed by cdo whan calling cmor, so that's why I think cdo may be able to help here.

RE: problem with o96 grid in combination with cmor - Added by Uwe Schulzweida almost 2 years ago

Fabian Wachsmann is the author of the cmor operator in CDO. I ask him if this problem can be solved directly in the cmor operator.

    (1-4/4)