[Thread Prev][Thread Next][Index]

Re: [ferret_users] DJF composite from daily data

Hi all,
After an exchange outside the list, here are some ideas for this question -- it follows along the lines of the FAQ about making a seasonal mask that we referred to before: How can I create a seasonal mask?

That FAQ was written before we had the TAX* functions such as TAX_jday. This function makes the solution easier.  For a seasonl average centered on January, we want to define a variable that contains the day-of-year for the time axis, and make from that a mask where the two parts are "if jday GE Dec_1st"  OR "if jday LE Feb_28th".  So we'll make two masks, one for December and one for January-February, and add the two masks.

As in the FAQ, I'll use reynolds_sst, which you can access as an OPeNDAP dataset:
yes? use "http://ferret.pmel.noaa.gov/thredds/dodsC/data/PMEL/reynolds_sst_wk.nc"
yes? let year_days = tax_jday(t[gt=wsst], t[gt=wsst])

   ! Define the two parts of the mask.  We're going to add  them, so use ELSE 0
yes? let daily_mask_a = if year_days ge 335 then 1 else 0
yes? let daily_mask_b = if year_days le 58 then 1 else 0

   ! Here is the mask: 1 if day-of-year corresponds to December or Jan-Feb.
   ! ( Note that this doesn't takeleap years into account!)
yes? let daily_mask = if (daily_mask_a + daily_mask_b) GT 0 THEN (daily_mask_a + daily_mask_b)
! Check what we've done with a line plot
yes? plot/t=1-jan-1982:1-jan-1985 wsst[x=300:350@ave,y=-20:20@ave]
yes? let/units="`wssw,return=units`" wsst_djf = wsst * daily_mask
yes? plot/over  wsst_djf[x=300:350@ave,y=-20:20@ave]
The question was also how to save the result as a yearly series.  We can define a yearly time axis, centered in the  middle of January for the time range of the data, and regrid the masked data to this time axis with the @AVE transformation. The result is the average for each season, one per year.
yes? define axis/t=16-jan-1982:16-jan-2001:1/units=year tyear
yes? let/units="`wssw,return=units`"/title="DJF seasonal average" wsst_djf_year = wsst_djf[gt=tyear@AVE]

yes? save/clobber/file=out_file.nc wsst_djf_year

jaya kumar A wrote:
Dear ferret users,
I have a daily data from 1950 to  2007, all data represented in one descriptor file, i want to make DJF( 90 time records) composite of pure IOD years. from this 57 years
I will be grateful to your help
thanks in advance
with regards
Junior Research Fellow,
Theoretical Studies Division
IITM, Pune-8

[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement