[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 980417: NetCDF with IDL



>To: address@hidden
>From: Albert Park <address@hidden>
>Subject: IDL
>Organization: Laboratory for Atmospheric and Space Physics, CU
>Keywords: 199804172327.RAA26043

Hi Albert,

> Hello, my name is Albert Park and I am an undergraduate research assistant
> at the Labratory for Atmospheric and Space Physics at the University of
> Colorado in Boulder. I have been given the task of understanding how to
> use netCDF so that it will play nicely with IDL. The only online
> documentation that I see is for C and Fortran. I've been told that there
> are commands within IDL that associate with netCDF, but I cannot find any
> information concerning that. Any help would be greatly appreciated. 

The IDL functions ncdf_open, ncdf_varget, and so on are part of the IDL
package from RSI.  I don't think you have to do anything but call them,
if you have IDL properly installed, but we couldn't find the RSI
documentation for these in our copy of IDL 5.0.  Here's an example of
how we used to use these in a demo:

    id = ncdf_open('T.nc')
    ncdf_varget,id, ncdf_varid( id, 'lon'), lon
    ncdf_varget,id, ncdf_varid( id, 'lat'), lat
    ncdf_varget,id, ncdf_varid( id, 'T'), Temp
    z0 = Temp(*,*,0)
    z1 = Temp(*,*,1)
    z2 = Temp(*,*,2)
    z3 = Temp(*,*,3)
    SURFACE, z3
    SHADE_SURF, z3
    SURFACE, z3, /noerase
    map_set,/mercator,/continents,/grid
    contour,z3,lon,lat,/overplot,nlevels=12
    map_set,/orthographic,/continents,/grid
    contour,z3,lon,lat,/overplot,nlevels=12
 
We also had a summer student write an elaborate netCDF data browser in
IDL:

    Matt Segur's IDL procedure that provides an X Window browser for
    netCDF data, including plotting a one- or two-dimensional
    cross-section of a selected variable, contour, wire-frame, and
    surface plots, and animation along a selected dimension.

and that's still available from 

    ftp://ftp.unidata.ucar.edu/pub/netcdf/contrib/ncbrowse.pro

So you might read the documentation that comes with that to see how the
netCDF interface is accessed.

Finally, there is a freely-available IDL-based 3D visualization tool
named ARGOS that reads netCDF data.  For a description, see

    http://www.unidata.ucar.edu/packages/netcdf/software.html#ARGOS

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu