      SUBROUTINE ADJGRD (A,NX,B,SIGUWT)

*** LIST CRUSTAL MOTION PARAMETERS

      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      IMPLICIT INTEGER (I-N)
      CHARACTER*1 ADIR01,ADIR02
      CHARACTER*80 CARDGR
      LOGICAL GETA,LBB,LGF,LCS,LVD,LVA,LVZ,LVS,
     &        LVR,LVG,LVC,LIS,LPS,LPG,LDR,LOS,LAP
      LOGICAL LMSL,LSS,LUP
      DIMENSION A(*),NX(*),B(*)
      COMMON /OPRINT/ CRIT,LBB,LGF,LCS,LVD,LVA,LVZ,LVS,
     &                LVR,LVG,LVC,LIS,LPS,LPG,LDR,LOS,LAP
      COMMON /STRUCT/ NSTA,NAUX,NUNK,IDIM,NSTAS,NOBS,NCON,NZ,NCD
      COMMON /OPT/ AX,E2,DMSL,DGH,VM,VP,CTOL,ITMAX,ITMIN,IMODE,
     &             LMSL,LSS,LUP
      COMMON /CDGRID/ GRDLX, GRDUX, GRDLY, GRDUY, ICNTX, ICNTY,
     &                ITREF
      COMMON /CONST/ PI,PI2,RAD,RADSEC,TWOPI
      COMMON /CARDG/ CARDGR


      OPEN(10,FILE='vfile',STATUS='UNKNOWN')
      WRITE(10,5) CARDGR
    5 FORMAT(A80)

*** LOOP OVER VELOCITY GRID PARAMETERS

      DO 30 IGRD = 1, ICNTX + 1
        DO 20 JGRD = 1, ICNTY + 1

          CALL GRDLOC(IGRD,JGRD,GLON,GLAT)

          CALL GETDMS (GLAT,ID01,IM01,S01,ISIGN)
          IF (ISIGN.GT.0) THEN
            ADIR01 = 'N'
          ELSE
            ADIR01 = 'S'
          ENDIF
          CALL GETDMS (GLON,ID02,IM02,S02,ISIGN)
          IF (ISIGN.GT.0) THEN
            ADIR02 = 'E'
          ELSE
            ADIR02 = 'W'
          ENDIF
          
          CALL RADCUR(GLAT,RMER,RPV)
          RPAR = RPV * DCOS(GLAT)
     
          DO 10 IVEC = 1, 3
            LVAL = IUNGRD(IGRD, JGRD, IVEC)
            STDDEV = 100.0D0
            IF (IMODE.NE.1) THEN
              IF (.NOT.GETA(LVAL,LVAL, VAR,A,NX)) THEN
                WRITE(6,4) LVAL
    4           FORMAT('0ERROR IN GETTING STD DEV OF VELOCITY ', I5)
              ENDIF
              IF (LSS) THEN
                STDDEV = DSQRT(VAR) * SIGUWT
              ELSE
                STDDEV = DSQRT(VAR)
              ENDIF
            ENDIF

            IF (IVEC.EQ.1) THEN
              VELN = B(LVAL) * RMER * 1000.D0
              STDN = STDDEV * RMER * 1000.D0/RADSEC
            ELSEIF (IVEC.EQ.2) THEN
              VELE = B(LVAL) * RPAR * 1000.D0
              STDE = STDDEV * RPAR * 1000.D0/RADSEC
            ELSEIF (IVEC.EQ.3) THEN
              VELU = B(LVAL) * 1000.D0
              STDU = STDDEV * 1000.D0
            ENDIF
   10     CONTINUE
          WRITE(10,15)IGRD,JGRD,ID01,IM01,S01,ADIR01,
     &      ID02,IM02,S02,ADIR02,VELN,STDN,VELE,STDE,VELU,STDU
   15     FORMAT(2I3,2(I3,I3.2,F6.2,A1),6F8.2)
   20   CONTINUE
   30 CONTINUE
      CLOSE(10,STATUS='KEEP')
      RETURN
      END

