integer yearday, year, month, day integer RETARD c c RETARD + 1 is the first day of year c c year = 1979 c RETARD = 10591000 c year = 1980 c RETARD = 10956000 c year = 1981 c RETARD = 11322000 c year = 1982 c RETARD = 11687000 c year = 1983 c RETARD = 12052000 year = 1984 RETARD = 12417000 c year = 1985 c RETARD = 12783000 do 1000 month=1,12 do 500 day=1,124 c c Read in the 361 point grid for the time. c do 300 igrid=1,361 read (*,*,end=2000) & lt,lat,lon,p,sqvap,t,sqvat,px,py,pxx,pxy,pyy if ( lon .lt. 500 ) lon = lon * 1000 fhour = lt - lt/1000*1000 if ( fhour .eq. 0 ) then ihour = 0 else if ( fhour .eq. 500 ) then ihour = 12 else if ( lt .eq. 66666666 ) then goto 1000 else print *,"What's up?" stop endif yearday = (lt - RETARD)/1000 call daytodate(year,yearday,month,day) ipx = px*1E3 ipy = py*1E3 ipxx = pxx*1E6 ipxy = pxy*1E6 ipyy = pyy*1E6 c c This is my write format for the 86 dataset AB. c write(*,"(4i3,i4,i5,f8.1,f7.1,2f5.1,2i5,3i6)") & year-1900,month,day,ihour, & nint(lat/1000.0),nint(lon/1000.0),p,t,sqvap,sqvat, & ipx,ipy,ipxx,ipxy,ipyy 300 continue c c Read in buoy positions for the time and toss. c 301 read (*,*,end=2000) lt,id,lat,lon,lat,lon,p,t if ( id .ne. -1 ) goto 301 500 continue 1000 continue 2000 stop end