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

20010806: readgeneral.F problem: UTDEC: invalid udunits structure



K.H.Seol,

>Date: Mon, 6 Aug 2001 18:55:33 +0900
>From: =?ks_c_5601-1987?B?vLOw5sjx?= <address@hidden>
>Organization: =?ks_c_5601-1987?B?seK788O7ILz2xKG/ubq4sPo=?=
>To: <address@hidden>
>Subject: question
>Keywords: 200108060951.f769pR129587

The above message contained the following:

> How are you? I'm K.H.Seol in KOREA. I have run the FORTRAN program -
> readgeneral.F . It is provided the CDC, and it is the program about NCEP
> reanalysis. I have worked on SunOS 5.6 platform and also have netcdf
> library and udunits library.
> 
> THen, I have a errer message like this "
> /home3/NCEP/ncep/hgt/ncep_hgt_1999.exe Error in udunits function: UTDEC
> An invalid udunits structure was found Note: probably a temporal struct
> 
>  NOTE: You must call netop_init to use gridread, gridreadx, dayread, and
>  dayreadx "
> 
> ' ncep_hgt_1999.exe ' is my executable file. I have a hard to understand
> this message. I guess I have error code value, '-5' ,so the error check
> program in readgeneral.F puts the message :
> 
> < An invalid udunits structure was found Note: probably a temporal
> struct
> 
>  NOTE: You must call netop_init to use gridread, gridreadx, dayread, and
>  dayreadx >
> 
> But I guess the message " Error in udunits function: UTDEC " has    ' . 
> relevance to 'udunits library So If you know what is wrong, please  ' . 
> let me know, or teach me the source of 'UTDEC                       ' . 
> 
> Expecting a response to this letter. With apologies for troubling you.

I do not know the routine "readgeneral.F" -- so I cannot help you very
much.  You might ask the CDC about the problem.

The UDUNITS library is written in C and must functions expect a pointer
to a "utUnit" structure. In Fortran-77, a pointer to such a structure
is obtain via the UTMAKE routine. The Fortran variable that holds the
pointer must be the same size as a C pointer.  The error you see might
indicate that the Fortran variable is not the right type.

Discover how large a C pointer is on your machine. Determine the Fortran
equivalent. See that the macro PTR in the installed file "udunits.inc"
is the Fortran equivalent. Use only variables of that type to hold the
return value from UTMAKE.

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>


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.