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]

dot in flattened attribute names



Hi James,

 

 Remember the stuff I had got involved with in libnc_dap concerning the handling of DODS strings, and associated containerized attributes in the libnc library?    I finally got around to switching my own use of the library from my privately patched version to the current SVN version that had incorporated the changes with your enhancements to them.

 

 I’ve discovered a problem…   the code in transfer_attributes_to_list in nc_util.c, which is part of the attribute, flattening process uses a “.” to append the attribute name to it’s parent container name to produce the flattened attribute name.    However AttrTable::find in libdap/AttrTable.cc  interprets the “.” to be a reference to an actual container rather than a dot in the attribute name, which is the case after flattening.  This means that AttrTable::find and everything that uses it to find attributes, can’t find the flattened attributes.    I had worked around this in my code by using “:” as the separator, but I understand why you changed it to be constant with the dot notation used elsewhere.

 

The basic symptom of this is running dncdump against the TDS where there are containerized attributes presented.  It just crashes.

 

One possible fix is going back to the “:”

 

Another is to replace most of the calls to AttrTable::find() in Dattr.cc, NCConnect.cc, with calls to an alternate version of find() that doesn’t apply special meaning to the dots.  Simple_find() comes to mind, but it’s private and the arg list is set up differently.   

 

I think I had opted for the “:” when I did my version of the patch because I was trying to not have to patch anything in libdap itself.

 

 

-----
David Wojtowicz, Sr. Research Programmer, Sysadmin
Dept of Atmospheric Sciences / Computer Services
University of Illinois at Urbana-Champaign
davidw@xxxxxxxx  (217) 333-8390

 


 
 
  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