Project

General

Profile

1-dimensional variables contain all 0 after ymonmean

Added by Ronny Meier almost 7 years ago

Hi,

I encounter a problem with ymonmean. When I use the following command:

cdo ymonmean infile.nc outfile.nc

For this file an error occurs:
cdf_put_vara_double : ncid = 131072 varid = 9 val0 = 269572799607884672.000000
cdf_put_vara_double : varname = area

Error (cdf_put_vara_double) : NetCDF: Numeric conversion not representable

From this post https://code.mpimet.mpg.de/boards/1/topics/1433 I learned that using the option -b F64 might resolve the issue. So when I use

cdo -b F64 ymonmean infile.nc outfile.nc

It will work for all the variables except for the 1-D ones, for which all the values are set to zero (even though they are non-zero in the infile.nc). Does anyone have an idea what might be the problem?

Thanks in advance,
Ronny


Replies (16)

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ralf Mueller almost 7 years ago

Hi Ronny!
cdo version, input data and your shoe size could help to solve this issue.

best,
ralf

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ronny Meier almost 7 years ago

Hi Ralf,

I am using netcdf 3.6.3. Unfortunately I can't upload the file since it is too large (15.7 GB). I have used the command before though with files of a similar size. My shoe size is 43 ;)

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ralf Mueller almost 7 years ago

  • CDO version with
    cdo -V
  • input data: if you're happy with the spatial fields, could you select the 1-D variables and recheck + upload them? They should be small enough - you may select only one or two of them and limit the time span to a couple of years. finally gzip compression is pretty effective for netcdf files and we offer a public ftp server ftp://ftp.zmaw.de/incomming
  • 43 - great, just like me! optimal conditions to solve the problem ....

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ronny Meier almost 7 years ago

Okay it is version 1.8.2
I attached a reduced file for which the error also occurs if I just use ymonmean. When using the -b F64 option for the 1-D variable there are non-zero numbers but they do not make sense any more. Probably the issue is based on the conversion to floating point number.

test4.nc (34.9 MB) test4.nc

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ralf Mueller almost 7 years ago

I could not reproduce any error

<ram@luthien:~/local/data/cdo/topics/5161>
% cdo yearmonmean test4.nc ymm.nc                                                                                                                                                         [Wed 2017-07-19|14:33:52]
cdo yearmonmean: Processed 9140616 values from 2 variables over 23 timesteps ( 0.06s )

I use 1.8.2, too. I also check the cdo binary comming from conda (also 1.8.2), which didnt caused any trouble.

