[Thread Prev][Thread Next][Index]

Re: [ferret_users] Regridding monthly data to daily time scale



Hi Murali & Rob,
                 This is a follow up to Rob's reply.

            To convert monthly data to daily, you need to do
"regridding transformation" because your source grid/axis (monthly)
and destination grid/axis (daily) are different. But @FLN is not
a regridding (grid changing) transformation, it identifies the gaps
in the specified axis and fills those gaps with an linearly interpolated 
value non-missing surrounding points. Hence, if you are doing @FLN 
on a variable, the time axis will not change, only the variable values
along that axis will change.

  In your case, the  solution is "Linear Interpolation". From User
Manual : Ch4 Sec2.4.1,  Regridding transformations, "@LIN linear 
interpolation (the default if no transform is specified)  Performs 
regridding by multi-axis linear interpolation."

Here is an example.

define axis/t=15-jan-2005:15-dec-2005:`365.2425/12`/T0=31-DEC-2005\
                        /units=days tmonth
let var_month = SIN(t[gt=tmonth]/50)
define axis/t=15-jan-2005:15-dec-2005:1/T0=31-DEC-2005/units=days tday
let var_day   = var_month[gt=tday]  ! same as var_month[gt=tday@LIN]
plot var_month, var_day


Cautionary note about time axis CALENDAR: 
   While defining a time axis, should think about the calendar. If 
you are defining a monthly time axis with a 30day increment, the
calendar should be "360_DAY". If you are not mentioning it, Ferret
will assume "GREGORIAN" calendar. So the following defenition of
time axis 
define axis/t=15-jan-2005:15-dec-2005:30/units=days t30dy

will have 13 points (one point spilled over to next year January)
instead of implied 12 points. So be carefull while defining time
axis. It is always better to specify the calendar explicitly, if
it is not GREGORIAN (the default), as follows

define axis/t= ............/units=days/calendar=360_DAY time

In the solution i suggested above, both the time
axis are defined on GREGORIAN (default) calendar. To know more about 
the calendar stuff, please have a look at User Manual (Ch4 Sec2.2.  
Time axes and calendars)

Hope this helps... 

Jaison


On Wed, 27 Sep 2006, Murali Krishna wrote:

> Hi Users,
> 
> Can any one tell, how to interpolate a monthly data to a daily time scale
> ???
> 
> i tried out with the transformation @FLN but its not working..
> 
> use my_data.nc
> 
> ! given my monthly data a proper time axis
> define axis/t=15-jan-2005:15-dec-2005:30/units=days t30dy
> LET my_30dy_var = my_var[gt=t30dy@asn]
> 
> ! regrid this data by daily Interpolation
> define axis/t=15-jan-2005:15-dec-2005:1/units=days t1day
> LET my_1dy_var = my_30dy_var[gt=t1day@FLN]
> 
> 
> Please help me to sort out this problem...
> 
> Thanks in Advance..
> Murali Krishna
> 

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement