MERIS IDL General Purpose Tools

Issue 1.1

November 2000

 

Interfacing w/ scientific formats

Interfacing w/ scientific formats

Last modified: Fri Oct 27 15:16:13 2000.


List of Routines


Routine Descriptions

HDF_SAVE_STRUCT

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

 PURPOSE:
     saves the content of a structure in a HDF file

 CATEGORY:
     I/O

 CALLING SEQUENCE:
     HDF_SAVE_STRUCT, FILE, DATA
 
 INPUTS:
     FILE - output HDF filename
     DATA - structured variable

 OPTIONAL INPUTS:
     None
      
 KEYWORD PARAMETERS:
     None

 OUTPUTS:
     None

 OPTIONAL OUTPUTS:
     None

 COMMON BLOCKS:
     None

 SIDE EFFECTS:
     Unknown

 RESTRICTIONS:;    
     The structured variable needs to hold tags of type (integer,
     character etc.) that should be compatible with HDF data format.

 PROCEDURE:


 EXAMPLE:
     data = {image:dist(256), name:'Test Image', flag:1, valid_range:[0L,200L]}
     hdf_save_struct, 'test.hdf', data
     hdf_info, 'test.hdf'

 MODIFICATION HISTORY:
   Created by Liam Gumley - http://cimss.ssec.wisc.edu/~gumley
   Documentation provided by Vincent Fournier-Sicre - vfs@acri.fr -
   Dec. 1999

(See $IDL_LOCAL/scientific_format/hdf_save_struct.pro)


NCBROWSE

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

 PURPOSE:
	provides an interface for users to browse generic NetCDF files
	It allows textual display of data, one- and two-
	dimensional plots of various types, and animations of these plots.

 AUTHOR:
	Matt Segur (msegur@colorado.edu)

 CATEGORY:
	Widgets.

 CALLING SEQUENCE:
	ncbrowse[, filename]

 INPUTS:

 OPTIONAL INPUT PARAMETERS:
	filename:  A string containing the name of the file to use. If not
		   specified, a file selection widget is used.

 KEYWORD PARAMETERS:
	GROUP:	The widget ID of the widget that calls ncbrowse.  When this
		ID is specified, the death of the caller results in the death
		of ncbrowse.
	HELP:	This option will print this header and exit.

 OUTPUTS:

 OPTIONAL OUTPUT PARAMETERS:

 COMMON BLOCKS:
	globs, datadisp_blk, helpdisp_blk, getvar_blk, prefs_blk, animate_blk,
	filename_blk

 SIDE EFFECTS:
	Initiates the XMANAGER if it is not already running.

 RESTRICTIONS:
	Under IDL 3.5.x, it may be necessary to enlarge some windows manually
	after initially invisible buttons have been created.

 PROCEDURE:
	Create and register the widget and then exit.

 MODIFICATION HISTORY:
	Created from a template written by: Steve Richards, January, 1991.

(See $IDL_LOCAL/scientific_format/ncbrowse.pro)


NCDF_SAVE_STRUCT

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

 PURPOSE:
     saves the content of a structure in a NCDF file
     The tags of the structure have to be 2-dimensional
     w/ same size.

 CATEGORY:
     I/O

 CALLING SEQUENCE:
     NCDF_SAVE_STRUCT, FILE, DATA
 
 INPUTS:
     FILE - output NCDF filename
     DATA - structured variable

 OPTIONAL INPUTS:
     None
      
 KEYWORD PARAMETERS:
     None

 OUTPUTS:
     None

 OPTIONAL OUTPUTS:
     None

 COMMON BLOCKS:
     None

 SIDE EFFECTS:
     Unknown

 RESTRICTIONS:;    
     The structured variable needs to hold  2-dimensional tags of
     same size and of type (integer, character etc.) that should be
     compatible with NCDF data format.

 PROCEDURE:


 EXAMPLE:
     data = {image:dist(256), name:'Test Image', flag:1, valid_range:[0L,200L]}
     ncdf_save_struct, 'test.cdf', data

 MODIFICATION HISTORY:
   Created by Liam Gumley - http://cimss.ssec.wisc.edu/~gumley
   Documentation provided by Vincent Fournier-Sicre - vfs@acri.fr -
   Dec. 1999

   Modified by Vincent Fournier-Sicre to save into a NetCDF file
   instead of a HDF file.
   June 2000

(See $IDL_LOCAL/scientific_format/ncdf_save_struct.pro)


READ_CDF

[Previous Routine] [List of Routines]

 (C) Cooperative Institute for Meteorological Satellite Studies, 1998

 NAME:
       READ_CDF

 PURPOSE:
       reads data from a netCDF format file

 CATEGORY:
       General

 CALLING SEQUENCE:
       result = read_cdf( cdf_file, $       ; Input
                          variable_list )   ; Input

 OPTIONAL INPUTS:
       cdf_file:        A string containing the name of the netCDF data file
                          to be read. If the file name is not supplied, a dialog
                          widget opens allowing the file to be selected
                          interactively.
       variable_list:   A string array containing the names of the variables
                          in the netCDF file to read.
	

 OUTPUTS:
       The function returns the specified variables in a data structure in the order
         in which they appear in variable list.

       The function returns -1 if an error occurs.

 COMMON BLOCKS:
       None.

 CALLS:
       None.

 SIDE EFFECTS:
       None known.

 RESTRICTIONS:
       The variable names have to be specified EXACTLY as they appear in the file.

 PROCEDURE:
       The commands to extract the required variables are created in line and executed.
         Information about the dimensionality of the netCDF file is output to screen.

 EXAMPLE:
       To read the variables "wnum1" and "basetime" from a netCDF file test.nc:

         IDL> result = read_cdf( 'test.nc', ['wnum1', 'base_time'] )
                   Number of dimensions        :       2
                   Number of variables         :     187
                   Number of global attributes :       2
                   ID of unlimited dimension   :       1
         IDL> PRINT, TAG_NAMES( result )
         WNUM1 BASE_TIME
         IDL> HELP, result.wnum1, result.base_time
             DOUBLE    = Array[2655]
             LONG      =    913935643

 MODIFICATION HISTORY:
       Written by:     Paul van Delst, CIMSS/SSEC 21-Aug-1998
                       paul.vandelst@ssec.wisc.edu

 $Log: read_cdf.pro,v $
 Revision 1.1.1.1  2000/09/26 11:32:17  uwe
 initial import of sources (binaries excluded)

 Revision 1.4  1999/03/07 02:28:54  paulv
 - Removed ASSERTION calls. If statements are used and a RETURN value of
   -1 is used to indicate a problem.
 - Added capability to read scalars from netCDF file.

 Revision 1.3  1998/11/20 16:50:57  paulv
 Updated in-line documentation.

 Revision 1.2  1998/09/06 22:08:56  paulv
 Removed check for latitude and longitude dimensions. Retained
   from read_cdftopography.pro...the precursor to this utility.

 Revision 1.1.1.1  1998/09/06 21:40:12  paulv
 Imported source




(See $IDL_LOCAL/scientific_format/read_cdf.pro)


HOME|Index|Work in Progress