[Thread Prev][Thread Next][Index]

Re: generating monthly climatologies/anomalies using noleap calendar

Mark.Collier@csiro.au wrote:
Hello ferreters,

I am trying to use a netCDF file with the calendar type set to "noleap",
and perform a climatology calculation in the FAQ titled "How do I
calculate climatologies and climatological anomalies?"

The case using the navy winds works fine (where the calendar type
defaults to "Gregorian") - but if I use a "noleap" calendar
and try to plot (for e.g.) the climatology over the desired period
(using say the "month_reg" definition as in the FAQ example),
it fails with

 **ERROR: regridding:  only @ASN, @LIN, or @NRST regridding between calendar

rather than plotting out the repeaing annual (climatological) cycle.

I thought that this would work nicely with the "noleap" calendar, or
am I doing something wrong here?

Dear Mark:

I believe the problem is that the month_reg axis uses Gregorian months i.e. 1/12 of 365.2425 days.
One solution is simply to define your own climatological axes, which is easy for the regular months at

Explanation in ferret:

SET DATA monthly_navy_winds
SHOW grid/T uwnd
% note the 730.5 hour tboxes....

SET LIST/precision=8
% which is a Gregorian month:
LIST 365.2425*2
% I guess you want a shorter month:
LIST 365*2

% Here's how I would define it (perhaps there's a cleaner solution that isn't missing a second at the end!)
DEFINE axis/T=01-JAN:"31-DEC:23:59:59"/edges/npoints=12/modulo/calendar=noleap month_reg_noleap

% data on a leap calendar, plotted at date line to show it's well defined:
LET uwnd_clim = uwnd[GT=month_reg_noleap@MOD]
PLOT uwnd_clim[x=180,y=35n]

% get it on a no_leap calendar (as a proxy for your data)
DEFINE axis/T=01-JAN-1982:31-DEC-1992:1/unit=month/calendar=noleap/edges tax_noleap
LET uwnd_noleap = uwnd[GT=tax_noleap]

% now going from no leap to no leap so it's okay:
LET uwnd_clim = uwnd_noleap[GT=month_reg_noleap@MOD]

% ... Bob's your uncle:
PLOT uwnd_clim[x=180,y=35n]

hope this helps,


Ideally I would like to use my own "climatological_axes" file which
has the month_irreg definitions (including edges) for a 365 day
calendar, but I suppose that is the next step.

I can provide datasets, printouts of t and tbox, but I don't think
that is important just at the moment. I am using the latest version of
ferret under rehat, but I get the same response on the latest version for

Thanks for any help. Regards,

Postal Address:

Program in Atmospheric and Oceanic Sciences
P.O. Box CN710, Sayre Hall
Princeton, NJ 08544-0710

Tel: 609-452-6519                    o__    ____ 
Fax: 609-987-5063                    _,>/'_  -----
E-mail: rscott@princeton.edu        (_) \(_) ------
[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement