[Thread Prev][Thread Next][Index]

Re: [ferret_users] how to compute the 5-day averaged climatology



Hi Yangxing,
I also came across this problem, but someone helped me out (Ansley).

Assume you have 1-day Net Surface Heat Flux and you want 5-day average of it, then you should use Boxcar-smoother.
yourvar[L=@SBX:5] starts at L=3. and this is the average of the data at L=1 through L=5.
So you only need to do the following:

let sflx_clim = sflx[gt=@sbx:5]
!though the two of the start and end points will become missing data, this is not an axis-changing function
list sflx_clim[l=3:365:5]
!every 5 point will represent the 5-day average. and it will produce 73 points.

Hope this helps,
Peter Szabo



On Fri, Jul 4, 2008 at 12:13 AM, yangxing zheng <yangxingz@xxxxxxxxx> wrote:
Hi,

 This may not be a good and new question, but I am still wondering how to do  it.

 I read FAQ about how to create daily climatology, so I attempt to modify it following the method. Below is what I change

---------------------------
!Get the length of a climatological year:365.2425
use climatological_axes
cancel data climatological_axes

!use the length of the "climatological year" to define a pentad axis
define axis/t=0:365.2425:5/edges/npoints=73/T0=1-JAN-0001/Units=days/Modulo t_pentad
!define axis/t=0:365.2425:5/edges/npoints=73/Units=days/Modulo t_pentad

!for example:
set data imet_epic_pentad.sflx.mc

!define the pentad climatology

let sflx_clim = sflx[gt=t_pentad@mod]

list sflx_clim,sflx[l=1:73]
---------------------
The data imet_epic_pentad.sflx.mc is 5-day averaged surface heat flux that I use as an example.

I run the script, it does not any error message, but the result is not correct.The first column is to list climatology, the second column is the first year original datasets.
---------
list sflx_clim,sflx[l=1:73]
 WARNING: Listed variables have ambiguous coordinates on axes: T
            DATA SET: ./imet_epic_pentad.sflx.mc
            Bouy Net Surface Heat Flux at the IMET Site
            LONGITUDE: 85.2W
            LATITUDE: 20.2S
            DEPTH (m): -0.2
 Column  1: SFLX_CLIM[T=01-JAN      00:00:01-JAN-0002 05:49] is SFLX[GT=T_PENTAD@MOD]
 Column  2: SFLX[T=01-JAN-2003 00:00:01-JAN-2004 00:00] is Net Surface Heat Flux (W/m^2)
     SFLX_CLI   SFLX
L /  1:    ....  117.7
L /  2:    ....  109.5
L /  3:    ....  106.3
L /  4:    ....  129.3
L /  5:    ....  150.8
L /  6:    ....  150.6
L /  7:    ....  129.6
L /  8:    ....  124.7
L /  9:    ....   94.9
L / 10:    ....   45.9
L / 11:    ....   70.1
L / 12:    ....   64.0
L / 13:    ....   70.8
L / 14:    ....   74.9
L / 15:    ....   96.2
L / 16:    ....  109.6
L / 17:    ....   86.3
L / 18:    ....   32.1
L / 19:    ....   33.8
L / 20:    ....   17.5
L / 21:    ....   38.2
L / 22:    ....   -8.8
L / 23:    ....   34.6
L / 24:    ....  -16.8
L / 25:    ....   -0.6
L / 26:    ....   14.2
L / 27:    ....  -23.1
L / 28:    ....  -44.0
L / 29:    ....    5.7
L / 30:    ....    0.0
L / 31:    ....  -12.4
L / 32:    ....  -16.2
L / 33:    ....   61.3
L / 34:    ....  -67.6
L / 35:    ....  -13.5
L / 36:    ....  -26.4
L / 37:    ....    8.1
L / 38:    ....  -41.7
L / 39:    ....  -79.3
L / 40:    ....  -74.3
L / 41:    .... -106.8
L / 42:    ....  -89.4
L / 43:    ....  -22.7
L / 44:    ....  -69.4
L / 45:    ....  -14.2
L / 46:    ....   28.7
L / 47:    ....  -48.0
L / 48:    ....  -40.4
L / 49:    ....   27.8
L / 50:    ....   62.6
L / 51:    ....  -76.2
L / 52:    ....    6.0
L / 53:    ....   42.4
L / 54:    ....  -19.9
L / 55:    ....   73.7
L / 56:    ....   77.9
L / 57:    ....   61.7
L / 58:    ....  123.5
L / 59:    ....   50.8
L / 60:    ....   71.1
L / 61:    ....   82.4
L / 62:    ....   55.4
L / 63:    ....   46.9
L / 64:    ....  155.8
L / 65:    ....  166.7
L / 66:    ....  120.6
L / 67:    ....  114.6
L / 68:    ....  109.0
L / 69:    ....   96.4
L / 70:    ....  120.2
L / 71:    ....   59.5
L / 72:    ....   73.1
L / 73:   36.63   50.2
-------------
Can anyone help me out?

Happy Independence Day!

Yangxing





[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement