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

Re: 19980915: netCDF: automatic type conversions



>To: address@hidden
>From: Darran Edmundson <address@hidden>
>Subject: netCDF: automatic type conversions ...
>Organization: Optical Sciences Centre, Australian National University
>Keywords: 199809151144.FAA24630

Darran, 

> By the way, are you familiar with IDL?  I have written a fairly generic 
> IDL object for interfacing with a netCDF file.  It is embryonic
> but it certainly beats using the IDL intrinsics.  I have appended the
> code header.  If you can think of a decent way of making this code
> widely available, please let me know.

Yes, we've used IDL and have included some information on the existing
IDL support for netCDF at:

   http://www.unidata.ucar.edu/packages/netcdf/software.html#IDL
   
and in the ncbrowse.pro entry of 

   http://www.unidata.ucar.edu/packages/netcdf/contrib.html

Also, the ARGOS tool is IDL-based and works with netCDF data:

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

I can think of several possibilities for making your IDL object more
widely available:

 1. Post an announcement of its availability to the
    address@hidden mailing list, which will reach close to
    1000 netCDF users.

 2. Give it a name and a web site, then compose a short description of
    it that we can include in our list of "software for Manipulating or
    Displaying NetCDF data", similar to the ARGOS entry.

 3. Determine whether it meets the criteria for "User-Contributed
    Software" listed in the second paragraph of
    
        http://www.unidata.ucar.edu/packages/netcdf/software.html#user

    and if so, we can make it available on our FTP site and add an entry
    in the user-contributed Software Catalog.

I'm also including this response in our netCDF email support database,
so others searching for "IDL" and "netCDF" might find it.  If you decide
on options 2 or 3, let me know and I'll edit the necessary documents.

Thanks for offering to make the results of your efforts available.

--Russ

> ;
> ; NAME:
> ;       NETCDF
> ;
> ; FILENAME:
> ;       netcdf__define.pro
> ;
> ; PURPOSE:
> ;       This class retrieves data from a reasonably generic netCDF file
> ;
> ; SUPERCLASSES:
> ;       none
> ;
> ; AUTHOR:
> ;       Darran Edmundson
> ;       Canadian NSERC Visiting Fellow
> ;       Optical Sciences Centre, RSPhysSE
> ;       Australian National University
> ;       email: address@hidden
> ;
> ; COPYRIGHT:
> ;       While this code is copyright, Darran Edmundson, 1998, it is
> ;       free for use in a non-commercial environment.  Please report
> ;       all bugs to address@hidden.  Commercial use requires
> ;       permission from the author.
> ;
> ; CATEGORY:
> ;       IDL 5.1 (object oriented)
> ;
> ; CALLING SEQUENCE:
> ;       myfile = Obj_New('netcdf',filename)
> ;
> ; REQUIRED INPUTS:
> ;       Filename:  string
> ;
> ; INIT METHOD KEYWORD PARAMETERS:
> ;       none.
> ;
> ; PUBLIC METHODS:
> ;
> ;       Stats (Procedure)
> ;             Display dimension and variable information
> ;
> ;       Dim_Exists, 'name' (Function)
> ;             Returns true if the dimension 'name' exists.
> ;
> ;       Dim_GetSize, 'name' (Function)
> ;             Returns the length of dimension 'name'
> ;
> ;       Var_Exists, 'name' (Function)
> ;             Returns true if the variable 'name' exists.
> ;
> ;       Var_Get, 'name' (Function)
> ;             Returns data for variable 'name'.  Beware of calling
> ;             this function for a variable containing large amounts
> ;             of data.  Consider Var_GetSlab instead.
> ;
> ;       Var_Get1, 'name', index  (Function)
> ;             Returns single element of the 1-vector variable 'name'.
> ;
> ;       Var_GetSlab, 'name', index_name=index (Function)
> ;             Return a hyperslab of variable 'name' at index.
> ;
> ;       Var_GetType, 'name' (Function)
> ;            Return a lowercase string showing the data-type of
> ;            variable 'name'.
> ;
> ;       Var_GetNDims, 'name' (Function)
> ;            Return the number of dimensions in variable 'name'.
> ;
> ;       Var_GetDims, 'name' (Function)
> ;            Return a string array containing the dimension names
> ;            of variable 'name'.
> ;
> ; SIDE EFFECTS:
> ;       A netcdf structure is created
> ;
> ; RESTRICTIONS:
> ;       None.
> ;
> ; EXAMPLE USAGE:
> ;       f = obj_new('netcdf','test.nc')
> ;       f->stats
> ;       if f->var_exists('x') then x = f->var_get('x')
> ;       if f->dim_exists('time_index') then $
> ;          maxtime = f->dim_getsize('time_index')
> ;       i = f->var_get('intensity')
> ;       i = f->var_getslab('intensity',z_index=12)
> ;       obj_destroy, f
> ;
> ; INSTALLATION:
> ;       Place this file in a directory contained in your IDL_PATH
> ;       environment variable.
> ;
> ; MODIFICATION HISTORY:
> ;       Written by Darran Edmundson, Tue Jul 28 1998
> ;         - added self-documenting help method, Aug. 5, 1998.  DEE.