[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 20010502: problem with netCDF 3.5.0 F90 subroutine nf90_put_att
- Subject: Re: 20010502: problem with netCDF 3.5.0 F90 subroutine nf90_put_att
- Date: Wed, 02 May 2001 09:58:49 -0600
>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