Hi Arthur, It sounds like you've about got it. I don't see anything wrong with your commands. Ferret does not interpolate your data to days as it's computing the monthly climatology; days are the coordinate units but the monthly data is kept as monthly data. This example works correctly, just using all of your commands but just integers as the data. See if any of the list commands I have here help you figure out what's happening with your data: yes? let v_3to5yr = tsequence(t[t=25:60]) yes? list/L=1:5 v_3to5yr VARIABLE : TSEQUENCE(T[T=25:60]) SUBSET : 5 points (T) 1 / 1: 25.00 2 / 2: 26.00 3 / 3: 27.00 4 / 4: 28.00 5 / 5: 29.00 yes? def axis/t=0:1095.7275/npoints=36/edges/units=days/\ t0="01-jan-1974:00:00" t3to5yr yes? let v_3to5yr_t = v_3to5yr[gt=t3to5yr@asn] yes? def axis/t=0:365.2425/edges/npoints=12/ \t0=1-jan-0001/units=days/modulo tclim yes? let v_clim_12mon = v_3to5yr_t[gt=tclim@mod] yes? list v_clim_12mon VARIABLE : V_3TO5YR_T[GT=TCLIM@MOD] SUBSET : 12 points (TIME) 16-JAN / 1: 37.00 15-FEB / 2: 38.00 18-MAR / 3: 39.00 17-APR / 4: 40.00 17-MAY / 5: 41.00 17-JUN / 6: 42.00 17-JUL / 7: 43.00 17-AUG / 8: 44.00 16-SEP / 9: 45.00 17-OCT / 10: 46.00 16-NOV / 11: 47.00 17-DEC / 12: 48.00 ! Check some averages yes? list v_3to5yr_t[l=1:36:12] ! January values averaged VARIABLE : V_3TO5YR[GT=T3TO5YR@ASN] regrid: 365 day on T SUBSET : 3 points (TIME) JAN-1974 / 1: 25.00 JAN-1975 / 2: 37.00 JAN-1976 / 3: 49.00 yes? list (28+40+52)/3 ! mean agrees with Jan of v_clim_12mon VARIABLE : (28+40+52)/3 40.00 yes? list v_3to5yr_t[l=4:36:12] ! April values averaged VARIABLE : V_3TO5YR[GT=T3TO5YR@ASN] regrid: 365 day on T SUBSET : 3 points (TIME) APR-1974 / 1: 28.00 APR-1975 / 2: 40.00 APR-1976 / 3: 52.00 yes? list (25+37+49)/3 ! mean agrees with Apr of v_clim_12mon VARIABLE : (25+37+49)/3 37.00 Arthur M. Greene wrote: Hi Jason, Thanks for the reply! Here's what I've been able to do (There are 5 years of monthly variable v; we wish to construct a climatology for the last three years): let v_3to5yr = tsequence(v[L=25:60]) ! Extract desired time slice define axis/T=0:1095.7275/npoints=36/edges/units=days/\ T0="01-jan-1974:00:00" t3to5yr let v_3to5yr_t = v_3to5yr[GT=t3to5yr@asn] So far, so good. I now have three years of data on a real-time axis, beginning with jan-1974. The plot looks OK. Now for the climatology: define axis/T=0:365.2425/EDGES/NPOINTS=12/\ T0=1-JAN-0001/UNITS=DAYS/MODULO tclim let v_clim_12mon = v_3to5yr_t[GT=tclim@MOD] This does produce a 12-month plot that _looks_ like a climatology (i.e., x-axis reads Jan, Feb, Mar...), but the values are not equal to the averages of the corresponding month's values in v_3to5yr_t, i.e., v(Jan,v_clim_12mon) <> (Sum of Jan vals in v_3to5mon)/3. So perhaps I don't understand how the MOD (or ASN, for that matter) climatologies are actually computed. Even if the 36 months of data were interpolated into daily values, and the appropriate daily values averaged to produce the monthly climatology, the resultant would not appear to be correct. The docs do not seem to clarify exactly how these climatologies are computed (or maybe I need a refresher!) Your comments greatly appreciated! Thanks, Arthur On Wed, 2004-09-01 at 08:33, Jaison Kurian wrote:! --------------example.jnl-------------------------------- ! extract last three years data ie. abstract index L=25:60 let v_3to5yr = TSEQUENCE(v[L=25:60]) ! define monthly time axis from JAN-1997 to DEC-1999 & assign it ! T=0:`365.2425*3`/NPOINTS=36/UNITS=DAYS together will make it for ! 3 years and T0 will take care of actual year stamp. define axis/T=0:`365.2425*3`/NPOINTS=36/EDGES/units=days/\ T0="01-JAN-1997:00:00" t3to5yr let v_3to5yr_t = v_3to5yr[gt=t3to5yr@asn] ! Define a monthly climatological axis define axis/T=0:365.2425/EDGES/NPOINTS=12/T0=1-JAN-0001/\ UNITS=DAYS/MODULO tclim ! Find monthly climatology by "MODULO" regridding let v_clim_12mon = v_3to5yr_t[GT=tclim@MOD] plot v_clim_12mon ! If you want to find anomaly or want to plot the climatology ! over the data then please refer : ! http://ferret.pmel.noaa.gov/Ferret/Mail_Archives/fu_2003/msg01470.html !---------------------- end of example.jnl------------- |