      SUBROUTINE GETCONH (CONNAME, HCON)
      include 'params.h'
      include 'processors.h'
      include 'templates.h'
C  SUBROUTINE GETCON IS CALLED TO RETURN LOCAL VALUES OF CONSTANTS
C  NEEDED BY THE CALLING ROUTINE.
C  THE THREE ENTRY POINTS THAT ARE ACTIVE ARE:
C  GETCONH - FOR RETURNING REAL VALUES
C  GETCONI - FOR RETURNING INTEGER VALUES
C  GETCONL - FOR RETURNING LOGICAL VALUES
      CHARACTER * 8 CONNAME
      CHARACTER * 60 message
C     REAL              HCON
      INTEGER ICON
      LOGICAL LCON
      COMMON / CONST / SIGE (20), DLAT, DLON, PI, PI180, PTOP, PINT, GI,
     & OMG2RE, RADEI, RADEI2, GRADEI, GRADEI2, G2, POLEFAC, RTD, POLELAT
      COMMON / CONTRL / IM, JNP, NB, NDALT, NHMS, NLAY, NLAYM1, NLAYP1, 
     &NYMD, STRAT, IDIMEN, SLP, FDCOS, FSOAR, FLOW, SIGDAT, MAXREP
      LOGICAL STRAT, SLP, FDCOS, FSOAR, FLOW, SIGDAT
      COMMON / MLAY / MLEV, MLEVM1, MMIX, MMIXM1, LS, LSM1
      COMMON / PHYSIC / BETA, CP, GRAV, OMEGA2, RADE, RGAS, ROCP, CPOG, 
     &GAMMA, ROCP1, GOCP
      COMMON / PRINT / MSGLEV
      COMMON / SATWIND / CWIND
      LOGICAL CWIND
      COMMON / scan / MAXOBS, RSCAN, ONESTAGE
      REAL RSCAN
      LOGICAL ONESTAGE
      COMMON / sparam / lsolve, ns, nr, nv, nh (13104), nq, kq (3), volc
     &entre_x (13104), ngv, volcentre_y (13104), glatup (13104), glonup 
     &(13104)
!hpf$ align with temp1D:: glatup,glonup,nh,volcentre_x,volcentre_y


      COMMON / TYPFUNC / IFDCOS, IFSOAR
      message = ' GETCON: Failure to find desired constant. '
C  ENTRY GETCONH FOR REAL CONSTANTS

      IF (CONNAME .EQ. 'BETA    ') THEN
      HCON = BETA
      ELSE IF (CONNAME .EQ. 'CP      ') THEN
      HCON = CP
      ELSE IF (CONNAME .EQ. 'GRAV    ') THEN
      HCON = GRAV
      ELSE IF (CONNAME .EQ. 'OMEGA2  ') THEN
      HCON = OMEGA2
      ELSE IF (CONNAME .EQ. 'RADE    ') THEN
      HCON = RADE
      ELSE IF (CONNAME .EQ. 'RGAS    ') THEN
      HCON = RGAS
      ELSE IF (CONNAME .EQ. 'ROCP    ') THEN
      HCON = ROCP
      ELSE IF (CONNAME .EQ. 'CPOG    ') THEN
      HCON = CPOG
      ELSE IF (CONNAME .EQ. 'GAMMA   ') THEN
      HCON = GAMMA
      ELSE IF (CONNAME .EQ. 'ROCP1   ') THEN
      HCON = ROCP1
      ELSE IF (CONNAME .EQ. 'GOCP    ') THEN
      HCON = GOCP
      ELSE IF (CONNAME .EQ. 'DLAT    ') THEN
      HCON = DLAT
      ELSE IF (CONNAME .EQ. 'DLON    ') THEN
      HCON = DLON
      ELSE IF (CONNAME .EQ. 'PI      ') THEN
      HCON = PI
      ELSE IF (CONNAME .EQ. 'PI180   ') THEN
      HCON = PI180
      ELSE IF (CONNAME .EQ. 'PTOP    ') THEN
      HCON = PTOP
      ELSE IF (CONNAME .EQ. 'PINT    ') THEN
      HCON = PINT
      ELSE IF (CONNAME .EQ. 'RADEI   ') THEN
      HCON = RADEI
      ELSE IF (CONNAME .EQ. 'RADEI2  ') THEN
      HCON = RADEI2
      ELSE IF (CONNAME .EQ. 'GRADEI  ') THEN
      HCON = GRADEI
      ELSE IF (CONNAME .EQ. 'GRADEI2 ') THEN
      HCON = GRADEI2
      ELSE IF (CONNAME .EQ. 'G2      ') THEN
      HCON = G2
      ELSE IF (CONNAME .EQ. 'RTD     ') THEN
      HCON = RTD
      ELSE IF (CONNAME .EQ. 'RHOBAR  ') THEN
      HCON = 1.24
      ELSE IF (CONNAME .EQ. 'RSCAN   ') THEN
      HCON = RSCAN
      ELSE
      WRITE (6, 901) CONNAME
      CALL flash (5, message, 1)
      END IF
      RETURN
