Project

General

Profile

issue in using splitmon operator

Added by Atul Kumar over 8 years ago

Hi

I downloaded NCEP/NCAR reanalysis data for year 2011 and I wanted to split the data in monthly file.

I used the splitmon operator but it failed to open the file

here is the error I received

atmos2@CORAL:~/Downloads/NCEP$ cdo splitmon air.2m.gauss.2011.nc air_Y2000M

cdo splitmon: Open failed on >air.2m.gauss.2011.nc<
Unsupported file type (library support not compiled in)

and here is Header info of the file

atmos2@CORAL:~/Downloads/NCEP$ ncdump -h air.2m.gauss.2011.nc
netcdf air.2m.gauss.2011 {
dimensions:
lon = 192 ;
lat = 94 ;
time = UNLIMITED ; // (1460 currently)
variables:
float lat(lat) ;
lat:units = "degrees_north" ;
lat:actual_range = 88.542f, -88.542f ;
lat:long_name = "Latitude" ;
lat:standard_name = "latitude" ;
lat:axis = "Y" ;
float lon(lon) ;
lon:units = "degrees_east" ;
lon:long_name = "Longitude" ;
lon:actual_range = 0.f, 358.125f ;
lon:standard_name = "longitude" ;
lon:axis = "X" ;
double time(time) ;
time:long_name = "Time" ;
time:delta_t = "0000-00-00 06:00:00" ;
time:avg_period = "0000-00-00 06:00:00" ;
time:standard_name = "time" ;
time:axis = "T" ;
time:units = "hours since 1800-01-01 00:00:0.0" ;
time:actual_range = 1849584., 1858338. ;
float air(time, lat, lon) ;
air:long_name = "4xDaily Air temperature at 2 m" ;
air:units = "degK" ;
air:precision = 2s ;
air:least_significant_digit = 1s ;
air:GRIB_id = 11s ;
air:GRIB_name = "TMP" ;
air:var_desc = "Air temperature" ;
air:level_desc = "2 m" ;
air:statistic = "Mean" ;
air:parent_stat = "Individual Obs" ;
air:missing_value = -9.96921e+36f ;
air:actual_range = 175.1f, 328.5f ;
air:valid_range = 150.f, 400.f ;
air:dataset = "NCEP Reanalysis" ;

// global attributes:
:Conventions = "COARDS" ;
:title = "4x daily NMC reanalysis (2011)" ;
:description = "Data is from NMC initialized reanalysis\n",
"(4x/day). It consists of T62 variables interpolated to\n",
"pressure surfaces from model (sigma) surfaces." ;
:platform = "Model" ;
:history = "created 2011/01 by Hoop (netCDF2.3)\n",
"Converted to chunked, deflated non-packed NetCDF4 2014/09" ;
:References = "http://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis.html" ;
:dataset_title = "NCEP-NCAR Reanalysis 1" ;

I have already done the same operation on NCEP/DOE reanalysis data set and it worked correctly

what could be the issue? is cdo is unable to read CORDS convection??????

Please Let me know if there is other alternative to solve the problem

I am also attaching the NCEP file

I am using cdo version1.6.2

air.2m.gauss.2011.nc (35.4 MB) air.2m.gauss.2011.nc NCEP-NCAR reanalysis dataset for air temprature at 2m

Replies (6)

RE: issue in using splitmon operator - Added by Ralf Mueller over 8 years ago

Hi!

most probably, the version you use is

  • outdated (for sure)
  • not compiled with netcdf4 support

your upload is z-compressed netcdf4 classic. Could be, that the netcdf library on your system does not have netcdf4 support. you have to check yourself, of course.

with

cdo -V
you can inspect, what library versions are used by CDO. BUT to get sure about netcdf, you have to look for and call the nc-config tool provided by you netcdf installation.

Should look like this

ram@luthien:~/Downloads nc-config                                                                                                                                                                                          [12:53:29|16-07-19]
Usage: nc-config [OPTION]

Available values for OPTION include:

  --help        display this help message and exit
  --all         display all options
  --cc          C compiler
  --cflags      pre-processor and compiler flags
  --has-dap     whether OPeNDAP is enabled in this build
  --has-nc2     whether NetCDF-2 API is enabled
  --has-nc4     whether NetCDF-4/HDF-5 is enabled in this build
  --has-hdf5    whether HDF5 is used in build (always the same as --has-nc4)
  --has-hdf4    whether HDF4 was used in build
  --has-logging whether logging is enabled with --enable-logging.
  --has-pnetcdf whether parallel-netcdf (a.k.a. pnetcdf) was used in build
  --has-szlib   whether szlib is included in build
  --libs        library linking information for netcdf
  --prefix      Install prefix
  --includedir  Include directory
  --version     Library version

  --fc          Fortran compiler
  --fflags      flags needed to compile a Fortran program
  --flibs       libraries needed to link a Fortran program
  --has-f90     whether Fortran 90 API is installed
  --has-f03     whether Fortran 03 API is installed (implies F90).
ram@luthien:~/Downloads nc-config --has-nc4                                                                                                                                                                                [12:57:57|16-07-19]
yes

RE: issue in using splitmon operator - Added by Atul Kumar over 8 years ago

Hi Ralf

Many thanks for your response

I am using netcdf 4.1.3 which I installed using command sudo apt-get install netcdf-bin

here are the libraries which CDO is able to use on my machine, which also confirms netcdf version 4.1.3 I also cross checked with nc-config option you mentioned above. It says yes for nc2,nc4,hdf5 but in case of hdf4 it say no which you can see below

atmos1@CORAL:~/roms/Roms_tools/Run/DATA/CFSR_BOB$ cdo -V
Climate Data Operators version 1.6.2 (http://code.zmaw.de/projects/cdo)
Compiler: gcc -std=gnu99 -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -pedantic -fPIC -pthread
version: gcc (Ubuntu/Linaro 4.8.2-4ubuntu1) 4.8.2
Compiled: by buildd on allspice (x86_64-unknown-linux-gnu) Nov 15 2013 17:10:54
Features: PTHREADS Z JASPER PROJ.4 MAGICS
Libraries: proj/4.7
Filetypes: srv ext ieg grb grb2 nc
CDI library version : 1.6.2 of Nov 15 2013 17:10:44
GRIB_API library version : 1.10.4
netCDF library version : 4.1.3 of Feb 24 2014 21:05:37 $
HDF5 library version : 1.8.11
SERVICE library version : 1.3.1 of Nov 15 2013 17:10:28
EXTRA library version : 1.3.1 of Nov 15 2013 17:10:20
IEG library version : 1.3.1 of Nov 15 2013 17:10:24
FILE library version : 1.8.2 of Nov 15 2013 17:10:20

atmos1@CORAL:~/roms/Roms_tools/Run/DATA/CFSR_BOB$ nc-config --has-nc4
yes
atmos1@CORAL:~/roms/Roms_tools/Run/DATA/CFSR_BOB$ nc-config --has-hdf5
yes
atmos1@CORAL:~/roms/Roms_tools/Run/DATA/CFSR_BOB$ nc-config --has-nc2
yes
atmos1@CORAL:~/roms/Roms_tools/Run/DATA/CFSR_BOB$ nc-config --has-hdf4
no

According to above information I think that I could say I say that my I have netcdf4 support but not hdf4 and my CDO vesrion is 1.6.2, which indeed is older but newly released CDO 1.7.2 has not updated splitmon function so I think I still can use CDO 1.6.2

Please let me know if I misunderstood anything and also if I have to install other libraries.

RE: issue in using splitmon operator - Added by Ralf Mueller over 8 years ago

that looks ok, finally you should check the cdo binary with ldd. This shows, which libraries the cdo binary is linked to. could be that although there is a proper system installation for netcdf, cdo does not use this on, but from somewhere else...

RE: issue in using splitmon operator - Added by Atul Kumar over 8 years ago

I could not understand how to solve this problem

I would be grateful if you can guide me to solve the problem.

RE: issue in using splitmon operator - Added by Antonio Rodriges over 8 years ago

Atul,

your cdo -V reports

....
Libraries: proj/4.7
Filetypes: srv ext ieg grb grb2 nc
CDI library version : 1.6.2 of Nov 15 2013 17:10:44
GRIB_API library version : 1.10.4
....

And this means that you do not have NetCDF4 support

For example, my cdo -V yields

*Filetypes: srv ext ieg grb nc nc2 nc4 nc4c *

So, go to
https://code.zmaw.de/projects/cdo/files
and download
libs4cdo-0.0.11

compile all libs there (notice Makefile at the folder root, you do not need manually compile all of them, just launch make only once at the libs4cdo-0.0.11 root)
and recompile cdo with something like this

./configure --with-netcdf=/usr/ --with-hdf5=/usr/ --with-szlib-lib=/usr/ --with-zlib-lib=/usr/ --with-hdf5-lib=/usr/ --with-sz-lib=/usr/ --with-proj=/usr/ -with-grib_api=/usr/

this will give you all formats supported by CDO to date

RE: issue in using splitmon operator - Added by Atul Kumar over 8 years ago

Dear Antonio,

Many thanks for your kind help.

Atul

    (1-6/6)