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.
>From: Andrew Roberts <address@hidden> >Subject: problem with 3.5.0 >Organization: Antarctic CRC >Keywords: 200105020622.f426MGp15902 netCDF 32.5.0 nf90_put_att Hi Andrew, > Today we downloaded he new version3.5.0 to use the f90 version, only to > find that the funtion nf90_put_att is not recognised on compilation, > while all other functions so far used are. > > Our hardware is a Sun running solaris 2.6. The code is attached with the > makefile in a tar file. One problem is the way you are specifying the vector literal in the nf90_put_att call. If you change status=nf90_put_att(ncid,ait4id,"valid_range",(-100,100)) to status=nf90_put_att(ncid,ait4id,"valid_range",(/ -100,100 /)) the correct nf90_put_att() function will be found and output.f90 should compile OK. Another problem is the way you are specifying libraries to link in the makefile. There should be no space between "-l" and "netcdf" on the line pathss = -L /opt/netcdf/lib -lnetcdf -M/opt/netcdf/include to find the installed netCDF library. The space is optional for ld, but seems to not work for f90, at least on our Solaris 2.7 system. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu