c c------------------------------------------------------------------ c Begin file /home/sting/foster/timegcm/mksrc/getinp.f c------------------------------------------------------------------ c subroutine getinp c include 'mksrc.h' include 'glbm.h' character*8 chtms(mxtms) c c GLBMVOL = '/ROBLE/GLBMEAN/GLBM01 ' c TIMEOUT = 'FOSTER','TIMESRC','EQSMN01' c IDEN = 1 c DDHHMM = '02:00:00' c call lexcon(glbmvol ,8HGLBMVOL ,nglbmvol) call lexcon(itimeout,8HTIMEOUT ,ntimeout) call lexcon(chtms ,8HDDHHMM ,ntms) call lexcon(iyd ,8HYD ,niyd) call lexcon(idispose,8HDISPOSE ,ndispose) call lexcon(idatvol ,8HDATAVOL ,ndatvol) call lexcon(ipltcira,8HPLTCIRA ,npltcira) call lexcon(ipltacd ,8HPLTACD ,npltacd) call lexcon(ipltlb ,8HPLTLB ,npltlb) call lexcon(ipltzatm,8HPLTZATM ,npltzatm) call lexcon(acdhist ,8HACDHIST ,nacdhist) call lexcon(datvnm ,8HDATAOUT ,ndatvnm) call readlx(5,ierr) if (ierr.ne.1) then write(6,"(' ')") write(6,"(' >>> getinp readlx ierr=',i10)") ierr write(6,"(' ')") stop 'readlx' endif c if (nglbmvol.le.0) then write(6,"('>>> getinp: need glbmvol to create ', + 'timegcm13: nglbmvol=',i3)") nglbmvol stop 'glbmvol' endif if (ntimeout.le.0) then write(6,"('>>> getinp: need timeout vol ')") stop 'timeout' endif C C Number of desired times: C if (ntms.gt.mxtms) then write(6,"(' >>> getinp: too many times: mxtms=',I2,' ntms=', + I3)") mxtms,ntms stop 'ntms' endif if (ntms.le.0) then write(6,"(' >>> getinp: need at least one time: ntms=',I3)") + ntms stop 'ntms' endif c c Ut loop: c do 100 it=1,ntms read(chtms(it),"(2(i2,1x),i2)") md(it),mh(it),mm(it) if (mh(it).lt.0.or.mh(it).gt.23) then write(6,"(' >>> getinp: bad mh(',I2,') = ',I4)") it,mh(it) stop 'mh' endif if (mm(it).lt.0.or.mm(it).gt.59) then write(6,"(' >>> getinp: bad mm(',i2,') = ',i4)") it,mm(it) stop 'mm' endif mdut(it) = md(it) mhut(it) = mh(it) mmut(it) = mm(it) ut(it) = float(mhut(it))+float(mm(it))/60. 100 continue if (ndispose.le.0) idispose = 0 c c data vol: c if (ndatvol.le.0) idatvol = 0 if (idatvol.gt.0.and.ndatvnm.le.0) then write(6,"('>>> getinp: need name for data volume')") stop 'datvnm' endif if (idatvol.gt.0.and.niyd.le.0) then write(6,"('>>> getinp: need iyd if making data vol')") stop 'iyd' endif c c If doing data volume, need day of year to be either 80 (for equinox) c or 355 (for solstice) -- this is for zatmos (month) c if (idatvol.gt.0) then iday = iyd - iyd/1000*1000 if (iday.ne.80.and.iday.ne.355) then write(6,"('>>> getinp: datavol should be for either ', + ' equinox (day 80) or solstice (day 355): iday=',i4, + /' (this is for zatmos)')") + iday stop 'iday' endif month = 3 ! march equinox if (iday.eq.355) month = 12 ! december solstice endif if (idatvol.gt.0.and.nacdhist.ne.4) then write(6,"('>>> getinp: need 32-char mss path for acd history', + ' if doing data volume: nacdhist=',i3)") nacdhist stop 'acdhist' endif if (npltcira.le.0) ipltcira = 0 if (npltacd.le.0) ipltacd = 0 if (npltlb.le.0) ipltlb = 0 if (npltzatm.le.0) ipltzatm = 0 c return end