NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3utcdat.f
Go to the documentation of this file.
1
4
22 subroutine w3utcdat(idat)
23 integer idat(8)
24 character cdate*8,ctime*10,czone*5
25! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
26! get local date and time but use the character time zone
27 call date_and_time(cdate,ctime,czone,idat)
28 read(czone,'(i5)') idat(4)
29! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
30! convert to hours and minutes to UTC time
31! and possibly adjust the date as well
32 idat(6)=idat(6)-mod(idat(4),100)
33 idat(5)=idat(5)-idat(4)/100
34 idat(4)=0
35 if(idat(6).lt.00) then
36 idat(6)=idat(6)+60
37 idat(5)=idat(5)-1
38 elseif(idat(6).ge.60) then
39 idat(6)=idat(6)-60
40 idat(5)=idat(5)+1
41 endif
42 if(idat(5).lt.00) then
43 idat(5)=idat(5)+24
44 jldayn=iw3jdn(idat(1),idat(2),idat(3))-1
45 call w3fs26(jldayn,idat(1),idat(2),idat(3),idaywk,idayyr)
46 elseif(idat(5).ge.24) then
47 idat(5)=idat(5)-24
48 jldayn=iw3jdn(idat(1),idat(2),idat(3))+1
49 call w3fs26(jldayn,idat(1),idat(2),idat(3),idaywk,idayyr)
50 endif
51! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
52 end
function iw3jdn(iyear, month, iday)
Computes julian day number from year (4 digits), month, and day.
Definition iw3jdn.f:42
subroutine w3fs26(jldayn, iyear, month, iday, idaywk, idayyr)
Computes year (4 digits), month, day, day of week, day of year from julian day number.
Definition w3fs26.f:56
subroutine w3utcdat(idat)
This subprogram returns the utc (greenwich) date and time in the NCEP absolute date and time data str...
Definition w3utcdat.f:23