*-----------------------------------------------------------------------
*     uvPGET / uvPSET
*-----------------------------------------------------------------------
      SUBROUTINE uvPGET(CP,IPARA)

      CHARACTER CP*(*)

      PARAMETER (NPARA=42)
      PARAMETER (IUNDEF=9999)

      INTEGER   IX(NPARA)
      REAL      RX(NPARA)
      LOGICAL   LX(NPARA),LCHREQ
      CHARACTER CPARA(NPARA)*8,CMSG*32

      EQUIVALENCE (IX,RX,LX)

      SAVE

      DATA      CPARA( 1)/'INDEX   '/, IX( 1)/3/
      DATA      CPARA( 2)/'LNRMAL  '/, LX( 2)/.TRUE./
      DATA      CPARA( 3)/'LEQRAT  '/, LX( 3)/.TRUE./
      DATA      CPARA( 4)/'XFACT1  '/, RX( 4)/1.0/
      DATA      CPARA( 5)/'YFACT1  '/, RX( 5)/1.0/
      DATA      CPARA( 6)/'XFACT2  '/, IX( 6)/IUNDEF/
      DATA      CPARA( 7)/'YFACT2  '/, IX( 7)/IUNDEF/
      DATA      CPARA( 8)/'LMSG    '/, LX( 8)/.TRUE./
      DATA      CPARA( 9)/'ICENT   '/, IX( 9)/0/
      DATA      CPARA(10)/'LMISSP  '/, LX(10)/.FALSE./
      DATA      CPARA(11)/'ITYPE1  '/, IX(11)/5/
      DATA      CPARA(12)/'LSMALL  '/, LX(12)/.FALSE./
      DATA      CPARA(13)/'RSMALL  '/, RX(13)/0.001/
      DATA      CPARA(14)/'ITYPE2  '/, IX(14)/1/
      DATA      CPARA(15)/'RSIZEM  '/, RX(15)/0.01/
      DATA      CPARA(16)/'RSIZET  '/, IX(16)/IUNDEF/
      DATA      CPARA(17)/'XTTL    '/, RX(17)/0.0/
      DATA      CPARA(18)/'IXINT   '/, IX(18)/1/
      DATA      CPARA(19)/'IYINT   '/, IX(19)/1/

*     / PARAMETERS FOR UNIT VECTOR /

      DATA      CPARA(20)/'LUNIT   '/, LX(20)/.FALSE./
      DATA      CPARA(21)/'LUMSG   '/, LX(21)/.TRUE./
      DATA      CPARA(22)/'VXUOFF  '/, RX(22)/0.02/
      DATA      CPARA(23)/'VYUOFF  '/, RX(23)/0./
      DATA      CPARA(24)/'VXULOC  '/, IX(24)/IUNDEF/
      DATA      CPARA(25)/'VYULOC  '/, IX(25)/IUNDEF/
      DATA      CPARA(26)/'UXUNIT  '/, IX(26)/IUNDEF/
      DATA      CPARA(27)/'UYUNIT  '/, IX(27)/IUNDEF/
      DATA      CPARA(28)/'VXUNIT  '/, RX(28)/0.05/
      DATA      CPARA(29)/'VYUNIT  '/, RX(29)/0.05/

*     / PARAMETERS FOR TITLES OF UNIT VECTOR /

      DATA      CPARA(30)/'IUNTTL  '/, IX(30)/0/
      DATA      CPARA(31)/'RSIZEUT '/, IX(31)/IUNDEF/
      DATA      CPARA(32)/'IUINDX  '/, IX(32)/3/
      DATA      CPARA(33)/'IUTXRO  '/, IX(33)/0/
      DATA      CPARA(34)/'IUTYRO  '/, IX(34)/90/
      DATA      CPARA(35)/'VUTOFF  '/, RX(35)/0.005/
      DATA      CPARA(36)/'RHFACT  '/, RX(36)/1.5/
      DATA      CPARA(37)/'IUNDEF  '/, IX(37)/IUNDEF/

*     / parameters for uvvect /
      data      cpara(38)/'IARLEN  '/, IX(38)/1/
      data      cpara(39)/'UVECTA  '/, RX(39)/0.001/
      data      cpara(40)/'VVPMAX  '/, RX(40)/0.2/
      data      cpara(41)/'LINVIS  '/, LX(41)/ .true. /
      data      cpara(42)/'VRCNST  '/, IX(42)/IUNDEF/

      DO 10 N=1,NPARA
        IF (LCHREQ(CP,CPARA(N))) THEN
          IPARA=IX(N)
          IF ((N.EQ.16 .OR. N.EQ.31) .AND. IPARA.EQ.IUNDEF) THEN
            CALL UZPGET('RSIZEL1',IPARA)
          END IF
          RETURN
        END IF
   10 CONTINUE
      NCP=LENC(CP)
      CMSG='PARAMETER '''//CP(1:NCP)//''' IS NOT DEFINED.'
      CALL MSGDMP('E','uvPGET',CMSG)

      RETURN
*-----------------------------------------------------------------------
      ENTRY uvPSET(CP,IPARA)

      DO 15 N=1,NPARA
        IF (LCHREQ(CP,CPARA(N))) THEN
          IX(N)=IPARA
          RETURN
        END IF
   15 CONTINUE
      NCP=LENC(CP)
      CMSG='PARAMETER '''//CP(1:NCP)//''' IS NOT DEFINED.'
      CALL MSGDMP('E','uvPSET',CMSG)

      RETURN
      END
