[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #UBI-364498]: netcdf issue



Hi Chris,

> I have compiled two compiled versions of netcdf (versions 3.4 and 4.1).  I
> am trying to compile some fortran source code that reads and writes
> netcdf.  When i build this code I am getting warnings with two function
> calls : NCVPT and NCVGT.  I have put the the warning below.  Any of the
> subroutines that call these functions output this warning.  The code
> compiles, but when I run the executable a cdf file should be output.
> Everything seems to work fine with the executable file, however no cdf is
> output.  Is this because there was an error in the build of netcdf.  Any
> help you can provide would be great.
> 
> Thank you,
> Chris Wilson
> 
> Argument #5 of `ncvgt' is one type at (2) but is some other type at (1)
> [info -f g77 M GLOBALS]
> ingcbh.f:164: warning:
> call NCVGT(cdfid, idbase, start, count, base_time, rcode)
> 1
> ingcbh.f:210: (continued):
> call NCVGT(cdfid, idcmask2, start, count, cmask2, rcode)
> 2

That warning is definitely not the cause of the other problem you see, with
the netCDF file not getting written.  The warning comes from using the netCDF-2
C interface, which used one function and its data argument for data of all 
types.

In the more recent netCDF-3 and netCDF-4 interfaces, there are type-specific
functions which don't get this warning and are also better at detecting 
inadverant
errors in the calling program, such as declaring the wrong types for data 
arguments.
You might consider updating your calling program to the netCDF-3 interfaces such
as nc_put_var_float, nc_put_var_int, etc., if you want to avoid the type 
warnings.

From the symptoms you provided, I can't tell why a netCDF file wasn't written.  
Can
you use the ncgen utility to write netCDF files OK?  If so, that indicates the 
netCDF
library that ncgen was linked with is OK.  Was "make check" run on the source 
for
the netCDF distribution when it was built and installed?  If you can't diagnose 
the
problem, can you provide us with a small program that demonstrates the problem?

Thanks.

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: UBI-364498
Department: Support netCDF
Priority: Normal
Status: Closed