Last modified: 2014-08-15, 11:31:21 GMT by idl_lib_html.pro.

Number of routines: 107

Contributors: Benjamin Grandey, Daithi Stone, Edward Wiebe

Licence: The IDL routines available from this page are free for non-commercial use under the terms of this Creative Commons License unless otherwise noted in the routine.

Please report any bugs to stoned@csag.uct.ac.za.

We welcome any modified or new routines you would like to add.

We would like to know if you have found any of these routines useful.

The entire routine library can be downloaded as an archive file.

Click here for a .tar archive.

Click here for a .zip archive.

- mask_lonlatmonth.pro has been superceded by mask_lonlattime.pro and process_lonlatmonth.pro. It was removed from the library on 2008-04-25.
- A .tar archive file containing the entire routine library was added on 2007-05-24; see above to download it.
- giorgi_regions.pro was replaced with ipcc_regions.pro on 2006-01-12.
- A separate webpage for the Optimal Detection Package was created on 2005-09-02 here.
**See bottom for more update information.**

- ADD_DIM This function returns an array with extra dimensions added, filled with copies of the original array. MODIFIED 2009-03-31
- ARRAY_TOTAL This function does more flexible array integration than IDL's total. WRITTEN 2008-03-11
- DIMENSION This function returns the dimension of an array. It returns 0 if the input variable is scalar. WRITTEN 2000-07-05
- INTERVAL_CALC This function calculates a convenient maximum value for a data set. MODIFIED 2001-01-11
- ISIN This function will tell you whether or not a token is contained in an array. MODIFIED 2011-02-22
- LENGTH Find the length of a vector (or the longest dimension of an array). WRITTEN 2002-06-09
- NEAREST_INDEX Search for the index of the value nearest to x in the vector mx. WRITTEN 2002-11-29
- NONUNIQ Return the subscripts of the non-unique elements in an array. WRITTEN 2002-07-23
- SHUFFLE This function shuffles the values in an array. MODIFIED 2011-11-06
- SLICE Slice a two dimensional array out of a three dimensional array. WRITTEN 2000-06-09

- CORRECT_DATE This function returns a corrected version of the input date, when the days are out of the range for the month. MODIFIED 2012-03-27
- MONTH_DAY This function returns the first and last days of the month. MODIFIED 2010-02-05
- MONTH_NAME This function returns the name of the desired calendar month. MODIFIED 2010-08-10
- MONTH_NUM This function returns the month number given the name. WRITTEN 1999-10-14
- MONTHS_TO_SEASONS This function extracts seasonal data from monthly data. MODIFIED 2008-03-18
- SEASON_NAME This function returns the initials of the months contained in a given season. MODIFIED 2010-01-05

- CW_AXIS_SELECT This compound widget provides an interface for selecting points along multiple axes. It was written to be used as an aid for the analysis of gridded data. WRITTEN 2002-09-18
- CW_BGRID CW_BGRID is a compound widget that implements a multi-column cw_bgroup widget. WRITTEN 2002-08-27
- CW_BGROUP2 Provides a radio-like button group which allows you to select any two buttons. WRITTEN 2002-08-23
- CW_BGROUP_MOD CW_BGROUP_MOD is a modification of CW_BGROUP that allows for turning off all of the buttons in the group. MODIFIED 2002-01-15

- EXTRACT_REGION This function extracts regional data from a [longitude,latitude,time] data file. MODIFIED 2010-03-09
- GEO_DIST This function returns the great circle distance (in km) between two geographical points. MODIFIED 2002-08-12
- GEO_MID This function returns the coordinates of the geographical point midway between the two input points. MODIFIED 2002-08-12
- IPCC_REGIONS This function returns the coordinates of the boxes defining the requested geographical regions selected for use in the IPCC AR4 of WG1. MODIFIED 2009-09-30
- LAND_MASK This function creates and returns a global gridded land mask of the desired resolution. MODIFIED 2006-07-25
- MASK_LONLATMONTH This procedure returns a version of the input lon-lat-month data set Data which has been masked according to Mask and other selected criteria. It will also do some area and time averaging. MODIFIED 2007-01-22
- MASK_LONLATTIME This procedure returns a version of the input lon-lat-time data set Data which has been interpolated to the grid of Mask and/or masked according to Mask. MODIFIED 2011-03-30
- PROCESS_LONLATMONTH This procedure returns a processed version of the input lon-lat-month data set. Processing includes lon-lat interpolation masking, taking anomalies, and taking averages. MODIFIED 2011-03-30

