C Copyright(c) 1997, Space Science and Engineering Center, UW-Madison
C Refer to "McIDAS Software Acquisition and Distribution Policies"
C in the file  mcidas/data/license.txt

C *** $Id: wxsplt.f,v 1.9 1997/10/10 20:19:06 dglo Exp $ ***

*$ Name:
*$      wxsplt  - Plots weather symbols on graphics.
*$
*$ Interface:
*$	subroutine
*$      wxsplt(integer itvras, integer itvpic, chararacter*8 cnam,
*$     *       integer linsiz, integer kolor)
*$
*$ Input:
*$      itvras  - TV line coordinate where center of symbol will be
*$                located.
*$      itvpic  - TV element coordinate where center of symbol will be
*$                located.
*$      cname   - Weather symbol to be plotted.
*$      linsiz  - Size of symbol to be plotted.
*$      kolor   - Graphics level at which to plot.
*$
*$ Input and Output:
*$      none
*$
*$ Output:
*$	none
*$
*$ Return values:
*$      none
*$
*$ Remarks:
*$	Important use info, algorithm, etc.
*$
*$ Categories:
*$	graphic

      SUBROUTINE WXSPLT(ITVRAS,ITVPIC,CNAME,LINSIZ,KOLOR)
      PARAMETER (NTYPE=44)
      REAL XSIZE,XSIZ2,XRAS,XPIC
      CHARACTER*(*) CNAME
      CHARACTER*8 CTYPE(NTYPE)
      CHARACTER*1 CDOT
      DIMENSION IFOUND(NTYPE)
      DATA CDOT/'.'/
      DATA CTYPE/'R       ','S       ','T       ','H       ','K     ',
     & 'L       ','F       ','R-      ','R+      ','S-      ',
     & 'S+      ','SW      ','RW      ','TR      ','BD      ',
     & 'BS      ','IP      ','TS      ','GF      ','R--     ',
     & 'S--     ','TRW     ','ZL-     ','ZR-     ','ZL+     ',
     & 'ZR+     ','RW-     ','SW-     ','TRW-    ','TRW+    ',
     & 'R-S-    ','S-R-    ','TRWX    ','TRW-A   ','TRW+A   ',
     & 'TRWXA   ','SW-RW-  ','RW-SW-  ','TORNADO ','L-      ',
     & 'HK      ','SG      ','SP      ','IC      '/
      DATA IFOUND/11,15,27,22,23,17,8,10,12,14,16,7,6,2,24,24,25,5,8,
     & 9,13,2,18,20,19,21,6,7,2,1,26,26,1,3,4,4,26,26,28,17,29,30,30,
     &31/
      LENGTH= 0
      XSIZE=LINSIZ
      XSIZ2=XSIZE/2.0
      XRAS=ITVRAS
      XPIC=ITVPIC
C --- DETERMINE LENGTH OF INPUT CURRENT WEATHER NAME
      LENGTH=NCHARS(CNAME,KB,KE)
  200 IF(LENGTH.LE.0) RETURN
  201 CONTINUE
      DO 300 I=1,NTYPE
         IF(CNAME(1:LENGTH).EQ.CTYPE(I)(1:LENGTH)) THEN
            NFOUND= IFOUND(I)
            GOTO 40
         END IF
  300 CONTINUE
C --- IF WEATHER SYMBOL NOT FOUND, REDUCE LENGTH BY 1 AND TRY AGAIN
      LENGTH= LENGTH-1
      IF(LENGTH.GE.1) GO TO 201
      RETURN
 40   CONTINUE
      GOTO(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
     & 21,22,23,24,25,26,27,28,29,30,31),NFOUND
    1 CALL TRWS(XRAS,XPIC,XSIZ2,KOLOR)
      RETURN
    2 CALL TRW(XRAS,XPIC,XSIZ2,KOLOR)
      RETURN
    3 CONTINUE
C --- DRAW A THUNDERSTORM SYMBOL WITH HAIL
      XSZ= XSIZE/2.
      CALL TRW(XRAS,XPIC,XSZ,KOLOR)
      XY= ANINT(XRAS - 3*XSZ)
      XX= ANINT(XPIC + XSZ/2)
      CALL POLYGN(XY,XX,3,XSZ,90.,KOLOR)
      RETURN
    4 CONTINUE
