Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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

Re: 20050922:DODS/THREDDS confusion



Hi David:

This looks great, a few comments aboyut what i did in the netcdf-java library which reads opendap:

David Wojtowicz wrote:
OK,

Here's what I have come up with concerning the discussion in this thread. Thanks for considering these potential changes. A pointer to the patch is at the end of this message.

***** Summary of Modified Functionality:

1) All containerized attributes are now "flattened" into the flat namespace. A colon seperates the container name from the contained attribute name. Since all container attributes are removed by this process, the netCDF API no longer chokes from encountering one, and the former contents of the containers are now available to access in flat namespace if the user cares to do so.

I did the same in netcdf-java library, but it uses a "." instead of a ":" to seperate the container name(s)


2) Because containerized attributes containing strings, are not quoted, the code that removes the quotes is modified to ignore the case where there is no quotes.


3) In the case of arrays of strings, the array is translated to an array of characters of the next higher rank, with the extra dimension's size and name being determine as follows:

a) If DODS:strlen attribute exists (or varname:DODS:strlen in the case of translated structures) it supplies the size and DODS:dimName supplies the name

or

b) otherwise, the STRING_ARRAY_SIZE constant is used as the size and varname-chars is used as the dim name.

The extra dimension is added to the global dimension list (if not already existing). If the name already exists for some reason, but with a different size, an alternate name is used.

4) Single scalar strings are treated in a similar manner.

I believe I prefetch all scalar Strings, and determine their correct length, then cache the data values.


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690