[Thread Prev][Thread Next][Index]

Re: [ferret_users] years as unit of time axis?



Hi Maria,
You could define the time axis like this, with the time coordinates starting at year zero, each representing a year.
yes? use ROMS-SST-BISCAY-HC-TSeries.nc
yes? define axis/t=1998:2009:1/units=years/t0=2-jul-0000 yearax
yes? let sst2 = sst[d=1,gt=yearax]
yes? save/file=yeardata.nc/clobber sst2
It probably doesn't matter much what day of the year you specify for the time origin. Then,
> ncdump yeardata.nc
netcdf yeardata {
dimensions:
        DEPTH = 1 ;
        YEARAX = UNLIMITED ; // (12 currently)
variables:
        double DEPTH(DEPTH) ;
                DEPTH:units = "METERS" ;
                DEPTH:positive = "down" ;
                DEPTH:point_spacing = "even" ;
                DEPTH:axis = "Z" ;
                DEPTH:standard_name = "depth" ;
        double YEARAX(YEARAX) ;
                YEARAX:units = "years since 0000-07-02 00:00:00" ;
                YEARAX:axis = "T" ;
                YEARAX:time_origin = "2-JUL-0000" ;
                YEARAX:standard_name = "time" ;

        float SST2(YEARAX, DEPTH) ;
                SST2:missing_value = -1.e+34f ;
                SST2:_FillValue = -1.e+34f ;
                SST2:long_name = "SST[D=1,GT=YEARAX]" ;

// global attributes:
                :history = "FERRET V6.73    7-May-12" ;
                :Conventions = "CF-1.0" ;
data:

 DEPTH = 2 ;

 YEARAX = 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
    2009 ;

 SST2 =
  _,
  16.54138,
  17.04896,
  17.71936,
  16.93596,
  16.73512,
  17.31326,
  17.65883,
  18.38688,
  17.41703,
  16.62187,
  17.63744 ;
}


On 5/7/2012 7:29 AM, Marina Chifflet wrote:

Hi,

 

Always for the same European Project, I have to provide a file with annual mean of variables (here the example of SST) form daily values.

 

I use the following lines, found in the Ferret documentation:

 

DEFINE AXIS/EDGES/T0=01-jan-1900/UNITS=days years=DAYS1900(X[i=1998:2010:1],1,1)

save/append/file="ROMS-SST-BISCAY-HC-TSeries.nc" SST[d=1,X=-10:-0.5@ave,Y=42:49@ave,gt=years]

 

D=1 is the file with the daily SST

 

The result (attached file) shows unit of time axis as:

02-JUL-1998

02-JUL-1999

02-JUL-2008

02-JUL-2009

 

That is to say 12 values for 12 years.

 

I would like “years” as the unit, like:

1998

1999

2008

2009

 

that is to say, no days and no months.

 

If I use UNIT=years, it does not work, as DAYS1900 returns the number of days since 01-JAN-1900.

 

Do you know if there is a solution to change this with Ferret? or nco?

 

Thank you very much.

_____________________________________________

Dr Marina Chifflet

AZTI - Tecnalia / Marine research Division
Herrera Kaia Portualde z/g
20110 Pasaia (Gipuzkoa) - Spain
Tel: 943 00 48 00 (ext. 890) - Fax: 946 572 555
e-mail:
mchifflet@xxxxxxxxxxx
www.azti.es ; www.tecnalia.info

 


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement