!    SUBROUTINE QSAT---------------------------------------------------
!  
!    SUITABLE FOR SINGLE COLUMN MODEL USE
!  
!    ORIGINAL VERSION WRITTEN FOR CYBER/ETA-10 BY M.FISHER DURING
!    SPRING AND SUMMER 1989
!    CODE REWORKED FOR CYBER/ETA10 BY D.GREGORY SPRING/SUMMER 1989
!  
!    CODE REWORKED FOR CRAY Y-MP BY D.GREGORY AUTUMN/WINTER 1989/90
!  
!    CODE REVIEWED BY C.WILSON   07/09/90
!  
!    VERSION NO. 1 DATED 31/1/90
!  
!    COSMOS DATA SET 'M20.UMCON(QSAT)'
!  
!    PROGRAMMING STANDARDS : UNIFIED MODEL DOCUMENTATION PAPER NO. 4
!    VERSION NO. 1
!  
!    SYSTEM TASK : P27
!  
!    PURPOSE : RETURNS A SATURATION MIXING RATIO GIVEN
!              A TEMPERATURE AND PRESSURE USING SATURATION
!              VAPOUR PRESSURES CALCULATED USING THE
!              GOFF-GRATCH FORMULAE, ADOPTED BY THE WMO AS
!              TAKEN FROM LANDOLT-BORNSTEIN, 1987 NUMERICAL
!              DATA AND FUNCTIONAL RELATIONSHIPS IN SCIENCE
!              AND TECHNOLOGY. GROUP V/VOL 4B METEOROLOGY.
!              PHYSICAL AND CHEMICAL PROPERTIES OF AIR, P35
!  
!              VALUES IN THE LOOKUP TABLE ARE OVER WATER ABOVE
!              0 DEG C AND OVER ICE BELOW THIS TEMPERATURE
!  
!  
!    DOCUMENTATION : UNIFIED MODEL DOCUMENTATION PAPER
!  
!  END-----------------------------------------------------------------
!
C*L  ARGUMENTS---------------------------------------------------------
!
      SUBROUTINE QSAT (QS,T,P,NPNTS)
!
      IMPLICIT NONE
!
C----------------------------------------------------------------------
! MODEL CONSTANTS
C----------------------------------------------------------------------
!
C*L------------------COMDECK C_EPSLON-----------------------------------
! EPSILON IS RATIO OF MOLECULAR WEIGHTS OF WATER AND DRY AIR
      REAL*8 EPSILON,C_VIRTUAL

      PARAMETER(EPSILON=0.62198D+00,
     &          C_VIRTUAL=1.0D+00/EPSILON-1.0D+00)
!
C----------------------------------------------------------------------
! LOCAL CONSTANTS
C----------------------------------------------------------------------
!
      REAL*8 T_LOW           ! LOWEST TEMPERATURE FOR WHICH LOOK-UP
                           ! TABLE OF SATURATION WATER VAPOUR
                           ! PRESSURE IS VALID (K)
!
      REAL*8 T_HIGH          ! HIGHEST TEMPERATURE FOR WHICH LOOK-UP
                           ! TABLE OF SATURATION WATER VAPOUR
                           ! PRESSURES IS VALID (K)
!
      REAL*8 DELTA_T         ! TEMPERATURE INCREMENT OF THE LOOK-UP
                           ! TABLE OF SATURATION VAPOUR PRESSURES
!
      INTEGER N            ! SIZE OF LOOK-UP TABLE OF SATURATION
                           ! WATER VAPOUR PRESSURES
!
      PARAMETER ( T_LOW = 183.15D+00,
     *            T_HIGH = 338.15D+00,
     *            DELTA_T = 0.1D+00,
     *            N = ((T_HIGH - T_LOW + (DELTA_T*0.5))/DELTA_T) +
     *            1.0D+00
     *          )
!
!
!----------------------------------------------------------------------
! VECTOR LENGTHS AND LOOP COUNTERS
!----------------------------------------------------------------------
!
      INTEGER NPNTS        ! VECTOR LENGTH
!
      INTEGER I            ! LOOP COUNTER
!
      INTEGER IES          ! LOOP COUNTER FOR DATA STATEMENT
                           ! LOOK-UP TABLE
!
!
!----------------------------------------------------------------------
! VARIABLES WHICH ARE INPUT
!----------------------------------------------------------------------
!
      REAL*8 T(NPNTS)        ! IN TEMPERATURE (K)
!
      REAL*8 P(NPNTS)        ! IN PRESSURE (PA)
!
!
!----------------------------------------------------------------------
! VARIABLES WHICH ARE OUTPUT
!----------------------------------------------------------------------
!
      REAL*8 QS(NPNTS)       ! OUT SATURATION MIXING RATIO AT TEMPERATURE
                           !     T AND PRESSURE P (KG/KG)
!
!
!----------------------------------------------------------------------
! VARIABLES WHICH ARE DEFINED LOCALLY
!----------------------------------------------------------------------
!
      REAL*8 ES(N)           ! TABLE OF SATURATION WATER VAPOUR
                           ! PRESSURE (PA) - SET BY DATA STATEMENT
                           ! CALCULATED FROM THE GOFF-GRATCH FORMULAE
                           ! AS TAKEN FROM LANDOLT-BORNSTEIN, 1987
                           ! NUMERICAL DATA AND FUNCTIONAL RELATIONSHIPS
                           ! IN SCIENCE AND TECHNOLOGY. GROUP V/ VOL 4B
                           ! METEOROLOGY. PHYSICAL AND CHEMICAL
                           ! PROPERTIES OF AIR, P35
!
      REAL*8 ATABLE          ! WORK VARIABLES
!
      INTEGER ITABLE       ! WORK VARIABLES
!
!----------------------------------------------------------------------
! 
! ---------------------------------------------------------------------
!  NO SIGNIFICANT STRUCTURE
! ---------------------------------------------------------------------
! 
!
!----------------------------------------------------------------------
! SATURATION WATER VAPOUR PRESSURE
!
! ABOVE 0 DEG C VALUES ARE OVER WATER
!
! BELOW 0 DEC C VALUES ARE OVER ICE
!----------------------------------------------------------------------
!
      DATA (ES(IES),IES=    1, 95) /
     *0.966483D-02,0.984279D-02,0.100240D-01,0.102082D-01,0.103957D-01,
     *0.105865D-01,0.107803D-01,0.109777D-01,0.111784D-01,0.113825D-01,
     *0.115902D-01,0.118016D-01,0.120164D-01,0.122348D-01,0.124572D-01,
     *0.126831D-01,0.129132D-01,0.131470D-01,0.133846D-01,0.136264D-01,
     *0.138724D-01,0.141225D-01,0.143771D-01,0.146356D-01,0.148985D-01,
     *0.151661D-01,0.154379D-01,0.157145D-01,0.159958D-01,0.162817D-01,
     *0.165725D-01,0.168680D-01,0.171684D-01,0.174742D-01,0.177847D-01,
     *0.181008D-01,0.184216D-01,0.187481D-01,0.190801D-01,0.194175D-01,
     *0.197608D-01,0.201094D-01,0.204637D-01,0.208242D-01,0.211906D-01,
     *0.215631D-01,0.219416D-01,0.223263D-01,0.227172D-01,0.231146D-01,
     *0.235188D-01,0.239296D-01,0.243465D-01,0.247708D-01,0.252019D-01,
     *0.256405D-01,0.260857D-01,0.265385D-01,0.269979D-01,0.274656D-01,
     *0.279405D-01,0.284232D-01,0.289142D-01,0.294124D-01,0.299192D-01,
     *0.304341D-01,0.309571D-01,0.314886D-01,0.320285D-01,0.325769D-01,
     *0.331348D-01,0.337014D-01,0.342771D-01,0.348618D-01,0.354557D-01,
     *0.360598D-01,0.366727D-01,0.372958D-01,0.379289D-01,0.385717D-01,
     *0.392248D-01,0.398889D-01,0.405633D-01,0.412474D-01,0.419430D-01,
     *0.426505D-01,0.433678D-01,0.440974D-01,0.448374D-01,0.455896D-01,
     *0.463545D-01,0.471303D-01,0.479191D-01,0.487190D-01,0.495322D-01/
      DATA (ES(IES),IES= 96,190) /
     *0.503591D-01,0.511977D-01,0.520490D-01,0.529145D-01,0.537931D-01,
     *0.546854D-01,0.555924D-01,0.565119D-01,0.574467D-01,0.583959D-01,
     *0.593592D-01,0.603387D-01,0.613316D-01,0.623409D-01,0.633655D-01,
     *0.644053D-01,0.654624D-01,0.665358D-01,0.676233D-01,0.687302D-01,
     *0.698524D-01,0.709929D-01,0.721490D-01,0.733238D-01,0.745180D-01,
     *0.757281D-01,0.769578D-01,0.782061D-01,0.794728D-01,0.807583D-01,
     *0.820647D-01,0.833905D-01,0.847358D-01,0.861028D-01,0.874882D-01,
     *0.888957D-01,0.903243D-01,0.917736D-01,0.932464D-01,0.947407D-01,
     *0.962571D-01,0.977955D-01,0.993584D-01,0.100942D+00,0.102551D+00,
     *0.104186D+00,0.105842D+00,0.107524D+00,0.109231D+00,0.110963D+00,
     *0.112722D+00,0.114506D+00,0.116317D+00,0.118153D+00,0.120019D+00,
     *0.121911D+00,0.123831D+00,0.125778D+00,0.127755D+00,0.129761D+00,
     *0.131796D+00,0.133863D+00,0.135956D+00,0.138082D+00,0.140241D+00,
     *0.142428D+00,0.144649D+00,0.146902D+00,0.149190D+00,0.151506D+00,
     *0.153859D+00,0.156245D+00,0.158669D+00,0.161126D+00,0.163618D+00,
     *0.166145D+00,0.168711D+00,0.171313D+00,0.173951D+00,0.176626D+00,
     *0.179342D+00,0.182096D+00,0.184893D+00,0.187724D+00,0.190600D+00,
     *0.193518D+00,0.196473D+00,0.199474D+00,0.202516D+00,0.205604D+00,
     *0.208730D+00,0.211905D+00,0.215127D+00,0.218389D+00,0.221701D+00/
      DATA (ES(IES),IES=191,285) /
     *0.225063D+00,0.228466D+00,0.231920D+00,0.235421D+00,0.238976D+00,
     *0.242580D+00,0.246232D+00,0.249933D+00,0.253691D+00,0.257499D+00,
     *0.261359D+00,0.265278D+00,0.269249D+00,0.273274D+00,0.277358D+00,
     *0.281498D+00,0.285694D+00,0.289952D+00,0.294268D+00,0.298641D+00,
     *0.303078D+00,0.307577D+00,0.312135D+00,0.316753D+00,0.321440D+00,
     *0.326196D+00,0.331009D+00,0.335893D+00,0.340842D+00,0.345863D+00,
     *0.350951D+00,0.356106D+00,0.361337D+00,0.366636D+00,0.372006D+00,
     *0.377447D+00,0.382966D+00,0.388567D+00,0.394233D+00,0.399981D+00,
     *0.405806D+00,0.411714D+00,0.417699D+00,0.423772D+00,0.429914D+00,
     *0.436145D+00,0.442468D+00,0.448862D+00,0.455359D+00,0.461930D+00,
     *0.468596D+00,0.475348D+00,0.482186D+00,0.489124D+00,0.496160D+00,
     *0.503278D+00,0.510497D+00,0.517808D+00,0.525224D+00,0.532737D+00,
     *0.540355D+00,0.548059D+00,0.555886D+00,0.563797D+00,0.571825D+00,
     *0.579952D+00,0.588198D+00,0.596545D+00,0.605000D+00,0.613572D+00,
     *0.622255D+00,0.631059D+00,0.639962D+00,0.649003D+00,0.658144D+00,
     *0.667414D+00,0.676815D+00,0.686317D+00,0.695956D+00,0.705728D+00,
     *0.715622D+00,0.725641D+00,0.735799D+00,0.746082D+00,0.756495D+00,
     *0.767052D+00,0.777741D+00,0.788576D+00,0.799549D+00,0.810656D+00,
     *0.821914D+00,0.833314D+00,0.844854D+00,0.856555D+00,0.868415D+00/
      DATA (ES(IES),IES=286,380) /
     *0.880404D+00,0.892575D+00,0.904877D+00,0.917350D+00,0.929974D+00,
     *0.942771D+00,0.955724D+00,0.968837D+00,0.982127D+00,0.995600D+00,
     *0.100921D+01,0.102304D+01,0.103700D+01,0.105116D+01,0.106549D+01,
     *0.108002D+01,0.109471D+01,0.110962D+01,0.112469D+01,0.113995D+01,
     *0.115542D+01,0.117107D+01,0.118693D+01,0.120298D+01,0.121923D+01,
     *0.123569D+01,0.125234D+01,0.126923D+01,0.128631D+01,0.130362D+01,
     *0.132114D+01,0.133887D+01,0.135683D+01,0.137500D+01,0.139342D+01,
     *0.141205D+01,0.143091D+01,0.145000D+01,0.146933D+01,0.148892D+01,
     *0.150874D+01,0.152881D+01,0.154912D+01,0.156970D+01,0.159049D+01,
     *0.161159D+01,0.163293D+01,0.165452D+01,0.167640D+01,0.169852D+01,
     *0.172091D+01,0.174359D+01,0.176653D+01,0.178977D+01,0.181332D+01,
     *0.183709D+01,0.186119D+01,0.188559D+01,0.191028D+01,0.193524D+01,
     *0.196054D+01,0.198616D+01,0.201208D+01,0.203829D+01,0.206485D+01,
     *0.209170D+01,0.211885D+01,0.214637D+01,0.217424D+01,0.220242D+01,
     *0.223092D+01,0.225979D+01,0.228899D+01,0.231855D+01,0.234845D+01,
     *0.237874D+01,0.240937D+01,0.244040D+01,0.247176D+01,0.250349D+01,
     *0.253560D+01,0.256814D+01,0.260099D+01,0.263431D+01,0.266800D+01,
     *0.270207D+01,0.273656D+01,0.277145D+01,0.280671D+01,0.284248D+01,
     *0.287859D+01,0.291516D+01,0.295219D+01,0.298962D+01,0.302746D+01/
      DATA (ES(IES),IES=381,475) /
     *0.306579D+01,0.310454D+01,0.314377D+01,0.318351D+01,0.322360D+01,
     *0.326427D+01,0.330538D+01,0.334694D+01,0.338894D+01,0.343155D+01,
     *0.347456D+01,0.351809D+01,0.356216D+01,0.360673D+01,0.365184D+01,
     *0.369744D+01,0.374352D+01,0.379018D+01,0.383743D+01,0.388518D+01,
     *0.393344D+01,0.398230D+01,0.403177D+01,0.408175D+01,0.413229D+01,
     *0.418343D+01,0.423514D+01,0.428746D+01,0.434034D+01,0.439389D+01,
     *0.444808D+01,0.450276D+01,0.455820D+01,0.461423D+01,0.467084D+01,
     *0.472816D+01,0.478607D+01,0.484468D+01,0.490393D+01,0.496389D+01,
     *0.502446D+01,0.508580D+01,0.514776D+01,0.521047D+01,0.527385D+01,
     *0.533798D+01,0.540279D+01,0.546838D+01,0.553466D+01,0.560173D+01,
     *0.566949D+01,0.573807D+01,0.580750D+01,0.587749D+01,0.594846D+01,
     *0.602017D+01,0.609260D+01,0.616591D+01,0.623995D+01,0.631490D+01,
     *0.639061D+01,0.646723D+01,0.654477D+01,0.662293D+01,0.670220D+01,
     *0.678227D+01,0.686313D+01,0.694495D+01,0.702777D+01,0.711142D+01,
     *0.719592D+01,0.728140D+01,0.736790D+01,0.745527D+01,0.754352D+01,
     *0.763298D+01,0.772316D+01,0.781442D+01,0.790676D+01,0.800001D+01,
     *0.809435D+01,0.818967D+01,0.828606D+01,0.838343D+01,0.848194D+01,
     *0.858144D+01,0.868207D+01,0.878392D+01,0.888673D+01,0.899060D+01,
     *0.909567D+01,0.920172D+01,0.930909D+01,0.941765D+01,0.952730D+01/
      DATA (ES(IES),IES=476,570) /
     *0.963821D+01,0.975022D+01,0.986352D+01,0.997793D+01,0.100937D+02,
     *0.102105D+02,0.103287D+02,0.104481D+02,0.105688D+02,0.106909D+02,
     *0.108143D+02,0.109387D+02,0.110647D+02,0.111921D+02,0.113207D+02,
     *0.114508D+02,0.115821D+02,0.117149D+02,0.118490D+02,0.119847D+02,
     *0.121216D+02,0.122601D+02,0.124002D+02,0.125416D+02,0.126846D+02,
     *0.128290D+02,0.129747D+02,0.131224D+02,0.132712D+02,0.134220D+02,
     *0.135742D+02,0.137278D+02,0.138831D+02,0.140403D+02,0.141989D+02,
     *0.143589D+02,0.145211D+02,0.146845D+02,0.148501D+02,0.150172D+02,
     *0.151858D+02,0.153564D+02,0.155288D+02,0.157029D+02,0.158786D+02,
     *0.160562D+02,0.162358D+02,0.164174D+02,0.166004D+02,0.167858D+02,
     *0.169728D+02,0.171620D+02,0.173528D+02,0.175455D+02,0.177406D+02,
     *0.179372D+02,0.181363D+02,0.183372D+02,0.185400D+02,0.187453D+02,
     *0.189523D+02,0.191613D+02,0.193728D+02,0.195866D+02,0.198024D+02,
     *0.200200D+02,0.202401D+02,0.204626D+02,0.206871D+02,0.209140D+02,
     *0.211430D+02,0.213744D+02,0.216085D+02,0.218446D+02,0.220828D+02,
     *0.223241D+02,0.225671D+02,0.228132D+02,0.230615D+02,0.233120D+02,
     *0.235651D+02,0.238211D+02,0.240794D+02,0.243404D+02,0.246042D+02,
     *0.248704D+02,0.251390D+02,0.254109D+02,0.256847D+02,0.259620D+02,
     *0.262418D+02,0.265240D+02,0.268092D+02,0.270975D+02,0.273883D+02/
      DATA (ES(IES),IES=571,665) /
     *0.276822D+02,0.279792D+02,0.282789D+02,0.285812D+02,0.288867D+02,
     *0.291954D+02,0.295075D+02,0.298222D+02,0.301398D+02,0.304606D+02,
     *0.307848D+02,0.311119D+02,0.314424D+02,0.317763D+02,0.321133D+02,
     *0.324536D+02,0.327971D+02,0.331440D+02,0.334940D+02,0.338475D+02,
     *0.342050D+02,0.345654D+02,0.349295D+02,0.352975D+02,0.356687D+02,
     *0.360430D+02,0.364221D+02,0.368042D+02,0.371896D+02,0.375790D+02,
     *0.379725D+02,0.383692D+02,0.387702D+02,0.391744D+02,0.395839D+02,
     *0.399958D+02,0.404118D+02,0.408325D+02,0.412574D+02,0.416858D+02,
     *0.421188D+02,0.425551D+02,0.429962D+02,0.434407D+02,0.438910D+02,
     *0.443439D+02,0.448024D+02,0.452648D+02,0.457308D+02,0.462018D+02,
     *0.466775D+02,0.471582D+02,0.476428D+02,0.481313D+02,0.486249D+02,
     *0.491235D+02,0.496272D+02,0.501349D+02,0.506479D+02,0.511652D+02,
     *0.516876D+02,0.522142D+02,0.527474D+02,0.532836D+02,0.538266D+02,
     *0.543737D+02,0.549254D+02,0.554839D+02,0.560456D+02,0.566142D+02,
     *0.571872D+02,0.577662D+02,0.583498D+02,0.589392D+02,0.595347D+02,
     *0.601346D+02,0.607410D+02,0.613519D+02,0.619689D+02,0.625922D+02,
     *0.632204D+02,0.638550D+02,0.644959D+02,0.651418D+02,0.657942D+02,
     *0.664516D+02,0.671158D+02,0.677864D+02,0.684624D+02,0.691451D+02,
     *0.698345D+02,0.705293D+02,0.712312D+02,0.719398D+02,0.726542D+02/
      DATA (ES(IES),IES=666,760) /
     *0.733754D+02,0.741022D+02,0.748363D+02,0.755777D+02,0.763247D+02,
     *0.770791D+02,0.778394D+02,0.786088D+02,0.793824D+02,0.801653D+02,
     *0.809542D+02,0.817509D+02,0.825536D+02,0.833643D+02,0.841828D+02,
     *0.850076D+02,0.858405D+02,0.866797D+02,0.875289D+02,0.883827D+02,
     *0.892467D+02,0.901172D+02,0.909962D+02,0.918818D+02,0.927760D+02,
     *0.936790D+02,0.945887D+02,0.955071D+02,0.964346D+02,0.973689D+02,
     *0.983123D+02,0.992648D+02,0.100224D+03,0.101193D+03,0.102169D+03,
     *0.103155D+03,0.104150D+03,0.105152D+03,0.106164D+03,0.107186D+03,
     *0.108217D+03,0.109256D+03,0.110303D+03,0.111362D+03,0.112429D+03,
     *0.113503D+03,0.114588D+03,0.115684D+03,0.116789D+03,0.117903D+03,
     *0.119028D+03,0.120160D+03,0.121306D+03,0.122460D+03,0.123623D+03,
     *0.124796D+03,0.125981D+03,0.127174D+03,0.128381D+03,0.129594D+03,
     *0.130822D+03,0.132058D+03,0.133306D+03,0.134563D+03,0.135828D+03,
     *0.137109D+03,0.138402D+03,0.139700D+03,0.141017D+03,0.142338D+03,
     *0.143676D+03,0.145025D+03,0.146382D+03,0.147753D+03,0.149133D+03,
     *0.150529D+03,0.151935D+03,0.153351D+03,0.154783D+03,0.156222D+03,
     *0.157678D+03,0.159148D+03,0.160624D+03,0.162117D+03,0.163621D+03,
     *0.165142D+03,0.166674D+03,0.168212D+03,0.169772D+03,0.171340D+03,
     *0.172921D+03,0.174522D+03,0.176129D+03,0.177755D+03,0.179388D+03/
      DATA (ES(IES),IES=761,855) /
     *0.181040D+03,0.182707D+03,0.184382D+03,0.186076D+03,0.187782D+03,
     *0.189503D+03,0.191240D+03,0.192989D+03,0.194758D+03,0.196535D+03,
     *0.198332D+03,0.200141D+03,0.201963D+03,0.203805D+03,0.205656D+03,
     *0.207532D+03,0.209416D+03,0.211317D+03,0.213236D+03,0.215167D+03,
     *0.217121D+03,0.219087D+03,0.221067D+03,0.223064D+03,0.225080D+03,
     *0.227113D+03,0.229160D+03,0.231221D+03,0.233305D+03,0.235403D+03,
     *0.237520D+03,0.239655D+03,0.241805D+03,0.243979D+03,0.246163D+03,
     *0.248365D+03,0.250593D+03,0.252830D+03,0.255093D+03,0.257364D+03,
     *0.259667D+03,0.261979D+03,0.264312D+03,0.266666D+03,0.269034D+03,
     *0.271430D+03,0.273841D+03,0.276268D+03,0.278722D+03,0.281185D+03,
     *0.283677D+03,0.286190D+03,0.288714D+03,0.291266D+03,0.293834D+03,
     *0.296431D+03,0.299045D+03,0.301676D+03,0.304329D+03,0.307006D+03,
     *0.309706D+03,0.312423D+03,0.315165D+03,0.317930D+03,0.320705D+03,
     *0.323519D+03,0.326350D+03,0.329199D+03,0.332073D+03,0.334973D+03,
     *0.337897D+03,0.340839D+03,0.343800D+03,0.346794D+03,0.349806D+03,
     *0.352845D+03,0.355918D+03,0.358994D+03,0.362112D+03,0.365242D+03,
     *0.368407D+03,0.371599D+03,0.374802D+03,0.378042D+03,0.381293D+03,
     *0.384588D+03,0.387904D+03,0.391239D+03,0.394604D+03,0.397988D+03,
     *0.401411D+03,0.404862D+03,0.408326D+03,0.411829D+03,0.415352D+03/
      DATA (ES(IES),IES=856,950) /
     *0.418906D+03,0.422490D+03,0.426095D+03,0.429740D+03,0.433398D+03,
     *0.437097D+03,0.440827D+03,0.444570D+03,0.448354D+03,0.452160D+03,
     *0.455999D+03,0.459870D+03,0.463765D+03,0.467702D+03,0.471652D+03,
     *0.475646D+03,0.479674D+03,0.483715D+03,0.487811D+03,0.491911D+03,
     *0.496065D+03,0.500244D+03,0.504448D+03,0.508698D+03,0.512961D+03,
     *0.517282D+03,0.521617D+03,0.525989D+03,0.530397D+03,0.534831D+03,
     *0.539313D+03,0.543821D+03,0.548355D+03,0.552938D+03,0.557549D+03,
     *0.562197D+03,0.566884D+03,0.571598D+03,0.576351D+03,0.581131D+03,
     *0.585963D+03,0.590835D+03,0.595722D+03,0.600663D+03,0.605631D+03,
     *0.610641D+03,0.615151D+03,0.619625D+03,0.624140D+03,0.628671D+03,
     *0.633243D+03,0.637845D+03,0.642465D+03,0.647126D+03,0.651806D+03,
     *0.656527D+03,0.661279D+03,0.666049D+03,0.670861D+03,0.675692D+03,
     *0.680566D+03,0.685471D+03,0.690396D+03,0.695363D+03,0.700350D+03,
     *0.705381D+03,0.710444D+03,0.715527D+03,0.720654D+03,0.725801D+03,
     *0.730994D+03,0.736219D+03,0.741465D+03,0.746756D+03,0.752068D+03,
     *0.757426D+03,0.762819D+03,0.768231D+03,0.773692D+03,0.779172D+03,
     *0.784701D+03,0.790265D+03,0.795849D+03,0.801483D+03,0.807137D+03,
     *0.812842D+03,0.818582D+03,0.824343D+03,0.830153D+03,0.835987D+03,
     *0.841871D+03,0.847791D+03,0.853733D+03,0.859727D+03,0.865743D+03/
      DATA (ES(IES),IES=951,1045) /
     *0.871812D+03,0.877918D+03,0.884046D+03,0.890228D+03,0.896433D+03,
     *0.902690D+03,0.908987D+03,0.915307D+03,0.921681D+03,0.928078D+03,
     *0.934531D+03,0.941023D+03,0.947539D+03,0.954112D+03,0.960708D+03,
     *0.967361D+03,0.974053D+03,0.980771D+03,0.987545D+03,0.994345D+03,
     *0.100120D+04,0.100810D+04,0.101502D+04,0.102201D+04,0.102902D+04,
     *0.103608D+04,0.104320D+04,0.105033D+04,0.105753D+04,0.106475D+04,
     *0.107204D+04,0.107936D+04,0.108672D+04,0.109414D+04,0.110158D+04,
     *0.110908D+04,0.111663D+04,0.112421D+04,0.113185D+04,0.113952D+04,
     *0.114725D+04,0.115503D+04,0.116284D+04,0.117071D+04,0.117861D+04,
     *0.118658D+04,0.119459D+04,0.120264D+04,0.121074D+04,0.121888D+04,
     *0.122709D+04,0.123534D+04,0.124362D+04,0.125198D+04,0.126036D+04,
     *0.126881D+04,0.127731D+04,0.128584D+04,0.129444D+04,0.130307D+04,
     *0.131177D+04,0.132053D+04,0.132931D+04,0.133817D+04,0.134705D+04,
     *0.135602D+04,0.136503D+04,0.137407D+04,0.138319D+04,0.139234D+04,
     *0.140156D+04,0.141084D+04,0.142015D+04,0.142954D+04,0.143896D+04,
     *0.144845D+04,0.145800D+04,0.146759D+04,0.147725D+04,0.148694D+04,
     *0.149672D+04,0.150655D+04,0.151641D+04,0.152635D+04,0.153633D+04,
     *0.154639D+04,0.155650D+04,0.156665D+04,0.157688D+04,0.158715D+04,
     *0.159750D+04,0.160791D+04,0.161836D+04,0.162888D+04,0.163945D+04/
      DATA (ES(IES),IES=1046,1140) /
     *0.165010D+04,0.166081D+04,0.167155D+04,0.168238D+04,0.169325D+04,
     *0.170420D+04,0.171522D+04,0.172627D+04,0.173741D+04,0.174859D+04,
     *0.175986D+04,0.177119D+04,0.178256D+04,0.179402D+04,0.180552D+04,
     *0.181711D+04,0.182877D+04,0.184046D+04,0.185224D+04,0.186407D+04,
     *0.187599D+04,0.188797D+04,0.190000D+04,0.191212D+04,0.192428D+04,
     *0.193653D+04,0.194886D+04,0.196122D+04,0.197368D+04,0.198618D+04,
     *0.199878D+04,0.201145D+04,0.202416D+04,0.203698D+04,0.204983D+04,
     *0.206278D+04,0.207580D+04,0.208887D+04,0.210204D+04,0.211525D+04,
     *0.212856D+04,0.214195D+04,0.215538D+04,0.216892D+04,0.218249D+04,
     *0.219618D+04,0.220994D+04,0.222375D+04,0.223766D+04,0.225161D+04,
     *0.226567D+04,0.227981D+04,0.229399D+04,0.230829D+04,0.232263D+04,
     *0.233708D+04,0.235161D+04,0.236618D+04,0.238087D+04,0.239560D+04,
     *0.241044D+04,0.242538D+04,0.244035D+04,0.245544D+04,0.247057D+04,
     *0.248583D+04,0.250116D+04,0.251654D+04,0.253204D+04,0.254759D+04,
     *0.256325D+04,0.257901D+04,0.259480D+04,0.261073D+04,0.262670D+04,
     *0.264279D+04,0.265896D+04,0.267519D+04,0.269154D+04,0.270794D+04,
     *0.272447D+04,0.274108D+04,0.275774D+04,0.277453D+04,0.279137D+04,
     *0.280834D+04,0.282540D+04,0.284251D+04,0.285975D+04,0.287704D+04,
     *0.289446D+04,0.291198D+04,0.292954D+04,0.294725D+04,0.296499D+04/
      DATA (ES(IES),IES=1141,1235) /
     *0.298288D+04,0.300087D+04,0.301890D+04,0.303707D+04,0.305529D+04,
     *0.307365D+04,0.309211D+04,0.311062D+04,0.312927D+04,0.314798D+04,
     *0.316682D+04,0.318577D+04,0.320477D+04,0.322391D+04,0.324310D+04,
     *0.326245D+04,0.328189D+04,0.330138D+04,0.332103D+04,0.334073D+04,
     *0.336058D+04,0.338053D+04,0.340054D+04,0.342069D+04,0.344090D+04,
     *0.346127D+04,0.348174D+04,0.350227D+04,0.352295D+04,0.354369D+04,
     *0.356458D+04,0.358559D+04,0.360664D+04,0.362787D+04,0.364914D+04,
     *0.367058D+04,0.369212D+04,0.371373D+04,0.373548D+04,0.375731D+04,
     *0.377929D+04,0.380139D+04,0.382355D+04,0.384588D+04,0.386826D+04,
     *0.389081D+04,0.391348D+04,0.393620D+04,0.395910D+04,0.398205D+04,
     *0.400518D+04,0.402843D+04,0.405173D+04,0.407520D+04,0.409875D+04,
     *0.412246D+04,0.414630D+04,0.417019D+04,0.419427D+04,0.421840D+04,
     *0.424272D+04,0.426715D+04,0.429165D+04,0.431634D+04,0.434108D+04,
     *0.436602D+04,0.439107D+04,0.441618D+04,0.444149D+04,0.446685D+04,
     *0.449241D+04,0.451810D+04,0.454385D+04,0.456977D+04,0.459578D+04,
     *0.462197D+04,0.464830D+04,0.467468D+04,0.470127D+04,0.472792D+04,
     *0.475477D+04,0.478175D+04,0.480880D+04,0.483605D+04,0.486336D+04,
     *0.489087D+04,0.491853D+04,0.494623D+04,0.497415D+04,0.500215D+04,
     *0.503034D+04,0.505867D+04,0.508707D+04,0.511568D+04,0.514436D+04/
      DATA (ES(IES),IES=1236,1330) /
     *0.517325D+04,0.520227D+04,0.523137D+04,0.526068D+04,0.529005D+04,
     *0.531965D+04,0.534939D+04,0.537921D+04,0.540923D+04,0.543932D+04,
     *0.546965D+04,0.550011D+04,0.553064D+04,0.556139D+04,0.559223D+04,
     *0.562329D+04,0.565449D+04,0.568577D+04,0.571727D+04,0.574884D+04,
     *0.578064D+04,0.581261D+04,0.584464D+04,0.587692D+04,0.590924D+04,
     *0.594182D+04,0.597455D+04,0.600736D+04,0.604039D+04,0.607350D+04,
     *0.610685D+04,0.614036D+04,0.617394D+04,0.620777D+04,0.624169D+04,
     *0.627584D+04,0.631014D+04,0.634454D+04,0.637918D+04,0.641390D+04,
     *0.644887D+04,0.648400D+04,0.651919D+04,0.655467D+04,0.659021D+04,
     *0.662599D+04,0.666197D+04,0.669800D+04,0.673429D+04,0.677069D+04,
     *0.680735D+04,0.684415D+04,0.688104D+04,0.691819D+04,0.695543D+04,
     *0.699292D+04,0.703061D+04,0.706837D+04,0.710639D+04,0.714451D+04,
     *0.718289D+04,0.722143D+04,0.726009D+04,0.729903D+04,0.733802D+04,
     *0.737729D+04,0.741676D+04,0.745631D+04,0.749612D+04,0.753602D+04,
     *0.757622D+04,0.761659D+04,0.765705D+04,0.769780D+04,0.773863D+04,
     *0.777975D+04,0.782106D+04,0.786246D+04,0.790412D+04,0.794593D+04,
     *0.798802D+04,0.803028D+04,0.807259D+04,0.811525D+04,0.815798D+04,
     *0.820102D+04,0.824427D+04,0.828757D+04,0.833120D+04,0.837493D+04,
     *0.841895D+04,0.846313D+04,0.850744D+04,0.855208D+04,0.859678D+04/
      DATA (ES(IES),IES=1331,1425) /
     *0.864179D+04,0.868705D+04,0.873237D+04,0.877800D+04,0.882374D+04,
     *0.886979D+04,0.891603D+04,0.896237D+04,0.900904D+04,0.905579D+04,
     *0.910288D+04,0.915018D+04,0.919758D+04,0.924529D+04,0.929310D+04,
     *0.934122D+04,0.938959D+04,0.943804D+04,0.948687D+04,0.953575D+04,
     *0.958494D+04,0.963442D+04,0.968395D+04,0.973384D+04,0.978383D+04,
     *0.983412D+04,0.988468D+04,0.993534D+04,0.998630D+04,0.100374D+05,
     *0.100888D+05,0.101406D+05,0.101923D+05,0.102444D+05,0.102966D+05,
     *0.103492D+05,0.104020D+05,0.104550D+05,0.105082D+05,0.105616D+05,
     *0.106153D+05,0.106693D+05,0.107234D+05,0.107779D+05,0.108325D+05,
     *0.108874D+05,0.109425D+05,0.109978D+05,0.110535D+05,0.111092D+05,
     *0.111653D+05,0.112217D+05,0.112782D+05,0.113350D+05,0.113920D+05,
     *0.114493D+05,0.115070D+05,0.115646D+05,0.116228D+05,0.116809D+05,
     *0.117396D+05,0.117984D+05,0.118574D+05,0.119167D+05,0.119762D+05,
     *0.120360D+05,0.120962D+05,0.121564D+05,0.122170D+05,0.122778D+05,
     *0.123389D+05,0.124004D+05,0.124619D+05,0.125238D+05,0.125859D+05,
     *0.126484D+05,0.127111D+05,0.127739D+05,0.128372D+05,0.129006D+05,
     *0.129644D+05,0.130285D+05,0.130927D+05,0.131573D+05,0.132220D+05,
     *0.132872D+05,0.133526D+05,0.134182D+05,0.134842D+05,0.135503D+05,
     *0.136168D+05,0.136836D+05,0.137505D+05,0.138180D+05,0.138854D+05/
      DATA (ES(IES),IES=1426,1520) /
     *0.139534D+05,0.140216D+05,0.140900D+05,0.141588D+05,0.142277D+05,
     *0.142971D+05,0.143668D+05,0.144366D+05,0.145069D+05,0.145773D+05,
     *0.146481D+05,0.147192D+05,0.147905D+05,0.148622D+05,0.149341D+05,
     *0.150064D+05,0.150790D+05,0.151517D+05,0.152250D+05,0.152983D+05,
     *0.153721D+05,0.154462D+05,0.155205D+05,0.155952D+05,0.156701D+05,
     *0.157454D+05,0.158211D+05,0.158969D+05,0.159732D+05,0.160496D+05,
     *0.161265D+05,0.162037D+05,0.162811D+05,0.163589D+05,0.164369D+05,
     *0.165154D+05,0.165942D+05,0.166732D+05,0.167526D+05,0.168322D+05,
     *0.169123D+05,0.169927D+05,0.170733D+05,0.171543D+05,0.172356D+05,
     *0.173173D+05,0.173993D+05,0.174815D+05,0.175643D+05,0.176471D+05,
     *0.177305D+05,0.178143D+05,0.178981D+05,0.179826D+05,0.180671D+05,
     *0.181522D+05,0.182377D+05,0.183232D+05,0.184093D+05,0.184955D+05,
     *0.185823D+05,0.186695D+05,0.187568D+05,0.188447D+05,0.189326D+05,
     *0.190212D+05,0.191101D+05,0.191991D+05,0.192887D+05,0.193785D+05,
     *0.194688D+05,0.195595D+05,0.196503D+05,0.197417D+05,0.198332D+05,
     *0.199253D+05,0.200178D+05,0.201105D+05,0.202036D+05,0.202971D+05,
     *0.203910D+05,0.204853D+05,0.205798D+05,0.206749D+05,0.207701D+05,
     *0.208659D+05,0.209621D+05,0.210584D+05,0.211554D+05,0.212524D+05,
     *0.213501D+05,0.214482D+05,0.215465D+05,0.216452D+05,0.217442D+05/
      DATA (ES(IES),IES=1521,1551) /
     *0.218439D+05,0.219439D+05,0.220440D+05,0.221449D+05,0.222457D+05,
     *0.223473D+05,0.224494D+05,0.225514D+05,0.226542D+05,0.227571D+05,
     *0.228606D+05,0.229646D+05,0.230687D+05,0.231734D+05,0.232783D+05,
     *0.233839D+05,0.234898D+05,0.235960D+05,0.237027D+05,0.238097D+05,
     *0.239173D+05,0.240254D+05,0.241335D+05,0.242424D+05,0.243514D+05,
     *0.244611D+05,0.245712D+05,0.246814D+05,0.247923D+05,0.249034D+05,
     *0.250152D+05/
!
      DO 10 I=1,NPNTS
!
       IF (T(I) .LE. T_LOW) THEN
          QS(I) = EPSILON * ES(1) / P(I)
!
       ELSE IF (T(I) .GE. T_HIGH) THEN
          QS(I) = EPSILON * ES(N) / P(I)
!
       ELSE
!
          ATABLE = (T(I) - T_LOW + DELTA_T) / DELTA_T
          ITABLE = ATABLE
          ATABLE = ATABLE - ITABLE
!
          QS(I)  = EPSILON * ((1.0D+00-ATABLE) * ES(ITABLE)
     *            +     ATABLE  * ES(ITABLE+1)) / P(I)
!
       END IF
!
 10   CONTINUE
!
      RETURN
      END