C --- DRAW A SEVERE THUNDERSTORM SYMBOL WITH HAIL
      XSZ= XSIZE/2.
      CALL TRWS(XRAS,XPIC,XSZ,KOLOR)
      XY= ANINT(XRAS - 3*XSZ)
      XX= ANINT(XPIC + XSZ/2)
      CALL POLYGN(XY,XX,3,XSZ,90.,KOLOR)
      RETURN
    5 CONTINUE
C --- DRAW A THUNDERSTORM SYMBOL WITH SNOW
      XSZ= XSIZE/2.
      CALL TRW(XRAS,XPIC,XSZ,KOLOR)
      XY= ANINT(XRAS - 3*XSZ)
      XX= ANINT(XPIC + XSZ/2.)
      CALL SMINUS(XY,XX,XSIZE,KOLOR)
      RETURN
    6 CONTINUE
C --- DRAW A RAIN SHOWER SYMBOL
      XSZ= XSIZE/2.
      CALL POLYGN(XRAS,XPIC,3,XSZ,270.,KOLOR)
      XY= ANINT(XRAS - 1.5*XSZ)
      XKSZ= .50 * XSZ
C --- ELIPSE DRAWS A CIRCLE ABOVE THE TRIANGLE
      CALL FITD(XY,XPIC,XKSZ,KOLOR)
      RETURN
    7 CONTINUE
C --- DRAW A SNOW SHOWER SYMBOL
      XSZ= XSIZE/2.
      CALL POLYGN(XRAS,XPIC,3,XSZ,270.,KOLOR)
      XY= ANINT(XRAS - 2*XSZ)
      XKSZ= .50 * XSZ
      CALL STAR(XY,XPIC,6,XKSZ,90.,KOLOR)
      RETURN
    8 CONTINUE
C --- DRAW A FOG SYMBOL
      XSZ= XSIZE*.80
      IRAS=NINT(XRAS)
      IPIC=NINT(XPIC)
      CALL PLOT(NINT(XRAS-XSZ/2.),IPIC,0)
      CALL PLOT(NINT(XRAS-XSZ/2.),NINT(XPIC+XSZ),KOLOR)
      CALL PLOT(IRAS,IPIC,0)
      CALL PLOT(IRAS,NINT(XPIC+XSZ),KOLOR)
      CALL PLOT(NINT(XRAS+XSZ/2.),IPIC,0)
      CALL PLOT(NINT(XRAS+XSZ/2.),NINT(XPIC+XSZ),KOLOR)
      CALL PLOT(IRAS,IPIC,0)
      RETURN
    9 CONTINUE
C --- DRAW A R-- SYMBOL
      XSZ= XSIZE*.25
      CALL FITD(XRAS,XPIC,XSZ,KOLOR)
      RETURN
   10 CONTINUE
C --- DRAW A R- SYMBOL
      XSZ= XSIZE*.25
      CALL FITD(XRAS,XPIC,XSZ,KOLOR)
      XX= ANINT(XPIC + 3*XSZ)
      CALL FITD(XRAS,XX,XSZ,KOLOR)
      RETURN
   11 CONTINUE
C --- DRAW A R SYMBOL
      XSZ= XSIZE*.25
      CALL FITD(XRAS,XPIC,XSZ,KOLOR)
      XX= ANINT(XPIC + 3*XSZ)
      CALL FITD(XRAS,XX,XSZ,KOLOR)
      XY= ANINT(XRAS - 3*XSZ)
      XX= ANINT(XPIC + 1.5*XSZ)
      CALL FITD(XY,XX,XSZ,KOLOR)
      RETURN
   12 CONTINUE
C --- DRAW A R+ SYMBOL
      XSZ= XSIZE*.25
      CALL FITD(XRAS,XPIC,XSZ,KOLOR)
      XX= ANINT(XPIC + 3*XSZ)
      CALL FITD(XRAS,XX,XSZ,KOLOR)
      XY= ANINT(XRAS - 3*XSZ)
      XX= ANINT(XPIC + 1.5*XSZ)
      CALL FITD(XY,XX,XSZ,KOLOR)
      XY= ANINT(XRAS + 3*XSZ)
      CALL FITD(XY,XX,XSZ,KOLOR)
      RETURN
   13 CALL SMINUS(XRAS,XPIC,XSIZE,KOLOR)
      RETURN
   14 CONTINUE
C --- DRAW A S- SYMBOL
      XSZ= XSIZE*.25
      CALL STAR(XRAS,XPIC,6,XSZ,90.,KOLOR)
      XX= ANINT(XPIC + 3*XSZ)
      CALL STAR(XRAS,XX,6,XSZ,90.,KOLOR)
      RETURN
   15 CONTINUE
