program sbdd c This routine reads the date/time from the stormcard.dat c file and outputs the current date/time, and c the date/time at t=-6,-12 hr. The output file is called sbdd.dat c c Modified Jan 2023 (KM) removed goto statements c c Modified Dec 2023 (MD) to replace code that jumps into a if block c to eliminate compiler warnings. c dimension ndmon(12) data ndmon /31,28,31,30,31,30,31,31,30,31,30,31/ c character *8 cdum(3000) character *8 cdt c data luin,ludat /80,81/ c c Open the input and output files open(unit=luin,file='stormcard.dat',status='old', + form='formatted',err=900) c open(unit=ludat,file='sbdd.dat',status='unknown', + form='formatted') c read(luin,100,err=900) iyear,imonth,iday 100 format(3(i2)) read(luin,101,err=900) itime 101 format(i2) c write(cdt,200) iyear,imonth,iday,itime 200 format(4(i2.2)) c c Fill the dummy array with the date/time every 6 hours for c two years, starting with the year before the year on the c comab.dat file. iyearm = iyear-1 c icount=0 do i=iyearm,iyear iyeart = i if (iyeart .lt. 0) iyeart=iyeart+100 c do j=1,12 ktot = ndmon(j) if (mod(i,4) .eq. 0 .and. j .eq. 2) ktot=ktot+1 c do k=1,ktot do n=0,3 itimet = n*6 icount=icount+1 write(cdum(icount),200) iyeart,j,k,itimet enddo enddo enddo enddo c c Find the date/time from the atcf file ifound=0 do i=1,icount if (cdt .eq. cdum(i)) then ifound=i write(ludat,250) cdum(ifound-2) write(ludat,250) cdum(ifound-1) write(ludat,250) cdum(ifound) 250 format(a8) stop endif enddo c if (ifound .eq. 0) then write(ludat,950) 950 format('00000000') stop endif c 900 continue write(ludat,950) stop end