Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hello all, We are currently implementing a netCDF interface on top of HDF. I wrote to this list a few weeks back asking for comments and information about how people use netCDF; I'd like to thank those people who responded. As part of the netCDF / HDF project we have established a mailing list in order to discuss design issues, progress and other aspects of the project. The mailing list is called: hdf-netcdf@xxxxxxxxxxxxx If you would like to be added to the list please send mail to hdf-netcdf-request@xxxxxxxxxxxxx Thanks -Chris >From owner-netcdfgroup@xxxxxxxxxxxxxxxx 02 2004 May -0600 10:24:55 Message-ID: <wrxu0yy4x0o.fsf@xxxxxxxxxxxxxxxxxxxxxxx> Date: 02 May 2004 10:24:55 -0600 From: Ed Hartnett <ed@xxxxxxxxxxxxxxxx> In-Reply-To: <22780.1083440509@xxxxxxxxxxxxx> To: =?iso-8859-15?q?Hans-J=FCrgen_Rieger?= <H.Rieger@xxxxxx> Subject: Re: VB.NET wrapper for netCDF Received: (from majordo@localhost) by unidata.ucar.edu (UCAR/Unidata) id i42GPJt0012175 for netcdfgroup-out; Sun, 2 May 2004 10:25:19 -0600 (MDT) Organization: UCAR/Unidata Keywords: 200405021624.i42GOttK010322 Cc: netcdfgroup@xxxxxxxxxxxxxxxx References: <22780.1083440509@xxxxxxxxxxxxx> Lines: 72 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-netcdfgroup@xxxxxxxxxxxxxxxx Precedence: bulk Reply-To: Ed Hartnett <ed@xxxxxxxxxxxxxxxx> "Hans-Jürgen Rieger" <H.Rieger@xxxxxx> writes: > Hi all, > > first of all many thanks to Ed Hartnett for the VB wrapper class and the > example provided to use NetCDF with VB.NET. > The example he provided (creation and writing/reading to/from a "test.nc" > file) works fine. I could also use own *.CDF file (from chromatographic > data). > > The only problem that I experience is with string-arrays. > For example, my *.CDF file has a variable > > char peak_name(peak_number, _32_byte_string) ; > with the two dimensions peak_number=7 and _32_byte_string=32 > > The data of the variable peak_name are therefore 7 strings (the peak names). > The data should be read by the code: > . > . > Case NetCDF.nc_type.NC_CHAR > vartext = New StringBuilder(dimlen - 1) > res = NetCDF.nc_get_var_text(ncid, varid, vartext) > If (res <> 0) Then GoTo err > Log("Var value: " & vartext.ToString) > . > . > I´ve got the error message "StringBuilder Buffer overflow". I recognized, > that I get no error message when the capacity of the StrinBuilder is 7*32 > (the product of the two dimensions). But now the StringBuilder variable > vartext contains only one (the first) peakname. > > What can I do to get all string values in the "peak_name" variable? > > > With best regards > > H.J. Rieger > > -- > "Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen! > Jetzt aktivieren unter http://www.gmx.net/info Howdy Hans-Jürgen! I will be very happy to take a look at this as soon as I have finished work immediately connected with the release of the first beta of 3.6.0, which will happen very soon. I do have a couple of questions for you. Firstly, please do an ncdump of the file and ensure that the data are what you expect. If you could send that to me, that might be helpful. Secondly, did you create this file with the VB.NET interface? Thirdly, as I recall there is no good way in VB to handle changes of dimensionality. That is, I could never find a way to convert a 1D array into a 2D array without just creating the target array and transferring every element one at a time. In C of course one can cast, and even fortran offers some tricks to make it happen, but the writers of VB apparently never thought of it. Bummer. Have you solved this dimensionality.problem in some way? For example, how do you deal with 2D int data? If you could send more of your vb program I would be very interested in seeing it, to see how you're using the VB.NET interface. Ed Hartnett
netcdfgroup
archives: