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.
Johan,
When I mentioned gfortran in the last reply, I should have said "ifort". Just
to be clear, Ed's response was to check the way the programs were compiled when
you ran "make check" successfully, and if you used the same order for the
compiler options as in the "make check" output, I'm confident the compile and
link would have worked.
So try this with ifort:
ifort -g -I/usr/local/netcdf-3.6.1/src/f90 -o pres_temp_4D_wr.x \
pres_temp_4D_wr.o -L/usr/local/netcdf-3.6.1/lib -lnetcdf
or if you've run "make install" to install include files in
usr/local/netcdf-3.6.1/include, then use this:
ifort -g -I/usr/local/netcdf-3.6.1/include -o pres_temp_4D_wr.x \
pres_temp_4D_wr.o -L/usr/local/netcdf-3.6.1/lib -lnetcdf
Also, it's more conventional to just use "pres_temp_4D_wr" for the name of the
compiled program rather than "pres_temp_4D_wr.x", even though the latter will
work fine.
--Russ
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: ZHX-166092
Department: Support netCDF
Priority: Normal
Status: Closed