Project

General

Profile

How to split netcdf data into two parts

Added by ch ch01 over 8 years ago

Hallo,,

I have a very easy question.
I have daily data 1990.nc,1991.nc, and 1992.nc 9each 365 days).

I would like to combine and split them into 2 netcdf data, which are;

data1.nc ---> 1 jan 1990 to 30 jun 1991

data2.nc ---> 1 jul 1991 to 31 dec 1992.

Could you suggest any a command line to do this task?

Ch.


Replies (3)

RE: How to split netcdf data into two parts - Added by Uwe Schulzweida over 8 years ago

CDO needs to steps for this task:

cdo select,startdate=1990-01-01,enddate=1991-06-30T23:59:59 199[0-2].nc data1.nc
cdo select,startdate=1991-07-01,enddate=1992-12-31T23:59:59 199[0-2].nc data2.nc
Please ignore the warning message!

RE: How to split netcdf data into two parts - Added by ch ch01 over 8 years ago

Dear Uwe,

I got these errors:

Parameter >startdate=1990-01-01< has not a valid keyword!
cdo select: 33%
cdo select (Abort): No variable selected!

do you know why?

Thanks
Chang.

RE: How to split netcdf data into two parts - Added by Uwe Schulzweida over 8 years ago

Dear Chang,

The keywords startdate and enddate are implemented only in the latest CDO version 1.6.9.

Cheers,
Uwe

    (1-3/3)