[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: hurricane plots



Don and Tom,

> -----Original Message-----
> From: Don Murray [mailto:address@hidden] 
> Sent: Friday, October 24, 2003 8:50 PM
> 
> How do you decode the positions?
> 
> Don

I use a Mcbasi script to parse the text bulletin - see below.

Tom Y. might be interested too, so I'll cc him.

REM ? Name:    HURPLT.MCB (version 1.0)
REM ?
REM ? Purpose: plot forecast hurricane positions on a map
REM ?
REM ? Invocation:
REM ?          RUN lat lon blowup FILE=HURPLT.MCB
REM ?               |   |    |         |__ McBASI script name
REM ?               |   |    |_____________image blowup factor
REM ?               |   |__________________longitude to center image
REM ?               |_____________________ latitude to center image
REM ?                                      
REM ?
REM   Written by Bill Fingerhut
REM   History: 030914 - Created for Unidata McIDAS-X Version 2003
REM ? ----------

REM   draw the map
    KEYIN "EG B"
    KEYIN "GU REST GRAPHIC"
    INPUT A$
    IF A$ <> "" GOTO 50
    A$ = "31"
    B$ = "79"
    C$ = "1"
    GOTO 75
50  INPUT B$
    INPUT C$
75 KEYIN "IMGDISP RTIMAGES/GE-IR LATLON=";A$;" ";B$;" MAG=";C$;" EU=SAB"

REM   retrieve the text bulletin
    KEYIN "WXTLIST WMO=WTNT4? WSTN=KNHC DTIME=6 NUM=6 DEV=F HURPLT.DAT"
    KEYIN "MAP H 6 LALO 4 INT=5 5"
    KEYIN "BAR SU=IRTEMP"

REM   open the file
    OPEN "HURPLT.DAT",10,80
100 INPUT @10,L$
    IF MID$(L$,1,4) <> EOF$ GOTO 150

REM   end of file read
    KEYIN "ECHO {end of file read"
    GOTO 900

REM   locate data
150 T$=MID$(L$,4,5)
    IF T$<>"TIAL " GOTO 200

REM   found initial position
    T$="HR VT"
    GOTO 500

REM   test for data
200 IF T$<>"HR VT" GOTO 100

REM   process data
500 D$=MID$(L$,14,2)
    H$=MID$(L$,17,2)
    Y$=MID$(L$,22,5)
    X$=MID$(L$,29,5)
    S$=MID$(L$,38,3)
    KEYIN "ECHO {D";D$;"DH";H$;"HY";Y$;"YX";X$;"XS";S$;"S"

REM   calculate plotting positions
    PTABLE STR$(VAL(Y$)+.5),"LP"
    PTABLE STR$(VAL(Y$)-.5),"LM"

REM   plot data
    KEYIN "PC T 1 1"
    KEYIN "PC E ";Y$;" ";X$"
    KEYIN "ZA 5 14 C TCY=5 N"
    KEYIN "PC E #LP ";X$;""
    KEYIN "ZA 5 12 L WID=2 {";S$;" kt"
    KEYIN "PC E #LM ";X$;""
    KEYIN "ZA 5 12 L WID=2 { ";D$;"/";H$;" GMT"
    GOTO 100

900 CLOSE 10
    KEYIN "FRMSAVE X REMOTE"


Bill

< Bill Fingerhut, Professor           PHONE: 802-626-6257 >
< Meteorology Dept                    FAX:   802-626-9770 >
< Lyndon State College                                    >
< Lyndonville, Vt 05851                                   >
<                                                         >
< EMAIL:     address@hidden            >
<            address@hidden                  >
< WWW:       http://apollo.lsc.vsc.edu/                   >
<                                                         >
< disclaimer: I know nothing - I only work here.          >