- ARROWS This function plots arrows onto the current window. MODIFIED 2012-07-18
- B_PLOT This procedure contours a data by drawing each element of an array as a rectangular box. MODIFIED 2009-12-08
- BAR_GRAPH This procedure plots bar graphs. MODIFIED 2003-06-16
- BOX This procedure draws a rectangular box on the screen. MODIFIED 2009-12-08
- BULLET_LEGEND This procedure plots a legend for bullet plots. MODIFIED 2000-09-12
- BULLET_PLOT This procedure draws bullet plots with bullets whose sizes are scaled to values in an input vector. MODIFIED 2001-03-06
- CHOOSE_LEVELS This function chooses convenient values for contour levels. MODIFIED 2002-06-02
- CIRCLE This function returns the x- and y- coordinates of a circle. MODIFIED 2004-11-26
- CONTOUR_LEGEND This procedure plots a legend for colour-contour plots. MODIFIED 2009-10-27
- CONTOUR_WORLD This procedure draws a colour contour of a data field over a world map. MODIFIED 2011-03-16
- ERROR_BARS This procedure plots error bars over plotted data. MODIFIED 2006-02-17
- FILL_REGIONS Fill regions with a colour on a plot of data from the UVic Climate Model. WRITTEN 1999-02-12
- LINE_LEGEND This procedure plots a legend for line plots. MODIFIED 2013-02-01
- OUTLINE_REGIONS Draw a line around regions on a contour plot. WRITTEN 1999-02-12
- PIE This procedure plots a pie chart. MODIFIED 2005-08-05
- PNG_START Prepare IDL to create a .png file using the z-buffer device. MODIFIED 2002-03-28
- PNG_WRITE Write out the contents of the currently active window as a .png file. If PNG_START is called before the graphics are generated the current device will be the z-buffer. MODIFIED 2002-04-29
- TEK_COLOR_SPECTRUM This function returns colour indices that make a spectrum out of the TEK_COLOR colours. MODIFIED 2004-07-21
- TIFF_START Prepare IDL to create a .tiff file using the z-buffer device. WRITTEN 2002-04-29
- TIFF_WRITE Write out the contents of the currently active window as a .tiff file. If TIFF_START is called before the graphics are generated the current device will be the z-buffer. WRITTEN 2002-04-29
- TRUECOL_ROTATE This a wrapper for the rotate function. Rotate doesn't like arrays from true colour images. WRITTEN 2000-12-18
- TWO_AXES Demonstrates how to make a plot with two different y-axes. MODIFIED 2002-01-10

- CLEAR This procedure clears the active IDL display window. MODIFIED 2000-07-14
- CLS This procedure clears the IDL terminal window. MODIFIED 2000-07-14
- LANDSCAPE This procedure sets the plotting output to landscape orientation. WRITTEN 2000-06-13
- NCDF_FILEINQ Print a table of the contents of an ncdf file to the terminal and/or save the structure of the file in a structure! MODIFIED 2002-08-09
- PORTRAIT This procedure sets the plotting output to portrait orientation. WRITTEN 2000-06-13
- PS_CLOSE This procedure closes a postscript file for plotting output. WRITTEN 2000-06-13
- PS_OPEN This procedure opens a postscript file for plotting output. WRITTEN 2000-06-13
- READ This function extracts column delimited data (whitespace between columns) from a file and loads it into an array It is intended to work with integer or floating point data but will always read the data as if it were floating point. MODIFIED 2009-09-29
- SREAD This function extracts column delimited data (whitespace between columns) of data from a file and loads it into an string array. MODIFIED 2014-08-15
- TEE Mimics the Unix tee command allowing output to go to the terminal and to a file. WRITTEN 2000-08-29
- W_CLOSE This procedure closes an existing plotting window. WRITTEN 2000-06-13
- W_OPEN This procedure opens a new plotting window. WRITTEN 2000-06-13

- DECIMAL_PLACE This function returns the decimal place of the first significant digit. MODIFIED 2002-02-06
- FACTORS This function calculates the prime factors of natural number. WRITTEN 2000-08-24
- FIRST_DIGIT This function returns the first significant digit. MODIFIED 2001-01-11
- IMAG This function returns the imaginary component of a complex number. WRITTEN 2000-06-09
- ODD This function returns 1 if the input is odd, 0 otherwise. MODIFIED 2000-08-23
- PARTIAL_FACTORIAL This function calculates the partial factorial n!/(n-m)!. WRITTEN 2004-11-22
- PLUS This function returns 1 if the input is positive, 0 otherwise. MODIFIED 2000-07-10
- REAL This function returns the real component of a complex number. WRITTEN 2000-06-09
- SIGN This function returns the sign of the input variable. MODIFIED 2011-11-06

