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.
> Organization: NOAA/FSL > Keywords: 199403141714.AA08594 Barry, > Well, you got it!. > > The problem was that I needed to include the netcdf.inc file, > i.e., ncwrite was not initialize and therfore was set to zero. Good, it was just a lucky guess. I wish there were a more obvious error message that resulted from trying to call netcdf functions from Fortran without including the netcdf.inc file. If you can think of a way to implement something that would cause the resulting Fortran programs to generate a compile-time error rather than a run-time error, it would be useful. A disciplined use of IMPLICIT NONE might work. > However, and this is expecting alot, I purposely did not include > the netcdf.inc because my program will not compile in the debug mode > when I include it! I get an error that says something like this: > > netcdf.inc: no new_triple block > compilation failed > > However, if I compile the code without the -g option, it works just > fine and as a matter of fact a ncdump -v varname on my file showed > that the data got written to output. So the last remainingt mystery is > why the code won't compile with the netcdf.inc file included with the -g > f77 option. Do you know why? No, sorry, it sounds like an error in the f77 compiler. --Russ