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

20030513: including udunits.inc in Fortran90 routine



Bill,

>Date: Tue, 13 May 2003 15:46:27 -0700
>From: Bill Riley <address@hidden>
>Organization: ?
>To: address@hidden
>Subject: udunits

The above message contained the following:

> I'm trying to use udunits to extract times from a NCAR netcdf file. They 
> give the time in hours since 1/1/0000. I downloaded the udunits-1.11.7 
> file, uncompressed it, and installed it. It seems that everything 
> installed fine.
> 
> But, I'm trying to use the 'utcaltime' function, but when I try to 
> include udunits.inc in my subroutine it won't compile because the 
> routine is in fortran90. Is there a way I can use this library with f90 
> (portland group compiler)? Thanks.

I take it that the Fortran compiler chokes on the "#include udunits.inc"
because the includee is Fortran-77 and the includer is Fortran-90.

I suggest that you NOT include "udunits.inc" and, instead, manually
declare an appropriate type for the utcaltime() routine (and any other
UDUNITS routines that you use).

Regards,
Steve Emmerson


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.