J routines

All GAMAP Routines

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

Last modified: Tue Apr 4 10:50:25 2017.


List of Routines


Routine Descriptions

JPEG2PS

[Next Routine] [List of Routines]
 NAME:
        JPEG2PS

 PURPOSE:
        Translates JPEG images to PostScript format.

 CATEGORY:
        Graphics

 CALLING SEQUENCE:
        JPEG2PS [, FILENAME [, Keywords ] ]

 INPUTS:
        FILENAME (optional) -> Name of the input JPEG file.  
             If FILENAME is omitted then JPEG2PS will prompt
             the user to supply a file name via a dialog box.
             FILENAME may contain wild card characters.

 KEYWORD PARAMETERS:
        OUTFILENAME -> Name of the output PostScript file.
             Default is "idl.ps".

        /FLIP_BW -> Set this keyword to turn black pixels into
             white pixels and vice-versa.  This is useful for
             creating PostScript files of JPEG images that have a 
             dark background color. 

        XOFFSET, YOFFSET (optional) -> Set these keywords to specify
             the X and Y Margins in inches.  Defaults are 
             XMARGIN = 0.5 inches and YMARGIN = 0.5 inches.
 
        _EXTRA=e -> Picks up extra keywords for OPEN_DEVICE,
             TVIMAGE, and CLOSE_DEVICE.

 OUTPUTS:
        Sends output to a PostScript file, whose name is given
        by the OUTFILENAME keyword.

 SUBROUTINES:
        External subroutines required:
        ------------------------------
        EXTRACT_FILEPATH (function)
        DIALOG_PICKFILE  (function)
        TVIMAGE

 REQUIREMENTS:
        References routines from the TOOLS package.

 NOTES:
        (1) Image processing options are limited to flipping the
            black and white pixels.  This should be good enough
            for most purposes.

        (2) XMARGIN and YMARGIN assume that we are printing out for
            standard USA 8.5 x 11" page.  Device sizes listed below
            are also in inches. 
 
        (3) Refer to the READ_JPEG procedure manual pages for
            JPEG image handling options. 

 EXAMPLE:
        (1)
        JPEG2PS, 'my_jpg.jpg', OUTFILENAME='my_ps.ps'

             ; Translates the image in "my_jpg.jpg" to 
             ; the PostScript file "my_ps.ps".

        (2)
        JPEG2PS, 'my_jpg.jpg', OUTFILENAME='my_ps.ps', /FLIP_BW
        
             ; Same as in (1), but also changes all black
             ; pixels to white and vice-versa.  

        (3)
        JPEG2PS, 'my_jpg.jpg', OUTFILENAME='my_ps.ps', /FLIP_BW, $
             XMARGIN=0.5, YMARGIN=0.5
        
             ; Same as in (2), but also will "pad" the image with
             ; 0.5" of white space around each side.

 MODIFICATION HISTORY:
        bmy, 28 Jan 2000: VERSION 1.45
  bmy & phs, 13 Jul 2007: GAMAP VERSION 2.10

(See /n/home09/ryantosca/IDL/gamap2/graphics/jpeg2ps.pro)


JV_DIFF

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
        JV_DIFF

 PURPOSE:
        Creates difference (new - old) plots of J-values at both the
        surface and 500 hPa. 
       
 CATEGORY:
        Benchmarking

 CALLING SEQUENCE:
        JV_DIFF, FILES, LEVELS, TAUS, 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.

        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 +/- 5%.

        /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.

 OUTPUTS:
        None

 SUBROUTINES:
        External Subroutines Required:
        ==================================================
        PlotJVDiff

        External Subroutines Required:
        ==================================================
        CLOSE_DEVICE          COLORBAR_NDIV    (function)
        CTM_GET_DATA          EXTRACT_FILENAME (function)       
        GETMODELANDGRIDINFO   MULTIPANEL         
        MYCT                  OPEN_DEVICE   
        TVMAP  

 REQUIREMENTS:
        References routines from the GAMAP package.

 NOTES:
        (1) Meant to be called from BENCHMARK_1MON

 EXAMPLE:
        FILES    = [ 'ctm.bpch.v7-04-10', 'ctm.bpch.v7-04-11' ]
        LEVELS   = [ 1, 1, 13, 13 ]
        TAUS     = [ NYMD2TAU( 20010701 ), NYMD2TAU( 20010701 ) ]
        VERSIONS = [ 'v7-04-10', 'v7-04-11' ]
 
        JV_DIFF, FILES, LEVELS, TAUS, VERSIONS, $
             /PS, OUTFILENAME='myplot.ps'

             ; Creates J-value difference plots [ v7-04-11 - v7-04-10 ]
             ; for July 2001 at the surface and 500 hPa.
             ; The max & min of the data will be fixed at +/- 5%.

        JV_DIFF, FILES, LEVELS, TAUS, VERSIONS, $
             /DYNRANGE, /PS, OUTFILENAME='myplot.ps'

             ; Same as above, but this time the full dynamic
             ; range of the data will be displayed.

 MODIFICATION HISTORY:
        mps, 02 Dec 2013: - Initial version, based on jv_ratios.pro
  mps & bmy, 29 May 2014: GAMAP VERSION 2.18
                          - Compatible with extra J-Value tracers
                            in v10-01c and higher versions
 

(See /n/home09/ryantosca/IDL/gamap2/benchmark/jv_diff.pro)


