Re: netCDF software -- discussion initiation

John Caron writes:
 >Well, I'd like to ask if anyone has/is writing a "generic"
 >data visualization package in IDL for netcdf files?  Is there
 >any interest in such?
 >

1.
*SOME GENERAL COMMENTS*
I doubt you can do much more than:

        IDL> ncdf_cat,netcdf_file

at the command line.  Possibly adding an option to display the data or print
the attributes would help.

There are more possibilities with widgets.  Maybe a front end to envi?  Or just
a widget to allow display of hyperslabs of 2-D, 3-D, ... variables and plotting
of 1-D variables could be developed.  Or a movie along the unlimited dimension?

2.
*MY EXPERIENCE*
I am currently using netCDF in my laboratory where I store images and the
accompanying auxiliary data in netCDF files.  The auxiliary data are stored in
global attributes (for experiment-level data) and in variables (for image-level
data).  In IDL these auxiliary data are stored in anonymous structures and
passed in common blocks to all the relevant routines.

One nice IDL feature that I employ is the ability to redefine anonymous
structures that contain the the auxiliary data.  In this way the auxiliary data
can change from experiment to experiment, and the tags in the structures are
changed automatically to correspond to the current set of auxiliary data.
During acquisition, the IDL variables determine (automatically) what gets put
into the netCDF file.  During post-experiment processing, the netCDF file
drives the structure definitions in IDL.  For example, while taking the data, I
output everything in the structure:

;;;;; Assume opened ncdf file (ncdf_id) and variables (varid array)
frame = { $             ; anonymous structure for image attributes
  ,time:systime() $     ; acquisition time.
  ,framerate:100. $     ; frame rate in Hz
  ,gain:1. $            ; current gain
  }
tags = 'FRAME.'+tag_names(frame)
for t = 0,n_elements(tags)-1 do begin
  ;;;;; omit code that sets up execute string: off etc. ;;;;;
  exestring = $
      "ncdf_varput,ncdf_id,varid("+strtrim(t+1,2)+"),offset=["+off+"],"+tags(t)
  if not execute(exestring) then message,/inform,!err_string
  endfor

Then on reading the netCDF file, the structure frame gets redefined according
to what's in the netCDF file to accommodate a netCDF file written with
different auxiliary data.  I doubt that any of this code is of general
interest, but the ideas could be applied elsewhere.

I hope this gives you a feel for my perspective.

Fred


  • 1994 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: