c c------------------------------------------------------------------ c Begin file /home/sting/foster/timescdf/getinp.f c------------------------------------------------------------------ c subroutine getinp c include 'timescdf.h' c call lexcon(histvol ,8HHISTVOL ,nhvols) call lexcon(mtimes ,8HDDHHMM ,ntimes) call lexcon(iden ,8HIDEN ,niden) call lexcon(unixdir ,8HUNIXDIR ,nunixdir) call readlx(5,ierr) if (ierr.ne.1) then write(6,"(' ')") write(6,"('>>> getinp readlx ierr=',i10)") ierr write(6,"(' ')") stop 'readlx' endif C C Iden = 0,1,2 for mass mixing ratios, number densities, or mixing C ratios of number densities C if (niden.lt.0.or.iden.gt.2) then write(6,"(' >>> getinp: no iden -- will default to cm-3')") iden = 1 endif C C Histvol(s): C if (mod(nhvols,3).ne.0) then write(6,"('>>> getinp: history volumes must be 24-chars each', + /' nhvols=',i3)") nhvols stop 'nhvols' endif nhvols = nhvols/3 if (nhvols.gt.mxvols) then write(6,"(' >>> getinp: nhvols.gt.mxvols: nhvols=',I3, + ' mxvols=',i3)") nhvols,mxvols stop 'nhvols' endif C C Number of desired times: C if (ntimes.le.0) then write(6,"('>>> getinp: need model times (DDHHMM)')") stop 'mtimes' endif if (mod(ntimes,3).ne.0) then write(6,"('>> getinp: model times should come in triplets ', + '(dd,hh,mm): ntimes=',i3)") ntimes stop 'ntimes' endif ntms = ntimes/3 if (ntms.gt.mxtms) then write(6,"('>>> getinp: too many model times (DDHHMM);', + ' ntms=',i3,' mxtms=',i3)") ntms,mxtms stop 'mxtms' endif c c Ut loop: c (mh,mm=99 means search only) c do 100 it=1,ntms if (mtimes(2,it).ne.99.and. + (mtimes(2,it).lt.0.or.mtimes(2,it).gt.23)) then write(6,"('>>> getinp: bad model hour: ',i3,' it=',i3)") + mtimes(2,it),it stop 'mhour' endif if (mtimes(3,it).ne.99.and. + (mtimes(3,it).lt.0.or.mtimes(3,it).gt.59)) then write(6,"('>>> getinp: bad model minute: ',i3,' it=',i3)") + mtimes(3,it),it stop 'mm' endif ut(it) = float(mtimes(2,it))+float(mtimes(3,it))/60. 100 continue c c Unix directory to which new cdf file may be copied from cray disk: if (nunixdir.gt.0) then nunixdir = nunixdir*8/32 write(6,"('getinp: unixdir=',a)") unixdir endif c return end