        subroutine PUTVAR
      include 'SIZE.INC'
      include 'GLOBAL.INC'
      include 'LOCAL.INC'
      include 'UNITS.INC'
      include 'TRANS.INC'
      include 'INPAR.INC'
      go to (100,170,330,400,470,530,590,660,730,780,880,950,1060,1130,
     &   1200,1290,1350,1460), ICOM
100   continue
      go to (110,120,130,140,150,160), IVAR
110   continue
      CHEMNA(ICL1,ICL2) = L1
      go to 1530
120   continue
      ECONAM(ICL1) = L1
      go to 1530
130   continue
      LOADNM(ICL1) = L1
      go to 1530
140   continue
      PRODNM(ICL1) = L1
      go to 1530
150   continue
      TYPEG(ICL1) = L1
      if (TYPEG(ICL1).eq.'l') TYPEG(ICL1) = 'L'
      if (TYPEG(ICL1).eq.'e') TYPEG(ICL1) = 'E'
      if (TYPEG(ICL1).eq.'h') TYPEG(ICL1) = 'H'
      if (TYPEG(ICL1).eq.'b') TYPEG(ICL1) = 'B'
      go to 1530
160   continue
      AIRTYG(ICL1) = L1
      if (AIRTYG(ICL1).eq.'r') AIRTYG(ICL1) = 'R'
      if (AIRTYG(ICL1).eq.'u') AIRTYG(ICL1) = 'U'
      if (AIRTYG(ICL1).eq.'m') AIRTYG(ICL1) = 'M'
      if (AIRTYG(ICL1).eq.'t') AIRTYG(ICL1) = 'T'
      go to 1530
170   continue
      go to (180,190,200,210,220,230,240,250,260,270,280,290,300,310,320
     &   ), IVAR
180   continue
      FIXFIL = I2
      go to 1530
190   continue
      IUNITG = I2
      go to 1530
200   continue
      if (I2.le.0.or.I2.gt.KCHEM) then
         write (TTYOUT(MACHNO),5000) KCHEM,I2,MCHEMG