C --- DRAW A S SYMBOL
      XSZ= XSIZE*.25
      CALL STAR(XRAS,XPIC,6,XSZ,90.,KOLOR)
      XX= ANINT(XPIC + 3*XSZ)
      CALL STAR(XRAS,XX,6,XSZ,90.,KOLOR)
      XY= ANINT(XRAS - 3*XSZ)
      XX= ANINT(XPIC + 1.5*XSZ)
      CALL STAR(XY,XX,6,XSZ,90.,KOLOR)
      RETURN
   16 CONTINUE
C --- DRAW A S+ SYMBOL
      XSZ= XSIZE*.25
      CALL STAR(XRAS,XPIC,6,XSZ,90.,KOLOR)
      XX= ANINT(XPIC + 3*XSZ)
      CALL STAR(XRAS,XX,6,XSZ,90.,KOLOR)
      XY= ANINT(XRAS - 3*XSZ)
      XX= ANINT(XPIC + 1.5*XSZ)
      CALL STAR(XY,XX,6,XSZ,90.,KOLOR)
      XY= ANINT(XRAS + 3*XSZ)
      CALL STAR(XY,XX,6,XSZ,90.,KOLOR)
      RETURN
   17 CALL DRZL(XRAS,XPIC,XSIZE,KOLOR)
      RETURN
   18 CONTINUE
C --- DRAW A FREEZING DRIZZLE - SYMBOL
      XSZ= XSIZ2/2.
      CALL FPRECP(XRAS,XPIC,XSZ,KOLOR)
      CALL DRZL(XRAS,XPIC-XSZ,XSZ,KOLOR)
      RETURN
   19 CONTINUE
C --- DRAW A FREEZING DRIZZLE + SYMBOL
      XSZ= XSIZ2/2.
      CALL FPRECP(XRAS,XPIC,XSZ,KOLOR)
      CALL DRZL(XRAS,XPIC-XSZ,XSZ,KOLOR)
      CALL DRZL(XRAS,XPIC+XSZ,XSZ,KOLOR)
      RETURN
   20 CONTINUE
C --- DRAW A FREEZING RAIN - SYMBOL
      XSZ= XSIZ2/2.
      CALL FPRECP(XRAS,XPIC,XSZ,KOLOR)
      XKSZ= XSZ/8.
      IF(XKSZ.LE.0.0) THEN
         IRAS=NINT(XRAS)
         IPIC=NINT(XPIC-XSZ)
         CALL WRTEXT(IRAS,IPIC,1,CDOT,1,KOLOR)
      ELSE
         CALL FITD(XRAS,XPIC-XSZ,XKSZ,KOLOR)
      END IF
      RETURN
   21 CONTINUE
C --- DRAW A FREEZING RAIN + SYMBOL
      XSZ= XSIZ2/2.
      CALL FPRECP(XRAS,XPIC,XSZ,KOLOR)
      XKSZ=XSZ/8.
      IF(XKSZ.LE.0.0) THEN
         IRAS=NINT(XRAS)
         IPIC=NINT(XPIC-XSZ)
         CALL WRTEXT(IRAS,IPIC,1,CDOT,1,KOLOR)
         IPIC=NINT(XPIC+XSZ)
         CALL WRTEXT(IRAS,IPIC,1,CDOT,1,KOLOR)
      ELSE
         CALL FITD(XRAS,XPIC-XSZ,XKSZ,KOLOR)
         CALL FITD(XRAS,XPIC+XSZ,XKSZ,KOLOR)
      END IF
      RETURN
   22 CONTINUE
C --- DRAW A HAZE SYMBOL.
      IRAS=NINT(XRAS)
      IPIC=NINT(XPIC)
      LSIZE=NINT(XSIZE)
      CALL PLTXTN(IRAS,IPIC,LSIZE+2,'$H',2,KOLOR)
      RETURN
   23 CONTINUE
C --- DRAW A SMOKE (K) SYMBOL
      IRAS=NINT(XRAS)
      IPIC=NINT(XPIC)
      LSIZE=NINT(XSIZ2)
      CALL PLOT(IRAS,IPIC,0)
      CALL PLOT(IRAS-2*LSIZE,IPIC,KOLOR)
      XSZ= XSIZ2*.25
      XY= XRAS - 2*XSIZ2
      XX= XPIC + 2*XSZ
      CALL FPRECP(XY,XX,XSZ,KOLOR)
      XX= XPIC + 6*XSZ
      CALL FPRECP(XY,XX,XSZ,KOLOR)
      RETURN
   24 CONTINUE