JV_MAP

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
        JV_MAP

 PURPOSE:
        Creates plots of J-values at both the surface and 500 hPa. 
       
 CATEGORY:
        Benchmarking

 CALLING SEQUENCE:
        JV_MAP, FILE, LEVELS, TAU, VERSION, [, Keywords ]

 INPUTS:
        FILE -> The name of the file containing data to be plotted.

        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!)

        TAU -> The TAU value (hours GMT from /1/1985) corresponding
             to the data to be plotted.

        VERSION -> The model version number corresponding to the
             data to be plotted.

 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 +/- 5%.

        /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.

 OUTPUTS:
        None

 SUBROUTINES:
        Internal Subroutines Required:
        ==================================================
        PlotJVMap

        External Subroutines Required:
        ==================================================
        CLOSE_DEVICE          COLORBAR_NDIV    (function)
        CTM_GET_DATA          EXTRACT_FILENAME (function)       
        GETMODELANDGRIDINFO   MULTIPANEL         
        MYCT                  OPEN_DEVICE   
        TVMAP  

 REQUIREMENTS:
        References routines from the GAMAP package.

 NOTES:
        (1) Meant to be called from BENCHMARK_1MON

 EXAMPLE:
        FILE     = 'ctm.bpch.v10-01i'
        LEVELS   = [ 1, 1, 13, 13 ]
        TAUS     = NYMD2TAU( 20130701 )
        VERSIONS = 'v10-01i'
 
        JV_MAP, FILES, LEVELS, TAUS, VERSIONS, $
             /PS, OUTFILENAME='myplot.ps'

             ; Creates J-value plots for v10-01i for July 2013
             ; at the surface and 500 hPa.
             ; The max & min of the data will be fixed at +/- 5%.

        JV_MAP, FILE, LEVELS, TAU, VERSION, $
             /DYNRANGE, /PS, OUTFILENAME='myplot.ps'

             ; Same as above, but this time the full dynamic
             ; range of the data will be displayed.

 MODIFICATION HISTORY:
        mps, 19 Apr 2014: VERSION 1.01
                          - Adapted from jv_ratio.pro
  mps & bmy, 29 May 2014: GAMAP VERSION 2.18
                          - Compatible with extra J-Value tracers
                            in v10-01c and higher versions
 

(See /n/home09/ryantosca/IDL/gamap2/benchmark/jv_map.pro)


JV_RATIO

[Previous Routine] [List of Routines]
 NAME:
        JV_RATIO

 PURPOSE:
        Creates ratio (new/old) plots of J-values at both the surface
        and 500 hPa. 
       
 CATEGORY:
        Benchmarking

 CALLING SEQUENCE:
        JV_RATIO, FILES, LEVELS, TAUS, 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.

        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 +/- 5%.

        /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.

 OUTPUTS:
        None

 SUBROUTINES:
        External Subroutines Required:
        ==================================================
        ComputeJVRatios       PlotJVRatios

        External Subroutines Required:
        ==================================================
        CLOSE_DEVICE          COLORBAR_NDIV    (function)
        CTM_GET_DATA          EXTRACT_FILENAME (function)       
        GETMODELANDGRIDINFO   MULTIPANEL         
        MYCT                  OPEN_DEVICE   
        TVMAP  

 REQUIREMENTS:
        References routines from the GAMAP package.

 NOTES:
        (1) Meant to be called from BENCHMARK_1MON

 EXAMPLE:
        FILES    = [ 'ctm.bpch.v7-04-10', 'ctm.bpch.v7-04-11' ]
        LEVELS   = [ 1, 1, 13, 13 ]
        TAUS     = [ NYMD2TAU( 20010701 ), NYMD2TAU( 20010701 ) ]
        VERSIONS = [ 'v7-04-10', 'v7-04-11' ]
 
        JV_RATIO, FILES, LEVELS, TAUS, VERSIONS, $
             /PS, OUTFILENAME='myplot.ps'

             ; Creates J-value ratio plots [ v7-04-11 / v7-04-10 ]
             ; for July 2001 at the surface and 500 hPa.
             ; The max & min of the data will be fixed at +/- 5%.

        JV_RATIO, FILES, LEVELS, TAUS, VERSIONS, $
             /DYNRANGE, /PS, OUTFILENAME='myplot.ps'

             ; Same as above, but this time the full dynamic
             ; range of the data will be displayed.

 MODIFICATION HISTORY:
        bmy, 14 Aug 2002: VERSION 1.01
                          - Adapted from Isabelle Bey's "cat_plot.pro"
                          - you may now specify different TAU values
        bmy, 13 Sep 2002: VERSION 1.02
                            for FILENEW and FILEOLD via the TAU0 keyword
        bmy, 04 Oct 2004: VERSION 1.03
                          - Remove MIN_VALID from call to TVMAP
        bmy, 09 Nov 2007: VERSION 1.04
                          - Modified argument list and some 
                            internal variable names.
        bmy, 20 Nov 2007: VERSION 1.05
                          - 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.06
                          - Now allow for comparing models on 2
                            different vertical grids.
        bmy, 08 Feb 2011: VERSION 1.07
                          - Now display in the top-of-plot title
                            if the dynamic range option is used.
        bmy, 08 Jun 2011: VERSION 1.08
                          - Now create log plots in range 0.5 - 2.0
                          - Added /DO_FULLCHEM keyword
                          - Adjust colorbar so that the 0.9 - 1.1
                            range shows up in white.
                          - Now restore !MYCT sysvar to previous
                            settings upon exiting the program
  mps & bmy, 29 May 2014: GAMAP VERSION 2.18
                          - Compatible with extra J-Value tracers
                            in v10-01c and higher versions; 

(See /n/home09/ryantosca/IDL/gamap2/benchmark/jv_ratio.pro)