IRI

Help Resources
Introductory Tutorial
Statistical Analysis Tutorial
Ingrid Function Documentation
Question and Answers
Your Home Directory
Topics
Overlays
The Basic Design
Examples
Overview

Ingrid Function Documentation
Function Category Index
Function Menu
Argument Types

help@iri
174 functions
2xtoNaN8 Changes missing_values into NaNs. Uses either missing_value or valid_range flags. Outputs are both real*4 or both real*8.
abrat Ratio of alpha to beta
abs Returns the absolute value of a variable or a constant
add Adds the last two items on the stack
add_variable adds a variable to a dataset
addGRID Adds a single-valued independent variable
addGRIDlast Adds a single-valued independent variable as the slowest-varying independent variable
average Calculates the average
beta
BofA=C Converts a variable A to a variable B using a table B(C=A) and linear interpolation. Out of range values beyond half a grid step are NaN
BofA=C-bounded Converts a variable A to a variable B using a table B(C=A) and linear interpolation. Out of range values are pegged to the extreme values
boxAverage Calcuates the box average. Commonly used for creating seasonal averages. Note: function should only be used with continuous data domain (see example below).
:c Defines a numeric constant with units and (optionally) other attributes
changetruncation Changes variable truncations to nsp
classify Classifies data into categories, i.e. labels ranges of values.
CofA=B Converts a variable A to a variable B using a table B(C) and linear interpolation. Out of range values beyond half a grid step are NaN
CofA=Bbounded Converts a variable A to a variable B using a table B(C) and linear interpolation. Out of range values are pegged to the extreme values
constantdata Returns constant data
correlate Calculates the Pearson Product-Moment Correlation coefficient of two variables over specified grids (i.e., independent variables)
cos Calculates the cosine of a number or variable (given in radians)
cosd Calculates the cosine of a number or variable (given in degrees)
:cressman Performs a cressman objective analysis to create gridded data from station data
datarank Ranks data over a selected independent variable(s)
definite-integral Returns integral evaluated between two limits
dekadalAverage converts daily data to dekadal by averaging
dens Unecso '81 density (insitu) of seawater
densa Unecso '81 density (insitu) of seawater minus 1
depth Depth from pressure, ignoring density anomaly
detrend-bfl detrends with a best-fit-line
differences Calculates pairwise differences along specified grid(s)
distrib Gives the distributions of values for a given variable d(x,y,z,t) by returning a new variable f(d) which gives the number of occurrences of data points nearest the values d_i which are equally spaced from min to max in steps of step
distrib1D Returns the frequency distribution of a set of data for a specified range and step interval. Commonly used to create histograms.
distrib2D Returns bivariate counts
div Divides the last two items on the stack.
dominant_class returns class with the highest weight
eexp Calculates base e to the power of a variable or constant
eigenvalues Calulates eigenvalues of a matrix
eigrs Computes eigenvalues and eigenvectors, returns low to high (but indexes the hightest one as 1
evengridAverage Regrids a variable to a new grid by averaging
Explicit:endLoop Ends an explicit integration loop
FillNaN Modifies a variable so that if it has a missing data flag the missing data is filled in.
flagge Flags data values greater than or equal to a specified threshold
flaggt Flags data values greater than a specified threshold
flagle Flags data values less than and equal to a specified threshold
flaglt Flags data values less than a specified threshold
Fourier_transform Computes fouriertransform
gaussianinv Converts random data uniformly distributed on to gaussian data
gaussiantlat Returns gaussian grid with n points
gautotsp Converts lon/lat to spectral coefficients
gautotspUV Converts lon/lat to spectral coefficients using spectral harmonics for velocity
georect Defines a lat/lon rectangle
ginverse Computes the (transposed) generalized inverse with the ivar1 grids as the first dimentsion of the matrix and the ivar2 grids as the second dimension of the matrix
GRID Regrids a variable onto a newly-defined, evenly-spaced grid (i.e., independent variable)
gridtomatch Returns variable1 regridded to match variable2
gridtomatchnamed
grouptogrid combines variables into a single variable
integral Takes integral with respect to independent variable
integrate Takes integral with respect to independent variable starting with initial value
integrateddistrib1D Returns the cumulative frequency distribution of a set of data for a specified range and step interval.
integrateddistrib2D Computes the normalized distribution and then integates it, thus the values will range from zero to one. The variable is marked so that contours will be at 66\% and 96\% widths as well as at the median.
invertontogrid Inverts onto surfaces
invlaplacian Applies inverse laplacian to variable in spectral coordinates
isolines Computes isolines from a gridded dataset. Should be changed to output a geometry
k-means136 K-means cluster analysis using AS 136 seeded with varimax structures, see APPL. STATIST. (1979) VOL.28, NO.1
L4cycle:endLoop Ends a Lorenz 4-cycle scheme integration loop
laggedcovariance Computes lagged covariance $C(E,E,S,L)$. If Tgrid is a variable, uses the first grid as the time grid
laplacian Applies Laplacian to variable in spectral coordinates
ln Calculates the natural log of a number or variable
lnratios Takes pairwise ln ratios along grid of variable
log Calculates the logarithm of a number or variable, with base 10
mag Calculates the vector magnitude
maskbybin Bins data into bins from lo to high by step, returning a mask with an additional grid (the bins) that is either NaN or 1
maskge Masks out data values greater than or equal to a specified threshold
maskgt Masks out data values greater than a specified threshold
maskle Masks out data values less than or equal to a specified threshold
masklt Masks out data values less than a specified threshold
masknotrange Masks out all values of a variable not included in the indicated range. Commonly used to select stations within a particular lat/lon range (see Live Example).
maskrange Masks out all values of a variable included in the indicated range.
matchtruncation Changes second variable to match truncation of the first
matrixinverse Calculates matrix inverse of variable using the first array of independent variables as the first dimension and the second array of independent variables for the second dimension. At the moment, assumes the matrix is compressed symmetric
max Returns the maximum of two variables or two numbers
maxover Returns the maximum value of a variable over a selected grid(s)
meansqover Changes second stream to match truncation of the first
median Computes the median
medianover Calculates the median value (i.e., 50th percentile) of a variable over selected grids (i.e., independent variables)
min Returns the minimum of two variables or two numbers
minover Returns the minimum value of a variable over a selected grid(s)
mod Returns the modulus of two variables or two numbers
monthlyAverage Converts daily data to monthly data by averaging
mul Multiplies the last two items on the stack.
mulavg Multiplies and averages over a set of independent variables
mulsum Returns A*B multiplied and summed along independent variables. If independent variable is an array of independent variables, sums over all of them
normalize Divides var1 by var2. Points less than minimum in var2 become NaN in the output
normalizeddistrib1D Returns the normalized frequency distribution of a set of data for a specified range and step interval.
normalizeddistrib2D Computes the distribution of A vs B (see distrib2D) and then renormalizes by the integral along B. This new variable has the property that the integral along B is 1
openquery Opens a query
openqueryby Opens a query indexed by indexvar
pairsums Pairwise sums along independent variable of variable. This is the variable equivalent of integralgrid
partial Takes partial derivative of variable along grid
partialeast Applies zonal derivative to variable in spectral coordinates
partialnorth Applies meridional derivative to variable in spectral coordinates
pentadAverage Converts daily data to pentad (i.e., five-day) data by averaging
percentileover Replaces data values with their percentile, based on non-parametric methods.
potemp Calculates the potential temperature
pressure Computes hydrostatic pressure by integrating from the surface
products Takes pairwise products along independent variable of variable
randomdata Returns a variable of random numbers
RANGE Identifies continuous range of values in one grid (i.e., independent variable) for which data will be selected.
RANGEEDGES Identifies continuous range of values in one grid (i.e., independent variable) for which data will be selected.
RANGESPAN Samples variable along one coordinate. Works by creating a child object of the variable
rankcorrelate Calculates the Spearman rank correlation coefficient of two variables over specified grids (i.e., independent variables)
rasterize rasterizes a geometry to match a gridded variable
ratios Takes pairwise ratios along independent variable of variable
readgrib Reads data from GRIB files
readthredds Reads a dataset from THREDDS server
regridAverage Regrids a variable by averaging. Indicated grids of one variable are regridded to match those of another variable. The function is commonly used when comparing multiple variables that are dependent on different spatial grids (see correlation example below).
regridLB Regrids variable2 to match variable1 by using left bounds, i.e. grid is ordered, variable2's grid is a subset of variable1's grid, the values of the variable1 grid are bounded by the values of the variable2 grid, and the variable2 values that are on the left of that pair are used as the matching values
regridLinear Regrids by averaging
removeGRID Removes a single-valued grid (i.e. independent variable) from a variable
renameGRID Assigns new name to an existing grid (i.e., independent variable)
REORDER Reorders variable so that the chunk for the variable has n dimensions and is ordered with the fastest varying dimension corresponding to ivar1, the second to ivar2, ect
replacebypercentile Calculates specified percentiles, based on non-parametric methods.
replaceGRID Replaces a grid (i.e., independent variable)
replaceNaN Replaces missing values in a variable with a selected value (or variable)
RESCALE Rescales data by multiplying by a scalar and then adding a scalar
rmsaover Returns the root mean square averaged over selected grids (i.e., independent variables) with the mean removed
rmsover Returns the root mean square averaged over selected grids (i.e., independent variables)
rotatedata Rotates a variable onto a new grid (X'Y')
runningAverage Calculates the running average
SAMPLE Samples variable along ivar1 according to ivar2
sample-along Samples variable1 along grid using variable2=grid
SAMPLE_MISSING samples variable by keeping only what is missing from a second variable
SAMPLELB Samples variable along ivar1 according to ivar2, returning lowest value in ivar1 greater than or equal to value in ivar2
SAMPLEUB Samples variable along ivar1 according to ivar2, returning highest grid value in ivar1 it value in ivar2
SCALE scales stream so that it has attributes scale_factor and add_offset
seasonalAverage computes seasonal Average over time
SELECT Selects values of a grid based on values of the indicated variable. Commonly used to select stations - station ids (grid) selected based on lat/lon (variables) values (see Live Example).
selectbyNaN Replaces missing_values in variable2 with variable1. Documentation carried primarily from variable1, however, making it a bit different that a reversed replaceNaN
setmissing_value Changes the missing value flag for missing data to value
shiftdata Shifts data to create lagged versions of the data. Commonly used to calculate lag correlations.
shiftdatashort Shifts data to create lagged versions of the data. Commonly used to calculate lag correlations.
shiftGRID Shifts a grid (i.e., independent variable) by a specified number of grid points
sin Calculates the sine of a number or variable (given in radians)
sind Calculates the sine of a number or variable (given in degrees)
SM121 Applies two-dimensional 121 smoothing to a variable
sort_by sorts dataset variables by replacing grid with rank, rank being calculated from variable.
splitstreamgrid Splits grid (i.e., independent variable) into two grids. Commonly-used to create climatologies (see live example below).
sqrt Calculates the square root of a number or variable
sqrtsgn Calculates the square root of a number or variable. The sign (+/-) of argument is preserved in the result.
standardize Standardizes a set of data by removing its mean and dividing the result by its standard deviation
STEP Identifies interval at which data will be selected along one grid (i.e., independent variable). Commonly used with runningAverage to create and select single season averages.
sub Subtracts the item on the top of stack from the item below it.
sum Returns the sum of a dataset or variable over a specified grid
svd Computes singular value decomposition
toNaN Changes missing_values into NaNs. Uses either missing_value or valid_range flags. output is real*4
toNaN8 Changes missing_values into NaNs. Uses either missing_value or valid_range flags. output is real*4 or real*8
toS Interpolates onto surfaces
transit Given a variable D(X,Y) and a ship track X(S), Y(S), returns D(S).
tsptogau Converts spectral coefficients to lon/lat
tsptogauR Converts spectral coefficients to lon/lat
tsptogauUV Converts spectral coefficients to lon/lat using spectral harmonics for velocity
unitconvert Converts units
unitmatrix creates a unit matrix
unsplitstreamgrid Combines two grids (i.e., independent variables) that were created by the splitstreamgrid function (i.e., undoes splitstreamgrid)
use_as_grid uses a 1D variable to replace the independent variable on which it depends
VALUES Identifies values along one grid (i.e., independent variable) for which data will be selected
varimax performs varimax rotation on the results of svd
:weaver Performs a simplified weaver objective analysis
weighted-average Computes weighted average
width96 Computes the 96 percentile widths
yearly-anomalies Calculates anomalies based on climatology of all selected years
yearly-climatology Calculates a monthly climatology
yearlyAverage converts daily data to yearly by averaging
zeropointwidth zeros pointwidth of an grid (independent variable) within a variable.