C --- DRAW A BLOWING DUST SYMBOL
      IRAS=NINT(XRAS)
      IPIC=NINT(XPIC)
      LSIZE=NINT(XSIZ2)
      LSIZ2=NINT(XSIZ2*2.)
      CALL PLOT(IRAS,IPIC,0)
      CALL PLOT(IRAS-2*LSIZE,IPIC,KOLOR)
      IY= NINT(XRAS - 1.75*XSIZ2)
      IX= NINT(XPIC - 0.25*XSIZ2)
      CALL PLOT(IY,IX,KOLOR)
      CALL PLOT(IRAS-LSIZ2,IPIC,KOLOR)
      IX= NINT(XPIC + 0.25*XSIZ2)
      CALL PLOT(IY,IX,KOLOR)
      XRAS= XRAS - XSIZ2
      XPIC= XPIC - XSIZ2
      IRAS=NINT(XRAS)
      IPIC=NINT(XPIC)
      CALL PLOT(IRAS,IPIC,0)
      CALL PLOT(IRAS,IPIC+LSIZ2,KOLOR)
      IY= NINT(XRAS - 0.25*XSIZ2)
      IX= NINT(XPIC + 1.75*XSIZ2)
      CALL PLOT(IY,IX,KOLOR)
      CALL PLOT(IRAS,IPIC+LSIZ2,KOLOR)
      IY= NINT(XRAS + 0.25*XSIZ2)
      CALL PLOT(IY,IX,KOLOR)
      CALL PLOT(IRAS,IPIC,0)
      RETURN
   25 CONTINUE
C --- DRAW AN ICE PELLETS SYMBOL
      CALL POLYGN(XRAS,XPIC,3,XSIZE,90.,KOLOR)
      XSZ= NINT(XSIZE*.25)
      CALL FITD(XRAS,XPIC,XSZ,KOLOR)
      RETURN
   26 CONTINUE
C --- DRAW A RAIN-SNOW SYMBOL
      XSZ= NINT(XSIZE*.25)
      XY= ANINT(XRAS - XSIZE/1.2)
      CALL STAR(XRAS,XPIC,6,XSZ,90.,KOLOR)
      CALL FITD(XY,XPIC,XSZ,KOLOR)
      RETURN
   27 CONTINUE
C --- DRAW A LIGHTNING SYMBOL
      IPIC=NINT(XPIC)
      IRAS=NINT(XRAS)
      XSZ= XSIZ2*.8
      IY= NINT(XRAS - 2*XSZ)
      CALL PLOT(IY,IPIC,0)
      IX= NINT(XPIC - XSZ)
      IY= NINT(XRAS - XSZ)
      CALL PLOT(IY,IX,KOLOR)
      CALL PLOT(IRAS,IPIC,KOLOR)
      IY= NINT(XRAS - XSZ*.25)
      CALL PLOT(IY,IPIC,KOLOR)
      CALL PLOT(IRAS,IPIC,KOLOR)
      IX= NINT(XPIC - XSZ*.25)
      CALL PLOT(IRAS,IX,KOLOR)
      CALL PLOT(IRAS,IPIC,0)
      RETURN
   28 CONTINUE
C --- DRAW A TORNADO SYMBOL
      XSZ= XSIZ2*.5
      XY= XRAS
      XX= XPIC-XSZ
      IY=NINT(XY)
      IX=NINT(XX)
      CALL PLOT(IY,IX,0)
      XY= XY - 2*XSZ
      IY=NINT(XY)
      CALL PLOT(IY,IX,KOLOR)
      CALL PLOT(IRAS,IPIC,0)
      CALL ELIPSE(XY,XX-XSZ,XSZ,XSZ,1,KOLOR)
      CALL ELIPSE(XRAS,XX-XSZ,XSZ,XSZ,4,KOLOR)
      XY= XRAS
      XX= XPIC+XSZ
      IY=NINT(XY)
      IX=NINT(XX)
      CALL PLOT(IY,IX,0)
      XY= XY - 2*XSZ
      IY=NINT(XY)
      CALL PLOT(IY,IX,KOLOR)
      CALL PLOT(IRAS,IPIC,0)
      CALL ELIPSE(XY,XX+XSZ,XSZ,XSZ,2,KOLOR)
      CALL ELIPSE(XRAS,XX+XSZ,XSZ,XSZ,3,KOLOR)
      RETURN
   29 CONTINUE
