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 Denise, > I was looking through the mail archive for help with ncgen -f and found a > reference to the new beta 5 version of netcdf which contained a new > version of ncgen. I grabbed netcdf-2.4-beta5 and find that when I try to > 'make all' I get: > > making `all' in directory /kevin1/dlw/netcdf-2.4-beta5/src/c++ > > c++ -c -I../libsrc netcdf.cc > In file included from netcdf.hh:16, > from netcdf.cc:12: > ncvalues.hh:13: generic.h: No such file or directory > ncvalues.hh:14: iostream.h: No such file or directory > ncvalues.hh:15: strstream.h: No such file or directory > *** Error code 1 (bu21) > > (Actually, I don't think I need to make the c++ directory anyway.) This looks like a problem with your C++ installation, since these include files should be available to every C++ compiler. If you want to skip the C++ interface, I think setting the CXX symbol to "" (the empty string) before you run the "congfigure" script should cause the C++ stuff to be ignored. > Incidentally, the problem I was having with ncgen -f is that I get a > 'fortran statement too long' as in: > > * leave define mode > call ncendf(cdfid, iret) > * store X > corner(1) = 1 > edges(1) = 360 > data X /0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11 > ....etc > ....etc > 6.5, 357.5, 358.5, 359.5/, line 62: FORTRAN statement too long: 03.5, > 204.5, 205 > > I thought I could fix this by going into my cdl file and editing the data > X statement so that all lines were less than 70 columns long, but that > did not fix the problem. Although ncgen can handle huge CDL files and variables when it's generating netCDF files (the "-b" option), it cannot generate Fortran programs with huge variables, because static data initialization is inadequate for representing huge arrays. If you send a CDL file that demonstrates the problem, I'll see if I can find a way to fix it. ______________________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu > ===================================================================== > Denise L. Worthen, SSAI > Oceans and Ice Branch/Code 971 > NASA Goddard Space Flight Center > Greenbelt MD 20771 > > address@hidden > (301) 286-2339 >