901   FORMAT (' GETCONH: CANNOT FIND REAL CONSTANT -  ',A8)
      END



      SUBROUTINE GETCONL (CONNAME, LCON)
      include 'params.h'
      include 'processors.h'
      include 'templates.h'
C  SUBROUTINE GETCON IS CALLED TO RETURN LOCAL VALUES OF CONSTANTS
C  NEEDED BY THE CALLING ROUTINE.
C  THE THREE ENTRY POINTS THAT ARE ACTIVE ARE:
C  GETCONH - FOR RETURNING REAL VALUES
C  GETCONI - FOR RETURNING INTEGER VALUES
C  GETCONL - FOR RETURNING LOGICAL VALUES
      CHARACTER * 8 CONNAME
      CHARACTER * 60 message
C     REAL              HCON
      INTEGER ICON
      LOGICAL LCON
      COMMON / CONST / SIGE (20), DLAT, DLON, PI, PI180, PTOP, PINT, GI,
     & OMG2RE, RADEI, RADEI2, GRADEI, GRADEI2, G2, POLEFAC, RTD, POLELAT
      COMMON / CONTRL / IM, JNP, NB, NDALT, NHMS, NLAY, NLAYM1, NLAYP1, 
     &NYMD, STRAT, IDIMEN, SLP, FDCOS, FSOAR, FLOW, SIGDAT, MAXREP
      LOGICAL STRAT, SLP, FDCOS, FSOAR, FLOW, SIGDAT
      COMMON / MLAY / MLEV, MLEVM1, MMIX, MMIXM1, LS, LSM1
      COMMON / PHYSIC / BETA, CP, GRAV, OMEGA2, RADE, RGAS, ROCP, CPOG, 
     &GAMMA, ROCP1, GOCP
      COMMON / PRINT / MSGLEV
      COMMON / SATWIND / CWIND
      LOGICAL CWIND
      COMMON / scan / MAXOBS, RSCAN, ONESTAGE
      REAL RSCAN
      LOGICAL ONESTAGE
      COMMON / sparam / lsolve, ns, nr, nv, nh (13104), nq, kq (3), volc
     &entre_x (13104), ngv, volcentre_y (13104), glatup (13104), glonup 
     &(13104)
!hpf$ align with temp1D:: glatup,glonup,nh,volcentre_x,volcentre_y


      COMMON / TYPFUNC / IFDCOS, IFSOAR
      message = ' GETCON: Failure to find desired constant. '

      IF (CONNAME .EQ. 'STRAT   ') THEN
      LCON = STRAT
      ELSE IF (CONNAME .EQ. 'SLP     ') THEN
      LCON = SLP
      ELSE IF (CONNAME .EQ. 'FDCOS   ') THEN
      LCON = FDCOS
      ELSE IF (CONNAME .EQ. 'FSOAR   ') THEN
      LCON = FSOAR
      ELSE IF (CONNAME .EQ. 'FLOW    ') THEN
      LCON = FLOW
      ELSE IF (CONNAME .EQ. 'SIGDAT  ') THEN
      LCON = SIGDAT
      ELSE IF (CONNAME .EQ. 'ONESTAGE') THEN
      LCON = ONESTAGE
      ELSE IF (CONNAME .EQ. 'CWIND   ') THEN
      LCON = CWIND
      ELSE
      WRITE (6, 902) CONNAME
      CALL flash (5, message, 1)
      END IF
      RETURN
902   FORMAT (' GETCONL: CANNOT FIND LOGICAL CONSTANT - ',A8)
      END


      SUBROUTINE GETCONI (CONNAME, ICON)
      include 'params.h'
      include 'processors.h'
      include 'templates.h'