C --- DRAW A HAZE SYMBOL.
      IRAS=NINT(XRAS)
      IPIC=NINT(XPIC)
      LSIZE=NINT(XSIZE)
      CALL PLTXTN(IRAS,IPIC,LSIZE+2,'$H',2,KOLOR)
      RETURN
   30 CONTINUE
C --- DRAW A GRANULAR SNOW SYMBOL
      XS5=XSIZE*.5
      XS8=XSIZE*.8
      CALL POLYGN(XRAS,XPIC,3,XS5,90.,KOLOR)
      IRAS=NINT(XRAS)
      IPIC=NINT(XPIC)
      CALL PLOT(IRAS,NINT(XPIC-XS8),0)
      CALL PLOT(IRAS,NINT(XPIC+XS8),KOLOR)
      CALL PLOT(IRAS,IPIC,0)
      RETURN
   31 CONTINUE
C --- DRAW A ICE/SNOW CRYSTAL SYMBOL
      IRAS=NINT(XRAS)
      IPIC=NINT(XPIC)
      XS5=XSIZE*.5
      XS8=XSIZE*.8
      CALL ASTRIX(XRAS,XPIC,XS5,KOLOR)
      CALL PLOT(IRAS,NINT(XPIC-XS8),0)
      CALL PLOT(IRAS,NINT(XPIC+XS8),KOLOR)
      CALL PLOT(IRAS,IPIC,0)
      RETURN
      END
      SUBROUTINE ASTRIX(XRAS,XPIC,XSIZE,KOLOR)
C $ CALL ASTRIX(XRAS, XPIC, XSIZE, KOLOR) (RJL)
C $ XRAS = (R) INPUT  TV LINE COORDINATE.
C $ XPIC = (R) INPUT  TV ELEMENT COORDINATE.
C $ XSIZE = (R) INPUT  SIZE OF SYMBOL
C $ KOLOR = (I) INPUT  COLOR TO PLOT.
C --- DRAW AN ASTRIX
      DATA DEGR/.017453292/
      IRAS=NINT(XRAS)
      IPIC=NINT(XPIC)
      RAD=XSIZE/2.
      THETA=60.*DEGR
      XDISP=RAD*COS(THETA)
      YDISP=RAD*SIN(THETA)
CCC   XSZ= XSIZE*.50
CCC   ZVAL=(SQRT(2.*(XSIZE**2)))*.50
      CALL PLOT(IRAS,NINT(XPIC-RAD),0)
      CALL PLOT(IRAS,NINT(XPIC+RAD),KOLOR)
      CALL PLOT(NINT(XRAS-YDISP),NINT(XPIC-XDISP),0)
      CALL PLOT(NINT(XRAS+YDISP),NINT(XPIC+XDISP),KOLOR)
      CALL PLOT(NINT(XRAS-YDISP),NINT(XPIC+XDISP),0)
      CALL PLOT(NINT(XRAS+YDISP),NINT(XPIC-XDISP),KOLOR)
      CALL PLOT(IRAS,IPIC,0)
      RETURN
      END
      SUBROUTINE POLYGN(XRAS,XPIC,NPOINT,RADIUS,ROTATE,KOLOR)
C $   DRAW A REGULAR POLYGON WITH N-SIDES.
C $ CALL POLYGN(XRAS, XPIC, NPOINT, RADIUS, ROTATE, KOLOR)  (TOD)
C $ XRAS = (R) INPUT  TV LINE COORDINATE.
C $ XPIC = (R) INPUT  TV ELEMENT COORDINATE.
C $ NPOINT = (I) INPUT  NUMBER OF POLYGON POINTS
C $ RADIUS = (R) INPUT  RADIUS OF UNIT CIRCLE
C $ ROTATE = (R) INPUT  ROTATION VALUE IN DEGREES.
C $ KOLOR = (I) INPUT  COLOR TO PLOT.
C --- CONVENTION E - 0 , N - 90 , W - 180 , S - 270
      DATA PI/ 3.14159265/,DEGR/.017453292/
      R1= RADIUS
      PSI= 2.*PI/FLOAT(NPOINT)
      RAS= XRAS
      PIC= XPIC
      ROT= DEGR*ROTATE
      TH= -ROT
      KOL= 0
C --- CALCULATE POLYGON END-POINTS
      YPT= RAS + R1*SIN(TH)
      XPT= PIC + R1*COS(TH)
      IYS=NINT(YPT)
      IXS=NINT(XPT)
      CALL PLOT(IYS,IXS,KOL)
      KOL= KOLOR
      TH=TH-PSI
      DO 1 I=2,NPOINT
         YPT= RAS + R1*SIN(TH)
         XPT= PIC + R1*COS(TH)
         IY=NINT(YPT)
         IX=NINT(XPT)
         CALL PLOT(IY,IX,KOL)
         TH= TH - PSI
    1 CONTINUE
      CALL PLOT(IYS,IXS,KOL)
      KOL= 0
      CALL PLOT(IYS,IXS,KOL)
      RETURN
      END
      SUBROUTINE FPRECP(XRAS,XPIC,XSIZE,KOLOR)
C $ CALL FPRECP(XRAS, XPIC, XSIZE, KOLOR)  (TOD)
C $ XRAS = (R) INPUT  TV LINE COORDINATE.
C $ XPIC = (R) INPUT  TV ELEMENT COORDINATE.
C $ XSIZE = (R) INPUT  RADIUS OF UNIT CIRCLE
C $ KOLOR = (I) INPUT  COLOR TO PLOT.
C --- DRAW A FREEZING PRECIPITATION SYMBOL.
C --- DRAW THE FIRST AND SECOND QUADRANTS OF A CIRCLE
      CALL ELIPSE(XRAS,XPIC-XSIZE,XSIZE,XSIZE,1,KOLOR)
      CALL ELIPSE(XRAS,XPIC-XSIZE,XSIZE,XSIZE,2,KOLOR)
C --- DRAW THE THIRD AND FOURTH QUADRANTS OF A CIRCLE
      CALL ELIPSE(XRAS,XPIC+XSIZE,XSIZE,XSIZE,3,KOLOR)
      CALL ELIPSE(XRAS,XPIC+XSIZE,XSIZE,XSIZE,4,KOLOR)
      RETURN
      END
      SUBROUTINE FITD(XRAS,XPIC,XSIZE,KOLOR)
C $ CALL FITD(XRAS, XPIC, XSIZE, KOLOR) (TOD)
C $ XRAS = (R) INPUT  TV LINE COORDINATE.
C $ XPIC = (R) INPUT  TV ELEMENT COORDINATE.
C $ XSIZE = (R) INPUT  SIZE OF SYMBOL
C $ KOLOR = (I) INPUT  COLOR TO PLOT.
C --- FILL IN THE DOT
      IRAS=NINT(XRAS)
      IPIC=NINT(XPIC)
      DO 1 R=1.0,XSIZE+.05,1.0
    1 CALL ELIPSE(XRAS,XPIC,R,R,5,KOLOR)
C --- FILL IN THE CENTER HOLE
      CALL PLOT(IRAS,IPIC-1,0)
      CALL PLOT(IRAS,IPIC+1,KOLOR)
      RETURN
      END
      SUBROUTINE TRWS(XRAS,XPIC,XSIZE,KOLOR)
C $ CALL TRWS(XRAS, XPIC, XSIZE, KOLOR) (TOD)
C $ WEATHER SYMBOL FOR SEVERE THUNDERSTORM
C $ XRAS = (R) INPUT  TV LINE COORDINATE.
C $ XPIC = (R) INPUT  TV ELEMENT COORDINATE.
C $ XSIZE = (R) INPUT  SIZE OF SYMBOL
C $ KOLOR = (I) INPUT  COLOR TO PLOT.
C $$ TRWS = GRAPHICS, PLOT
C --- DRAW A SEVERE THUNDERSTORM SYMBOL
      XSZ= XSIZE*.8
      XY=XRAS
      XX=XPIC
      IY= NINT(XRAS)
      IX= NINT(XPIC)
      CALL PLOT(IY,IX,0)
      XY= XY - 2*XSZ
      IY=NINT(XY)
      CALL PLOT(IY,IX,KOLOR)
      XX= XX - XSZ
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOLOR)
      XX= XX + 3*XSZ
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOLOR)
      XY= XRAS - XSZ
      XX= XPIC + XSZ
      IY=NINT(XY)
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOLOR)
      XY= XRAS - XSZ/2.
      XX= XPIC + 2*XSZ
      IY=NINT(XY)
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOLOR)
      XY= XRAS
      XX= XPIC + XSZ
      IY=NINT(XY)
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOLOR)
      XX= XPIC + 1.25*XSZ
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOLOR)
      XX= XPIC+XSZ
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOLOR)
      XY= XRAS - .25*XSZ
      IY=NINT(XY)
      CALL PLOT(IY,IX,KOLOR)
      IY= NINT(XRAS)
      IX= NINT(XPIC)
      CALL PLOT(IY,IX,0)
      RETURN
      END
      SUBROUTINE TRW(XRAS,XPIC,XSIZE,KOLOR)
