Project

General

Profile

Multiyear mean on Snow cover data

Added by Nathanael Harwood over 5 years ago

Hi - using ydaymean on the attached file returns some suspect dates and data

I downloaded Snow Cover Extent SCE data from NOAA and regridded it to ECMWF format, (time) interpolated it from weekly->daily and then made it into a spatial average for the N America region.

cdo -r -remapbil,SeaIce_Jan-June2016.nc SCE.nc SCE_2_regrid.nc 
cdo -b F32 inttime,1966-10-10,00:00:00,1day SCE_2_regrid.nc SCE_2_Daily.nc
cdo -fldmean -sellonlatbox,-130,-70,40,70 SCE_2_Daily.nc SCE_NAmerica.nc

The result, attached, looks fine to me and yet ydaymean fails to run on it from the following code:

cdo -select,season=DJF,startdate=1981-12-01,enddate=2018-02-28 SCE_NAmerica.nc temp.nc
cdo -timselmean,5 temp.nc temp_5day.nc
cdo -ydaymean temp_5day.nc temp1.nc
cdo -mergetime -selmon,12 temp1.nc -selmon,1,2 temp1.nc SCE_NAmerica_multiyear.nc

Did the interpolation mess with the date and somehow prevent ydaymean from working? Perhaps I need to mess with the time format?

Many thanks in advance,
Nathanael


Replies (1)

RE: Multiyear mean on Snow cover data - Added by Karin Meier-Fleischer over 5 years ago

Hi Nathanael,

you have forgotten to delete the 29th February.

cdo -O -select,season=DJF,startdate=1981-12-01,enddate=2018-02-28 -del29feb SCE_NAmerica.nc temp.nc
cdo -O -timselmean,5 temp.nc temp_5day.nc
cdo -O -ydaymean temp_5day.nc temp1.nc
cdo -O -mergetime -selmon,12 temp1.nc -selmon,1,2 temp1.nc SCE_NAmerica_multiyear.nc
cdo info SCE_NAmerica_multiyear.nc
    -1 :       Date     Time   Level Gridsize    Miss :     Minimum        Mean     Maximum : Parameter ID
     1 : 2017-12-03 00:00:00       0        1       0 :                 0.68876             : -1            
     2 : 2017-12-08 00:00:00       0        1       0 :                 0.71939             : -1            
     3 : 2017-12-13 00:00:00       0        1       0 :                 0.73638             : -1            
     4 : 2017-12-18 00:00:00       0        1       0 :                 0.74834             : -1            
     5 : 2017-12-23 00:00:00       0        1       0 :                 0.76557             : -1            
     6 : 2017-12-28 00:00:00       0        1       0 :                 0.77330             : -1            
     7 : 2018-01-02 00:00:00       0        1       0 :                 0.77886             : -1            
     8 : 2018-01-07 00:00:00       0        1       0 :                 0.78298             : -1            
     9 : 2018-01-12 00:00:00       0        1       0 :                 0.78821             : -1            
    10 : 2018-01-17 00:00:00       0        1       0 :                 0.79328             : -1            
    11 : 2018-01-22 00:00:00       0        1       0 :                 0.79686             : -1            
    12 : 2018-01-27 00:00:00       0        1       0 :                 0.79300             : -1            
    13 : 2018-02-01 00:00:00       0        1       0 :                 0.78819             : -1            
    14 : 2018-02-06 00:00:00       0        1       0 :                 0.78336             : -1            
    15 : 2018-02-11 00:00:00       0        1       0 :                 0.77877             : -1            
    16 : 2018-02-16 00:00:00       0        1       0 :                 0.77477             : -1            
    17 : 2018-02-21 00:00:00       0        1       0 :                 0.76430             : -1            
    18 : 2018-02-26 00:00:00       0        1       0 :                 0.75342             : -1            
cdo info: Processed 18 values from 1 variable over 18 timesteps [0.01s 14MB]

-Karin

    (1-1/1)