      SUBROUTINE DEF(IQ,IRT)
      COMMON DDM(95),NOV,DD1(7),IR,DD2(6)
      DIMENSION IQT(40),IQI(7)
      DATA IQI/2,3,5,6,8,9,10/
      IF (IQ) 10,20,50
   10 IQQ=(-IQ)
      IQT(IQQ)=0
      RETURN
   20 DO 40 I=1,40
   30 IQT(I)=0
   40 CONTINUE
      RETURN
   50 IF (IQ.EQ.80) GO TO 140
      IF (IQ.GT.40) GO TO 110
      IF (IQ.EQ.40) GO TO 120
      IF (IQ.EQ.39) GO TO 130
      IF (IQT(IQ).EQ.0) GO TO 60
      IRT=1
      CALL QLIST(IQ,IRT)
      RETURN
  60  IRT=0
      IF(IQ.NE.12.AND.IR.NE.2) WRITE(*,*)
      CALL QLIST(IQ,IRT)
      IQT(IQ)=1
      IF (NOV-1) 70,90,100
   70 WRITE(*,80)
   80 FORMAT('  INPUT:'\)
      RETURN
   90 IF (IQ.EQ.2) WRITE(*,1001)
      IF (IQ.EQ.3) WRITE(*,1007)
      IF (IQ.EQ.5) WRITE(*,1003)
      IF (IQ.EQ.6) WRITE(*,1004)
      IF (IQ.EQ.8) WRITE(*,1005)
      IF (IQ.EQ.9) WRITE(*,1006)
      IF (IQ.EQ.17) WRITE(*,1012)   
      IF (IQ.EQ.36) WRITE(*,1024)   
      GO TO 70
 100  IF (IQ.EQ.1) WRITE(*,2000)
      IF (IQ.EQ.2) WRITE(*,2005)
      IF (IQ.EQ.3) WRITE(*,2010)
      IF (IQ.EQ.5) WRITE(*,2020)
      IF (IQ.EQ.6) WRITE(*,2030)
      IF (IQ.EQ.8) WRITE(*,2040)
      IF (IQ.EQ.9) WRITE(*,2050)
      IF (IQ.EQ.13.AND.IR.NE.3) WRITE(*,2060)
      IF (IQ.EQ.13) WRITE(*,2070)   
      IF (IQ.EQ.17) WRITE(*,2080)   
      IF (IQ.EQ.21) WRITE(*,2090)   
      IF (IQ.EQ.23) WRITE(*,2095)
      IF (IQ.EQ.36) WRITE(*,2110)   
      GO TO 70  
  110 IQQ=IQ-40 
      IQT(IQQ)=0
      IF (NOV.GT.1) RETURN  
  115 IF (IQQ.EQ.1) WRITE(*,2000)   
      IF (IQQ.EQ.2) WRITE(*,2005)   
      IF (IQQ.EQ.3) WRITE(*,2010)   
      IF (IQQ.EQ.5) WRITE(*,2020)   
      IF (IQQ.EQ.6) WRITE(*,2030)   
      IF (IQQ.EQ.8) WRITE(*,2040)
      IF (IQQ.EQ.9) WRITE(*,2050)   
      IF (IQQ.EQ.17) WRITE(*,2080)  
      IF (IQQ.EQ.21) WRITE(*,2090)  
      IF (IQQ.EQ.23) WRITE(*,2095)  
      IF (IQQ.EQ.36) WRITE(*,2110)  
      RETURN
  120 IQQ=IRT   
      IF (IQQ.GT.0) GO TO 115
      IF (IRT.EQ.-1) WRITE(*,601)   
      IF (IRT.EQ.-2) WRITE(*,602)   
      IF (IRT.EQ.-3) WRITE(*,603)   
      IF (IRT.EQ.-4) THEN
      WRITE(*,604)
      PAUSE
      WRITE(*,605)
      PAUSE
      WRITE(*,606)
      PAUSE
      WRITE(*,607)
      PAUSE 
      ENDIF 
      WRITE(*,600)  
      RETURN
  130 WRITE(*,500)
      PAUSE
      WRITE(*,501)
      PAUSE
      RETURN
  140 WRITE(*,*) ' LOC,SEA,MUN,AGN,REL,STB,WND'
      DO 145 I=1,7
  145 IQT(IQI(I))=1
      RETURN
C-------------------------------------------------
C CONTROL OPTION AND QUESTION FORMAT STATEMENTS 
C-------------------------------------------------
  600 FORMAT(// 
     +' TABLE DISPLAY CODES  1 CONTROL OPTIONS',5X, 
     +'2 ASSESSMENT OPTIONS'/,22X,'3 OUTPUT OPTIONS'
     +,6X,'4 ALPHABETIC LISTING'/)  
  601 FORMAT(// 
     +14X,'CONTROL OPTIONS'//,6X,'RST  RESTART'/,6X,'RSN  RESCAN'/, 
     +6X,'ALL  EXECUTE'/,6X,'STP  STOP'//,6X,'GTO  GO TO '  
     +'QUESTION NO. (GTO 3)'/,6X,'IRT  RETURN TO QUESTION NO.'/,
     +6X,'INP  INPUT QUESTION NO.'//,6X,'HLD  HOLD VARIABLE '   
     +'(HLD HML)'/,6X,'RLS  RELEASE VARIABLE'//,6X,'TAB  DISPLAY'   
     +' TABLE'/,6X,'DSP  DISPLAY QUESTION DEFINITION'/,6X,'??? '
     +' LIST OF DISPLAY CODES'/)
  602 FORMAT(///
     +16X,'ASSESSMENT CONTROLS'//,5X,'IMA=0  DOSAGE (DEFAULT)'/,
     +9X,'1  CONCENTRATION (MG/CU M)'/,9X,'2  CONCENTRATION (PPM)'  
     +/,9X,'3  FUMIGATION CONCENTRATION'//,5X,'2MC=0  DO NOT'   
     +'USE 2-MINUTE CORRECTION'/,12X,'WITH GB AND VX VAPOR'/,   
     +9X,'2  USE 2-MINUTE CORRECTION WITH'/,12X,'GB AND VX' 
     +' VAPOR (DEFAULT)'//,5X,'MNR=0  NO EFFECTS, NO DEATHS'
     +', 1% LETHALITY'/,9X,'1  NO DEATHS, 1% LETHALITY'/,   
     +9X,'2  1% LETHALITY'//,5X,'VDP=0  W/O VAPOR DEPLETION '   
     +'(DEFAULT)'/,9X,'1  W/VAPOR DEPLETION'/)  
 603  FORMAT(//
     +15X,'OUTPUT CONTROLS'//,5X,'NOV=0  LIST QUESTIONS ONLY'/,9X,  
     +'1  LIST QUESTIONS AND OPTIONS'/,9X,'2  LIST OPTIONS WITH'
     +' DEFINITIONS'//,5X,'OPO=0  OUTPUT SHORT HEADING (DEFAULT)'/, 
     +9X,'1  LIST DOSAGE AND DISTANCE'/,9X,'2  ABOVE PLUS COMPON'   
     +'ENTS OF D'/,9X,'3  CLOUD HALF-WIDTH WITH X'//,5X,
     +'OPC=0  USE HT MAX FROM PLRS'/,9X,'1  LIST F(X), USE '
     +'HT MAX'/,9X,'2  USE HT=F(X)'/,9X,'3  LIST AND USE F(X)'/)
  604 FORMAT(// 
     +' CODE                          INPUT VARIABLE'/  
     +'  AGN   AGENT, SEE  DSP 6'/  
     +'  ALL   CONTROL WORD,EXECUTE PROGRAM'/
     +'  ALF   SLOPE OF THE SIGMA-Y VERSUS X CURVE'/
     +'  ARE   AREA OF PUDDLE                    (M^2)'/
     +'  BPT   BOILING POINT                     (DEG C)'/
     +'  BRT   BREATHING RATE                    (L/MIN)'/
     +'  BTA   SLOPE OF THE SIGMA-Z VERSUS X CURVE'/
     +'  CHT   CLOUD HEIGHT                      (FT)'/
     +'  CRD   CLOUD RADIUS                      (M)'/
     +'  DLX   CHANGE IN X (FIRST CYCLE)         (M)'/
     +'  DOW   DOWNWIND LENGTH OF PUDDLE         (M)'/
     +'  DST   DIAMETER OF STACK                 (M)'/
     +'  FMV   MOLECULAR VOLUME                  (CM^3 /GM MOLE)'/
     +'  FMW   MOLECULAR WEIGHT'/
     +'  FRO   SLOPE OF THE FROST WIND PROFILE'/
     +'  GTO   CONTROL  GO TO SPECIFIED QUESTION'/
     +'  HML   HEIGHT OF MIXING LAYER        (M)')
  605 FORMAT(//
     +'  HLD   HOLD VALUE OF  SYMBOL'/
     +'  HRL   HEAT RELEASED                 (CAL)'/
     +'  HRS   LOCAL STANDARD MILITARY TIME  (HRS)'/
     +'  HST   HEIGHT OF STACK               (M)'/
     +'  HTS   HEIGHT OF SOURCE              (M)'/
     +'  ICC   CLOUD COVER                   (1/10)'/
     +'  IDD   NUMBER OF THE DAY'/
     +'  IMA   METHOD OF ASSESSMENT, SEE TAB 2'/
     +'  IMM   NUMBER OF THE MONTH'/
     +'  INP   CONTROL.  CLEAR INPUT BLOCK FOR QUESTION'/
     +'  IRT   CONTROL.  RETURN TO SPECIFIED QUESTION'/
     +'  LOC   LOCATION, SEE DSP 2'/
     +'  MNR   MINIMUN RESPONSE LEVEL, SEE TAB 2'/
     +'  MUN   MUNITION, SEE DSP 5'/
     +'  NCI   NUMBER OF CONCENTRATIONS OF INTEREST'/
     +'  NDI   NUMBER OF DOSAGES OF INTEREST'/
     +'  NMU   NUMBER OF MUNITIONS'/
     +'  NOV   NOVICE LEVEL'/
     +'  NQI   NUMBER OF SOURCE INTERVALS')
  606 FORMAT(//
     +'  OPC   OUTPUT FOR STACK, SEE TAB 3'/
     +'  OPO   OUTPUT CONTROL, SEE TAB 3'/
     +'  PMM   ATOMOSPHERIC PRESSURE             (MM HG)'/
     +'  QQQ   AIRBORNE SOURCE                   (MG)   '/
     +'  RDE   RELATIVE DENSITY OF EFFLUENT'/
     +'  REF   REFLECTION COEFFICIENT (DEFAULT=1)'/
     +'  REL   METHOD OF RELEASE, SEE DSP 8'/
     +'  RLS   RELEASE HOLD OF SYMBOL VALUE'/   
     +'  RSN   RESCAN FROM QUESTION 2'/ 
     +'  RST   CONTROL.  RESTART'/  
     +'  SEA   SEASON, SEE DSP 3'/  
     +'  SKF   SKIN FACTOR FOR SUBJECT CLOTHING'/   
     +'  SLA   LATITUDE                          (DEG)'/
     +'  SLO   LONGITUDE                         (DEG)'/
     +'  SMH   SAMPLING HEIGHT                   (M)'/
     +'  STB   STABILITY, SEE DSP 9'/
     +'  SUN   SUN ELEVATION ANGLE               (DEG)'/
     +'  SUR   SURFACE TYPE, SEE DSP 13')
  607 FORMAT(//
     +'  SEV   SETTLING VELOCITY OF CLOUD CENTROID (DEFAULT=0) (M/SEC)'/
     +'  SXS   SOURCE SIGMA -X                   (M)'/
     +'  SYR   REFERENCE SIGMA -Y AT 100M        (M)'/
     +'  SYS   SOURCE SIGMA -Y                   (M)'/
     +'  SZR   REFERNCE SIGMA -Z AT 100M         (M)'/
     +'  SZS   SOURCE SIGMA -Z                   (M)'/
     +'  TEV   TIME OF EVAPORATION               (MIN)'/
     +'  TIM   TIME AFTER FUNCTIONING (INS,HD)   (MIN)'/
     +'  TMC   TIME TO MET CHANGE                (MIN)'/
     +'  TMP   TEMPERATURE                       (DEG C)'/
     +'  TST   TEMPERATURE OF STACK              (DEG C)'/
     +'  VAP   VAPOR PRESSURE                    (MM HG)'/  
     +'  CDP   VAPOR DEPLETION INDICATOR, SEE TAB 2'/   
     +'  VST   VELOCITY OF EFFLUENT FROM STACK   (M/SEC)'/  
     +'  WND   TRANSPORT WIND SPEED              (M/SEC)'/  
     +'  WOO   WOODS TYPE, SEE DSP 36'/ 
     +'  ZZO   ROUGHNESS LENGHT                  (CM)'/ 
     +'  2MC   TWO MINUTE CONNECTIONS CONTROL, SEE TAB 2')  
C------------------------   
C NOV=1 FORMAT STATEMENTS   
C-------------------------  
 1001 FORMAT(8X,'AAD,DPG,EWA,JHI,LBG,NAP,PBA,PAD,RMA,UAD,EUR,NDF')  
 1007 FORMAT(8X,'WIN,SPR,SUM,FAL')  
 1003 FORMAT(8X,'105,155,8IN,500,750,M55,525,139,M23,4.2,NON')  
 1004 FORMAT(8X,'GA,GB,GD,GF,VX,BZ,HY,UD,HD,H1,H3,HT,LL,AC,CG,CK',  
     +           'DM,NA')
 1005 FORMAT(8X,'INS,EVP,SEM,VAR,STK,STJ,FLS,FIR')  
 1006 FORMAT(8X,'A,B,C,D,E,F,U,S,W')
 1012 FORMAT(8X,'GRA,NPR,NDF')  
 1024 FORMAT(8X,'DW,MW,CF,MS,RF')   
C-------------------------  
C NOV=2 FORMAT STATEMENTS   
C-------------------------  
 2000 FORMAT(8X,'0  SHORT LISTING FOR THE EXPERT'/,8X,'1  LISTS'
     $' OPTIONS FOR MULTIPLE CHOISE QUESTIONS'/,8X,'2  DEFINES' 
     $' ALL OPTIONS FOR MULTIPLE CHOISE QUESTIONS'/,8X,'3  EXPL'
     $'AINS PROGRAM INPUTS'/)   
 2005 FORMAT(8X,'AAD    ANNISTON ARMY DEPOT'/8X,
     $'DPG    DUGWAY PROVING GROUND AND TOOELE ARMY DEPOT'/ 8X, 
     $'EWA    EDGEWOOD AREA,APG'/8X,'JHI    JOHNSTON ISLAND'/ 8X,   
     $'LBG    LEXINGTON-BLUE GRASS ARMY DEPOT'/ 8X, 
     $'NAP    NEWPORT AMMUNITION PLANT'/ 8X,'PBA    PINE BLUFF ARSENAL' 
     $/8X,'PAD    PUEBLO ARMY DEPOT'/ 8X,'RMA    ROCKY MOUNTAIN ARSENAL'
     $/8X,'UAD    UMATILLA ARMY DEPOT'/8X,'EUR    USAEUR'/8X,   
     $'NDF    NOT DEFINED') 
 2010 FORMAT(8X,'WIN    WINTER'/8X,'SPR    SPRING'/8X,'SUM    SUMMER'/  
     $8X,'FAL    FALL') 
 2020 FORMAT(8X,'105    105-MM CARTRIDGE,M60,M360'/8X,  
     $'155    155-MM PROJECTILE,M110,M121A1'/8X,
     $'8IN    8-INCH PROJECTILE,M126'/8X,'500    500-LB BOMB,MK94'/8X,  
     $'750    750-LB BOMB,MC-1'/8X,'M55    115-MM ROCKET,M55'/8X,   
     $'525    525-LB BOMB,MK116'/8X,'139    BOMBLET,M139'/8X,   
     $'M23    LAND MINE,M23'/8X,'4.2    4.2-INCH CARTRIDGE,M2A4'/8X,
     $'NON    NONMUNITION') 
 2030 FORMAT (8X,'GA  TABUN',15X,'H1  HN-1,NITROGEN MUSTARD'/ 8X,'GB  SA
     $RIN',15X,'H3  HN-3,NITROGEN MUSTARD'/ 8X,'GD  SOMAN',15X,'HT  60% 
     $HD & 40% T' /8X,'GF  EA 1212',13X,'LL  LEWISITE'/ 8X,'VX  EA 1701'
     $,13X,'AC  HYDROGEN CYANIDE'/ 8X,'BZ  INCAP AGENT', 9X,'CG  PHOSGEN
     $E'/ 8X,'HY  HYDRAZINE',11X,'CK  CYANOGEN CHLORIDE'/ 8X,'UH  UDMH',
     $16X,'DM  ADAMSITE'/ 8X,'HD  DISTILLED MUSTARD', 3X,'NA  NOT AN AGE
     $NT')  
 2040 FORMAT(8X,'INS    INSTANTANEOUS(EXPLOSIVE)'/8X,'EVP    EVAPORATION
     $ FROM A PUDDLE FORMED BY A SPILL'/8X,'SEM    UNIFORM RELEASE FOR A
     $FINITE TIME'/8X,'VAR    SOURCE DEFINED AS A NUMBER OF UNIFORM RELE
     $ASES(MAX 6)'/8X,'STK    RELEASE OF HEATED EFFLUENT FROM STACK'/8X,
     $'STJ    RELEASE FROM STACK WITH JET EFFECT'/8X,'FLS    FLASH FIRE 
     $FROM GROUND LEVEL'/8X,'FIR    FIRE BURNING FOR FINITE TIME')  
 2050 FORMAT(8X,'A',5X,'VERY UNSTABLE'/ 8X,'B',5X,'UNSTABLE'/8X, 'C',5X,
     $       'SLIGHTLY UNSTABLE'/,8X,'D',5X,'NEUTRAL'/,8X,'E',5X,   
     $       'SLIGHTLY STABLE'/,8X,'F',5X,'STABLE'/,8X,'U',5X,  
     $       'UNDEFINED'/,8X,'S',5X,'SELECT(PASQUILL)'/,8X,'W',5X,  
     $       'WOODS')
 2060 FORMAT(8X,'NQI  NUMBER OF TIME INTERVALS')
 2070 FORMAT(8X,'Q()  SOURCE FOR EACH INTERVAL'/,   
     $7X,'TQ()  CUMULATIVE TIME FROM BEGINNING OF FIRST')   
 2080 FORMAT(8X,'GRA  GRAVEL'/8X,'NPR  NONPOROUS(CONCRETE)'/8X,'NDF  NOT
     $ DEFINED')
 2090 FORMAT(8X,'FMW  MOLECULAR WEIGHT',/8X,'FMV  MOLECULAR'
     $' VOLUME'/8X,'VAP  VAPOR PRESSURE (MM HG)'/8X,
     $'BPT  BOILING POINT (DEG K)'/)
 2095 FORMAT(8X,'0  USE HT MAX FROM PLRS'/,8X,'1  LIST F(X),'   
     $' USE HT MAX'/,8X,'2  USE HT=F(X)'/,8X,'3  LIST F(X),'
     $' USE HT=F(X/)')  
 2100 FORMAT(8X,'GRA     GRAVEL, LOOSE EARTH'/8X,'NPR     NONPOROUS,
     $ CONCRETE, BLACKTOP'/8X,'NDF     NOT DEFINED'/' NOTE: THIS CODE   
     $ ONLY DETERMINES THE SIZE OF THE WETTED SURFACE') 
 2110 FORMAT(8X,'DW  DECIDUOUS, WINTER'/ 8X,'MW  MIXED, WINTER'/ 8X,
     $'CF  CONIFEROUS FOREST'/ 8X,'MS  MIXED SUMMER'/ 8X,   
     $'RF  RAIN FOREST')
  500 FORMAT(// 
     $'     The operator may control the length of the questions by'/   
     $' specifying the novice level. Level 2 will define all options,'/ 
     $' level 1 will list the options and level 0 will only state the'/ 
     $' questions. Responding with question marks provides the level'/  
     $' 2 list and the question is repeated.'/
     $'      The sequence of questions is determined by the answers'/   
     $' given.  Units are stated for numeric inputs. "Foreign" units'/  
     $' may be converted by preceeding the number with the character  '/
     $' code identifying the units. Two question marks will cause the '/
     $' code list to be displayed.'/
     $'      The questions terminate with ALL OTHER INPUT.'/
     $' Here only control options or data changes may be entered.'/ 
     $' Again question marks will display the options list. Control '/  
     $' options include restart(RST), stop(STP) and go to(GTO) any'/
     $' question number. The code ALL will complete this input and'/
     $' cause the downwind hazard to be computed.'////) 
  501 FORMAT(/  
     $'     If the changes made in the ALL questions cause the'/
     $' program to reaccess its data base the input logic is re-'/  
     $' scanned. This is shown by a display of the input questions,'/   
     $' but no input is required unless new questions are asked. The'/  
     $' program again stops at the ALL question, and will proceed'/ 
     $' with the answer ALL.'/'      When the downwind hazard esti-'/   
     $' mate has been made the program will terminate at the ALL'/  
     $' question. The operator may change individual parameter values'/ 
     $' [including NOV] and repeat the run or restart or stop.'/
     $' A hold[HLD] may be placed on any variable if you do not wish'/  
     $' its value to be changed by rescan of the data base. Input HLD'/
     $' and the variable code(eg. HLD HML). RLS will release the hold.'/
     $' For more information see Chemical Systems Technical Report'/
     $' ARCSL-TR-82014.'///////)
      END