% cdo -V                                                                                                                                                                                  [Wed 2017-07-19|14:39:24]
Climate Data Operators version 1.8.2 (http://mpimet.mpg.de/cdo)
Compiled: by ram on luthien (x86_64-unknown-linux-gnu) Jul  6 2017 15:56:19
Compiler: gcc -g -O3 -std=gnu99 -Wall -fopenmp -march=native   
 version: gcc (GCC) 7.1.1 20170516
Features: DATA PTHREADS OpenMP45 HDF5 NC4/HDF5 OPeNDAP SZ UDUNITS2 PROJ.4 XML2 MAGICS CURL FFTW3 AVX2
Libraries: HDF5/1.10.0 proj/4.93 xml2/2.9.4 curl/7.54.1
Filetypes: srv ext ieg grb1 grb2 nc1 nc2 nc4 nc4c 
     CDI library version : 1.8.2 of Jul  6 2017 15:55:57
 CGRIBEX library version : 1.7.6 of Dec 20 2016 19:55:24
GRIB_API library version : 2.3.0
  NetCDF library version : 4.4.1 of Oct 21 2016 04:58:10 $
    HDF5 library version : 1.10.0
 SERVICE library version : 1.4.0 of Jul  6 2017 15:55:54
   EXTRA library version : 1.4.0 of Jul  6 2017 15:56:00
     IEG library version : 1.4.0 of Jul  6 2017 15:56:01
    FILE library version : 1.8.3 of Jul  6 2017 15:56:00

so it might be caused by your netcdf-3.6. Can you make use of the conda package? Installation is pretty easy, see Anaconda

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ronny Meier almost 7 years ago

Here is the whole information:
Climate Data Operators version 1.8.2 (http://mpimet.mpg.de/cdo)
Compiled: by beyerleu on co2 (x86_64-unknown-linux-gnu) Jul 12 2017 14:14:39
Compiler: gcc -std=gnu99 -fopenmp
version: gcc (SUSE Linux) 4.8.5
Features: DATA PTHREADS OpenMP3 HDF5 NC4/HDF5/threadsafe OPeNDAP SZ PROJ.4 SSE2
Libraries: HDF5/1.8.15 proj/4.92
Filetypes: srv ext ieg grb1 grb2 nc1 nc2 nc4 nc4c
CDI library version : 1.8.2 of Jul 12 2017 14:14:07
CGRIBEX library version : 1.7.6 of Dec 20 2016 19:55:24
GRIB_API library version : 1.14.0
NetCDF library version : 4.3.3 of Jul 12 2017 12:07:19 $
HDF5 library version : 1.8.15 threadsafe
SERVICE library version : 1.4.0 of Jul 12 2017 14:14:01
EXTRA library version : 1.4.0 of Jul 12 2017 14:13:58
IEG library version : 1.4.0 of Jul 12 2017 14:13:59
FILE library version : 1.8.3 of Jul 12 2017 14:13:58

yearmonmean does run for me as well (btw what is the difference to ymonmean). However it still does not produce the expected result. If you check the variable cols1d_itype the values are actually multiplied by a factor of roughly 27.

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ralf Mueller almost 7 years ago

  • ymonmean computes monthly mean value for each month from all of your data, hence for 2 years you will get 12 timesteps per variable
  • yearmonmean computes a mean value per year out of monthly values, hence you get on 2 timesteps per variable

sorry for taking the wrong operator

btw, you use netcdf-4.3.3

your input

<ram@luthien:~/local/data/cdo/topics/5161>
% cdo sinfov test4.nc                                                                                                                                                                     [Wed 2017-07-19|16:38:08]
   File format : NetCDF2
    -1 : Institut Source   Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  Community constant      1   1    380859   1  I32  : cols1d_itype_lunit
     2 : unknown  Community instant       1   1    380859   2  F32  : FSA           
   Grid coordinates :
     1 : generic                  : points=380859
     2 : generic                  : points=380859
   Vertical coordinates :
     1 : surface                  : levels=1
   Time coordinate :  23 steps
     RefTime =  1997-01-01 00:00:00  Units = days  Calendar = 365_day  Bounds = true
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  2002-02-01 00:00:00  2002-03-01 00:00:00  2002-04-01 00:00:00  2002-05-01 00:00:00
  2002-06-01 00:00:00  2002-07-01 00:00:00  2002-08-01 00:00:00  2002-09-01 00:00:00
  2002-10-01 00:00:00  2002-11-01 00:00:00  2002-12-01 00:00:00  2003-01-01 00:00:00
  2003-02-01 00:00:00  2003-03-01 00:00:00  2003-04-01 00:00:00  2003-05-01 00:00:00
  2003-06-01 00:00:00  2003-07-01 00:00:00  2003-08-01 00:00:00  2003-09-01 00:00:00
  2003-10-01 00:00:00  2003-11-01 00:00:00  2003-12-01 00:00:00
cdo sinfon: Processed 2 variables over 23 timesteps ( 0.01s )
ymonmean
<ram@luthien:~/local/data/cdo/topics/5161>
% cdo sinfov -ymonmean test4.nc                                                                                                                                                           [Wed 2017-07-19|16:38:09]
cdo sinfon: Started child process "ymonmean test4.nc (pipe1.1)".
   File format : NetCDF2
    -1 : Institut Source   Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  Community constant      1   1    380859   1  I32  : cols1d_itype_lunit
     2 : unknown  Community instant       1   1    380859   2  F32  : FSA           
   Grid coordinates :
     1 : generic                  : points=380859
     2 : generic                  : points=380859
   Vertical coordinates :
     1 : surface                  : levels=1
   Time coordinate :  23 steps
     RefTime =  1997-01-01 00:00:00  Units = days  Calendar = 365_day
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  2003-01-01 00:00:00  2003-02-01 00:00:00  2003-03-01 00:00:00  2003-04-01 00:00:00
  2003-05-01 00:00:00  2003-06-01 00:00:00  2003-07-01 00:00:00  2003-08-01 00:00:00
  2003-09-01 00:00:00  2003-10-01 00:00:00  2003-11-01 00:00:00  2003-12-01 00:00:00
cdo(2) ymonmean: Processed 9140616 values from 2 variables over 23 timesteps ( 0.05s )
cdo sinfon: Processed 2 variables over 12 timesteps ( 0.05s )
yearmonmean
<ram@luthien:~/local/data/cdo/topics/5161>
% cdo sinfov -yearmonmean test4.nc                                                                                                                                                        [Wed 2017-07-19|16:38:16]
cdo sinfon: Started child process "yearmonmean test4.nc (pipe1.1)".
   File format : NetCDF2
    -1 : Institut Source   Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  Community constant      1   1    380859   1  I32  : cols1d_itype_lunit
     2 : unknown  Community instant       1   1    380859   2  F32  : FSA           
   Grid coordinates :
     1 : generic                  : points=380859
     2 : generic                  : points=380859
   Vertical coordinates :
     1 : surface                  : levels=1
   Time coordinate :  23 steps
     RefTime =  1997-01-01 00:00:00  Units = days  Calendar = 365_day  Bounds = true
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  2002-07-01 00:00:00  2003-06-16 00:00:00
cdo(2) yearmonmean: Processed 9140616 values from 2 variables over 23 timesteps ( 0.06s )
cdo sinfon: Processed 2 variables over 2 timesteps ( 0.06s )

with CDO_TIMESTAT_DATE, you can should how to set the timestamp.

hth
ralf

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ronny Meier almost 7 years ago

Hey again,

Okay so for me the initial problem with ymonmean remains. Does it work for you? How would the CDO_TIMESTAT_DATE change the result (and also how do I use it since I couldn't find an example anywhere?)?

Cheers,
Ronny

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ralf Mueller almost 7 years ago

Hi Ronnie!

no problems/warnings/errors for me

<ram@luthien:~/local/data/cdo/topics/5161>
% cdo ymonmean test4.nc ymm.nc                                                                                                                                                            [Thu 2017-07-20|14:10:25]
cdo ymonmean: Processed 9140616 values from 2 variables over 23 timesteps ( 0.08s )
<ram@luthien:~/local/data/cdo/topics/5161>
% cdo sinfov ymm.nc                                                                                                                                                                       [Thu 2017-07-20|14:10:46]
   File format : NetCDF2
    -1 : Institut Source   Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  Community constant      1   1    380859   1  I32  : cols1d_itype_lunit
     2 : unknown  Community instant       1   1    380859   2  F32  : FSA           
   Grid coordinates :
     1 : generic                  : points=380859
     2 : generic                  : points=380859
   Vertical coordinates :
     1 : surface                  : levels=1
   Time coordinate :  12 steps
     RefTime =  1997-01-01 00:00:00  Units = days  Calendar = 365_day
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  2003-01-01 00:00:00  2003-02-01 00:00:00  2003-03-01 00:00:00  2003-04-01 00:00:00
  2003-05-01 00:00:00  2003-06-01 00:00:00  2003-07-01 00:00:00  2003-08-01 00:00:00
  2003-09-01 00:00:00  2003-10-01 00:00:00  2003-11-01 00:00:00  2003-12-01 00:00:00<ram@luthien:~/local/data/cdo/topics/5161>
% cdo ymonmean test4.nc ymm.nc                                                                                                                                                            [Thu 2017-07-20|14:10:25]
cdo ymonmean: Processed 9140616 values from 2 variables over 23 timesteps ( 0.08s )
<ram@luthien:~/local/data/cdo/topics/5161>
% cdo sinfov ymm.nc                                                                                                                                                                       [Thu 2017-07-20|14:10:46]
   File format : NetCDF2
    -1 : Institut Source   Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  Community constant      1   1    380859   1  I32  : cols1d_itype_lunit
     2 : unknown  Community instant       1   1    380859   2  F32  : FSA           
   Grid coordinates :
     1 : generic                  : points=380859
     2 : generic                  : points=380859
   Vertical coordinates :
     1 : surface                  : levels=1
   Time coordinate :  12 steps
     RefTime =  1997-01-01 00:00:00  Units = days  Calendar = 365_day
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  2003-01-01 00:00:00  2003-02-01 00:00:00  2003-03-01 00:00:00  2003-04-01 00:00:00
  2003-05-01 00:00:00  2003-06-01 00:00:00  2003-07-01 00:00:00  2003-08-01 00:00:00
  2003-09-01 00:00:00  2003-10-01 00:00:00  2003-11-01 00:00:00  2003-12-01 00:00:00
cdo sinfon: Processed 2 variables over 12 timesteps ( 0.01s )

cdo sinfon: Processed 2 variables over 12 timesteps ( 0.01s )

Bcause you dont have multiple timesteps per month, the setting of CDO_TIMESTAT_DATE does not change anything. It would only change the timestamps of the fields, not the field values.

How to use environment variables depends on the shell you use, see the docu for help

With bash compatibe shells you can leave out the export and put everything in a single command line:

As an example I take the call

cdo -sinfov  -mul -enlarge,r2x2 -for,1,1000 -const,1,r2x2
This creates data with a time axis on the fly - instead of writing anything to disk I use sinfov to check the time axis values
% cdo -sinfov  -mul -enlarge,r2x2 -for,1,1000 -const,1,r2x2                                                                                                                               [Thu 2017-07-20|14:20:15]
cdo sinfon: Started child process "mul -enlarge,r2x2 -for,1,1000 -const,1,r2x2 (pipe1.1)".
cdo(2) mul: Started child process "enlarge,r2x2 -for,1,1000 (pipe2.1)".
cdo(2) mul: Started child process "const,1,r2x2 (pipe2.2)".
cdo(4) enlarge: Started child process "for,1,1000 (pipe4.1)".
cdo(3) const: Set default filetype to GRIB
cdo(2) mul: Filling up stream2 >-const,1,r2x2< by copying the first timestep.
   File format : GRIB
    -1 : Institut Source   Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  unknown  instant       1   1         4   1  -1   : for           
   Grid coordinates :
     1 : lonlat                   : points=4 (2x2)
                              lon : 0 to 180 by 180 degrees_east  circular
                              lat : -45 to 45 by 90 degrees_north
   Vertical coordinates :
     1 : surface                  : levels=1
   Time coordinate :  unlimited steps
     RefTime =  0001-01-01 00:00:00  Units = hours  Calendar = proleptic_gregorian
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  0001-01-01 00:00:00  0001-01-02 00:00:00  0001-01-03 00:00:00  0001-01-04 00:00:00
  0001-01-05 00:00:00  0001-01-06 00:00:00  0001-01-07 00:00:00  0001-01-08 00:00:00
  0001-01-09 00:00:00  0001-01-10 00:00:00  0001-01-11 00:00:00  0001-01-12 00:00:00
  0001-01-13 00:00:00  0001-01-14 00:00:00  0001-01-15 00:00:00  0001-01-16 00:00:00
  0001-01-17 00:00:00  0001-01-18 00:00:00  0001-01-19 00:00:00  0001-01-20 00:00:00
  0001-01-21 00:00:00  0001-01-22 00:00:00  0001-01-23 00:00:00  0001-01-24 00:00:00
  0001-01-25 00:00:00  0001-01-26 00:00:00  0001-01-27 00:00:00  0001-01-28 00:00:00
  0001-01-29 00:00:00  0001-01-30 00:00:00  0001-01-31 00:00:00  0001-02-01 00:00:00
  0001-02-02 00:00:00  0001-02-03 00:00:00  0001-02-04 00:00:00  0001-02-05 00:00:00
  0001-02-06 00:00:00  0001-02-07 00:00:00  0001-02-08 00:00:00  0001-02-09 00:00:00
  0001-02-10 00:00:00  0001-02-11 00:00:00  0001-02-12 00:00:00  0001-02-13 00:00:00
  0001-02-14 00:00:00  0001-02-15 00:00:00  0001-02-16 00:00:00  0001-02-17 00:00:00
  0001-02-18 00:00:00  0001-02-19 00:00:00  0001-02-20 00:00:00  0001-02-21 00:00:00
  0001-02-22 00:00:00  0001-02-23 00:00:00  0001-02-24 00:00:00  0001-02-25 00:00:00
  0001-02-26 00:00:00  0001-02-27 00:00:00  0001-02-28 00:00:00  0001-03-01 00:00:00
   ................................................................................
   ................................................................................
  0003-07-30 00:00:00  0003-07-31 00:00:00  0003-08-01 00:00:00  0003-08-02 00:00:00
  0003-08-03 00:00:00  0003-08-04 00:00:00  0003-08-05 00:00:00  0003-08-06 00:00:00
  0003-08-07 00:00:00  0003-08-08 00:00:00  0003-08-09 00:00:00  0003-08-10 00:00:00
  0003-08-11 00:00:00  0003-08-12 00:00:00  0003-08-13 00:00:00  0003-08-14 00:00:00
  0003-08-15 00:00:00  0003-08-16 00:00:00  0003-08-17 00:00:00  0003-08-18 00:00:00
  0003-08-19 00:00:00  0003-08-20 00:00:00  0003-08-21 00:00:00  0003-08-22 00:00:00
  0003-08-23 00:00:00  0003-08-24 00:00:00  0003-08-25 00:00:00  0003-08-26 00:00:00
  0003-08-27 00:00:00  0003-08-28 00:00:00  0003-08-29 00:00:00  0003-08-30 00:00:00
  0003-08-31 00:00:00  0003-09-01 00:00:00  0003-09-02 00:00:00  0003-09-03 00:00:00
  0003-09-04 00:00:00  0003-09-05 00:00:00  0003-09-06 00:00:00  0003-09-07 00:00:00
  0003-09-08 00:00:00  0003-09-09 00:00:00  0003-09-10 00:00:00  0003-09-11 00:00:00
  0003-09-12 00:00:00  0003-09-13 00:00:00  0003-09-14 00:00:00  0003-09-15 00:00:00
  0003-09-16 00:00:00  0003-09-17 00:00:00  0003-09-18 00:00:00  0003-09-19 00:00:00
  0003-09-20 00:00:00  0003-09-21 00:00:00  0003-09-22 00:00:00  0003-09-23 00:00:00
  0003-09-24 00:00:00  0003-09-25 00:00:00  0003-09-26 00:00:00  0003-09-27 00:00:00
cdo(3) const:  ( 0.02s )
cdo(5) for:  ( 0.02s )
cdo(4) enlarge: Processed 1000 values from 1 variable over 1000 timesteps ( 0.02s )
cdo(2) mul: Processed 4004 values from 2 variables over 1001 timesteps ( 0.02s )
cdo sinfon: Processed 1 variable over 1000 timesteps ( 0.02s )

the default is a time axis with daily data. Not I set different values for CDO_TIMESTAT_DATE with a monthly mean calculation:
% cdo -sinfov -monmean -mul -enlarge,r2x2 -for,1,1000 -const,1,r2x2                                                                                                                       [Thu 2017-07-20|14:20:20]
cdo sinfon: Started child process "monmean -mul -enlarge,r2x2 -for,1,1000 -const,1,r2x2 (pipe1.1)".
cdo(2) monmean: Started child process "mul -enlarge,r2x2 -for,1,1000 -const,1,r2x2 (pipe2.1)".
cdo(3) mul: Started child process "enlarge,r2x2 -for,1,1000 (pipe3.1)".
cdo(3) mul: Started child process "const,1,r2x2 (pipe3.2)".
cdo(4) enlarge: Started child process "for,1,1000 (pipe4.1)".
cdo(5) const: Set default filetype to GRIB
cdo(3) mul: Filling up stream2 >-const,1,r2x2< by copying the first timestep.
   File format : GRIB
    -1 : Institut Source   Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  unknown  instant       1   1         4   1  -1   : for           
   Grid coordinates :
     1 : lonlat                   : points=4 (2x2)
                              lon : 0 to 180 by 180 degrees_east  circular
                              lat : -45 to 45 by 90 degrees_north
   Vertical coordinates :
     1 : surface                  : levels=1
   Time coordinate :  unlimited steps
     RefTime =  0001-01-01 00:00:00  Units = hours  Calendar = proleptic_gregorian
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  0001-01-16 00:00:00  0001-02-14 12:00:00  0001-03-16 00:00:00  0001-04-15 12:00:00
  0001-05-16 00:00:00  0001-06-15 12:00:00  0001-07-16 00:00:00  0001-08-16 00:00:00
  0001-09-15 12:00:00  0001-10-16 00:00:00  0001-11-15 12:00:00  0001-12-16 00:00:00
  0002-01-16 00:00:00  0002-02-14 12:00:00  0002-03-16 00:00:00  0002-04-15 12:00:00
  0002-05-16 00:00:00  0002-06-15 12:00:00  0002-07-16 00:00:00  0002-08-16 00:00:00
  0002-09-15 12:00:00  0002-10-16 00:00:00  0002-11-15 12:00:00  0002-12-16 00:00:00
  0003-01-16 00:00:00  0003-02-14 12:00:00  0003-03-16 00:00:00  0003-04-15 12:00:00
  0003-05-16 00:00:00  0003-06-15 12:00:00  0003-07-16 00:00:00  0003-08-16 00:00:00
  0003-09-14 00:00:00
cdo(5) const:  ( 0.04s )
cdo(6) for:  ( 0.04s )
cdo(4) enlarge: Processed 1000 values from 1 variable over 1000 timesteps ( 0.04s )
cdo(3) mul: Processed 4004 values from 2 variables over 1001 timesteps ( 0.04s )
cdo(2) monmean: Processed 4000 values from 1 variable over 1000 timesteps ( 0.04s )
cdo sinfon: Processed 1 variable over 33 timesteps ( 0.04s )
The default is: Use the middle of the month. But you can use the first or last contributing timestep if you like:
% CDO_TIMESTAT_DATE=last cdo -sinfov -monmean -mul -enlarge,r2x2 -for,1,1000 -const,1,r2x2                                                                                                [Thu 2017-07-20|14:20:29]
cdo sinfon: Started child process "monmean -mul -enlarge,r2x2 -for,1,1000 -const,1,r2x2 (pipe1.1)".
cdo(2) monmean: Started child process "mul -enlarge,r2x2 -for,1,1000 -const,1,r2x2 (pipe2.1)".
cdo(3) mul: Started child process "enlarge,r2x2 -for,1,1000 (pipe3.1)".
cdo(3) mul: Started child process "const,1,r2x2 (pipe3.2)".
cdo(4) enlarge: Started child process "for,1,1000 (pipe4.1)".
cdo(6) for: Set default filetype to GRIB
cdo(3) mul: Filling up stream2 >-const,1,r2x2< by copying the first timestep.
   File format : GRIB
    -1 : Institut Source   Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  unknown  instant       1   1         4   1  -1   : for           
   Grid coordinates :
     1 : lonlat                   : points=4 (2x2)
                              lon : 0 to 180 by 180 degrees_east  circular
                              lat : -45 to 45 by 90 degrees_north
   Vertical coordinates :
     1 : surface                  : levels=1
   Time coordinate :  unlimited steps
     RefTime =  0001-01-01 00:00:00  Units = hours  Calendar = proleptic_gregorian
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  0001-01-31 00:00:00  0001-02-28 00:00:00  0001-03-31 00:00:00  0001-04-30 00:00:00
  0001-05-31 00:00:00  0001-06-30 00:00:00  0001-07-31 00:00:00  0001-08-31 00:00:00
  0001-09-30 00:00:00  0001-10-31 00:00:00  0001-11-30 00:00:00  0001-12-31 00:00:00
  0002-01-31 00:00:00  0002-02-28 00:00:00  0002-03-31 00:00:00  0002-04-30 00:00:00
  0002-05-31 00:00:00  0002-06-30 00:00:00  0002-07-31 00:00:00  0002-08-31 00:00:00
  0002-09-30 00:00:00  0002-10-31 00:00:00  0002-11-30 00:00:00  0002-12-31 00:00:00
  0003-01-31 00:00:00  0003-02-28 00:00:00  0003-03-31 00:00:00  0003-04-30 00:00:00
  0003-05-31 00:00:00  0003-06-30 00:00:00  0003-07-31 00:00:00  0003-08-31 00:00:00
  0003-09-27 00:00:00
cdo(5) const:  ( 0.04s )
cdo(6) for:  ( 0.04s )
cdo(4) enlarge: Processed 1000 values from 1 variable over 1000 timesteps ( 0.04s )
cdo(3) mul: Processed 4004 values from 2 variables over 1001 timesteps ( 0.04s )
cdo(2) monmean: Processed 4000 values from 1 variable over 1000 timesteps ( 0.04s )
cdo sinfon: Processed 1 variable over 33 timesteps ( 0.04s )
% CDO_TIMESTAT_DATE=first cdo -sinfov -monmean -mul -enlarge,r2x2 -for,1,1000 -const,1,r2x2                                                                                               [Thu 2017-07-20|14:20:40]
cdo sinfon: Started child process "monmean -mul -enlarge,r2x2 -for,1,1000 -const,1,r2x2 (pipe1.1)".
cdo(2) monmean: Started child process "mul -enlarge,r2x2 -for,1,1000 -const,1,r2x2 (pipe2.1)".
cdo(3) mul: Started child process "enlarge,r2x2 -for,1,1000 (pipe3.1)".
cdo(3) mul: Started child process "const,1,r2x2 (pipe3.2)".
cdo(4) enlarge: Started child process "for,1,1000 (pipe4.1)".
cdo(5) const: Set default filetype to GRIB
cdo(3) mul: Filling up stream2 >-const,1,r2x2< by copying the first timestep.
   File format : GRIB
    -1 : Institut Source   Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  unknown  instant       1   1         4   1  -1   : for           
   Grid coordinates :
     1 : lonlat                   : points=4 (2x2)
                              lon : 0 to 180 by 180 degrees_east  circular
                              lat : -45 to 45 by 90 degrees_north
   Vertical coordinates :
     1 : surface                  : levels=1
   Time coordinate :  unlimited steps
     RefTime =  0001-01-01 00:00:00  Units = hours  Calendar = proleptic_gregorian
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  0001-01-01 00:00:00  0001-02-01 00:00:00  0001-03-01 00:00:00  0001-04-01 00:00:00
  0001-05-01 00:00:00  0001-06-01 00:00:00  0001-07-01 00:00:00  0001-08-01 00:00:00
  0001-09-01 00:00:00  0001-10-01 00:00:00  0001-11-01 00:00:00  0001-12-01 00:00:00
  0002-01-01 00:00:00  0002-02-01 00:00:00  0002-03-01 00:00:00  0002-04-01 00:00:00
  0002-05-01 00:00:00  0002-06-01 00:00:00  0002-07-01 00:00:00  0002-08-01 00:00:00
  0002-09-01 00:00:00  0002-10-01 00:00:00  0002-11-01 00:00:00  0002-12-01 00:00:00
  0003-01-01 00:00:00  0003-02-01 00:00:00  0003-03-01 00:00:00  0003-04-01 00:00:00
  0003-05-01 00:00:00  0003-06-01 00:00:00  0003-07-01 00:00:00  0003-08-01 00:00:00
  0003-09-01 00:00:00
cdo(5) const:  ( 0.05s )
cdo(6) for:  ( 0.05s )
cdo(4) enlarge: Processed 1000 values from 1 variable over 1000 timesteps ( 0.05s )
cdo(3) mul: Processed 4004 values from 2 variables over 1001 timesteps ( 0.05s )
cdo(2) monmean: Processed 4000 values from 1 variable over 1000 timesteps ( 0.05s )
cdo sinfon: Processed 1 variable over 33 timesteps ( 0.05s )

hth
ralf

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ronny Meier almost 7 years ago

Can you upload the resulting file so that I can check whether the result is correct?

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ronny Meier almost 7 years ago

Okay so you reproduced my problem ;) If you check the variable cols1d_itype you will see that now the values are now all zero which was not the case for the initial file...

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ralf Mueller almost 7 years ago

But there is only a single timestep for this variable

<ram@luthien:~/local/data/cdo/topics/5161>
% cdo infov test4.nc                                                                                                                                                                      [Thu 2017-07-20|15:25:38]
    -1 :       Date     Time   Level Gridsize    Miss :     Minimum        Mean     Maximum : Parameter name
     1 : 2002-02-01 00:00:00       0   380859       0 :      1.0000      2.5583      6.0000 : cols1d_itype_lunit
     2 : 2002-02-01 00:00:00       0   380859       0 :      0.0000      83.481      325.11 : FSA           
     3 : 2002-03-01 00:00:00       0   380859       0 :      0.0000      95.027      294.82 : FSA           
     4 : 2002-04-01 00:00:00       0   380859       0 :      2.9405      112.60      297.83 : FSA           
     5 : 2002-05-01 00:00:00       0   380859       0 :      4.4064      133.29      310.51 : FSA           
     6 : 2002-06-01 00:00:00       0   380859       0 :      3.5318      155.84      328.06 : FSA           
     7 : 2002-07-01 00:00:00       0   380859       0 :      3.0655      171.90      338.56 : FSA           
     8 : 2002-08-01 00:00:00       0   380859       0 :      3.2521      170.58      332.10 : FSA           
     9 : 2002-09-01 00:00:00       0   380859       0 :      4.0867      153.98      308.38 : FSA           
    10 : 2002-10-01 00:00:00       0   380859       0 :      4.3934      133.42      294.89 : FSA           
    11 : 2002-11-01 00:00:00       0   380859       0 :    0.045423      109.76      297.89 : FSA           
    12 : 2002-12-01 00:00:00       0   380859       0 :      0.0000      90.018      317.53 : FSA           
    13 : 2003-01-01 00:00:00       0   380859       0 :      0.0000      80.059      323.55 : FSA           
    14 : 2003-02-01 00:00:00       0   380859       0 :      0.0000      83.149      341.92 : FSA           
    15 : 2003-03-01 00:00:00       0   380859       0 :      0.0000      94.118      325.01 : FSA           
    16 : 2003-04-01 00:00:00       0   380859       0 :      2.8125      112.71      290.53 : FSA           
    17 : 2003-05-01 00:00:00       0   380859       0 :      4.6860      135.17      319.27 : FSA           
    18 : 2003-06-01 00:00:00       0   380859       0 :      3.6500      156.72      329.60 : FSA           
    19 : 2003-07-01 00:00:00       0   380859       0 :      3.0220      171.39      339.68 : FSA           
    20 : 2003-08-01 00:00:00       0   380859       0 :      3.4911      171.89      339.37 : FSA           
    21 : 2003-09-01 00:00:00       0   380859       0 :      4.2047      156.13      314.05 : FSA           
    22 : 2003-10-01 00:00:00       0   380859       0 :      4.7327      134.07      283.97 : FSA           
    23 : 2003-11-01 00:00:00       0   380859       0 :    0.048523      110.20      293.44 : FSA           
    24 : 2003-12-01 00:00:00       0   380859       0 :      0.0000      89.967      316.18 : FSA           
the other timesteps are missing. I would not expect it to be correct for this var.

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ronny Meier almost 7 years ago

The strange thing is it has worked for other data of similar shape before. For example if you check with the attached file you will see that ymonmean just copies the variable cols1d_itype_lunit, which is actually what I want...

test8.nc (39.2 MB) test8.nc

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ralf Mueller almost 7 years ago

Correct, but I have no explanation for that, sorry. I would not rely on this, if you want a copy, you better do it explicitly.

cheers
ralf

RE: 1-dimensional variables contain all 0 after ymonmean - Added by Ronny Meier almost 7 years ago

Hey

I am doing it like that now and it works. Probably that is the safest way to go.

    (1-16/16)