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.
Hi Kevin, > When I try to compile the short program below (using Portland > pgi/12.10_64), I get this error message: > > PGF90-S-0155-Could not resolve generic procedure nf90_put_var > > Any ideas? I've looked at this and can't figure out what the syntax error is about. I get it with gfortran, but gfortran compiles, successfully links, and runs an example program that uses a very similar nf90_put_var call in our netcdf-fortran-4.2 distribution, from the file examples/F90/nc4_pres_temp_4D_wr.f90, where the following statements appear: call check( nf90_put_var(ncid, pres_varid, pres_out, start = start, & count = count) ) call check( nf90_put_var(ncid, temp_varid, temp_out, start = start, & count = count) ) This file compiles and is run when I configure with the option "--enable-extra-example-tests". Can you successfully compile and run this example program too? If so, maybe there is a diffrence that I can't see that explains why this more complex program compiles, but the simple one you've presented gets a compile error. Or maybe I'll be able to see it when I look at it again next week ... --Russ > !********************************************** > program pmsu > > ! Global data module > > use netcdf > > implicit none > > ! Local declarations > > integer :: ncid, ndim_id, nvar_id, istatus > integer, parameter :: ntmax = 4 > integer, parameter :: double_precision = 8 > real ( kind = double_precision ), dimension(ntmax) :: time > integer, dimension(1) :: start > integer, dimension(1) :: count > > istatus = nf90_create ( 'test.nc', nf90_clobber, ncid ) > istatus = nf90_def_dim ( ncid, 'ntmax', ntmax, ndim_id ) > istatus = nf90_def_var ( ncid, 'time', nf90_double, ndim_id, nvar_id ) > istatus = nf90_enddef ( ncid ) > > time(1) = 1.0e+10 > time(2) = 2.0e+10 > time(3) = 3.0e+10 > time(4) = 4.0e+10 > > start(1) = 2 > count(1) = 1 > > istatus = nf90_put_var ( ncid, nvar_id, time(2), start, count ) > istatus = nf90_close ( ncid ) > > end program > > !********************************************** > > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: UMK-718798 Department: Support netCDF Priority: Normal Status: Closed