- BREAKLINE This function breaks a line of text into pieces less than or equal to a maximum length. Text is broken on whitespace. WRITTEN 2002-05-08
- CONSTANTS This procedure returns the values of some absolute constants. MODIFIED 2002-08-09
- HMAN Play the "Hangman" word guessing game. Each time you issue the hman command a single game is played (guess one word). WRITTEN 2001-04-30
- IDL_LIB_HTML This procedure creates the web page listing of a library's IDL utilities. MODIFIED 2013-07-19
- PRINTP Print text to the terminal and suppress the carriage return at the end of the line. This allows more characters to be added to the same line. WRITTEN 1999-09-29
- SET_EDGE Fill the boundary of a two dimensional array with a value. WRITTEN 2002-04-11
- SWAP This procedure will swap the values of two variables. WRITTEN 2002-02-12
- VAR_TYPE This function returns the IDL code of the variable type. MODIFIED 2011-11-06

- POTEM Compute the potential temperature of a parcel of seawater at a reference pressure using the Bryden 1973 polynomial for adiabatic lapse rate and Runge=Kutta 4th order integration algorithm. WRITTEN 1999-03-31
- STANDARD_ATM This function calculates the pressure at a given altitude in the troposphere, assuming a uniform, dry atmosphere. MODIFIED 2002-08-12

- PDF This procedure estimates the one or two dimensional probability density function of a given data set. MODIFIED 2012-01-24
- PDF_TO_CDF This function estimates a cumulative distribution function from a given probability density function. MODIFIED 2011-04-13
- QUANTILE_THRESHOLD This function estimates the thresholds in the input data array corresponding to the specified quantiles. MODIFIED 2012-07-05
- SAMPLE_PDF This function randomly samples a given probability density function. MODIFIED 2011-04-13
- THRESHOLD_QUANTILE This function estimates the quantiles of the given thresholds in the input data array. MODIFIED 2012-07-05

- EXPAND_TABS Replace tab characters in a text string with spaces. WRITTEN 2001-04-02
- ORDINAL This function returns the ordinal value of the input number. MODIFIED 2001-02-15
- STR This function converts an integer or floating point number to a string. MODIFIED 2006-02-17
- STRING_FROM_VECTOR This function converts a vector to a single string containing the vector's entries separated by commas. MODIFIED 2004-06-16
- STRMERGE Merge two string arrays. MODIFIED 2002-07-23
- WRITTEN_NUMBER This function returns the written form of the input number. WRITTEN 2001-02-15

- CROSS_SPEC This function estimates the power cross-spectrum of two vectors. WRITTEN 2004-07-13
- EMD This function estimates the empirical mode decomposition of a given data vector. MODIFIED 2005-08-05
- EXTREMA This function returns the locations of the local extrema in a given time series. WRITTEN 2003-10-09
- FILTER This function returns a smoothed version of the input vector. MODIFIED 2009-01-05
- FILTER_ND This function returns a smoothed version of an N-dimensional input array. MODIFIED 2005-08-05
- FILTER_WINDOW This function returns a desired filter window of desired width. MODIFIED 2005-10-21
- FIRST_DIFF This function returns the first difference vector of the input. MODIFIED 2000-07-10
- HILBERT_SPEC This function estimates the Hilbert-Huang amplitude spectrum of an input matrix of time series (e.g. intrinsic mode functions). MODIFIED 2005-08-05
- MONTE_CARLO_AR1 This function returns a Monte Carlo generated time series which preserves the distributional and AR(1) properties of the original series. MODIFIED 2005-10-23
- PCA This procedure calculates the principal components and empirical orthogonal functions of a given data set. MODIFIED 2012-01-23
- TREND This function calculates the least-squares linear trend in the input vector. MODIFIED 2005-11-23
- UNWRAP This function unwraps angular time series such that is it continuous. WRITTEN 2004-10-25
- ZERO_CROSS This function returns the number of zero crossings in a given time series. WRITTEN 2003-10-09

- A number of routines were removed from the library on 2003-11-19 because they were too system specific. These are CDIAC_PLOT, CDIAC_READ, CRU_PLOT, EDIT_REGIONS, GLOBETOPOG, PLOT_PRECIP, PLOT_WEATHER, READ_GLOBE_TOPOG, READ_PARTICLES, READ_REGION_MASK, READ_TERM, SSTOPOG, VANCOUVER_ISLAND, WRITE_HORZ_REGIONS. PRODUCT was also removed as it is superceded by IDL's PRODUCT function.
- SUM and SUM_ROW were removed on 2005-08-05 as they are superceded by IDL's TOTAL function.
**A separate webpage for the Optimal Detection Package was created on 2005-09-02 here.**