NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3pradat.f
Go to the documentation of this file.
1
4
26 subroutine w3pradat(idat,cdat)
27 integer idat(8)
28 character*(*) cdat(8)
29 character*10 ctmp(8)
30 character*10 cmon(12)
31 data cmon/'January ','February ','March ',
32 & 'April ','May ','June ',
33 & 'July ','August ','September ',
34 & 'October ','November ','December '/
35 character*10 cdow(7)
36 data cdow/'Sunday ','Monday ','Tuesday ',
37 & 'Wednesday ','Thursday ','Friday ',
38 & 'Saturday '/
39! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
40! get day of week and day of year, convert day of week and month
41! to english names, write other formats of date and time, and
42! write time zone differential in one of three ways.
43 jldayn=iw3jdn(idat(1),idat(2),idat(3))
44 call w3fs26(jldayn,jy,jm,jd,jdow,jdoy)
45 ctmp(1)=cdow(jdow)
46 ctmp(2)='********'
47 if(idat(2).ge.1.and.idat(2).le.12) ctmp(2)=cmon(idat(2))
48 write(ctmp(3),'(i2,", ",i4)') idat(3),idat(1)
49 write(ctmp(4),'(i4,"-",i2.2,"-",i2.2)') idat(1),idat(2),idat(3)
50 write(ctmp(5),'(i4,".",i3.3)') idat(1),jdoy
51 write(ctmp(6),'(i2.2,":",i2.2,":",i2.2)') idat(5),idat(6),idat(7)
52 write(ctmp(7),'(".",i3.3)') idat(8)
53 if(idat(4).eq.0) then
54 write(ctmp(8),'("UTC")')
55 elseif(mod(idat(4),100).eq.0) then
56 kh=idat(4)/100
57 write(ctmp(8),'("UTC",sp,i3.2,"h")') kh
58 else
59 kh=idat(4)/100
60 km=abs(mod(idat(4),100))
61 write(ctmp(8),'("UTC",sp,i3.2,"h",ss,i2.2,"m")') kh,km
62 endif
63 cdat=ctmp
64! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
65 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 w3pradat(idat, cdat)
This subprogram forms various character strings useful in describing an NCEP absolute date and time.
Definition w3pradat.f:27