[Thread Prev][Thread Next][Index]

Re: [ferret_users] seasonal climatologies



Hi All,

I have used so far a rather complicated way to define seasonal mask for daily data- actually, for counting climate indices, so, i needed to have them on daily resolution, but i wanted points to be valid for particular seasons only:

First, i put them on real time axis:
yes? def axis/t="1-jan-1961:12:00":"31-dec-1990:12:00":1/t0="1-jan-1961:00:00"/units=days treal
yes? let pre=precip[gt=treal@asn]

Then i defined a variable which helps me to differ seasons from each other:
yes? let day=l[gt=prer]

I use mod() function to calculate residua and define seasons with masks:
let sea_wi = if (mod(day,365.2425) le 59.25) or (mod(day,365.2425) gt 334.25) then 1
let temp_wi=pre*sea_wi

let sea_sp = if (mod(day,365.2425) gt 59.25) and (mod(day,365.2425) le 151.25) then 1
let temp_sp=pre*sea_sp

let sea_su = if (mod(day,365.2425) gt 151.25) and (mod(day,365.2425) le 243.25) then 1
let temp_su=pre*sea_su

let sea_au = if (mod(day,365.2425) gt 243.25) and (mod(day,365.2425) le 334.25) then 1
let temp_au=pre*sea_au
Thanks for the solution for averaging, Ansley.

Peter

On Wed, Jun 16, 2010 at 6:39 PM, Ansley Manke <Ansley.B.Manke@xxxxxxxx> wrote:
Hi all
I think the best solution is to define your own modulo seasonal time axis which has the months centered at Dec-Jan-Feb, Mar-Apr-May, Jun-Jul-Aug, Sep-Oct-Nov.  A climatological axis can run across the boundary between two years, so long as its length is a year or less.

yes? DEFINE AXIS/T0=1-jan-0000/UNITS=months/MODULO seas_djf_reg = {12,15,18,21,24}
 *** NOTE: /UNIT=MONTHS is ambiguous ... using 1/12 of 365.2425 days

yes? LIST T[GT=seas_djf_reg]
             VARIABLE : T
                        axis SEAS_DJF_REG
             SUBSET   : 5 points (TIME)
 31-DEC      / 1:  12.00
 01-APR      / 2:  15.00
 01-JUL      / 3:  18.00
 01-OCT      / 4:  21.00
 31-DEC      / 5:  24.00

Now, you can use modulo regridding to regrid the daily data to this axis, and pick out the Dec-Jan-Feb point only. No need to go to the monthly climatology first.

let pre_monthlycl = precip[d=1,gt=seas_djf_reg@mod]




On 6/16/2010 1:35 AM, Peter Szabo wrote:
Dear Izidine,

after you have created a 12-month climatology, you wil have J, F, ... D (l=1:12)
let pre_monthlycl = precip[d=1,gt=month_reg@mod] ! 12-month climatology

with the running smoothing (averaging) you will get an average for JFM, MAM, ... ,OND (l=1:12, but only l=2:10 will exist)
let pre_3monthav = pre_monthlycl[l=@sbx:3] ! running 3-month average

and this will select MAM, JJA and SON (l=1:4, but only l=:2:4 will exist)
save/file=pre_seasonal_alt.nc pre_3monthav[l=1:10:3] ! save only DJF,MAM,JJA,SON

Consequently, they will differ.
Here is my demonstration:

yes? let t2mmod=t2m[l=1:12] !this equals to pre_monthlycl
yes? let t2msbx=t2mmod[l=@sbx:3] !~pre_3monthav
yes? let t2m3month=t2msbx[l=1:10:3] !~pre_3monthav[l=1:10:3] 

listings:
  T2MMOD T2MSBX
 1: -3.000 ....
 2: -5.500 -4.867
 3: -6.100 -4.833
 4: -2.900 -3.600
 5: -1.800 -2.967
 6: -4.200 -1.700
 7: 0.900 -1.033
 8: 0.200 -0.500
 9: -2.600 -1.133
 10: -1.000 -1.667
 11: -1.400 -1.433
 12: -1.900 ....
  T2M3MONTH
  1: ....
  2: -3.600
  3: -1.033
  4: -1.667

Peter

On Tue, Jun 15, 2010 at 11:58 AM, Izidine Pinto <izidinep@xxxxxxxxx> wrote:
Dear ferret users

I am comparing two seasonal means of two files
       file 1 contains daily data from 1jan1981 to 31dec1999
and file 2 contains daily data only for 'all' DJF for the same period

 1> ./daily.ppt.1981.1999.era40.nc
name     title                                                     I         J         K         L
 PRECIP   TOTAL PRECIPITATION RATE    1:127     1:110     1:1       1:6939
 
2> ./ppt.DJF.daily.1981_1999.era40.nc  (default)
 name     title                                                         I         J         K         L
 PRECIP   TOTAL PRECIPITATION RATE         1:127     1:110     1:1       1:1683

let pre_monthlycl = precip[d=1,gt=month_reg@mod]     ! 12-month climatology
let pre_3monthav = pre_monthlycl[l=@sbx:3]               ! running 3-month average
save/file=pre_seasonal_alt.nc pre_3monthav[l=1:10:3]  ! save only DJF,MAM,JJA,SON

shade pre_3monthav[l=1]                 ! DJF average
shade PRECIP[d=2,l=1:1683@ave]  ! DJF average

I was expecting to have the same result
Hope someone can help me to understand why the results differs

Thanks in advance
--
I.P.
"In these matters the only certainty is that nothing is certain".  Pliny the Elder (23 AD - 79 AD)




[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement