Close

Service Interruption

TOVS Path-P IDL Tools Tutorial


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

Example 4: PPP_EXTRACT, PPP_SAVE, and PPP_RESTORE

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

TOVS Path-P PPP_EXTRACT Example:

This example uses PPP_EXTRACT for eight days of TEMP-50 data in the winter of 1990. Use the following command:

IDL> status = ppp_extract(data,'temp-50', dates=1990001+indgen(8), /verbose, SDS_INFO=sds_info, LABELS=extract_dates)

Which should result in output similar to the following:

% PPP_EXTRACT: > ...opening ./1990/tpp_n100_1990001_daily.v3-2.hdf...
% PPP_EXTRACT: > ...opening ./1990/tpp_n100_1990002_daily.v3-2.hdf...
% PPP_EXTRACT: > ...opening ./1990/tpp_n100_1990003_daily.v3-2.hdf...
% PPP_EXTRACT: > ...opening ./1990/tpp_n100_1990004_daily.v3-2.hdf...
% PPP_EXTRACT: > ...opening ./1990/tpp_n100_1990005_daily.v3-2.hdf...
% PPP_EXTRACT: > ...opening ./1990/tpp_n100_1990006_daily.v3-2.hdf...
% PPP_EXTRACT: > ...opening ./1990/tpp_n100_1990007_daily.v3-2.hdf...
% PPP_EXTRACT: > ...opening ./1990/tpp_n100_1990008_daily.v3-2.hdf...

Print the status to verify that the procedure was successful (1 for success or 0 if an error occurred) using the following command. This should result in the output of a 1. If the command returns a 0, check your input parameters to verify that you entered them correctly.

IDL> print,status
1

If the value of the status is 1, then print out information about sds_info using the following command:

IDL> help,sds_info,/str

Which should result in output similar to the following:

** Structure SDS_INFO, 7 tags, length=48:
NAME STRING 'TEMP-50'
LABEL STRING 'TEMP: temperatures [K] at pressure level 50'
UNIT STRING 'K'
LAYER_NUM INT 2
FILL_VALUE FLOAT -99999.0
CALIBRATION_FACTORDOUBLE 1.0000000
UNCALIBRATED_OFFSETDOUBLE

Print out the extract_dates using the following command:

IDL> print,extract_dates

Which should result in output similar to the following:

1990001 1990002 19900003 1990004 1990005 1990006 1990007 1990008

Return to tutorial

TOVS Path-P PPP_SAVE and PPP_RESTORE Example:

IDL> save_dir = GETENV('HOME') ; or set save_dir to some directory you can write to
IDL> save_file = save_dir + '/tovs_temps_50.dat'
IDL> ppp_save,data,extract_dates,sds_info,save_file
IDL> ppp_restore,restored_data,restored_labels,restored_sds_info,save_file

The restored variables will contain copies of the originals. Please refer to the Extended Help Documentation for details on using PPP_SAVE and PPP_RESTORE.

Return to tutorial

Contact Us | NSIDC Web Policy | Use & Copyright | Our Sponsors

The National Snow and Ice Data Center

Supporting Cryospheric Research Since 1976
449 UCB  University of Colorado  Boulder, CO 80309-0449

Cooperative Institute for Research in Environmental Sciences (CIRES)    University of Colorado Boulder