This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Stefan, The following support-email reply might answer your question: http://www.unidata.ucar.edu/glimpse/netcdf/4207 Contact me if you have further questions. Regards, Steve Emmerson <http://www.unidata.ucar.edu> > To: address@hidden > From: Stefan Maehlmann <address@hidden> > Subject: How to read arrays correctly > Organization: Aerodynamisches Institut Aachen > Keywords: 200105231132.f4NBWZp12260 > > Hello Ladies and Gents, > > i have programed some routiones for data reading and writing and i've always > the same problems when i'd like to read an array from a netcdf file. > For example, there's an array: > dimensions X1=64; > X2=32; > double X(X1,X2) ; > stored in a file. > > To read it, i say Xstart=1, Xcount(1)=64(X1) and Xcount(2)=32(X2) > then call nf_get_vara_double(nc,var_id,Xstart,Xcount,X). > But somehow this does not work. 'Edge+start exceeds dimension bound'. > If i change the Xcount items X1->X2 and X2->X1 i get the values in a wrong > sequence. What's wrong. I'm very glad if you would help me. > > Thanks in advance, > Stefan Maehlmann > > ------------------------------------ > Stefan Maehlmann Email: address@hidden > Aerodynamisches Institut der RWTH-Aachen WWW: http://www.aia.rwth-aachen.de > Wuellnerstr. zw. 5 u. 7 Ftp: ftp://ftp.aia.rwth-aachen.de > D-52062 Aachen, Germany Phone: +49-241-80-5426 Fax: +49-241-8888-257 > ---------------------------------------------------------------------------- > !!!!!!!!!!!!!! Sending unsolicited commercial e-mail (UCE) to this address > !Legal Notice! is indication of your consent to pay me $120/hour for 1 hour > !!!!!!!!!!!!!! minimum for professional proofreading& technical assessment.