subroutine limons (root, limmo) character*(*) root integer limmo(2) c find the range of months present character*60 filnam integer lenam, iymo, nextmo, mold integer*2 iyr, imon, iday limmo(1) = 0 limmo(2) = 0 c pick up current date call getdat (iyr, imon, iday) iymo = iyr*100 + imon c go backwards from current month looking for last month on CDrom c old line :- c do while (limmo(2) .eq. 0 .and. iymo .gt. 196000) c Modified July 16th 2003 - Peter - enables iscbul to work on a c subset of data and NOT just from 1960+ - backwards do while (limmo(2) .eq. 0 .and. iymo .gt. 190000) call monfil (iymo, root, filnam, lenam) if (lenam .eq. 0) then iymo = nextmo (iymo, -1) else limmo(2) = iymo end if end do if (limmo(2) .ne. 0) then c now find first month present c July 16th 2003 Peter - existing code stopped when hit a c non-existent month EVEN though there could be earlier c months c old line :- c do while (limmo(1) .eq. 0) do while (iymo .gt. 190000) call monfil (iymo, root, filnam, lenam) if (lenam .ne. 0) then mold = iymo c old line moved to end of 'end if' c iymo = nextmo (iymo, -1) else limmo(1) = mold end if iymo = nextmo (iymo, -1) end do end if return end