[Thread Prev][Thread Next][Index]
Re: [ferret_users] Daily Averages from 6 hourly data
Hi Ashley,
You can use @AVE regridding on time axis. However, it
should be noted that @AVE computes 'the average weighted by grid box
size". Hence you should be carefull while defining the destination'
daily time axis. For more information, please see
User Manual
Ch3 Sec2.4.6. @AVE-average
FAQ
http://www.ferret.noaa.gov/Ferret/FAQ/analysis/regridding_with_ave.html
Mail Archives (discussions starting with the following one)
http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2006/msg00679.html
A quick example is given below.
Hope this helps,
Regards,
Jaison
!----------example starts here---------------------------------
\cancel mode verify
!
! Description : Example for regridding 6-hourly data to daily time axis
! using @AVE.
!
! create some dummy data
define axis/t="01-OCT-1998:00":"01-JUN-1999:18":6/units=hours\
/calendar=GREGORIAN/T0="30-SEP-1998:00" t6hr
let var = RANDN(t[gt=t6hr])+ SIN(t[gt=t6hr]/200)
plot var
! suppose we want to average data at 00, 06, 12 and 18 hours to get daily
! value. In this case the time points on the daily time axis should
! be centered at (00+18)/2 = 09 hours. Use exactly the same calendar
! as that of 6-hourly time axis. If you are not sure, use return
! command : yes? say `my_6hr_var,return=calendar`.
define axis/t="01-OCT-1998:09":"01-JUN-1999:09":1/units=days\
/calendar=GREGORIAN/T0="30-SEP-1998:00" tdaily
let var_daily = var[gt=tdaily@AVE]
! check it : if your 6hrly data does not start at 00 hours, the
! following example may not work out....you have to choose proper
! L-range.
set list/precision=7
list/l=1:4 var ! (first days values at 00,06,12 & 18 hours)
list var[l=1:4@AVE] ! average it on L, not on T
list/l=1 var_daily
plot/ov var_daily
!-----------example ends here-----------------------------------------
On Wed, 20 Jun 2007, Ashley Watson wrote:
> Hi ferreters,
> I am trying to get daily averages of a varaible which has values
> from 01-oct-1998 to 01-jun-1999 with timestep of 6hours. As it spreads
> over two years 1998 and 1999, I am getting problem in defining output
> timestep. Any hint or suggestion how to calculate this daily average.
>
>
> yes? show data
> currently SET data sets:
> 1> ./latentheat.nc (default)
> name title I J K
> L
> LTH Latent_Heat 1:150 1:130 ... 1:973
>
>
> Thanks in Advance
> Ashley
>
>
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement