c c------------------------------------------------------------------ c Begin file /home/sting/foster/uars/tracsat/getinp.f c------------------------------------------------------------------ c subroutine getinp(nvol,ntms,utlim,ipltime,inttime,itxver,norbfr, + f107,f107a) c include "timegcm.h" include "tracsat.h" include "uars.h" dimension ipltime(nftot),utlim(2),htrange(3),itxver(7) c call lexcon(satatt, 8HUARSATT ,natt) call lexcon(utlim, 8HUTLIM ,nutlim) call lexcon(norbfr, 8HNORBFR ,nnorbfr) call lexcon(gcmvol, 8HHISTVOL ,nvol) call lexcon(mt, 8HDDHHMM ,ntms) call lexcon(f107, 8HF107 ,nf107) call lexcon(f107a, 8HF107A ,nf107a) call lexcon(inttime, 8HINTTIME ,ninttime) call lexcon(htrange ,8HHT_RANGE,nhtrange) call lexcon(ipltime ,8HPLTIME ,npltime) call lexcon(cint ,8HCINT ,ncint) call lexcon(cmin ,8HCMIN ,ncmin) call lexcon(cmax ,8HCMAX ,ncmax) call readlx(5,ierr) if (ierr.ne.1) then write(6,"(' ')") write(6,"(' >>> getinp readlx ierr=',i10)") ierr write(6,"(' ')") stop 'readlx' endif if (natt.ne.4) then write(6,"('>>> getinp: need UARSATT (sat attitude file) ', + ' (32 chars): natt=',i4)") natt stop 'UARSATT' endif c c utlim = limits of sat ut to process within a single day: c if (nutlim.ne.2) then write(6,"('>>> getinp: need 2 values for UTLIM: nutlim=', + i3)") nutlim stop 'utlim' endif if (utlim(1).lt.0..or.utlim(1).ge.24.) then write(6,"('>>> getinp: bad utlim(1)=',f10.3)") utlim(1) stop 'utlim1' endif if (utlim(2).lt.0..or.utlim(2).ge.24.) then write(6,"('>>> getinp: bad utlim(2)=',f10.3)") utlim(2) stop 'utlim2' endif if (utlim(1).ge.utlim(2)) then write(6,"('utlim(1) must be < utlim(2): utlim1,2=',2f10.3)") + utlim stop 'utlim' endif c c nvol = number of timegcm volumes: c if (mod(nvol,4).ne.0) then write(6,"('>>> getinp: gcm history vol names (HISTVOL) should', + ' be 32 chars each: nvol=',i4)") nvol stop 'HISTVOL' endif nvol = nvol/4 if (nvol.gt.mxvols) then write(6,"('>>> getinp: too many history vols: nvol=',i4)") nvol stop 'nvol' endif c c Do time interpolation only if inttime > 0 c if (ninttime.le.0) then write(6,"('>>> getinp warning: ninttime=',i3,' will ', + 'default to no interpolation in time')") ninttime inttime = 0 endif c c ntms = number of timegcm histories: c if (mod(ntms,3).ne.0) then write(6,"('>>> getinp: need 3 integers per time (DDHHMM):', + ' ntms=',i4)") ntms stop 'ntms' endif ntms = ntms/3 if (ntms.gt.mxtms) then write(6,"('>>> getinp: too many history times: ntms=',i4)") + ntms stop 'ntms' endif if (inttime.gt.0.and.ntms.lt.2) then write(6,"('>>> getinp: need at least 2 times for time ', + ' interp: ntms=',i3)") ntms stop 'ntms' endif c c If not doing time interpolation, we will use only the first c history given: c if (inttime.le.0.and.ntms.gt.1) then write(6,"('>>> getinp: inttime=',i2,' but ntms=',i3,/ + ' Since we are not doing time interp, I will ignore ', + 'histories after the first one')") inttime,ntms endif c c Fields to plot: c nflds (in timegcm.h) = number of fields on timegcm histories (30) c nftot = number of fields available in this code (nflds+other calculated c fields) As of 2/19/92 other fields are: c ver6300 (volume emmision rate at 6300A) c if (npltime.le.0) then write(6,"('>>> getinp: no fields to plot? npltime=',i3)") + npltime stop 'npltime' elseif (npltime.ne.nftot) then write(6,"('>>> getinp: need ',i3,' values for PLTIME', + ' -- got ',i3)") nftot,npltime stop 'npltime' endif c c Need height field for interpolations: c if (ipltime(itxz).le.0) then write(6,"('>>> getinp warning: need gcm height field for ', + 'interpolation: setting ipltime(',i2,') to 1')") itxz ipltime(itxz) = 1 endif c c Range of zp for y-axis (pltlon and pltlat): c common/gcm/ gcmvol,mt(3,mxtms),ht1,dht,,nhtscale c parameter (nhtscale=21,ht1=60.,dht=20.) ! 60-460km c if (nhtrange.le.0) then ht1 = 60. dht = 20. nhtscale = 21 write(6,"('>>> getinp: defaulting nhtscale=',i2,' dht=', + f6.2,' ht1=',f6.2)") nhtscale,dht,ht1 elseif (nhtrange.ne.3) then write(6,"('>>> HT_RANGE needs 3 values (got ',i3,')')") + nhtrange stop 'htrange' endif ht1 = htrange(1) dht = htrange(2) nhtscale = ifix(htrange(3)) write(6,"('getinp: ht1=',f8.2,' dht=',f8.2,' nhtscale=',i3)") + ht1,dht,nhtscale c c Need following fields for calculation of ver6300: c itxt,itxte,itxo2,itxo1,itxn2,itxo2p,itxne c if (ipltime(nflds+1).gt.0) then do i=1,7 if (ipltime(itxver(i)).le.0) then write(6,"('getinp: need field ',i2,' for calculation ', + 'of ver6300 -- setting ipltime(',i2,') to 1')") + itxver(i),itxver(i) ipltime(itxver(i)) = 1 endif enddo c c Need fluxes for ver6300: if (nf107.le.0.or.nf107a.le.0) then write(6,"('>>> getinp: need fluxes f107 and f107a for ', + 'calculation of ver6300')") stop 'f107' endif endif c c Number of orbits per frame if (nnorbfr.le.0) norbfr = 1 c c Contour intervals: c if (ncint.le.0) then do ip=1,nftot cint(ip) = 0. enddo elseif (ncint.ne.nftot) then write(6,"('>>> Need ',i3,' contour intervals (CINT),' + ' or none: got ',i3,' -- stop ')") + nftot,ncint stop 'CINT' endif c c Contour minimums: c if (ncmin.le.0) then do ip=1,nftot cmin(ip) = 1. enddo elseif (ncmin.ne.nftot) then write(6,"('>>> Need ',i3,' contour minimums (CMIN),' + ' or none: got ',i3,' -- stop ')") + nftot,ncmin stop 'CMIN' endif c c Contour maximums: c if (ncmax.le.0) then do ip=1,nftot cmax(ip) = 0. enddo elseif (ncmax.ne.nftot) then write(6,"('>>> Need ',i3,' contour maximums (CMAX),' + ' or none: got ',i3,' -- stop ')") + nftot,ncmax stop 'CMAX' endif c return end