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

Read some elements of an array with NetCDF

Hello, 
I'm writting some code using NetCDF format 
My problem is that my data structure is one array (written in a NetCDF file)
and I need to have just few elements of this array 
I made some tests and the result is that it's faster to read the whole array
and use some elements than read directly some elements of this array 
(but the memory place is not the same) 
Here it is the commands used to read : 
        status = NF_GET_VARM_DOUBLE(IdFichier,4,start,count,stride,imap,Val)

        status = NF_GET_VAR_DOUBLE(IdFichier,4,Val) 
I would like to know if my tests results are corrects. 
I was thinking that the NetCDF format would allow to read few elements
faster than read the whole array ! 
And does it exist any (other) command to read faster only some elements of
an array in a NetCDF file ? 
I would appreciate any advice for this problem. 
thanks 



Stéphane MALLEDANT
mailto : stephane.malledant@xxxxxxxxxxxxxxxxxx

CRIL TECHNOLOGY / Systèmes avancés
Espace Nobel - Rue Antoine Becquerel
CS 80804 - 35708 RENNES Cedex 7
Tél.: (+33) (0)2 23 21 11 11 / Fax: (+33) (0)2 23 21 11 00
http://www.criltechnology.com



 
 
  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