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.
Hi Stefan, > When I compile the program run.f90 with > > gfortran run.f90 -o run -lnetcdff -L/home/z3439823/programs/netcdf/lib > -I/home/z3439823/programs/netcdf/include > > and run it, the data in data_in.nc is read partially corrupted. The program > outputs the last data entry as 0.0, and not -1.84714535003628, which is the > last value in > > ncdump -v ctns data_in.nc > > The command > > ncdump -v ctns data_out.nc > > shows that the output data is partially corrupted (about the last third of > the data is bad). > > I have tried to understand what's going on, but I have no clue. I do the > exact same procedure with other datasets of identical size and type, and it > works as it should. > > I use netcdf-4.2.1. Using our latest snapshot release of the netCDF C and Fortran-90 libraries, I can reproduce the error you're seeing, though I don't understand yet what the cause is. It appears to be a bug in the netCDF F90 library, but I'll need to spend more time studying the problem in a debugger. Thanks for reporting this potentially serious problem, and for providing the demonstration program. I'm entering the problem in our bug-tracking system, where you can follow any progress we make in finding and fixing the bug: https://bugtracking.unidata.ucar.edu/browse/NCFORTRAN-23 --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: GYC-914895 Department: Support netCDF Priority: Normal Status: Closed