NCL Website header
NCL Home > Documentation > Functions > Array query


Convert monthly total values [e.g., precipitation] to "per day" values.


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 monthly_total_to_daily_mean (
		yyyymm [*] : numeric,  
		x          : numeric,  
		opt    [1] : integer   



Year-month dates [e.g., 198401,198402,...]. This must be the same size as the "time" dimension of x.


An array containing monthly values. Typically, this is monthly precipitation totals. The "time" dimension must be the leftmost dimension if there are multiple dimensions.


Currently, not used. Set to zero [0].

Return value

Returns an array the same size as x. All values have been divided by the number of days in a month.


Typical usage is that an array of monthly precipitation totals (e.g., mm) are input. Each value is divided by the number of days in the month to return mm/day. Leap year Februaries use 29 days.

See Also



Example 1

An array of monthly precipitation totals [mm] is to be converted to mm/day. Typically, the array takes the form prc(time), prc(time,stations) or prc(time,lat,lon).

           prc_day = monthly_total_to_daily_mean(yyyymm, prc, 0)