[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 980722: netCDF problem



>To: address@hidden
>From: address@hidden (Carrie Gonzalez)
>Subject: netCDF problem
>Organization: .
>Keywords: 199807222032.OAA10741

Hi Carrie,

>    I need some help please!  I wrote some code some months back to read a
>    data format particular to our site and to generate a netCDF file.  It
>    was successful.  Now, we have come across some software that will plot
>    contour and images but the data must be in netCDF format.  After looking
>    at their source code, it appears that the software wants the data in
>    a "triplet".  So I tried writing a new filter program that would take the
>    netCDF files we successfully generated, that is, read in the data from
>    one netCDF file and create a new netCDF file in the format we think the new
>    software expects.  However, I have had no success.  The program always
>    produces a segmentation fault when I run it.  Let me explain how it works:
>    
>    The scan_values array is a one-dimensional array.  The data_values and
>    az_values are also one-dimensional arrays, but they are record-variant.
>    
>    I retrieve one record at a time and combine the data into one big data
>    matrix.  For the first generation of this module, I actually end up just
>    attempting to write the last record to the new netCDF file.  Anyhow,
>    I close the old netCDF file, create a new one and try to write this
>    data matrix.  However, like I said, it always cores.  If I change it to
>    a one dimensional variable and massage the data_matrix, it does not core
>    and runs to completion (I did not dump the contents to verify correctness).
>    When I tried taking it to two-dimensional data, it too cored!

Sorry, but the only way we would have a chance of debugging a problem
like this would be if we could reproduce the problem here, and then use
a debugger to see what's happening.  That requires that you make
available a small input file on which we can reproduce the problem.  If
you have such a file, either tell us where we can access it (e.g. a URL
or via anonymous FTP), or include it as an attachment to a mail
message.  Thanks.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu