IDL Access Tools

Introduction  |   Getting Started  |  Tutorial:  1  2  3  4  5  |   Extended Help

** DRAFT ** DRAFT ** ** DRAFT ** DRAFT ** ** DRAFT **



Tutorial:

3. X-Y plots of SDS data in P-Cube or TOVS Path-P files

This section of the tutorial will explain how to display a time-series plot of the data value for one pixel (column,row) of a specific sds_name, how to convert between (column,row) and (latitude,longitude) coordinates, and how to display a scatter plot of two sds_names for a given date. You will learn how to use:


EASE_CONVERT - Converting (lat,lon) to (col,row) coordinates and EASE_INVERSE - Converting (col,row) to (lat,lon) coordinates

The IDL tools include coordinate conversion routines for converting between (latitude,longitude) and (column,row) coordinates for all of the Polar Pathfinder EASE-Grids. The P-Cube data are stored in the coarsest resolution grid, designated 'NPATHP', the TOVS 100 km grid, but these routines will work for all of the Polar Pathfinder EASE-Grids.

Both routines, EASE_CONVERT and EASE_INVERSE, are functions requiring five input arguments. The function result will be 0 for normal, successful return, or -1 in the event of an error, (an unknown grid name, or if the input coordinates are not on the input grid). The first argument is always the grid name. To determine the P-Cube (and TOVS) grid cell that contains the North Pole, for example, call EASE_CONVERT like this:

IDL> status=ease_convert('NPATHP',90.,0.,col,row)
IDL> print,status,col,row
       0      33.0000      33.0000
IDL>

To perform the reverse operation, and find out the (latitude,longitude) coordinates of (the center of) a given grid cell, say, the cell at column 20, row 35 of the P-Cube EASE-Grid, use:

IDL> status=ease_inverse('NPATHP',20,35,lat,lon)
IDL> print,status,lat,lon
       0      78.1185     -81.2538

And, finally, if you wanted to know what (column,row) coordinates correspond to this location in the AVHRR 5km grid, and the SMMR-SSM/I 25 km grid, you could find this out with:

IDL> status=ease_convert('NA5',lat,lon,avhrr_col,avhrr_row)
IDL> print,status,avhrr_col,avhrr_row
       0      642.000      942.000
IDL> status=ease_convert('NL',lat,lon,ssmi_col,ssmi_row)
IDL> print,status,ssmi_col,ssmi_row
       0      308.000      368.000
IDL>

And use these (column,row) coordinates to subset the respective full-resolution products for this same geographic location.

Please refer to the Extended Help Documentation for complete details on EASE_CONVERT and EASE_INVERSE.


PPP_PLOT - Plotting a time-series of SDS data from a given pixel

Now that you know how to determine the particular pixel coordinates for a given (latitude,longitude), you can use PPP_PLOT to extract data values for that pixel, and display a time-series plot for a range of dates. PPP_PLOT has three required arguments, sds_name, and the column and row coordinates to extract. It also accepts a number of specific keywords, and makes use of IDL's keyword inheritance capability, by accepting and passing along any keywords that are valid for IDL's PLOT procedure.

Like PPP_STATS and PPP_ANIMATE, PPP_PLOT accepts keywords for a date range (START_DATE and END_DATE), or an array of interesting dates (DATES). The defaults are the beginning and end of all data found under the current directory.

P-cube Example
TOVS Path-P Example

Please refer to the Extended Help Documentation for details on the other keywords to PPP_PLOT.


PPP_COMPARE - Making a scatter plot of two SDS arrays for a given date

Another interesting plot display is the scatter plot produced by PPP_COMPARE. PPP_COMPARE has three required arguments, the sds_name to plot on the X-axis, the sds_name to plot on the Y-axis, and the date. Like PPP_PLOT, it makes use of IDL's keyword inheritance capability, by accepting and passing along any keywords that are valid for IDL's PLOT procedure. It also accepts the CURSOR keyword, for interactive mouse behavior.

P-cube Example
TOVS Path-P Example

You can use any keywords to PPP_COMPARE that would normally be accepted by PLOT, to customize the plot being displayed, for example, you can shorten the strings used for XTITLE or YTITLE.

Please refer to the Extended Help Documentation for details on the other keywords to PPP_COMPARE.


Next tutorial section