[Thread Prev][Thread Next][Index]

Re: [ferret_users] how to calculate 5day average


Assuming you have daily dataset, first compute the 5 day running mean and then pick every 5th point starting at the 3rd day.
Note that this method doesn't distinguish leap year.

let var_rm=var[l=@sbx:5]
let var_pntd=var_rm[l=3:365:5]    ! assuming lend=365 ( i.e.e 1 year's daily data)

Further for pentad climatology I did the following: (Assuming multi year daily data)

def axis/t=0:365.2425/edges/npoints=365/t0=1-jan-0001/units=days/modulo tdaily
let prc=precip[d=1,gt=tdaily@mod]
let prrm1=prc[l=@sbx:5]
let pr_pntd=prrm1[l=3:365:5]    !pentad

I probabaly got the idea/ pick this up from past email archives, but I am not sure if this the best method to compute pentad & pentad climatology but comparision with daily and daily climatogy plots gave satisfactory result for me

Hope this helps

chinnu sachi <chinnu.sachi7@xxxxxxxxx>
To: ferret_users@xxxxxxxx
Sent: Tuesday, September 11, 2012 9:46 AM
Subject: [ferret_users] how to calculate 5day average

                 Dear all,
                                     I have a daily dataset of current velocity for standard depths for a particular location, I want to find out the 5day mean. I use the below .jnl file

set mem/size=400
use 77_04-08.nc
let u_5day= u[l=1:1315:5@ave]
list/file=5day.dat u_5day[k=1]
plot u_5day[z=48]

though the .jnl file is working but in ferret the 5day average is not computing correctly,when i computed it manualy.
Please help me on this regard. Thankyou

Chinnu Sachidanandan
Physical Oceanography Division
National Institute of Oceanography

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

Privacy Policy | Disclaimer | Accessibility Statement