[Thread Prev][Thread Next][Index]

Re: [ferret_users] Daily data to pentads



Hi,
To do it with Ferret commands, define the new time axis that you want, and use a regridding transformation.  So (using the dates in your datset),

yes? define axis/t=1-jan-2010:31-jan-2010:5/units=days/edges  day5axis
yes? let var5 = var[gt=day5axis]

You'll probably want to add units and a title to your new variable, with let/UNITS="units string"/TITLE="title string".  Note the /EDGES qualifier on the axis definition.  This causes Ferret to interpret the dates you specify as the edges of each grid cell.  You'll need to decide how to define your axis. Compare:

yes? define axis/t=1-jan-2010:31-jan-2010:5/units=days/edges  day5axis
yes? show axis/t day5axis
 name       axis              # pts   start                end
 DAY5AXIS  TIME                 6 r   03-JAN-2010 12:00    28-JAN-2010 12:00
T0 = 15-JAN-1901
   Axis span (to cell edges) = 30
 
       L     T                   TBOX      TBOXLO                TSTEP (DAYS)
       1>  03-JAN-2010 12:00:00  5          01-JAN-2010 00:00:00    39800.5
       2>  08-JAN-2010 12:00:00  5          06-JAN-2010 00:00:00    39805.5
       3>  13-JAN-2010 12:00:00  5          11-JAN-2010 00:00:00    39810.5
       4>  18-JAN-2010 12:00:00  5          16-JAN-2010 00:00:00    39815.5
       5>  23-JAN-2010 12:00:00  5          21-JAN-2010 00:00:00    39820.5
       6>  28-JAN-2010 12:00:00  5          26-JAN-2010 00:00:00    39825.5
Without the /EDGES qualifier, the center of each grid cell is at day 1, 6, ...
yes? define axis/t=1-jan-2010:31-jan-2010:5/units=days  day5axis
Replacing definition of axis DAY5AXIS

yes? show axis/t day5axis
 name       axis              # pts   start                end
 DAY5AXIS  TIME                 7 r   01-JAN-2010 00:00    31-JAN-2010 00:00
T0 = 15-JAN-1901
   Axis span (to cell edges) = 35
 
       L     T                   TBOX      TBOXLO                TSTEP (DAYS)
       1>  01-JAN-2010 00:00:00  5          29-DEC-2009 12:00:00    39798
       2>  06-JAN-2010 00:00:00  5          03-JAN-2010 12:00:00    39803
       3>  11-JAN-2010 00:00:00  5          08-JAN-2010 12:00:00    39808
       4>  16-JAN-2010 00:00:00  5          13-JAN-2010 12:00:00    39813
       5>  21-JAN-2010 00:00:00  5          18-JAN-2010 12:00:00    39818
       6>  26-JAN-2010 00:00:00  5          23-JAN-2010 12:00:00    39823
       7>  31-JAN-2010 00:00:00  5          28-JAN-2010 12:00:00    39828

On 6/13/2013 5:48 AM, FISSEHA G. BERHANE wrote:
Hi dear ferreters,

I was wondering how I can change daily data to pentads.

Thank you,
Fisseha


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

Privacy Policy | Disclaimer | Accessibility Statement