5000  format (//' MCHEM cannot be negative, zero or greater than the'/' 
     &current value of KCHEM (now set at',I2,').  MCHEM'/' has not been 
     &set to',I5,'; it is still = ',I2,'.')
      else
         MCHEMG = I2
      endif
      go to 1530
210   continue
      if (I2.le.NCHEM) then
         KCHEM = I2
      else
         write (TTYOUT(MACHNO),5010) NCHEM
5010  format (//' Maximum number of chemicals is:',I3,'.'/              
     .'  KCHEM not changed.'//)
      endif
      go to 1530
220   continue
      if (I2 .gt. 0 .and. I2 .le. 3) then
         MODEG = I2
      else
      write (TTYOUT(MACHNO),224)
224   format(' EXAMS has only three operational modes--',/,             
     -       '    Mode 1 -- steady-state analyses',/,                   
     -       '    Mode 2 -- initial value problems',/,                  
     -       '    Mode 3 -- dynamics over annual cycles',//,            
     -       ' MODE has not been altered.')
      go to 1530
      endif
      IRUN = 0
      IFLAG = 0
      if (MODEG.eq.3) then
         PRSWG = 0
         TCODEG = 2
      else
         PRSWG = 1
      endif
      go to 1530
230   continue
      PRSWG = I2
      go to 1530
240   continue
      if (I2 .gt. 0 .and. I2 .le. 13) then
         MONTHG = I2
      else
         write (TTYOUT(MACHNO),245)
245   format(' Set "month" to 1 through 12 for calendar months,',/,     
     -' or to 13 for average values.  "Month" has not been altered.')
      endif
      go to 1530
250   continue
      NYEARG = I2
      go to 1530
260   continue
      YEAR1G = I2
      if (MODEG.eq.3) then
         IRUN = 0
         IFLAG = 0
      endif
      go to 1530
270   continue
      if (I2.ge.1.and.I2.le.4) then
         TCODEG = I2
         if (MODEG .eq. 3) TCODEG=2
         IRUN = 0
         IFLAG = 0
      else
         write (TTYOUT(MACHNO),5020)
5020     format (/' TCODE must be 1, 2, 3, or 4.  Command cancelled.')
      endif
      go to 1530
280   continue
      CINTG = R4
      go to 1530
290   continue
      TENDG = R4
      IRUN = 0
      IFLAG = 0
      go to 1530
300   continue
      TINITG = R4
      TINITL = TINITG
      go to 1530
310   continue
      ABSERG = R4
      go to 1530
320   continue
      RELERG = R4
      go to 1530
330   continue
      go to (340,350,360,370,380,390), IVAR
340   continue
      SPFLGG(ICL1,ICL2) = I2
      go to 1530
350   continue
      MWTG(ICL1) = R4
      go to 1530
360   continue
      SOLG(ICL1,ICL2) = R4
      go to 1530
370   continue
      ESOLG(ICL1,ICL2) = R4
      go to 1530
380   continue
      PKG(ICL1,ICL2) = R4
      go to 1530
390   continue
      EPKG(ICL1,ICL2) = R4
      go to 1530
400   continue
      go to (410,420,430,440,450,460), IVAR
410   continue
      KOCG(ICL1) = R4
      go to 1530
420   continue
      KOWG(ICL1) = R4
      go to 1530
430   continue
      KPBG(ICL1,ICL2) = R4
      go to 1530
440   continue
      KPDOCG(ICL1,ICL2) = R4
      go to 1530
450   continue
      KPSG(ICL1,ICL2) = R4
      go to 1530
460   continue
      KIECG(ICL1,ICL2) = R4
      go to 1530
470   continue
      go to (480,490,500,510,520), IVAR
480   continue
      KVOG(ICL1) = R4
      go to 1530
490   continue
      HENRYG(ICL1) = R4
      go to 1530
500   continue
      EHENG(ICL1) = R4
      go to 1530
510   continue
      VAPRG(ICL1) = R4
      go to 1530
520   continue
      EVPRG(ICL1) = R4
      go to 1530
530   continue
      go to (540,550,560,570,580), IVAR
540   continue
      QUANTG(ICL1,ICL2,ICL3) = R4
      go to 1530
550   continue
      KDPG(ICL1,ICL2) = R4
      go to 1530
560   continue
      RFLATG(ICL1,ICL2) = R4
      go to 1530
570   continue
      ABSORG(ICL1,ICL2,ICL3) = R4
      go to 1530
580   continue
      LAMAXG(ICL1,ICL2) = R4
      go to 1530
590   continue
      go to (600,610,620,630,640,650), IVAR
600   continue
      KAHG(ICL1,ICL2,ICL3) = R4
      go to 1530
610   continue
      EAHG(ICL1,ICL2,ICL3) = R4
      go to 1530
620   continue
      KNHG(ICL1,ICL2,ICL3) = R4
      go to 1530
630   continue
      ENHG(ICL1,ICL2,ICL3) = R4
      go to 1530
640   continue
      KBHG(ICL1,ICL2,ICL3) = R4
      go to 1530
650   continue
      EBHG(ICL1,ICL2,ICL3) = R4
      go to 1530
660   continue
      go to (670,680,690,700,710,720), IVAR
670   continue
      KOXG(ICL1,ICL2,ICL3) = R4
      go to 1530
680   continue
      EOXG(ICL1,ICL2,ICL3) = R4
      go to 1530
690   continue
      K1O2G(ICL1,ICL2,ICL3) = R4
      go to 1530
700   continue
      EK1O2G(ICL1,ICL2,ICL3) = R4
      go to 1530
710   continue
      KREDG(ICL1,ICL2,ICL3) = R4
      go to 1530
720   continue
      EREDG(ICL1,ICL2,ICL3) = R4
      go to 1530
730   continue
      go to (740,750,760,770), IVAR
740   continue
      KBACWG(ICL1,ICL2,ICL3) = R4
      go to 1530
750   continue
      QTBAWG(ICL1,ICL2,ICL3) = R4
      go to 1530
760   continue
      KBACSG(ICL1,ICL2,ICL3) = R4
      go to 1530
770   continue
      QTBASG(ICL1,ICL2,ICL3) = R4
      go to 1530
780   continue
      go to (790,800,810,820,830,840,850,860,870), IVAR
790   continue
      if (I2.le.NPX) then
         KOUNT = I2
      else
         write (TTYOUT(MACHNO),5030) NPX
5030  format (//' Maximum number of segments is:',I3,'.'                
     ./'  KOUNT not changed.'//)
      endif
      go to 1530
800   continue
      JFRADG(ICL1) = I2
      go to 1530
810   continue
      ITOADG(ICL1) = I2
      go to 1530
820   continue
      ADVPRG(ICL1) = R4
      go to 1530
830   continue
      JTURBG(ICL1) = I2
      go to 1530
840   continue
      ITURBG(ICL1) = I2
      go to 1530
850   continue
      XSTURG(ICL1) = R4
      go to 1530
860   continue
      CHARLG(ICL1) = R4
      go to 1530
870   continue
      DSPG(ICL1,ICL2) = R4
      go to 1530
880   continue
      go to (890,900,910,920,930,940), IVAR
890   continue
      SUSEDG(ICL1,ICL2) = R4
      go to 1530
900   continue
      BULKDG(ICL1,ICL2) = R4
      go to 1530
910   continue
      FROCG(ICL1,ICL2) = R4
      go to 1530
920   continue
      CECG(ICL1,ICL2) = R4
      go to 1530
930   continue
      AECG(ICL1,ICL2) = R4
      go to 1530
940   continue
      PCTWAG(ICL1,ICL2) = R4
      go to 1530
950   continue
      go to (960,970,980,990,1000,1010,1020,1030,1040,1050), IVAR
960   continue
      TCELG(ICL1,ICL2) = R4
      go to 1530
970   continue
      PHG(ICL1,ICL2) = R4
      go to 1530
980   continue
      POHG(ICL1,ICL2) = R4
      go to 1530
990   continue
      OXRADG(ICL1) = R4
      go to 1530
1000  continue
      REDAGG(ICL1,ICL2) = R4
      go to 1530
1010  continue
      BACPLG(ICL1,ICL2) = R4
      go to 1530
1020  continue
      BNBACG(ICL1,ICL2) = R4
      go to 1530
1030  continue
      PLMASG(ICL1,ICL2) = R4
      go to 1530
1040  continue
      BNMASG(ICL1,ICL2) = R4
      go to 1530
1050  continue
      KO2G(ICL1,ICL2) = R4
      go to 1530
1060  continue
      go to (1070,1080,1090,1100,1110,1120), IVAR
1070  continue
      DOCG(ICL1,ICL2) = R4
      go to 1530
1080  continue
      CHLG(ICL1,ICL2) = R4
      go to 1530
1090  continue
      if (R4 .ge. 0.0000 .and. R4 .le. 10.0000) then
         CLOUDG(ICL1) = R4
      else
         write (TTYOUT(MACHNO),5040)
      endif
5040  format(/' Cloudiness must be entered in tenths of sky covered;'/  
     .' EXAMS does not accept values outside the range 0.0 to 10.0.'/   
     .' CLOUD has not been changed.')
      go to 1530
1100  continue
      if (R4 .ge. 1.0000 .and. R4 .le. 2.0000) then
         DFACG(ICL1,ICL2) = R4
      else
         write (TTYOUT(MACHNO),5050)
5050  format(' DFAC only takes values between 1.0 (for a beam) and 2.0'/
     -       ' (fully diffused light field).  Parameter not altered.')
      endif
      go to 1530
1110  continue
      DISO2G(ICL1,ICL2) = R4
      go to 1530
1120  continue
      OZONEG(ICL1) = R4
      go to 1530
1130  continue
      go to (1140,1150,1160,1170,1180,1190), IVAR
1140  continue
      VOLG(ICL1) = R4
      go to 1530
1150  continue
      AREAG(ICL1) = R4
      go to 1530
1160  continue
      DEPTHG(ICL1) = R4
      go to 1530
1170  continue
      XSAG(ICL1) = R4
      go to 1530
1180  continue
      LENGG(ICL1) = R4
      go to 1530
1190  continue
      WIDTHG(ICL1) = R4
      go to 1530
1200  continue
      go to (1210,1220,1230,1240,1250,1260,1270,1280), IVAR
1210  continue
      RAING(ICL1) = R4
      go to 1530
1220  continue
      EVAPG(ICL1,ICL2) = R4
      go to 1530
1230  continue
      LATG = R4
      go to 1530
1240  continue
      LONGG = R4
      go to 1530
1250  continue
      WINDG(ICL1,ICL2) = R4
      go to 1530
1260  continue
      ELEVG = R4
      go to 1530
1270  continue
      RHUMG(ICL1) = R4
      go to 1530
1280  continue
      ATURBG(ICL1) = R4
      go to 1530
1290  continue
      go to (1300,1310,1320,1330,1340), IVAR
1300  continue
      STFLOG(ICL1,ICL2) = R4
      go to 1530
1310  continue
      STSEDG(ICL1,ICL2) = R4
      go to 1530
1320  continue
      NPSFLG(ICL1,ICL2) = R4
      go to 1530
1330  continue
      NPSEDG(ICL1,ICL2) = R4
      go to 1530
1340  continue
      SEEPSG(ICL1,ICL2) = R4
      go to 1530
1350  continue
      go to (1360,1370,1380,1390,1395,1400,1410,1420,1430,1440,1450,
     &1455),IVAR
1360  continue
      STRLDG(ICL1,ICL2,ICL3) = R4
      go to 1530
1370  continue
      NPSLDG(ICL1,ICL2,ICL3) = R4
      go to 1530
1380  continue
      PCPLDG(ICL1,ICL2,ICL3) = R4
      go to 1530
1390  continue
      DRFLDG(ICL1,ICL2,ICL3) = R4
      go to 1530
1395  continue
      if (R4.ge.0.0 .and. R4.le.1.0) then
        PRBENG=R4
      else
      write (TTYOUT(MACHNO),5060)
5060  format                                                            
     &(' PRBEN must be between 0.0 and 1.0--its value was not altered.')
      endif
      go to 1530
1400  continue
      SEELDG(ICL1,ICL2,ICL3) = R4
      go to 1530
1410  continue
      IMASSG(ICL1) = R4
      go to 1530
1420  continue
      ISEGG(ICL1) = I2
      go to 1530
1430  continue
      ICHEMG(ICL1) = I2
      go to 1530
1440  continue
      IMONG(ICL1) = I2
      go to 1530
1450  continue
      IDAYG(ICL1) = I2
      go to 1530
1455  continue
      IYEARG(ICL1) = I2
      go to 1530
1460  continue
      go to (1470,1480,1490,1500,1510,1520), IVAR
1470  continue
      CHPARG(ICL1) = I2
      go to 1530
1480  continue
      TPRODG(ICL1) = I2
      go to 1530
1490  continue
      NPROCG(ICL1) = I2
      go to 1530
1500  continue
      RFORMG(ICL1) = I2
      go to 1530
1510  continue
      YIELDG(ICL1) = R4
      go to 1530
1520  continue
      EAYLDG(ICL1) = R4
1530  continue
      return
      end