C  SUBROUTINE GETCON IS CALLED TO RETURN LOCAL VALUES OF CONSTANTS
C  NEEDED BY THE CALLING ROUTINE.
C  THE THREE ENTRY POINTS THAT ARE ACTIVE ARE:
C  GETCONH - FOR RETURNING REAL VALUES
C  GETCONI - FOR RETURNING INTEGER VALUES
C  GETCONL - FOR RETURNING LOGICAL VALUES
      CHARACTER * 8 CONNAME
      CHARACTER * 60 message
C     REAL              HCON
      INTEGER ICON
      LOGICAL LCON
      COMMON / CONST / SIGE (20), DLAT, DLON, PI, PI180, PTOP, PINT, GI,
     & OMG2RE, RADEI, RADEI2, GRADEI, GRADEI2, G2, POLEFAC, RTD, POLELAT
      COMMON / CONTRL / IM, JNP, NB, NDALT, NHMS, NLAY, NLAYM1, NLAYP1, 
     &NYMD, STRAT, IDIMEN, SLP, FDCOS, FSOAR, FLOW, SIGDAT, MAXREP
      LOGICAL STRAT, SLP, FDCOS, FSOAR, FLOW, SIGDAT
      COMMON / MLAY / MLEV, MLEVM1, MMIX, MMIXM1, LS, LSM1
      COMMON / PHYSIC / BETA, CP, GRAV, OMEGA2, RADE, RGAS, ROCP, CPOG, 
     &GAMMA, ROCP1, GOCP
      COMMON / PRINT / MSGLEV
      COMMON / SATWIND / CWIND
      LOGICAL CWIND
      COMMON / scan / MAXOBS, RSCAN, ONESTAGE
      REAL RSCAN
      LOGICAL ONESTAGE
      COMMON / sparam / lsolve, ns, nr, nv, nh (13104), nq, kq (3), volc
     &entre_x (13104), ngv, volcentre_y (13104), glatup (13104), glonup 
     &(13104)
!hpf$ align with temp1D:: glatup,glonup,nh,volcentre_x,volcentre_y


      COMMON / TYPFUNC / IFDCOS, IFSOAR
      message = ' GETCON: Failure to find desired constant. '

      IF (CONNAME .EQ. 'IM      ') THEN
      ICON = IM
      ELSE IF (CONNAME .EQ. 'JNP     ') THEN
      ICON = JNP
      ELSE IF (CONNAME .EQ. 'NYMD    ') THEN
      ICON = NYMD
      ELSE IF (CONNAME .EQ. 'NHMS    ') THEN
      ICON = NHMS
      ELSE IF (CONNAME .EQ. 'IDIMEN  ') THEN
      ICON = IDIMEN
      ELSE IF (CONNAME .EQ. 'MAXREP  ') THEN
      ICON = MAXREP
      ELSE IF (CONNAME .EQ. 'MAXOBS  ') THEN
      ICON = MAXOBS
      ELSE IF (CONNAME .EQ. 'MLEV    ') THEN
      ICON = MLEV
      ELSE IF (CONNAME .EQ. 'IFDCOS  ') THEN
      ICON = IFDCOS
      ELSE IF (CONNAME .EQ. 'IFSOAR  ') THEN
      ICON = IFSOAR
      ELSE IF (CONNAME .EQ. 'LSOLVE  ') THEN
      ICON = lsolve
      ELSE IF (CONNAME .EQ. 'NS      ') THEN
      ICON = ns
      ELSE IF (CONNAME .EQ. 'NR      ') THEN
      ICON = nr
      ELSE IF (CONNAME .EQ. 'NV      ') THEN
      ICON = nv
      ELSE IF (CONNAME .EQ. 'NQ      ') THEN
      ICON = nq
      ELSE IF (CONNAME .EQ. 'KQ(1)   ') THEN
      ICON = kq (1)
      ELSE IF (CONNAME .EQ. 'KQ(2)   ') THEN
      ICON = kq (2)
      ELSE IF (CONNAME .EQ. 'KQ(3)   ') THEN
      ICON = kq (3)
      ELSE IF (CONNAME .EQ. 'MAXNHGP ') THEN
      ICON = 288
      ELSE
      WRITE (6, 903) CONNAME
      CALL flash (5, message, 1)
      END IF
      RETURN
903   FORMAT (' GETCONI: CANNOT FIND INTEGER CONSTANT - ',A8)
      END
