List routines by category:
Atmospheric Sciences |
Benchmarking |
Color |
Date/Time |
Doc |
File & I/O |
BPCH Format |
Scientific Data Formats |
GAMAP Examples |
GAMAP Internals |
GAMAP Utilities |
GAMAP Data Manipulation |
GAMAP Models &
Grids |
GAMAP Plotting |
General |
Graphics |
Math & Units |
Plotting |
Regridding |
Strings |
Structures |
Time Series
List routines by alphabetical order:
A |
B |
C |
D |
E |
F |
G |
H |
I |
J |
K |
L |
M |
N |
O |
P |
Q |
R |
S |
T |
U |
V |
W |
X |
Y |
Z
NAME: DATATYPE PURPOSE: Returns the number (or name) of the data type of an IDL scalar, array, structure, or object. CATEGORY: General CALLING SEQUENCE: RESULT = DATATYPE( Data [, Keywords ] ) INPUTS: DATA -> A variable (scalar, array, structure, or object) whose data type is desired. KEYWORD PARAMETERS: /NAME -> If set, will return the name of the data type instead of the type number. OUTPUTS: The IDL data type number or data type name will be contained in RESULT. SUBROUTINES: None REQUIREMENTS: None NOTES: The IDL data type numbers are: ----------------------------------------- 0 : undefined 6 : complex 1 : byte 7 : string 2 : int 8 : structure 3 : long 9 : double complex 4 : float 10 : pointer 5 : double 11 : object reference EXAMPLES: PRINT, DATATYPE( 0d0 ) 5 ; Double precision data is type 5 PRINT, DATATYPE( 0d0, /Name ) DOUBLE ; Returns the name of the data type MODIFICATION HISTORY: bmy, 26 Jul 1999: VERSION 1.00 bmy & phs, 13 Jul 2007: GAMAP VERSION 2.10
(See /n/home09/ryantosca/IDL/gamap2/general/datatype.pro)
NAME: DATE2YMD PURPOSE: Given a date in YYYYMMDD format, returns the year, month, and day in separate variables. Also can be used to separate time in a HHMMSS format into hours, minutes, seconds. CATEGORY: Date & Time CALLING SEQUENCE: DATE2YMD, YYYYMMDD, YEAR, MONTH, DAY INPUTS: YYYYMMDD -> Today's date as YYYY/MM/DD (or time as HH/MM/SS) YEAR -> Year (or hour ) value MONTH -> Month (or minute) value DAY -> Day (or second) value KEYWORD PARAMETERS: None OUTPUTS: None SUBROUTINES: None REQUIREMENTS: None NOTES: None EXAMPLE: DATE2YMD, 20060101, Y, M, D PRINT, Y, M, D 2006 1 1 ; Separates the date into Y, M, D variables DATE2YMD, 123000, H, Mi, S PRINT, H, Mi, S 12 30 0 ; Separates the time into H, Mi, S variables MODIFICATION HISTORY: bmy, 06 Jun 2006: TOOLS VERSION 2.05 bmy & phs, 13 Jul 2007: GAMAP VERSION 2.10
(See /n/home09/ryantosca/IDL/gamap2/date_time/date2ymd.pro)
NAME: DAY_OF_YEAR (function) PURPOSE: Computes the day number (0-365 or 0-366 if leap year) of a given date. CATEGORY: Date & Time CALLING SEQUENCE: RESULT = DAY_OF_YEAR( MONTH, DAY, YEAR ) OR RESULT = DAY_OF_YEAR( YYYYMMDD ) INPUTS: With 3 arguments: MONTH (int or long) -> the input month (1 - 12) DAY (int or long) -> the input day (0 - 31) YEAR (int or long) -> the input year (YEAR<0 is BC; YEAR>0 is AD) With 1 argument: YYYYMMDD (long) -> the input date in YYYYMMDD format. KEYWORD PARAMETERS: OUTPUTS: RESULT -> Day number of the year SUBROUTINES: None REQUIREMENTS: None NOTES: (1) You cannot abbreviate YEAR. If you specify 10/14/97 DAY_OF_YEAR will compute the day number for 14 Oct 97 AD instead of 14 Oct 1997 AD EXAMPLES: (1) PRINT, DAY_OF_YEAR( 10, 14, 1997 ) 287 ; A typical modern date: 14 Oct 1997 AD (2) PRINT, DAY_OF_YEAR( 19971014 ) 287 ; The same as example #1, but this time we call ; DAY_OF_YEAR with a date in YYYYMMDD format (3) PRINT, DAY_OF_YEAR( 1, 1, 1 ) 1 ; Beginning of the "Anno Domini" era: 1 Jan 1 AD (4) PRINT, DAY_OF_YEAR( 3, 15, -44 ) 74 ; When Julius Caesar was murdered: 15 Mar 44 BC MODIFICATION HISTORY: bmy, 14 Oct 1997: VERSION 1.00 bmy, 26 Mar 1998: VERSION 1.01 -- now written as a function with more elegant error checking. bmy & phs, 13 Jul 2007: GAMAP VERSION 2.10 bmy, 03 Apr 2008: GAMAP VERSION 2.12 - Modified to accept either 3 arguments (month, day, year) or one argument (date in YYYYMMDD format)
(See /n/home09/ryantosca/IDL/gamap2/date_time/day_of_year.pro)
NAME: DEFAULT_DIRS PURPOSE: Define a couple of system variables to facilitate file searching across or in multiple platforms. The settings are made depending on the host name which is queried with getenv(). This file is meant to be modified for your own computing environment and directory structure. It's probably a good idea to include a call to Default_Dirs in your startup file. A string (or string array) argument allows individual users to add their own default settings for individual projects (see INPUTS). CATEGORY: General CALLING SEQUENCE: DEFAULT_DIRS [,projectlist [,searchpath=searchpath] ] INPUTS: PROJECTLIST -> A string or string array containing the names of projects of individual users for which additional settings shall be made. For each entry for which a procedure named default_.pro exists, this procedure will be called with the host name (lower case) as argument. If the procedure is not found, a warning message is issued. KEYWORD PARAMETERS: SEARCHPATH -> A string that will be inserted at the beginning of the !PATH variable to look for the default_ procedures. This keyword is only evaluated when a PROJECTLIST is present. For simplicity, the user must make sure that SEARCHPATH adheres to the syntax of the curent OS. Since DEFAULT_DIRS is usually caled from the startup file, this shouldn't be too much of a problem. /PRINT -> print all system variables ending in 'DIR' after the definition. OUTPUTS: Various system variables are created. As a minimum, these are !RootDir = the root of the file system !HomeDir = the user's home directory !DataDir = a general data depository !TmpDir = a temporary directory !FNSep = filename seperator ('/' for unix and '\' for windows) Further project-specific directories should also end in 'Dir', this allows an easy query of all default directories: help,/system_variables,output=o print,o[ where(strpos(o,'DIR') gt 0) ] (see PRINT keyword). ******* NEED TO WORK THAT OUT !! ****** it's not that easy !!! ********* SUBROUTINES: none. REQUIREMENTS: none. NOTES: This routine uses a common block (yes!) to remember whether the user had already been warned about non-exisiting project procedures. Therefore, when you add projects on the fly, you can probably call default_dirs safely every time you wish to compose a search mask. EXAMPLE: default_dirs ; set platform dependent default directories default_dirs,['GTE','CTM'],searchpath='~/myprogs',/PRINT ; as above, but add definitions from default_gte.pro and ; default_ctm.pro which may be in ~/myprogs or the regular ; IDL search !PATH. Print all !...DIR system variables upon ; exit. See attached default_gte procedure for an example. MODIFICATION HISTORY: mgs, 12 May 1999: VERSION 1.00 bmy & phs, 13 Jul 2007: GAMAP VERSION 2.10
(See /n/home09/ryantosca/IDL/gamap2/general/default_dirs.pro)
NAME: DEFAULT_GTE PURPOSE: Define default system variables for GTE data directories and GTE programs. Specific entries are made for the PEM-Tropics A and B projects. This procedure is caled from DEFAULT_DIRS when 'GTE' is added as an argument. CATEGORY: General CALLING SEQUENCE: DEFAULT_GTE,host INPUTS: HOST -> the name of the host computer which is running IDL. In our environment these are sol or cyclope or now. KEYWORD PARAMETERS: OUTPUTS: Additional system variables are created: !GTE_Dir = home of GTE data on current platform !PEMTA_Dir = PEM-Tropics A data !PEMTB_Dir = PEM-Tropics B data !GTE_Filetypes = list of fiel extensions used with GTE data SUBROUTINES: REQUIREMENTS: It is assumed that this routine is called from DEFAULT_DIRS although it should be working stand-alone as well. NOTES: EXAMPLE: see default_dirs MODIFICATION HISTORY: mgs, 12 May 1999: VERSION 1.00 bmy & phs, 13 Jul 2007: GAMAP VERSION 2.10
(See /n/home09/ryantosca/IDL/gamap2/general/default_gte.pro)
NAME: DEFAULT_RANGE (function) PURPOSE: Make sure a RANGE argument or keyword is a valid vector with at least two elements. Can also be used to limit RANGE to two elements. The argument may be a string containing one or more numeric values delimited by almost any character combination (including '..' and '-'). A '-' will be treated as a separator if it is preceeded by a digit or not followed by a digit. The resulting range will be sorted and spans the minimum and maximum of the "data" given in the argument. CATEGORY: General CALLING SEQUENCE: RANGE = DEFAULT_RANGE( ARG, DEFAULT [,/LIMIT2] ) INPUTS: ARG -> The range argument or keyword as passed into a procedure or function. This can be an undefined variable or a variable with 1 or more elements. If ARG contains 1 element, it will be repeated to range from and to the same number. DEFAULT -> A 2-element vector containing the default range if ARG is undefined. This argument is mandatory although it is not used if ARG contains at least 1 element. KEYWORD PARAMETERS: /LIMIT2 -> Limit the resulting RANGE vector to 2 elements. Default is to return *at least* 2 elements. RANGE -> Limit the RANGE vector to minimum and maximum value given by this keyword. /NOSORT -> Do not sort the output. This can be useful for longitude vectors spanning the Pacific ;-) OUTPUTS: RANGE -> A two (or more) element vector that can be used in statements like WHERE(x ge RANGE[0] AND x lt RANGE[1]). SUBROUTINES: External Subroutines Required: ============================================ ISALGEBRAIC (function) ISDIGIT (function) STRBREAK (function) STRREPL (function) REQUIREMENTS: None NOTES: This function is meant for argument checking in procedures or functions, hence it will generally not be called from the command line. EXAMPLE: LATRANGE = DEFAULT_RANGE( LATRANGE, [-90.,90.] ) ; Suppose a procedure has a keyword parameter named ; LATRANGE. Before we use LATRANGE in any form, we ; should test it (as above). This ensures that we have ; at least 2 elements in LATRANGE and it defaults ; LATRANGE to the whole globe if nothing was passed ; in the LATRANGE keyword. MODIFICATION HISTORY: mgs, 29 Sep 1998: VERSION 1.00 mgs, 17 Nov 1998: - added string handling - added RANGE and NOSORT keywords bmy, 13 Jul 2001: TOOLS VERSION 1.48 - now uses new STRREPL function from mgs bmy, 16 Jul 2001: - bug fix: only call STRREPL if there are non-algebraic characters to be replaced - eliminate call to obsolete STR_SEP function bmy, 17 Jan 2002: TOOLS VERSION 1.50 - now call STRBREAK wrapper routine from the TOOLS subdirectory for backwards compatiblity for string-splitting bmy & phs, 13 Jul 2007: GAMAP VERSION 2.10
(See /n/home09/ryantosca/IDL/gamap2/general/default_range.pro)
NAME: DIFFERENCES PURPOSE: Creates absolute difference plots ( New - Old ) for GEOS-Chem tracers and OH. CATEGORY: Benchmarking CALLING SEQUENCE: DIFFERENCES, FILES, LEVELS, TAUS, TRACERS, VERSIONS, [, Keywords ] INPUTS: FILES -> A 2-element vector containing the names of files from the "old" and "new" GEOS-Chem model versions that are to be compared. LEVELS -> A 4-element vector containing the level indices for the GEOS-Chem surface layer and 500 hPa layer. for both models (e.g. SFC_1, SFC_2, 500_1, 500_2). NOTE: This is in Fortran notation (starting from 1!) TAUS -> A 2-element vector contaning TAU values (hours GMT from /1/1985) corresponding to the "old" and "new" GEOS-Chem model versions. TRACERS -> The list of transported tracers (i.e. diagnostic category "IJ-AVG-$"). VERSIONS -> A 2-element vector containing the version numbers for the "old" and "new" GEOS-Chem model versions. KEYWORD PARAMETERS: /DO_FULLCHEM -> Set this switch to plot the chemically produced OH in addition to the advected tracers. /DYNRANGE -> Set this switch to create plots using the whole dynamic range of the data. Default is to restrict the plot range to predetermined values as returned by routine GET_DIFF_RANGE. /PS -> Set this switch to generate PostScript output. OUTFILENAME -> If /PS is set, will write PostScript output to a file whose name is specified by this keyword. Default is "tracer_ratio.pro". OUTPUTS: None SUBROUTINES: Internal Subroutines Included: =================================================== PlotDiff External Subroutines Required: =================================================== CLOSE_DEVICE COLORBAR_NDIV (function) CTM_GET_DATA GET_DIFF_RANGE GETMODELANDGRIDINFO EXTRACT_FILENAME (function) MULTIPANEL MYCT OPEN_DEVICE TVMAP UNDEFINE REQUIREMENTS: References routines from the GAMAP package. NOTES: (1) Meant to be called from BENCHMARK_1MON. EXAMPLES: FILES = [ 'ctm.bpch.v7-04-10', 'ctm.bpch.v7-04-11' ] LEVELS = [ 1, 1, 13, 13 ] TAUS = [ NYMD2TAU( 20010701 ), NYMD2TAU( 20010701 ) ] TRACERS = INDGEN( 43 ) + 1 VERSIONS = [ 'v7-04-10', 'v7-04-11' ] DIFFERENCES, FILES, LEVELS, TAUS, TRACERS, VERSIONS, $ /DO_FULLCHEM, /PS, OUTFILENAME='myplot.ps' ; Creates ratio plots of two GEOS-CHEM versions ; (in this case v7-04-11 / v7-04-10) for July 2001. ; Output is sent to PostScript file "myplot.ps". ; The min and max of the data on each plot panel is ; restricted to pre-defined values returned by ; function GET_DIFF_RANGE. DIFFERENCES, FILES, LEVELS, TAUS, TRACERS, VERSIONS, $ /DO_FULLCHEM, /DYNRANGE, /PS, OUTFILENAME='myplot.ps' ; Same as the above example, but the min & max of ; each plot panel corresponds to the dynamic range ; of the data. MODIFICATION HISTORY: bmy, 14 Nov 2007: VERSION 1.01 - Initial version bmy, 20 Nov 2007: VERSION 1.02 - Now draw out-of-bounds triangles for the colorbar when using the "small" data ranges. New feature of TVMAP. bmy, 07 May 2008: VERSION 1.03 - Now allow for comparing models on 2 different vertical grids. bmy, 08 Feb 2011: VERSION 1.04 - Now display in the top-of-plot title if the dynamic range option is used. bmy, 08 Jun 2011: VERSION 1.05 - Added /NO_FULLCHEM keyword - Now call COLORBAR with the UPOS keyword to place the colorbar unit string properly - Now use appropriate settings for creating plots w/ the full dynamic range (/DYNRANGE) - Now restore !MYCT sysvar to previous settings upon exiting the program mps, 29 Mar 2013: - Now plot HO2 differences
(See /n/home09/ryantosca/IDL/gamap2/benchmark/differences.pro)
NAME: DIFFERENCES_AOD PURPOSE: Creates column difference maps of aerosol optical depths from 1-month GEOS-Chem benchmark simulation output. CATEGORY: Benchmarking CALLING SEQUENCE: DIFFERENCES_AOD, FILES, TAUS, TRACERS, VERSIONS, [, Keywords ] INPUTS: FILES -> A 2-element vector containing the names of files from the "red", 'green", and "blue" GEOS-Chem model versions that are to be compared. TAUS -> A 2-element vector contaning TAU values (hours GMT from /1/1985) corresponding to the "old" and "new" GEOS-Chem model versions. TRACERS -> The list of transported tracers (i.e. diagnostic category "IJ-AVG-$") to be plotted. VERSIONS -> A 2-element vector containing the model version names from the "red", 'green", and "blue" simulations. KEYWORD PARAMETERS: /DYNRANGE -> Set this switch to create plots using the entire dynamic range of the data (centered around zero). The default is to use pre-defined data ranges. /PS -> Set this switch to generate PostScript output. OUTFILENAME -> If /PS is set, will write PostScript output to a file whose name is specified by this keyword. Default is "tracer_ratio.pro". OUTPUTS: None SUBROUTINES: Internal Subroutines Provided: ========================================= PLOTDIFF External Subroutines Required: ========================================= OPEN_DEVICE CLOSE_DEVICE MULTIPANEL COLORBAR_NDIV (function) CTM_PLOT CHKSTRU (function) REQUIREMENTS: References routines from both GAMAP and TOOLS packages. NOTES: (1) Meant to be called from BENCHMARK_1MON. EXAMPLE: FILES = [ 'ctm.bpch.v9-02p', 'ctm.bpch.v9-02q' ] TAUS = [ NYMD2TAU( 20050701 ), NYMD2TAU( 20050701 ) ] TRACERS = [ 1, 2, 4 ] VERSIONS = [ 'v9-02p', 'v9-02q' ] DIFFERENCES_AOD, FILES, TAUS, TRACERS, VERSIONS, $ /PS, OUTFILENAME='myplot.ps' ; Creates difference maps from 2 different model versions ; using output from GEOS-Chem 1-month benchmark simulations. DIFFERENCES_AOD, FILES, TAUS, TRACERS, VERSIONS, /DYNRANGE, $ /PS, OUTFILENAME='myplot.ps' ; Same as above, but will create difference maps using ; the full dynamic range of the data (centered around zero) ; instead of using pre-defined min & max values. MODIFICATION HISTORY: bmy, 09 Nov 2007: VERSION 1.01 - Initial version bmy, 20 Dec 2007: VERSION 1.02 - Now pass the month as a keyword to put on the plot panel titles bmy, 02 Jun 2011: VERSION 1.03 - Make the colorbar a little wider - Reduce the character size CsFac to 0.75 to better display long plot titles - Now call COLORBAR with the UPOS keyword to place the colorbar unit string properly - Now use appropriate settings for creating plots w/ the full dynamic range (/DYNRANGE) - Also restore the !MYCT sysvar to defaults mps, 16 Sep 2013: - Modified for 1-month benchmark output bmy, 24 Jan 2014: GAMAP VERSION 2.17 - Updated comments
(See /n/home09/ryantosca/IDL/gamap2/benchmark/differences_aod.pro)
NAME: DIFF_2D_MET PURPOSE: Creates absolute difference plots ( New - Old ) for GEOS-Chem 2-D meteorology fields. CATEGORY: Benchmarking CALLING SEQUENCE: DIFF_2D_MET, FILES, TAUS, TRACERS, VERSIONS, [, Keywords ] INPUTS: FILES -> A 2-element vector containing the names of files from the "old" and "new" GEOS-Chem model versions that are to be compared. TAUS -> A 2-element vector contaning TAU values (hours GMT from /1/1985) corresponding to the "old" and "new" GEOS-Chem model versions. TRACERS -> The list of transported tracers (i.e. diagnostic category "IJ-AVG-$"). VERSIONS -> A 2-element vector containing the version numbers for the "old" and "new" GEOS-Chem model versions. KEYWORD PARAMETERS: /DYNRANGE -> Set this switch to create plots using the whole dynamic range of the data. Default is to restrict the plot range to predetermined values as returned by routine GET_DIFF_RANGE. /PS -> Set this switch to generate PostScript output. OUTFILENAME -> If /PS is set, will write PostScript output to a file whose name is specified by this keyword. Default is "tracer_ratio.pro". OUTPUTS: None SUBROUTINES: Internal Subroutines Included: =================================================== PlotDiff External Subroutines Required: =================================================== CLOSE_DEVICE COLORBAR_NDIV (function) CTM_GET_DATA GET_DIFF_RANGE GETMODELANDGRIDINFO EXTRACT_FILENAME (function) MULTIPANEL MYCT OPEN_DEVICE TVMAP UNDEFINE REQUIREMENTS: References routines from the GAMAP package. NOTES: (1) Meant to be called from BENCHMARK_1MON. EXAMPLES: FILES = [ 'ctm.bpch.v7-04-10', 'ctm.bpch.v7-04-11' ] TAUS = [ NYMD2TAU( 20010701 ), NYMD2TAU( 20010701 ) ] TRACERS = INDGEN( 43 ) + 1 VERSIONS = [ 'v7-04-10', 'v7-04-11' ] DIFF_2D_MET, FILES, TAUS, TRACERS, VERSIONS, $ /PS, OUTFILENAME='myplot.ps' ; Creates ratio plots of two GEOS-CHEM versions ; (in this case v7-04-11 / v7-04-10) for July 2001. ; Output is sent to PostScript file "myplot.ps". ; The min and max of the data on each plot panel is ; restricted to pre-defined values returned by ; function GET_DIFF_RANGE. DIFF_2D_MET, FILES, TAUS, TRACERS, VERSIONS, $ /DYNRANGE, /PS, OUTFILENAME='myplot.ps' ; Same as the above example, but the min & max of ; each plot panel corresponds to the dynamic range ; of the data. MODIFICATION HISTORY: mps, 02 Dec 2013: - Initial version, based on differences.pro ewl, 14 Mar 2016: - Fix bug in PlotPctDiff by passing Log=Log to TvMap
(See /n/home09/ryantosca/IDL/gamap2/benchmark/diff_2d_met.pro)
NAME: DIFF_3D_MET PURPOSE: Creates absolute difference plots ( New - Old ) for GEOS-Chem 3-D meteorology fields. CATEGORY: Benchmarking CALLING SEQUENCE: DIFF_3D_MET, FILES, LEVELS, TAUS, TRACERS, VERSIONS, [, Keywords ] INPUTS: FILES -> A 2-element vector containing the names of files from the "old" and "new" GEOS-Chem model versions that are to be compared. LEVELS -> A 4-element vector containing the level indices for the GEOS-Chem surface layer and 500 hPa layer. for both models (e.g. SFC_1, SFC_2, 500_1, 500_2). NOTE: This is in Fortran notation (starting from 1!) TAUS -> A 2-element vector contaning TAU values (hours GMT from /1/1985) corresponding to the "old" and "new" GEOS-Chem model versions. TRACERS -> The list of transported tracers (i.e. diagnostic category "IJ-AVG-$"). VERSIONS -> A 2-element vector containing the version numbers for the "old" and "new" GEOS-Chem model versions. KEYWORD PARAMETERS: /DYNRANGE -> Set this switch to create plots using the whole dynamic range of the data. Default is to restrict the plot range to predetermined values as returned by routine GET_DIFF_RANGE. /PS -> Set this switch to generate PostScript output. OUTFILENAME -> If /PS is set, will write PostScript output to a file whose name is specified by this keyword. Default is "tracer_ratio.pro". OUTPUTS: None SUBROUTINES: Internal Subroutines Included: =================================================== PlotDiff External Subroutines Required: =================================================== CLOSE_DEVICE COLORBAR_NDIV (function) CTM_GET_DATA GET_DIFF_RANGE GETMODELANDGRIDINFO EXTRACT_FILENAME (function) MULTIPANEL MYCT OPEN_DEVICE TVMAP UNDEFINE REQUIREMENTS: References routines from the GAMAP package. NOTES: (1) Meant to be called from BENCHMARK_1MON. EXAMPLES: FILES = [ 'ctm.bpch.v7-04-10', 'ctm.bpch.v7-04-11' ] LEVELS = [ 1, 1, 13, 13 ] TAUS = [ NYMD2TAU( 20010701 ), NYMD2TAU( 20010701 ) ] TRACERS = INDGEN( 43 ) + 1 VERSIONS = [ 'v7-04-10', 'v7-04-11' ] DIFF_3D_MET, FILES, LEVELS, TAUS, TRACERS, VERSIONS, $ /PS, OUTFILENAME='myplot.ps' ; Creates ratio plots of two GEOS-CHEM versions ; (in this case v7-04-11 / v7-04-10) for July 2001. ; Output is sent to PostScript file "myplot.ps". ; The min and max of the data on each plot panel is ; restricted to pre-defined values returned by ; function GET_DIFF_RANGE. DIFF_3D_MET, FILES, LEVELS, TAUS, TRACERS, VERSIONS, $ /DYNRANGE, /PS, OUTFILENAME='myplot.ps' ; Same as the above example, but the min & max of ; each plot panel corresponds to the dynamic range ; of the data. MODIFICATION HISTORY: mps, 02 Dec 2013: - Initial version, based on differences.pro
(See /n/home09/ryantosca/IDL/gamap2/benchmark/diff_3d_met.pro)
NAME: DIFF_CLOUDS PURPOSE: Creates absolute difference plots ( New - Old ) for cloud fraction (CLDTOT) and cloud optical depth (OPTD) in the surface - 500 hPa column. CATEGORY: Benchmarking CALLING SEQUENCE: DIFF_CLOUDS, FILES, TAUS, TRACERS, VERSIONS, [, Keywords ] INPUTS: FILES -> A 2-element vector containing the names of files from the "old" and "new" GEOS-Chem model versions that are to be compared. TAUS -> A 2-element vector contaning TAU values (hours GMT from /1/1985) corresponding to the "old" and "new" GEOS-Chem model versions. TRACERS -> The list of transported tracers (i.e. diagnostic category "IJ-AVG-$"). VERSIONS -> A 2-element vector containing the version numbers for the "old" and "new" GEOS-Chem model versions. KEYWORD PARAMETERS: /DYNRANGE -> Set this switch to create plots using the whole dynamic range of the data. Default is to restrict the plot range to predetermined values as returned by routine GET_DIFF_RANGE. /PS -> Set this switch to generate PostScript output. OUTFILENAME -> If /PS is set, will write PostScript output to a file whose name is specified by this keyword. Default is "tracer_ratio.pro". OUTPUTS: None SUBROUTINES: Internal Subroutines Included: =================================================== PlotAbsDiff PlotPctDiff External Subroutines Required: =================================================== CLOSE_DEVICE COLORBAR_NDIV (function) CTM_GET_DATA GET_DIFF_RANGE GETMODELANDGRIDINFO EXTRACT_FILENAME (function) MULTIPANEL MYCT OPEN_DEVICE TVMAP UNDEFINE REQUIREMENTS: References routines from the GAMAP package. NOTES: (1) Meant to be called from BENCHMARK_1MON. EXAMPLES: FILES = [ 'ctm.bpch.v7-04-10', 'ctm.bpch.v7-04-11' ] TAUS = [ NYMD2TAU( 20010701 ), NYMD2TAU( 20010701 ) ] TRACERS = [ 1, 2 ] VERSIONS = [ 'v7-04-10', 'v7-04-11' ] DIFF_CLOUDS, FILES, TAUS, TRACERS, VERSIONS, $ /DYNRANGE, /PS, OUTFILENAME='myplot.ps' ; Creates ratio plots of two GEOS-CHEM versions ; (in this case v7-04-11 / v7-04-10) for July 2001. ; Output is sent to PostScript file "myplot.ps". ; The min and max of the data on each plot panel ; corresponds to the dynamic range of the data. MODIFICATION HISTORY: mps, 23 Mar 2016: - Initial version
(See /n/home09/ryantosca/IDL/gamap2/benchmark/diff_clouds.pro)
NAME: DISTRIBUTE PURPOSE: Collect all the routine names and file names that are used in a given program. CATEGORY: General CALLING SEQUENCE: DISTRIBUTE [, ROUTINENAME ] INPUTS: ROUTINENAME -> (OPTIONAL) The name of the routine to be searched. If omitted, then the user will be prompted to supply a file name via a dialog box. KEYWORD PARAMETERS: OUTFILE -> Name of file where output will be sent. If OUTFILE is omitted then DISTRIBUTE will print the information to the screen. /NO_IDL -> Set this switch to exclude IDL library routines from the search process. OUTPUTS: A list of filenames with full pathnames and a list of routinenames together with the filenames where they can be found. Sorry, for local files, no pathname is provided. SUBROUTINES: External Subroutines Required: =============================== OPEN_FILE REQUIREMENTS: Requires routines from the TOOLS package. NOTES: Unfortunately there is no way to figure out which routines really belong to a given ROUTINENNAME, so DISTRIBUTE will always return too many routinenames and filenames, including itself and FILE_EXIST, as well as a couple of IDL standard library routines (The latter can be left out with the keyword NO_IDL). In order to get the closest results, run DISTRIBUTE only at the start of an IDL session. EXAMPLE: DISTRIBUTE, 'iterate' ; Get all routines that belong to "iterate.pro". ; A subsequent call with routinename 'create_master' ; will return both, the routines for "create_master.pro" ; and the routines for "iterate.pro". MODIFICATION HISTORY: mgs, 16 Nov 1997: VERSION 1.00 mgs, 20 Nov 1997: - added OUTFILE and NO_IDL keywords bmy & phs, 13 Jul 2007: GAMAP VERSION 2.10 - Now use IDL routine RESOLVE_ALL - Now use OPEN_FILE instead of OPENW - Updated comments, cosmetic changes
(See /n/home09/ryantosca/IDL/gamap2/general/distribute.pro)
NAME: DOCUMENT_COLOR_TABLE PURPOSE: Displays all of the color tables within a standard IDL *.tbl file. Can display output to the Xwindow device, or create PostScript and PDF output. CATEGORY: Color CALLING SEQUENCE: DOCUMENT_COLOR_TABLE [, Keywords ] INPUTS: None KEYWORD PARAMETERS: FILE -> Name of the the color table (*.tbl) file to read. Default is "gamap_colors.tbl". /PS -> Set this switch to print output to a PostScript document instead of plotting to the screen. /PDF -> Set this switch to create a PostScript document and then also create a PDF document. OUTPUTS: None SUBROUTINES: None REQUIREMENTS: The Unix utility "ps2pdf" must be installed on your system for the /PDF keyword to work. The ps2pdf utility should come standard with most Unix or Linux builds. NOTES: None EXAMPLES DOCUMENT_COLOR_TABLE ; Prints out the color tables to the screen. ; Will set a 900x900 pixel window by default. DOCUMENT_COLOR_TABLE, /PS ; Prints color tables to a PostScript file ; called "table_info.ps". DOCUMENT_COLOR_TABLE, /PDF ; Prints out the color tables to a PostScript file ; "table_info.ps", then also creates a PDF file ; "table_info.pdf" using "ps2pdf". MODIFICATION HISTORY: phs, 21 Apr 2008: VERSION 1.00 phs, 25 Mar 2009: GAMAP VERSION 2.13 - Added FUN keyword
(See /n/home09/ryantosca/IDL/gamap2/color/document_color_table.pro)
NAME: DRAWDOTONMAP PURPOSE: Draws a dot atop a world map, in order to highlight a given (lat,lon) location. Also prints a label next to the point, and draws a line from the point to the label. CATEGORY: Plotting CALLING SEQUENCE: DRAWDOTONMAP, X, Y, R, THETA, NAME, COLOR [, ALIGN=ALIGN ] INPUTS: X -> Longitude of the point to be drawn (degrees) Y -> Latitude of the point to be drawn (degrees) R -> Radius (in degrees) of the line that will extend from the point to the the label. THETA -> Angle (in the trigonometric sense, 0=due east) which specifies the direction of the line that will connect the plot label to the point. NAME -> String for the plot label. Default is ''. COLOR -> Color of the point to be plotted. Default is !MYCT.BLACK. KEYWORD PARAMETERS: ALIGN -> Specifies the alignment of NAME. Works in the same way as the ALIGN keyword to XYOUTS (e.g. ALIGN=0 is left-justified, ALIGN=0.5 is centered, ALIGN=1 is right-justified). OUTPUTS: None SUBROUTINES: External Subroutines Required: =============================== SYM (function) REQUIREMENTS: Assumes that we are using a MYCT-defined colortable. NOTES: None EXAMPLE: MAP_SET, LIMIT=[ 10, -140, 55,-40 ], GRID=0, $ COLOR=!MYCT.BLACK, /CYL, /NOBORDER MAP_CONTINENTS, /COUNTRIES, /COASTS, $ COLOR=!MYCT.BLACK, /USA DRAWDOTONMAP, -71, 42, 3, 0, 'Harvard', !MYCT.RED ; Draws a USA map and then plots a dot at the (lat,lon) ; of Harvard University. The label will be plotted 3 ; units away along THETA=0 (due east). MODIFICATION HISTORY: bmy & phs, 13 Jul 2007: GAMAP VERSION 2.10
(See /n/home09/ryantosca/IDL/gamap2/plotting/drawdotonmap.pro)