**To**:**TRINA BOSE <trina@xxxxxxxxxxxxxx>****Subject**:**Re: [ferret_users] Calculation of monthly mean****From**:**Ansley Manke <ansley.b.manke@xxxxxxxx>**- Date: Fri, 01 May 2009 12:29:22 -0700
- Cc: oar.pmel.ferret_users@xxxxxxxx
- In-reply-to: <20090501092918.M66748@xxxxxxxxxxxxxxxxxxx>
- References: <20090501092918.M66748@xxxxxxxxxxxxxxxxxxx>
- Sender: owner-ferret_users@xxxxxxxx
- User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Hi Trina, You can absolutely do this in Ferret. It's done using a regridding operation. You open the dataset with daily data, then define your desired monthly time axis, and regrid the data to the new axis. Defining the correct time axis with units of months takes some care, but here is the basic idea: And that's it. Ferret takes care of reconciling the coordinates on the two time axes, and does the average for the whole variable. When you plot sst_month, or save it to a file, it'll be on the monthly axis. Look at the "regridding transformations" for more on what the different methods are for doing the regridding. I've shown averaging above. The standard time axes in Ferret include leap years, as well as the adjustments to leap year once a century, and so forth. If your daily data includes leap days, you don't need to do anything special to handle that. If your data started in July 1930, the above would still work fine; there would just be some missing data at the start of the series. Now, the problem with using a unit of "months" of course is that calendar months are not the same length. This means that the axis we defined above, which just divides each year into 12 equal sections, is probably not what you want. In the Users Guide, there's an index entry "axis, monthly, defining". The idea is that we'll give a definition which specifies the edges of grid cells at the start of each month. Taking that example and changing it to make a 50 year axis: and the regridding we did above would beyes? ! Define a 50 year monthly axis starting in Jan 1930 yes? LET start_year = 1930 yes? LET nyears = 50 yes? LET indices = L[L=1:`nyears*12`] yes? LET month = MOD(indices-1,12)+1 yes? LET year = start_year + INT((indices-1)/12) yes? DEFINE AXIS/UNITS=days/T0=1-jan-1900/EDGES truemonth = DAYS1900(year,month,1)
Ansley TRINA BOSE wrote: Somebody please inform me of the steps required for monthly mean calculation from .grd data-daily data over >50 years. Is it even possible by ferret? I mean I can do jan but how do I adjust feb and others for leap years? sincerely Trina Bose |

**References**:**[ferret_users] Calculation of monthly mean***From:*TRINA BOSE

- Previous by thread:
**[ferret_users] Calculation of monthly mean** - Next by thread:
**[ferret_users] Fwd: reading ascii in polar stereographic projection**

Contact Us

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement