A Library of IDL Programs
Maintained by: Dáithí Stone (email@example.com)
Last modified: 2015-06-03, 14:52:17 GMT by idl_lib_html.pro.
Number of routines: 109
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 firstname.lastname@example.org.
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.
- ARRAY_TOTAL This function does more flexible array integration than IDL's total.
- DIMENSION This function returns the dimension of an array. It returns 0 if the input variable is scalar.
- INTERVAL_CALC This function calculates a convenient maximum value for a data set.
- ISIN This function will tell you whether or not a token is contained in an array.
- LENGTH Find the length of a vector (or the longest dimension of an array).
- NEAREST_INDEX Search for the index of the value nearest to x in the vector mx.
- NONUNIQ Return the subscripts of the non-unique elements in an array.
- SHUFFLE This function shuffles the values in an array.
- SLICE Slice a two dimensional array out of a three dimensional array.
- CORRECT_DATE This function returns a corrected version of the input date, when the days are out of the range for the month.
- MONTH_DAY This function returns the first and last days of the month.
- MONTH_NAME This function returns the name of the desired calendar month.
- MONTH_NUM This function returns the month number given the name.
- MONTHS_TO_SEASONS This function extracts seasonal data from monthly data.
- SEASON_NAME This function returns the initials of the months contained in a given season.
- 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.
- CW_BGRID CW_BGRID is a compound widget that implements a multi-column cw_bgroup widget.
- CW_BGROUP2 Provides a radio-like button group which allows you to select any two buttons.
- CW_BGROUP_MOD CW_BGROUP_MOD is a modification of CW_BGROUP that allows for turning off all of the buttons in the group.
- LS This procedure runs the UNIX ls (list files) command.
- PATHTO Find a file in the $IDL_PATH search tree.
- EXTRACT_REGION This function extracts regional data from a [longitude,latitude,time] data file.
- GEO_DIST This function returns the great circle distance (in km) between two geographical points.
- GEO_MEAN This function returns the coordinates of the central geographical point of the input points.
- GEO_MID This function returns the coordinates of the geographical point midway between the two input points.
- IPCC_REGIONS This function returns the coordinates of the boxes defining the requested geographical regions selected for use in the IPCC AR4 of WG1.
- LAND_MASK This function creates and returns a global gridded land mask of the desired resolution.
- 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.
- 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.
- 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.
- ROTATE_POLE Convert geographical coordinates to a new polar coordinate system with a different North Pole.
- ARROWS This function plots arrows onto the current window.
- B_PLOT This procedure contours a data by drawing each element of an array as a rectangular box.
- BAR_GRAPH This procedure plots bar graphs.
- BOX This procedure draws a rectangular box on the screen.
- BULLET_LEGEND This procedure plots a legend for bullet plots.
- BULLET_PLOT This procedure draws bullet plots with bullets whose sizes are scaled to values in an input vector.
- CHOOSE_LEVELS This function chooses convenient values for contour levels.
- CIRCLE This function returns the x- and y- coordinates of a circle.
- CONTOUR_LEGEND This procedure plots a legend for colour-contour plots.
- CONTOUR_WORLD This procedure draws a colour contour of a data field over a world map.
- ERROR_BARS This procedure plots error bars over plotted data.
- FILL_REGIONS Fill regions with a colour on a plot of data from the UVic Climate Model.
- LINE_LEGEND This procedure plots a legend for line plots.
- OUTLINE_REGIONS Draw a line around regions on a contour plot.
- PIE This procedure plots a pie chart.
- PNG_START Prepare IDL to create a .png file using the z-buffer device.
- 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.
- TEK_COLOR_SPECTRUM This function returns colour indices that make a spectrum out of the TEK_COLOR colours.
- TIFF_START Prepare IDL to create a .tiff file using the z-buffer device.
- 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.
- TRUECOL_ROTATE This a wrapper for the rotate function. Rotate doesn't like arrays from true colour images.
- TWO_AXES Demonstrates how to make a plot with two different y-axes.
- CLEAR This procedure clears the active IDL display window.
- CLS This procedure clears the IDL terminal window.
- LANDSCAPE This procedure sets the plotting output to landscape orientation.
- 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!
- PORTRAIT This procedure sets the plotting output to portrait orientation.
- PS_CLOSE This procedure closes a postscript file for plotting output.
- PS_OPEN This procedure opens a postscript file for plotting output.
- 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.
- SREAD This function extracts column delimited data (whitespace between columns) of data from a file and loads it into an string array.
- TEE Mimics the Unix tee command allowing output to go to the terminal and to a file.
- W_CLOSE This procedure closes an existing plotting window.
- W_OPEN This procedure opens a new plotting window.
- DECIMAL_PLACE This function returns the decimal place of the first significant digit.
- FACTORS This function calculates the prime factors of natural number.
- FIRST_DIGIT This function returns the first significant digit.
- IMAG This function returns the imaginary component of a complex number.
- ODD This function returns 1 if the input is odd, 0 otherwise.
- PARTIAL_FACTORIAL This function calculates the partial factorial n!/(n-m)!.
- PLUS This function returns 1 if the input is positive, 0 otherwise.
- REAL This function returns the real component of a complex number.
- SIGN This function returns the sign of the input variable.
- BREAKLINE This function breaks a line of text into pieces less than or equal to a maximum length. Text is broken on whitespace.
- CONSTANTS This procedure returns the values of some absolute constants.
- HMAN Play the "Hangman" word guessing game. Each time you issue the hman command a single game is played (guess one word).
- IDL_LIB_HTML This procedure creates the web page listing of a library's IDL utilities.
- 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.
- SET_EDGE Fill the boundary of a two dimensional array with a value.
- SWAP This procedure will swap the values of two variables.
- VAR_TYPE This function returns the IDL code of the variable type.
- 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.
- STANDARD_ATM This function calculates the pressure at a given altitude in the troposphere, assuming a uniform, dry atmosphere.
- PDF This procedure estimates the one or two dimensional probability density function of a given data set.
- PDF_TO_CDF This function estimates a cumulative distribution function from a given probability density function.
- QUANTILE_THRESHOLD This function estimates the thresholds in the input data array corresponding to the specified quantiles.
- SAMPLE_PDF This function randomly samples a given probability density function.
- THRESHOLD_QUANTILE This function estimates the quantiles of the given thresholds in the input data array.
- EXPAND_TABS Replace tab characters in a text string with spaces.
- ORDINAL This function returns the ordinal value of the input number.
- STR This function converts an integer or floating point number to a string.
- STRING_FROM_VECTOR This function converts a vector to a single string containing the vector's entries separated by commas.
- STRMERGE Merge two string arrays.
- WRITTEN_NUMBER This function returns the written form of the input number.
TIME SERIES ANALYSIS
- CROSS_SPEC This function estimates the power cross-spectrum of two vectors.
- EMD This function estimates the empirical mode decomposition of a given data vector.
- EXTREMA This function returns the locations of the local extrema in a given time series.
- FILTER This function returns a smoothed version of the input vector.
- FILTER_ND This function returns a smoothed version of an N-dimensional input array.
- FILTER_WINDOW This function returns a desired filter window of desired width.
- FIRST_DIFF This function returns the first difference vector of the input.
- HILBERT_SPEC This function estimates the Hilbert-Huang amplitude spectrum of an input matrix of time series (e.g. intrinsic mode functions).
- MONTE_CARLO_AR1 This function returns a Monte Carlo generated time series which preserves the distributional and AR(1) properties of the original series.
- PCA This procedure calculates the principal components and empirical orthogonal functions of a given data set.
- TREND This function calculates the least-squares linear trend in the input vector.
- UNWRAP This function unwraps angular time series such that is it continuous.
- ZERO_CROSS This function returns the number of zero crossings in a given time series.
- 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.