C $ CALL TRW(XRAS, XPIC, XSIZE, KOLOR) (TOD)
C $ XRAS = (R) INPUT  TV LINE COORDINATE.
C $ XPIC = (R) INPUT  TV ELEMENT COORDINATE.
C $ XSIZE = (R) INPUT  SIZE OF SYMBOL
C $ KOLOR = (I) INPUT  COLOR TO PLOT.
C --- DRAW A THUNDERSTORM SYMBOL
      XSZ= XSIZE*.8
      XY=XRAS
      XX=XPIC
      IY= NINT(XRAS)
      IX= NINT(XPIC)
      CALL PLOT(IY,IX,0)
      XY= XY - 2*XSZ
      IY=NINT(XY)
      CALL PLOT(IY,IX,KOLOR)
      XX= XX - XSZ
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOLOR)
      XX= XX + 3*XSZ
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOLOR)
      XY= XRAS - XSZ
      XX= XPIC + XSZ
      IY=NINT(XY)
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOLOR)
      XY= XRAS
      XX= XPIC + 2*XSZ
      IY=NINT(XY)
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOLOR)
      XX= XPIC + 1.75*XSZ
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOLOR)
      XX= XPIC + 2*XSZ
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOLOR)
      XY= XRAS - .25*XSZ
      IY=NINT(XY)
      CALL PLOT(IY,IX,KOLOR)
      IY= NINT(XRAS)
      IX= NINT(XPIC)
      CALL PLOT(IY,IX,0)
      RETURN
      END
      SUBROUTINE SMINUS(XRAS,XPIC,XSIZE,KOLOR)
C $ CALL SMINUS(XRAS, XPIC, XSIZE, KOLOR) (TOD)
C $ XRAS = (R) INPUT  TV LINE COORDINATE.
C $ XPIC = (R) INPUT  TV ELEMENT COORDINATE.
C $ XSIZE = (R) INPUT  SIZE OF SYMBOL
C $ KOLOR = (I) INPUT  COLOR TO PLOT.
C --- DRAW A S-- SYMBOL
      XSZ= XSIZE*.25
      CALL STAR(XRAS,XPIC,6,XSZ,90.,KOLOR)
      RETURN
      END
      SUBROUTINE DRZL(XRAS,XPIC,XSIZE,KOLOR)
C $ CALL DRZL(IRAS, IPIC, XSIZE, KOLOR) (TOD)
C $ IRAS = (I) INPUT  TV LINE COORDINATE.
C $ IPIC = (I) INPUT  TV ELEMENT COORDINATE.
C $ XSIZE = (R) INPUT  SIZE OF SYMBOL
C $ KOLOR = (I) INPUT  COLOR TO PLOT.
C --- DRAW A DRIZZLE SYMBOL
      CHARACTER*1 CCC
      DATA CCC/','/
      IRAS=NINT(XRAS-XSIZE/2.)
      IPIC=NINT(XPIC)
      LSIZE=NINT(XSIZE)
      CALL WRTEXT(IRAS,IPIC,LSIZE,CCC,1,KOLOR)
      RETURN
      END
      SUBROUTINE STAR(XRAS,XPIC,NPOINT,RADIUS,ROTATE,KOLOR)
C $ CALL STAR(XRAS, XPIC, NPOINT, RADIUS, ROTATE, KOLOR) (TOD)
C $   DRAW A STAR WITH N-POINTS.
C $ XRAS = (R) INPUT  TV LINE COORDINATE.
C $ XPIC = (R) INPUT  TV ELEMENT COORDINATE.
C $ NPOINT = (I) INPUT  NUMBER OF STAR POINTS
C $ RADIUS = (R) INPUT  RADIUS OF UNIT CIRCLE
C $ ROTATE = (R) INPUT  ROTATION VALUE IN DEGREES.
C $ KOLOR = (I) INPUT  COLOR TO PLOT.
C $$ STAR = GRAPHICS, PLOT
C --- CONVENTION E - 0 , N - 90 , W - 180 , S - 270
      DATA PI/ 3.14159265/,DEGR/.017453292/
      R1= RADIUS
      R2= 2.*R1/NPOINT
      IF(NPOINT.EQ.3) R2= R1/NPOINT
      NPTS= 2*NPOINT
      PSI= 2.*PI/FLOAT(NPTS)
      RAS= XRAS
      PIC= XPIC
      ROT= ROTATE*DEGR
      TH=  - ROT
