NCL Website header
NCL Home > Documentation > Functions > Climatology


Computes a user-specified list of three-month seasonal means (DJF, JFM, FMA, MAM, AMJ, MJJ, JJA, JAS, ASO, SON, OND, NDJ).


load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"  ; This library is automatically loaded
                                                             ; from NCL V6.2.0 onward.
                                                             ; No need for user to explicitly load.

	function month_to_seasonN (
		xMon       : numeric,  
		season [*] : string    

	return_val  :  typeof(x)



A one-, three-, or four-dimensional array [xMon(time) or xMon(time,lat,lon) or xMon(time,lev,lat,lon)] of any numeric type.

xMon must have named dimensions and the time (leftmost) dimension must be divisible by 12. The data are assumed to be monthly mean data and the first record is assumed to be January.


An array of strings representing the seasons to calculate: e.g., (/"DJF","JJA"/).

Return value

The return value will be of the same type and one more dimension than xMon. The leftmost dimension will be N where N is the length of season. See the description below for more information.

If the input data contains metadata (e.g., coordinate variables and attributes), these will be retained.

In addition, the attributes "long_name" and "season" are returned.


Computes a user-specified list three-month seasonal means (DJF, JFM, FMA, MAM, AMJ, MJJ, JJA, JAS, ASO, SON, OND, NDJ). The first average (DJF=JF) and the last average (NDJ=ND) are actually two-month averages.

The following table shows how the output variable is dimensioned with respect to the input variable:

Input Output
xMon(time) xSea(N,time/12)
xMon(time,lat,lon) xSea(N,time/12,lat,lon)
xMon(time,lev,lat,lon) xSea(N,time/12,lev,lat,lon)

See Also

month_to_season, month_to_season12


; for xMon(time,lat,lon) 

  xJJA = month_to_seasonN (xMon, (/"JJA","JFM"/))

; result: xJJA(2,dimsizes(time)/12,lat,lon)