[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20000505: utdec() error reading NCEP reanalysis data
- Subject: 20000505: utdec() error reading NCEP reanalysis data
- Date: Fri, 05 May 2000 09:28:50 -0600
Eunjoo,
>Date: Fri, 05 May 2000 12:00:24 +1000
>From: Eunjoo Jung <address@hidden>
>Organization: School of Mathematics UNSW
>To: Steve Emmerson <address@hidden>
>Subject: utdec() error reading NCEP reanalysis data
>Keywords: 200005030232.e432WhG20618
In the above message, you wrote:
> Thank you for prompt reply again.
> I have two "udunits.inc" files.
>
> 1)one is from the ftp.cdc.noaa.gov/Software/udunits.inc
> 2)the other is from the udunits-1.11.7/src/lib
>
> when I use the first one, there is no problem compiling and linking.
> but I've got running error.
The file <ftp://ftp.cdc.noaa.gov/Software/udunits.inc> declares that the
"utmake()" function returns an "integer*4". This is incorrect for a Dec
Alpha. On that system, the "utmake()" function returns an "integer*8".
> otherwise I use the second one, I couldn't compile the fortran program.
> here are the compile error message I've got.
> c-----------------------------------------------------------------
> fort: Error: ./udunits-1.11.7/include/udunits.inc, line 27: Unsupported or
> malformed preprocessor directive.
> #ifndef PTR
> --^
Because the offending line above strictly complies with the C standard,
it would appear that your "fort" compiler isn't preprocessing the file
using a Standard C preprocessor.
It appears that NOAA hard-coded a pointer to be equivalent to a Fortan
"integer*4" -- which is wrong for your system. I suggest the following:
1. Edit NOAA's "udunits.inc". Change the "integer*4" return value
of "utmake()" to "integer*8".
2. Edit NOAA's "read.f" file. Change the type of the variable
"unitptr" from "integer*4" to "integer*8".
Regards,
Steve Emmerson <http://www.unidata.ucar.edu>