distrib1D

Returns the frequency distribution of a set of data for a specified range and step interval. Commonly used to create histograms.

var DATA lower upper step RANGESTEP [ depends_on ... ] distrib1D

Arguments
labeltypedescription
var variable variable (i.e., data) of which distribution is to be found
lower number lower bound of range over which distribution is to be found
upper number upper bound of range over which distribution is to be found
step number width of intervals (in units of var) used in distribution
depends_on grid set independent variables that the distribution is to depend on. Default is to compute over all independent variables, thus depends_on is empty (optional)
Returns
dist variable frequency distribution of var within range and interval specified by lower, upper, and step

Description

distrib1D returns the frequency distribution (as binned counts) of data from an input variable based upon a user-specified binning interval and range limits defined in the DATA lower upper step RANGESTEP command. In doing this, distrib1D creates a new grid of bins defined by the RANGESTEP command that has the same name as the input variable.

Example

In this example soil moisture values from July 1948-2003 and the grid box that includes the coordinates 20° N, 50° E have been selected, leaving soil moisture values that vary only over the time grid. DATA 0 50 2 RANGESTEP specifies a selection of soil moisture values from 0 to 50 mm and a binning of 2 mm. distrib1D uses these specifications to produce a count of the number of soil moisture observations in the selection that fall within each 2 mm bin from 0 to 50 mm. The limits of the RANGESTEP command serve as bin centers. Therefore, in this example, there are 26 bins, namely -1 (actually 0)-1, 1-3, 3-5, ..., 47-49, 49-51 (actually 50). The grid of bins is named "w".

SOURCES .NOAA .NCEP .CPC .GMSM .w
Y (20) VALUE
X (50) VALUE
T (Jul 1948-2003) VALUES
DATA 0 50 2 RANGESTEP
distrib1D


Live Example Link

In the following example using the GHCN monthly precipitation data set, precipitation values for stations in Madagascar and its vicinity have been selected for January 1971 to December 2000. The DATA 0 1200 50 RANGESTEP command specifies the selection of precipitation values from 0 to 1200 mm and defines 50 mm-wide bins. Finally, in the distrib1D command, the inclusion of IWMO, the name of the station ID grid, in brackets means that a frequency distribution will be constructed for each station separately. If "[IWMO]" had been excluded, a single frequency distribution would have been produced using the collective precipitation values from all the selected stations. This can be generalized to multiple grids (if the data depend upon additional grids) as well.

SOURCES .NOAA .NCDC .GHCN .v2beta
lon (41.5) (53.0) masknotrange SELECT
lat (-28.5) (-8.0) masknotrange SELECT
T (Jan 1971) (Dec 2000) RANGE
.prcp
DATA 0 1200 50 RANGESTEP
[IWMO]distrib1D


Live Example Link


See also

Categorization: classify distrib distrib2D dominant_class
Statistical Functions: correlate datarank integrateddistrib1D medianover normalizeddistrib1D percentileover rankcorrelate replacebypercentile rmsaover rmsover seasonalfreqGT seasonalfreqLT seasonalmeandailyvalueGT seasonalnonoverlapDSfreq seasonalnonoverlapWSfreq seastotAvgFill seastotZeroFill standardize width96