C --- CALCULATE STAR END-POINTS
      KOL= 0
      YPT= RAS + R1*SIN(TH)
      XPT= PIC + R1*COS(TH)
      IYS= NINT(YPT)
      IXS= NINT(XPT)
      CALL PLOT(IYS,IXS,KOL)
      KOL=KOLOR
      TH=TH-PSI
      DO 1 I=2,NPTS
C ----- DECIDE WHETHER 'I' IS ODD OR EVEN
         IF(MOD(I,2).NE.0) THEN
            YPT= RAS + R1*SIN(TH)
            XPT= PIC + R1*COS(TH)
         ELSE
            YPT= RAS + R2*SIN(TH)
            XPT= PIC + R2*COS(TH)
         END IF
         IY= NINT(YPT)
         IX= NINT(XPT)
         CALL PLOT(IY,IX,KOL)
         TH= TH - PSI
    1 CONTINUE
      CALL PLOT(IYS,IXS,KOL)
      KOL= 0
      CALL PLOT(IYS,IXS,KOL)
      RETURN
      END
      SUBROUTINE ELIPSE(XRAS,XPIC,MAJOR,MINOR,IQUAD,KOLOR)
C $ CALL ELIPSE(XRAS, XPIC, MAJOR, MINOR, IQUAD, KOLOR) (TOD)
C $   TO DRAW AN ELLIPSE OR ANY QUADRANT THEREOF.
C $ XRAS = (R) INPUT  TV LINE COORDINATE.
C $ XPIC = (R) INPUT  TV ELEMENT COORDINATE.
C $ MAJOR = (R) INPUT  MAJOR AXIS OF ELLIPSE.
C $ MINOR = (R) INPUT  MINOR AXIS OF ELLIPSE
C $ IQUAD = (I) INPUT  QUADRANT TO DISPLAY, >4 DISPLAY WHOLE ELLIPSE.
C $ KOLOR = (I) INPUT  COLOR TO PLOT.
C $$ ELIPSE = GRAPHICS, PLOT
C --- INITIALIZE PLOT.
      REAL MAJOR,MINOR
      DATA STEP/.1/,STEP2/.05/
      XKY(X,FA,FB)= (FA/FB)*SQRT(ABS(FB*FB-X*X))
      FA= MAJOR
      FB= MINOR
   10 CONTINUE
      IF(IQUAD.EQ.2) GOTO 11
      IF(IQUAD.EQ.3) GOTO 21
      IF(IQUAD.EQ.4) GOTO 31
C --- PLOT FIRST QUADRANT OF ELLIPSE.
      KOL = 0
      DO 1 X=0,FB+STEP2,STEP
      XY= XRAS - XKY(X,FA,FB)
      XX= XPIC + X
      IY=NINT(XY)
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOL)
      KOL = KOLOR
    1 CONTINUE
      IF(IQUAD.EQ.1) RETURN
C --- PLOT SECOND QUADRANT OF ELLIPSE.
 11   CONTINUE
      KOL = 0
      DO 2 X=0,FB+STEP2,STEP
      XY= XRAS - XKY(X,FA,FB)
      XX= XPIC - X
      IY=NINT(XY)
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOL)
      KOL = KOLOR
    2 CONTINUE
      IF(IQUAD.EQ.2) RETURN
C --- PLOT THIRD QUADRANT OF ELLIPSE.
 21   CONTINUE
      KOL = 0
      DO 3 X=0,FB+STEP2,STEP
      XY= XRAS + XKY(X,FA,FB)
      XX= XPIC - X
      IY=NINT(XY)
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOL)
      KOL = KOLOR
    3 CONTINUE
      IF(IQUAD.EQ.3) RETURN
C --- PLOT FOURTH QUADRANT OF ELLIPSE.
 31   CONTINUE
      KOL = 0
      DO 4 X=0,FB+STEP2,STEP
      XY= XRAS + XKY(X,FA,FB)
      XX= XPIC + X
      IY=NINT(XY)
      IX=NINT(XX)
      CALL PLOT(IY,IX,KOL)
      KOL = KOLOR
    4 CONTINUE
      RETURN
      END
