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

[netcdfgroup] as_double weaknesses

Hello list,

I've come across two apparent properties of the as_double() function in the 
NetCDF C++ interface:
1: as_double() does not check for data_mode, and creashes if the file is in 
definition mode
2: as_double() does not check for dimension limits, returning whatever is in 
the calculated memory location.

Are these checks left out intentionally to save time, or would it be 
advantageous to have them? Considering that the function allocates and 
deallocates memory on the fly, the extra time to perform these checks should 
not be dramatic.

NetCDF 4 on Windows, precompiled C interface dll.

Best regards,

Sjur Kolberg
SINTEF Energiforskning A/S
Sem Sælands vei 11
7465 Trondheim
tlf. 73 59 72 78
fax  73 59 72 50


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community 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