Project

General

Profile

how to select DJF data

Added by patty Lyn over 3 years ago

Hi, thanks this forum and thanks the production of CDO. I am new to this package and I work it under conda system. I have two questions, and I can not find the answer to it on the CDO guide book. I am wondering if anyone can help me with these:

1. I have a daily .nc dataset starts from 1979-01-01 to 2019-12-31, while I try to use the splitseas function to split the data to 4 seasons, I realized that the data I want for DJF is December from last year and January and February for current year. I have tried several ways but all failed, can anyone tell me how to make this classification? Also, after the classification, how can I try to calculate the annual DJF mean? I think that yseasmean is not helpful in this DJF classification. Ans also I would like to calculate the annual percentile for the DJF. How should I deal with it?

2. I have another .nc datasets, split with years, like 1979.nc,1980.nc....etc, how can I merge then into one .nc data in one dimension starts from 1979-01-01 to 2019.12-31? If I use the cat/merge/mergetime, the merged file will show in 41 dimensions.


Replies (5)

RE: how to select DJF data - Added by Karin Meier-Fleischer over 3 years ago

Hi Patty,

without any file it is not really possible to help.

to 1.

If you select the season DJF from a file starting with January the first season will have only 2 months (JF) and the last year only one month (D). CDO tells you what happens with a warning message like

Warning: Season 1 ( 1979-01-16) has only 2 input time steps!
Warning: Season 625 ( 2019-12-16) has only 1 input time step!

You have to add the December of the year before to the dataset and the January and February of the last year+1. If you have added them than you can use seasmean to compute the seasonal mean. Or you disreagard the missing months and start year+1 to max(year)-1. The anual percentile can be computed using the operator timselpctl.

to 2.

What do you mean with 'the merged file will show in 41 dimensions'?

-Karin

RE: how to select DJF data - Added by patty Lyn over 3 years ago

Hi dear Karin, thank you for your reply. My data is very huge so it's not possible to upload, so it's a netcdf file containing 365(366) * 41 timesteps. While I just use the splitseas function, the merged DJF file starts from 1979-01-01 and ends with 2019-12-31, with all the DJF data in one dimension. There is no such warnings as you decribed.

RE: how to select DJF data - Added by Karin Meier-Fleischer over 3 years ago

Can you show us the output of 'ncdump -h' if the file type is netCDF or from 'cdo sinfo'?

RE: how to select DJF data - Added by patty Lyn over 3 years ago

hey, yes, it's the results I copy from cdo sinfo

File format : NetCDF4
-1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter ID
1 : unknown unknown v instant 1 1 21901 1 F64 : -1
2 : unknown unknown v instant 1 1 21901 1 F64 : -2
3 : unknown unknown v instant 1 1 21901 1 F64 : -3
4 : unknown unknown v instant 1 1 21901 1 F64 : -4
5 : unknown unknown v instant 1 1 21901 1 F64 : -5
Grid coordinates :
1 : lonlat : points=21901 (181x121)
longitude : 100 to 145 by 0.25 degrees_east
latitude : 50 to 20 by -0.25 degrees_north
Vertical coordinates :
1 : surface : levels=1
Time coordinate : 14975 steps
RefTime = 1979-01-01 00:00:00 Units = days 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
1979-01-01 00:00:00 1979-01-02 00:00:00 1979-01-03 00:00:00 1979-01-04 00:00:00
1979-01-05 00:00:00 1979-01-06 00:00:00 1979-01-07 00:00:00 1979-01-08 00:00:00
1979-01-09 00:00:00 1979-01-10 00:00:00 1979-01-11 00:00:00 1979-01-12 00:00:00
1979-01-13 00:00:00 1979-01-14 00:00:00 1979-01-15 00:00:00 1979-01-16 00:00:00
1979-01-17 00:00:00 1979-01-18 00:00:00 1979-01-19 00:00:00 1979-01-20 00:00:00
1979-01-21 00:00:00 1979-01-22 00:00:00 1979-01-23 00:00:00 1979-01-24 00:00:00
1979-01-25 00:00:00 1979-01-26 00:00:00 1979-01-27 00:00:00 1979-01-28 00:00:00
1979-01-29 00:00:00 1979-01-30 00:00:00 1979-01-31 00:00:00 1979-02-01 00:00:00
1979-02-02 00:00:00 1979-02-03 00:00:00 1979-02-04 00:00:00 1979-02-05 00:00:00
1979-02-06 00:00:00 1979-02-07 00:00:00 1979-02-08 00:00:00 1979-02-09 00:00:00
1979-02-10 00:00:00 1979-02-11 00:00:00 1979-02-12 00:00:00 1979-02-13 00:00:00
1979-02-14 00:00:00 1979-02-15 00:00:00 1979-02-16 00:00:00 1979-02-17 00:00:00
1979-02-18 00:00:00 1979-02-19 00:00:00 1979-02-20 00:00:00 1979-02-21 00:00:00
1979-02-22 00:00:00 1979-02-23 00:00:00 1979-02-24 00:00:00 1979-02-25 00:00:00
1979-02-26 00:00:00 1979-02-27 00:00:00 1979-02-28 00:00:00 1979-03-01 00:00:00
................................................................................
................................................................................
................................................................................
......
2019-11-03 00:00:00 2019-11-04 00:00:00 2019-11-05 00:00:00 2019-11-06 00:00:00
2019-11-07 00:00:00 2019-11-08 00:00:00 2019-11-09 00:00:00 2019-11-10 00:00:00
2019-11-11 00:00:00 2019-11-12 00:00:00 2019-11-13 00:00:00 2019-11-14 00:00:00
2019-11-15 00:00:00 2019-11-16 00:00:00 2019-11-17 00:00:00 2019-11-18 00:00:00
2019-11-19 00:00:00 2019-11-20 00:00:00 2019-11-21 00:00:00 2019-11-22 00:00:00
2019-11-23 00:00:00 2019-11-24 00:00:00 2019-11-25 00:00:00 2019-11-26 00:00:00
2019-11-27 00:00:00 2019-11-28 00:00:00 2019-11-29 00:00:00 2019-11-30 00:00:00
2019-12-01 00:00:00 2019-12-02 00:00:00 2019-12-03 00:00:00 2019-12-04 00:00:00
2019-12-05 00:00:00 2019-12-06 00:00:00 2019-12-07 00:00:00 2019-12-08 00:00:00
2019-12-09 00:00:00 2019-12-10 00:00:00 2019-12-11 00:00:00 2019-12-12 00:00:00
2019-12-13 00:00:00 2019-12-14 00:00:00 2019-12-15 00:00:00 2019-12-16 00:00:00
2019-12-17 00:00:00 2019-12-18 00:00:00 2019-12-19 00:00:00 2019-12-20 00:00:00
2019-12-21 00:00:00 2019-12-22 00:00:00 2019-12-23 00:00:00 2019-12-24 00:00:00
2019-12-25 00:00:00 2019-12-26 00:00:00 2019-12-27 00:00:00 2019-12-28 00:00:00
2019-12-29 00:00:00 2019-12-30 00:00:00 2019-12-31 00:00:00

RE: how to select DJF data - Added by patty Lyn over 3 years ago

and also the newly merged DJF file shows like it from Panoply:
time : 3700, starts from 1979-01-01

so it includes every winter day in the whole timesteps.

    (1-5/5)