[Thread Prev][Thread Next][Index]
Re: [ferret_users] how to compute the 5-day averaged climatology
Hi Yangxing
try this:
def axis/t=1-jan:31-dec/edges/npoints=73/units=days t_pentad
let sflx_clim = sflx[gt=t_pentad@mod]
list sflx_clim
it gives you the pentad climatology
let me know if it still doesn't work
Hanh
> Hi Peter,
>
> It is a 142-day daily dataset.
> set data imet_epic_pentad.sflx.mc
> yes? show data/var
> currently SET data sets:
> 1> ./imet_epic_pentad.sflx.mc (default)
> Bouy Net Surface Heat Flux at the IMET Site
> name title I J K
> L
> SFLX Net Surface Heat Flux 1:1 1:1 1:1
> 1:142
> W/m^2 on grid GMK1 with 1.000000E+35 for missing data
> X=85.7W:84.7W Y=20.7S:19.7S Z=-0.7:0.3
>
> time range: 03-JAN-2003 12:00 to 08-DEC-2004 12:00
>
> I try other datasets which cover 5 years. it still does not work.
> The major purpose is that I want to calculate the 5-day averaged
> anomalies.
>
> I do not know if anyone else has a good idea to calculate the 5-day
> average climatology for several years 5-day datasets.
>
> By the way, I try regrid 5-day data into daily dataset, like what the
> FAQ:
> set data imet_epic_pentad.sflx.mc
> define axis/t=03-JAN-2003:08-DEC-2004:1/units=days tsflxdaily
> let sflx_daily = sflx[gt=tsflxdaily]
>
> let sflx_clim = sflx_daily[gt=tdaily@mod]
>
> but it does not work, either.
>
> Anyone can help me out? Thanks!
>
> Yangxing
>
>
> --- On Mon, 7/7/08, Peter Szabo <szabpet83@xxxxxxxxx> wrote:
>
>> From: Peter Szabo <szabpet83@xxxxxxxxx>
>> Subject: Re: [ferret_users] how to compute the 5-day averaged
>> climatology
>> To: yangxingz@xxxxxxxxx
>> Date: Monday, July 7, 2008, 8:58 PM
>> hi Yangxingz,
>> i see now. i have different data set (daily and i thought
>> you wanted a 5-day
>> averaged data set). anysleay wrote only two lines what i
>> included in my last
>> message.
>>
>> if you followed the daily climatology in the faq, then it
>> should work.
>> maybe you only have one year thats why it lists the first
>> year as the only
>> one to be taken into the "climatology". and it
>> seems for me you only have
>> one year.
>> "SFLX[T=01-JAN-2003 00:00:01-JAN-2004 00:00]"
>>
>> another problem could be when you have your data on
>> non-calendar axis.
>>
>> Peter
>>
>>
>> On Fri, Jul 4, 2008 at 6:21 PM, yangxing zheng
>> <yangxingz@xxxxxxxxx> wrote:
>>
>> > Hi Peter,
>> >
>> > Happy holiday!
>> > Thank for your reply. It seems that your definition
>> of sflx_clim is just
>> > 5-day average from daily dataset, not really 5-day
>> climatology. Also
>> > actually I have 5-day average datasets, so I do not
>> need to do conversion.
>> >
>> > It looks to me that regriding with time axis does
>> not work properly. I do
>> > not know why. For example, I try regrid 5-day average
>> data to daily dataset,
>> > as I define the daily axis "tdaily", then
>> use
>> > let sflx_daily = sflx[gt=tdaily]
>> > as I list sflx_daily
>> > the data is missing for all grid points.
>> >
>> > Could you send me the script that Ansley did it?
>> >
>> > Thanks.
>> >
>> > Yangxing
>> >
>> >
>> > --- On Fri, 7/4/08, Peter Szabo
>> <szabpet83@xxxxxxxxx> wrote:
>> >
>> > > From: Peter Szabo <szabpet83@xxxxxxxxx>
>> > > Subject: Re: [ferret_users] how to compute the
>> 5-day averaged climatology
>> > > To: yangxingz@xxxxxxxxx
>> > > Cc: ferret_users@xxxxxxxx
>> > > Date: Friday, July 4, 2008, 4:12 PM
>> > > 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