This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Jeremy,
>Date: Mon, 18 Apr 2005 16:24:58 -0400
>From: Jeremy Rolph <address@hidden>
>Organization: Florida State University
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20050418: udunits documentation
The above message contained the following:
> I am using fortran and i am assuming that is possibly why the
> julday_to_gregdate function does not work???
Probably. The function julday_to_gregdate() in the UDNITS library
doesn't have a Fortran interface.
You could use any another routine that converts Julian day-number to
Gregorian date. Alternatively, you could modify the file "lib/utlib.c"
in the UDUNITS package by adding
FCALLSCSUB4(julday_to_gregdate,jultogreg,JULTOGREG,
LONG,PINT,PINT,PINT)
just after the definition of the julday_to_gregdate() function. At
least I think the above is correct -- you should verify that it does the
right think by executing the command "make utlib.i" in that subdirectory
and then examining the JULTOGREG subroutine.
The two functions -- julday_to_gregdate() and gregdate_to_julday() -- were
never intended to be used outside the UDUNITS package.
> thanks again,
> jeremy
Regards,
Steve Emmerson