NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3ctzdat.f
Go to the documentation of this file.
1
4
19
20 subroutine w3ctzdat(ntz,idat,jdat)
21 integer idat(8),jdat(8)
22 real rinc1(5),rinc2(5)
23! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
24! determine if the input time zone is in valid hh or hhmm format
25 if(ntz.gt.-24.and.ntz.lt.24) then
26 itz=ntz*100
27 elseif(ntz.eq.mod(ntz/100,24)*100+mod(mod(ntz,100),60)/30*30) then
28 itz=ntz
29 else
30 itz=idat(4)
31 endif
32! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
33! determine new time of day, putting into reduced form
34! and possibly adjust the date as well
35 rinc1(1)=0
36 rinc1(2)=idat(5)+itz/100-idat(4)/100
37 rinc1(3)=idat(6)+mod(itz,100)-mod(idat(4),100)
38 rinc1(4)=idat(7)
39 rinc1(5)=idat(8)
40 call w3reddat(-1,rinc1,rinc2)
41 jldayn=iw3jdn(idat(1),idat(2),idat(3))+nint(rinc2(1))
42 call w3fs26(jldayn,jdat(1),jdat(2),jdat(3),jdow,jdoy)
43 jdat(4)=itz
44 jdat(5:8)=nint(rinc2(2:5))
45! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
46 end
function iw3jdn(iyear, month, iday)
Computes julian day number from year (4 digits), month, and day.
Definition iw3jdn.f:42
subroutine w3ctzdat(ntz, idat, jdat)
THis subprogram converts an ncep absolute date and time to another time zone.
Definition w3ctzdat.f:21
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 w3reddat(it, rinc, dinc)
This subprogram reduces an ncep relative time interval into one of seven canonical forms,...
Definition w3reddat.f:86