Project

General

Profile

extraction of djf

Added by SANJUKTA RANI PADHI almost 6 years ago

HELLO ALL,
I want to extrct djf from a .nc file (starting fro december of 1st year to february of last year) using cdo. I used cdo -selmon,12,1,2 -shifttime,-1mo infile.nc outfile.nc. but it show wrong in values......2nd year january data show as 1st year december ... Please help me in this regards. Here I attach the infile (sst_dec.nc) and outfile (124.nc) .

when i used 
cdo select,season=DJF infile.nc outfile.nc

i got this

cdo select : Enter parameter list >

after this i dont know what to do.
kindly help

Thank you

Anyone can help me?
Thanks a lot!

124.nc (2.58 MB) 124.nc outfile.nc
sst_dec.nc (10.4 MB) sst_dec.nc infile.nc

Replies (4)

RE: extraction of djf - Added by Karin Meier-Fleischer almost 6 years ago

Do you really enter the cdo command above or do you have a blank between select, and season? That's where I would get the 'cdo select : Enter parameter list >' request.

You have to enter

cdo select,season=DJF sst_dec.nc 124.nc

Show the contents of the output file 124.nc:

cdo infon 124.nc
-1 : Date Time Level Gridsize Miss : Minimum Mean Maximum : Parameter name
1 : 1979-12-01 00:00:00 0 16109 5063 : -1.8000 13.662 30.220 : sst
2 : 1980-01-01 00:00:00 0 16109 5063 : -1.8000 13.710 30.150 : sst
3 : 1980-02-01 00:00:00 0 16109 5063 : -1.8000 13.770 29.880 : sst
4 : 1980-12-01 00:00:00 0 16109 5063 : -1.8000 13.646 30.400 : sst
5 : 1981-01-01 00:00:00 0 16109 5063 : -1.8000 13.671 30.240 : sst
6 : 1981-02-01 00:00:00 0 16109 5063 : -1.8000 13.810 30.050 : sst
7 : 1981-12-01 00:00:00 0 16109 5063 : -1.8000 13.543 30.800 : sst
8 : 1982-01-01 00:00:00 0 16109 5063 : -1.8000 13.665 30.230 : sst
9 : 1982-02-01 00:00:00 0 16109 5063 : -1.8000 13.788 30.050 : sst
10 : 1982-12-01 00:00:00 0 16109 5063 : -1.8000 13.568 30.350 : sst
11 : 1983-01-01 00:00:00 0 16109 5063 : -1.8000 13.734 30.740 : sst
12 : 1983-02-01 00:00:00 0 16109 5063 : -1.8000 13.847 29.770 : sst
13 : 1983-12-01 00:00:00 0 16109 5063 : -1.8000 13.673 30.330 : sst
14 : 1984-01-01 00:00:00 0 16109 5063 : -1.8000 13.842 31.010 : sst
15 : 1984-02-01 00:00:00 0 16109 5063 : -1.8000 13.975 30.320 : sst
16 : 1984-12-01 00:00:00 0 16109 5063 : -1.8000 13.729 31.140 : sst
17 : 1985-01-01 00:00:00 0 16109 5063 : -1.8000 13.882 30.470 : sst
18 : 1985-02-01 00:00:00 0 16109 5063 : -1.8000 14.009 30.270 : sst
19 : 1985-12-01 00:00:00 0 16109 5063 : -1.8000 13.754 30.880 : sst
20 : 1986-01-01 00:00:00 0 16109 5063 : -1.8000 13.850 30.550 : sst
21 : 1986-02-01 00:00:00 0 16109 5063 : -1.8000 13.943 29.790 : sst
22 : 1986-12-01 00:00:00 0 16109 5063 : -1.8000 13.857 30.820 : sst
cdo infon: Processed 354398 values from 1 variable over 22 timesteps ( 0.01s 14MB )

If this won't work for you which cdo version are you using(cdo -V)? The current version is 1.9.5.

-Karin

RE: extraction of djf - Added by SANJUKTA RANI PADHI almost 6 years ago

Hello Karin Sir,
when i used
cdo select,season=DJF sst_dec.nc 124.nc
i got
Parameter >season=DJF< has not a valid keyword!

cdo select (Abort): No variable selected!

so i use cdo -V
and get following information

Climate Data Operators version 1.7.0 (http://mpimet.mpg.de/cdo)
Compiler: gcc -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -fPIC -fopenmp
version: gcc (Ubuntu 5.3.1-9ubuntu2) 5.3.1 20160220
Features: DATA PTHREADS OpenMP4 HDF5 NC4/HDF5/threadsafe OPeNDAP SZ Z UDUNITS2 PROJ.4 MAGICS CURL FFTW3 SSE2
Libraries: HDF5/1.8.16 proj/4.92 curl/7.47.0
Filetypes: srv ext ieg grb grb2 nc nc2 nc4 nc4c
CDI library version : 1.7.0
GRIB_API library version : 1.14.4
netCDF library version : 4.4.0 of Mar 29 2016 11:41:40 $
HDF5 library version : 1.8.16
SERVICE library version : 1.4.0
EXTRA library version : 1.4.0
IEG library version : 1.4.0
FILE library version : 1.8.2

I think got the due to my old version.
I think mine cdo is older one.....Can you please tell me how to upgrade cdo to 1.9.5.

Thank you

RE: extraction of djf - Added by Abubakar Bello about 2 years ago

Thank you for your reply but what if you want the selection to be December for the first year(2000) and JF for the next year(2001).
I tried this command cdo selseas,OND -shifttime,2mon infle outfile. My goal is to calculate the DJF seasonal anomalies

    (1-4/4)