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

Problems with Strings

Hello,

I have the following problem:

My netCDF file structure:

..
dim2 = 2;
dim30 = 30;
..
char name(dim2, dim30);
..

I read the data with:

long start[MAX_DIMS] = {0, 0};
long count[MAX_DIMS] = {2, 30};
ncvarget(cdfid, start, count, &value);

After this operation value contains the data in this way: 
<string1><string2>, e.g. JohnPaul

So, how can I know which part is the first string and which is the second.
There is no delimiter set, and I only know that the max. string length is 30.


Thanks for any helpful hints,

    Tim


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    ( o )            "Paddington on the Rocks"                                  
                     
   ()~*~()                                                                      
                      
    (_)-(_)          Tim Weilkiens, Kiel, Germany                               
                      
        /\                                                                      
                      
       /  \/\           Tim.Weilkiens@xxxxxxxxxxxxxxx                           
                      
  /\  /      \           tim-w@xxxxxxxxxxxxxxxxxxxxxxxxxxx                      
                      
 /  \/        \          http://oekoalpha.pz-oekosys.uni-kiel.de/~tim-w    

 
 
  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