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

Re: 980519: g77 netcdf problems.



>To: address@hidden,
>To: address@hidden
>From: Rich Signell <address@hidden>
>Subject: Re: g77 netcdf problems.
>Organization: U.S. Geological Survey
>Keywords: 199805191222.GAA18144

Sung Tae Jang,

> My system is Linux. (gcc version 2.7.2.3 and g77)
> Compiled pom model using netcdf 3.4 and use matlab 5.1, analyzing the
> model output
> But something wrong.
> Output is different that used unix.
> 
> Please help me.
> 
> Warning messages :
> 
> [stjang@orri pom]$ f77 -O -o pom97 pom97.f libnetcdf.a
> pom97.f: In subroutine `putcdf':
> pom97.f:3095: warning:
>            Call NCAPT(CDFID,DEPTHID,'valid_range',NCFLOAT,2,VRNG,IRET)
>                 1
> pom97.f:3302: (continued):
>            Call
> NCAPT(CDFID,NCGLOBAL,'base_date',NCLONG,3,BASE_DATE,IRET)
>                 2
> Argument #6 of `ncapt' is one type at (2) but is some other type at (1)
> [info -f
>  g77 M GLOBALS]
> pom97.f:3328: warning:
>            Call NCVPT(CDFID,XID,CORNER,EDGES,XGRID,IRET)
>                 1
> pom97.f:3383: (continued):
>          Call NCVPT(CDFID,ELID,CORNER,EDGES,WS0,IRET)
>               2
> Argument #5 of `ncvpt' is one type at (2) but is some other type at (1)
> [info -f
>  g77 M GLOBALS]
> pom97.f:3328: warning:
>            Call NCVPT(CDFID,XID,CORNER,EDGES,XGRID,IRET)
>                 1
> pom97.f:3393: (continued):
>          Call NCVPT(CDFID,TXID,CORNER,EDGES,WS0,IRET)
>               2
> Argument #5 of `ncvpt' is one type at (2) but is some other type at (1)
> [info -f
>  g77 M GLOBALS]
> pom97.f:3328: warning:
>            Call NCVPT(CDFID,XID,CORNER,EDGES,XGRID,IRET)
>                 1
> pom97.f:3399: (continued):
>          Call NCVPT(CDFID,TYID,CORNER,EDGES,WS0,IRET)
>               2
> Argument #5 of `ncvpt' is one type at (2) but is some other type at (1)
> [info -f
>  g77 M GLOBALS]
> pom97.f:3328: warning:
>            Call NCVPT(CDFID,XID,CORNER,EDGES,XGRID,IRET)
>                 1
> pom97.f:3456: (continued):
>            Call NCVPT(CDFID,SALID,CORNER,EDGES,WS1,IRET)
>                 2
> Argument #5 of `ncvpt' is one type at (2) but is some other type at (1)
> [info -f
>  g77 M GLOBALS]
> pom97.f:3328: warning:
>            Call NCVPT(CDFID,XID,CORNER,EDGES,XGRID,IRET)
>                 1
> pom97.f:3469: (continued):
>            Call NCVPT(CDFID,TMPID,CORNER,EDGES,WS1,IRET)
>                 2
> Argument #5 of `ncvpt' is one type at (2) but is some other type at (1)
> [info -f
>  g77 M GLOBALS]
> pom97.f:3328: warning:
>            Call NCVPT(CDFID,XID,CORNER,EDGES,XGRID,IRET)
>                 1
> pom97.f:3482: (continued):
>            Call NCVPT(CDFID,KMID,CORNER,EDGES,WS1,IRET)
>                 2
> Argument #5 of `ncvpt' is one type at (2) but is some other type at (1)
> [info -f
>  g77 M GLOBALS]
> pom97.f:3328: warning:
>            Call NCVPT(CDFID,XID,CORNER,EDGES,XGRID,IRET)
>                 1
> pom97.f:3495: (continued):
>            Call NCVPT(CDFID,AMID,CORNER,EDGES,WS1,IRET)
>                 2
> Argument #5 of `ncvpt' is one type at (2) but is some other type at (1)
> [info -f
>  g77 M GLOBALS]
> pom97.f:3328: warning:
>            Call NCVPT(CDFID,XID,CORNER,EDGES,XGRID,IRET)
>                 1
> pom97.f:3508: (continued):
>            Call NCVPT(CDFID,UID,CORNER,EDGES,WS1,IRET)
>                 2
> Argument #5 of `ncvpt' is one type at (2) but is some other type at (1)
> [info -f
>  g77 M GLOBALS]
> pom97.f:3328: warning:
>            Call NCVPT(CDFID,XID,CORNER,EDGES,XGRID,IRET)
>                 1
> pom97.f:3520: (continued):
>            Call NCVPT(CDFID,VID,CORNER,EDGES,WS1,IRET)
>                 2
> Argument #5 of `ncvpt' is one type at (2) but is some other type at (1)
> [info -f
>  g77 M GLOBALS]
> pom97.f:3328: warning:
>            Call NCVPT(CDFID,XID,CORNER,EDGES,XGRID,IRET)
>                 1
> pom97.f:3532: (continued):
>            Call NCVPT(CDFID,WID,CORNER,EDGES,WS1,IRET)
>                 2
> Argument #5 of `ncvpt' is one type at (2) but is some other type at (1)
> [info -f
>  g77 M GLOBALS]

The above warning messages are not serious. They merely indicate that
the Fortran netCDF subroutines NCAPT and NCVPT are being called with
different type data for variables of different types.  This is necessary
with the netCDF-2 interface, because there is only one interface
provided for writing numeric data of INTEGER*1, INTEGER*2, INTEGER,
REAL, or DOUBLE types.  So if you write data to an integer variable
using NCVPT in one part of the program and to a floating-point variable
using NCVPT in another part of the program, scrupulous Fortran compilers
will emit a warning, in case this was an error.

If you used the netCDF-3 Fortran interfaces instead, there would be no
warnings, because all the interfaces are type-safe.  To write an array
of integer values, for example, you would call the function

  NF_PUT_VARA_INT(...)

but to write an array of REAL values, you would call a different
function

  NF_PUT_VARA_REAL(...)

For more details, see the NetCDF User's Guide for FORTRAN, Version 3, at

  http://www.unidata.ucar.edu/packages/netcdf/docs.html

--Russ

_____________________________________________________________________

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