Re: Julday [message #31309 is a reply to message #24332] |
Sun, 23 June 2002 23:37  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Wolfgang Koppe wrote:
>
> Dear members,
>
> I would like to convert ASCII data-sets with the Julday function. I
> haven�t got a lot of experience with IDL. I can convert 1 date like
> this:
> PRINT, JULDAY (2000,11,6,12,35,12)
> -->1784427.0,
> but I want to convert a whole ASCII file with dates.
> Do I have to write a whole programm?
> Is it possible to use programm VIP (visual IDL programming)?
>
> Thanks a lot.
>
> Wolfgang
Dear Wolfgang
idl is an array orientated language.
Most functions are programmed to use arrays too.
The following example show vectors of data
all with the same length defining two dates.
If you take a look into the online help of julday
Result is of type double-precision if Hour, Minute, or Second is
specified, otherwise Result is of type long integer. If all arguments
are scalar, the function returns a scalar. If all arguments are arrays,
the function matches up the corresponding elements of the arrays,
returning an array with the same dimensions as the smallest array
year=[2000,2001]
month=[11,2]
day=[6,4]
hour=[12,10]
min=[35,10]
sec=[12,10]
print,julday(year,month,day,hour,min,sec)
1784427.0 1783718.9
regards
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
============================================================ =======
|
|
|