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

20040304: UDUNITS problem: time varaibles: data types



Nir,

> To: address@hidden
> From: address@hidden
> Subject: udunits problems
> Organization: UCAR/Unidata
> Keywords: 200403042037.i24KburV008355

The above message contained the following:

> I am writing you again - after we managed to compile the libraries
> on the Intel Compiler, we are now having problems with the time
> variables.  When we try to run CDFreader to read NCEP data we got the
> error message (below the corresponding subroutine).  We tried to
> fix it by moving the include commands of the subroutine to the main
> program (rather than the subroutne gridread where they originally
> are), all date-time variables got the value 1 (exept the hour that got
> 0).

The include-file "/home/sapir/udunits-1.12.1/include/udunits.inc"
defines the types of UTMAKE, UTDEC, and UTTIME -- so it's not necessary
(and apparently an error) to define them within the "gridread"
subroutine.  If you remove the following lines

>      integer UTMAKE !!!!this is line 271
>      integer UTDEC,uttime

from the "gridread" subroutine, then the file should compile without the
following errors:

> fortcom: Error: CDFreaderII.F, line 271: This name has already been assigned a
> data type.   [UTMAKE]
>       integer UTMAKE
> ..............^
> fortcom: Error: CDFreaderII.F, line 272: This name has already been assigned a
> data type.   [UTDEC]
>       integer UTDEC,uttime
> ..............^
> fortcom: Error: CDFreaderII.F, line 272: This name has already been assigned a
> data type.   [UTTIME]
>       integer UTDEC,uttime
> ....................^
> compilation aborted for CDFreaderII.F (code 1)

> The same code is working perfectly other machines that are using the portland
> group fortran compiler (I am using the Intel Fortran compiler). 

Apparently, the Portland Group Fortran compiler doesn't care how many
times a symbol is declared as long as the declarations are the same.

> Looks to me like a compiler problem. some dependency between intel fortran and
> the subroutines of the UDUNITS library.
> 
> Did anyone else has encoutered such a problem?
> Any ideas for possible solutions?
> 
> I will appreciate any help,
> 
> Best regards,
> 
> Nir. 

Regards,
Steve Emmerson