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.
Hello David, My initial thought was that `--fflags` was deprecated, as the fortran interface was moved into a separate library starting with netcdf 4.2.0. Testing locally, however, I see that the `nc-config` created on my system has proper information for nc-config --fflags. Can you provide more information regarding how you built netCDF-C? If possible, can you provide the 'config.log' file created when you built it? Regarding -has-f90; I've spoken with Russ Rew, our Fortran expert, and we agree that this may be a bug in nf-config. Assuming you have an F03 compiler, --has-f90 would be set to 'no' even though F03 supports the f90 API. In the short term, you can fix this by editing the `nf-config` script directly and change the value of has-f90 from no to yes. This assumes you are using a compiler which supports F03. If this is *not* the case, the fix is even simpler; you will need to install a compiler which supports the f90 API. I hope this helps, -Ward > Dear Staff Member, > > I have a question regarding installing netCDF Fortran and would appreciate > your help. > > First, I installed netCDF C, following the instructions at an external > site, here: > http://scigeo.org/articles/howto-install-latest-geospatial-software-on-linux.html#netcdf > > Then, I installed netCDF Fortran by following the instructions here: > https://www.unidata.ucar.edu/software/netcdf/docs/building_netcdf_fortran.html > > Questions: > 1. The model I'm using require nc-config --fflags. This was not done > correctly. See appended output at the end of this email. > 2. If the model I'm using is written in F90, would I need the F90 API? If > so, how would I get has-f90 to be 'yes'? > > Thanks, > David > > > > wuser@wavesftwDell:/opt/source/netcdf-fortran-4.4.2$ nf-config --all > > This netCDF-Fortran 4.4.2 has been built with the following features: > > --cc -> gcc > --cflags -> -I/opt/source/netcdf-fortran-4.4.2/build/include > -I/opt/source/netcdf-4.3.3.1/build/include > > --fc -> gfortran > --fflags -> -I/opt/source/netcdf-fortran-4.4.2/build/include > --flibs -> -L/opt/source/netcdf-fortran-4.4.2/build/lib -lnetcdff > -L/opt/source/netcdf-4.3.3.1/build/lib -lnetcdf -lnetcdf > --has-f90 -> no > --has-f03 -> yes > > --has-nc2 -> yes > --has-nc4 -> yes > > --prefix -> /opt/source/netcdf-fortran-4.4.2/build > --includedir-> /opt/source/netcdf-fortran-4.4.2/build/include > --version -> netCDF-Fortran 4.4.2 > > > > wuser@wavesftwDell:/opt/source/netcdf-fortran-4.4.2$ nc-config --all > > This netCDF 4.3.3.1 has been built with the following features: > > --cc -> gcc > --cflags -> -I/opt/source/netcdf-4.3.3.1/build/include > -I/opt/source/hdf5-1.8.15/build/include > -I/opt/source/hdf-4.2.11/build/include > --libs -> -L/opt/source/netcdf-4.3.3.1/build/lib -lnetcdf > > --has-c++ -> no > --cxx -> > --has-c++4 -> no > --cxx4 -> > > --fc -> > --fflags -> > --flibs -> > --has-f90 -> no > > --has-dap -> yes > --has-nc2 -> yes > --has-nc4 -> yes > --has-hdf5 -> yes > --has-hdf4 -> yes > --has-pnetcdf-> no > > --prefix -> /opt/source/netcdf-4.3.3.1/build > --includedir-> /opt/source/netcdf-4.3.3.1/build/include > --version -> netCDF 4.3.3.1 > > Ticket Details =================== Ticket ID: AJO-570770 Department: Support netCDF Priority: Normal Status: Closed