On Mon, 26 Jul 2004 21:17:38 -0700 JCB <jborrero@xxxxxxx> wrote: > > hi, > > i am trying to run a fortran code that writes the output in netCDF > > format. > > i have a Mac with OSX 10.3 > > when i run the code i get these errors: > > "invalid Argument" > "variable not found" > "not a netCDF id" > > depending on which routines i have switched on or off (i get one > of the above each time, not all 3 each time) > > i believe i have netCDF installed properly. all the scripts ran > well during the install and the code compiles when calling the > routines that invoke netCDF stuff. > > i have my fortran compiler looking at the /netcdf-3.5.1/include > and /netcdf-3.5.1/lib directories for the -I and -L flags in the > g77 compile command. In your Fortran code, you should have: include 'netcdf.inc' and use your compiler's linking and include switches. The above file, however, will not be built/installed unless the configure program detects a working Fortran compiler. Try rebuilding the netcdf library and make sure you see the Fortran interface being created (or else an error message). I haven't used g77/netcdf for a while, and I've worked mostly with the C interface anyway, but the netcdf configure *should* find g77 if everything is installed properly. If the Fortran stuff gets built, then there should also be a separate man page for it: /usr/share/man/man3f/netcdf.3f (note the f) If you don't have the above man page installed (or the netcdf.inc file) then netcdf didn't build the Fortran interface. The same applies to f90 as well, but it only looks for f90 and xlf90. Steve -- Steve Arnold http://arnolds.dhs.org/ gnupg key: http://arnolds.dhs.org/static/files/pubkey.txt http://www.gentoo.org/ http://caosity.org/ with Std.Disclaimer; use Std.Disclaimer;
Attachment:
pgpOuIWQYxN0Y.pgp
Description: PGP signature
netcdfgroup
archives: