TOVS Path-P IDL Tools Tutorial


Introduction  |   Getting Started  |   Tutorial1  2  3  4  |   Example:  1  2  3  4  |   Extended Help

Example 2: PPP_SHOW and PPP_ANIMATE

This Web page provides examples of how to use the following IDL routines for the TOVS Path-P data set:

TOVS Path-P PPP_SHOW Example:

To display the TOVS Path-P parameter we used previously for 5 January 1990, enter the following command at the IDL prompt:

IDL> ppp_show,'temp-50',date=1990005

The result should be a window with the data scaled to color indices from 0 to !d.n_colors-2 (reserving the final 2 indices for customization) with a descriptive label at the bottom right, the date at the bottom left, and a legend along the right hand side. The colors will probably appear as shades of gray similar to the image below.

TOVS Temperatures at Pressure Level 50, Jan. 5, 1990, Black/White, No Overlays

To change to another color palette and add some overlays, enter the following commands:


IDL> loadct,13
IDL> num = !d.table_size
IDL> ppp_show,'temp-50',date=1990005,map_color=num-1,grat_color=num-2

If you like the rainbow palette, but would like the overlays to appear white, enter the following commands:


IDL> tvlct,r,g,b,/get
IDL> num = n_elements(r)
IDL> r[num-2:num-1]=255
IDL> g[num-2:num-1]=255
IDL> b[num-2:num-1]=255
IDL> tvlct,r,g,b
IDL> ppp_show,'temp-50',date=1990005,map_color=num-1,grat_color=num-2

You should see something similar to the image below:

TOVS Temperatures at Pressure Level 50, Jan. 5, 1990, Color, With Overlays

PPP_SHOW also accepts a keyword, CURSOR, that allows you to have interactive output of displayed data by clicking your mouse in the display window. To do this, enter the following command:

IDL> ppp_show,'temp-50',date=1990005,map=num-1,grat=num-2,/cursor

As you left- or middle-click the mouse in the display window, you should see output in your IDL window that displays (column, row) and (latitude,longitude) coordinates and the data value at the pixel currently under the mouse. Pressing the right mouse button will exit and return you to the IDL command line.

Return to tutorial


TOVS Path-P PPP_ANIMATE Example:

The following is an example of how to run PPP_ANIMATE for a short, 10-day movie of T_TEMPERATURE-50 data for the first week of February 1988. Enter the following commands:

IDL> ppp_animate,'temp-50',start_date=1990002,end_date=1990011,map=num-1,grat=num-2,/verbose

Alternatively, you can subset the dates array returned from PPP_TOC:

IDL> ppp_animate,'t_temperature-50',dates=dates[32:41],map=num-1,grat=num-2,/verbose

You can also create your own dates array using the following command:

IDL> ppp_animate,'temp-50',dates=1990002+indgen(10),map=num-1,grat=num-2,/verbose

Using any of the above commands should result in an IDL xinteranimate widget with a movie that includes frames of PPP_SHOW output. Setting the VERBOSE keyword will display a message for each file opened and will allow you to estimate how long the animation may take for longer lists of dates on your system.

If you want each frame to be scaled to a global minimum and maximum value, instead of being scaled to the relative min/max of data for that frame, you can use PPP_STATS for the same range of dates and use the global min/max from PPP_STATS as the MIN_VALUE and MAX_VALUE keywords to PPP_ANIMATE using the following commands:

IDL> ppp_stats,'temp-50',dates=1990002+indgen(10),GLOBAL_STATS=stats
IDL> ppp_animate,'temp-50',dates=1990002+indgen(10),MIN_VALUE=stats.minimum, MAX_VALUE=stats.maximum

Return to tutorial