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 Gabor, > I am Gabor Papp from the Geodetic and Geophysical Res. Inst., > Sopron, Hungary. I have used GMT program package since 1993 > which runs with your netCDF type files. Now I have decided > to change the source code of my own Fortran programs in order > to make them capable to read and write netCDF files directly, > without the use of converting programs provided in the GMT > package. At the moment my programs are able to read the netCDF > files but the creation of a netCDF file does not work. > > At runtime, when the program reaches the following line > (and have already read a netCDF file successfully): > > NCID=NCCRE(FNAME,NCNOCLOB,RCODE) > > ,where > > INTEGER NCID,RCODE,.... > CHARACTER FNAME*50 > > an error message occurs. > > nccreate: Bad Flag Perhaps you haven't included the "netcdf.inc" file that contains the PARAMETER statement defining NCNOCLOB and other netCDF Fortran symbols. In the netcdf.inc file, NCNOCLOB is defined by: parameter(NCNOCLOB = 15) If you have included netcdf.inc with a statement such as include 'netcdf.inc' then, something before the call to NCCRE must have caused the value of NCNOCLOB to be overwritten, even though PARAMETER values are supposed to be constant. You could tell if this is the case by printing the value of NCNOCLOB before the call. --Russ ______________________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu