Weather Analysis

Date: 198x
Type: Program
Platform(s): TS 1000

Appears on

Assembled by Tim Ward from many sources. Contains programs 10211 – 10251.

Gallery

Weather Analysis

Source Code

  13 LET X=0
  14 LET A=0
  15 LET B=0
  16 LET C=0
  17 LET L=0
  18 DIM A$(90,31)
  19 DIM B$(1,8)
  20 DIM C$(1,4)
  25 DIM D$(1,4)
  30 DIM E$(1,5)
  35 DIM F$(1,1)
  40 DIM G$(1,5)
  45 DIM H$(1,3)
  50 DIM I$(1,4)
  55 DIM J$(1,31)
  56 DIM K$(1)
  59 GOSUB 2000
  60 CLS 
  65 PRINT AT 0,5;"%W%E%A%T%H%E%R% %A%N%A%L%Y%S%I%S"
  70 PRINT 
  75 PRINT AT 5,3;"UPDATE DATA ENTER %U"
  80 PRINT AT 7,3;"FORECAST FROM DATA ENTER %F"
  85 PRINT AT 9,3;"DISPLAY DATA ENTER %D"
  90 PRINT AT 11,3;"DISPLAY NORMALS ENTER %N"
  92 PRINT AT 13,3;"TO STOP ENTER %S"
  93 PRINT AT 15,3;"SEARCH DATE ENTER %C"
  94 PRINT AT 17,3;"CORRECTIONS ENTER %M"
  95 PRINT AT 20,0;"%F%U%N%C%T%I%O%N???"
 100 INPUT Y$
 105 IF Y$="U" THEN GOTO 135
 110 IF Y$="F" THEN GOTO 380
 115 IF Y$="D" THEN GOTO 700
 120 IF Y$="N" THEN GOTO 900
 122 IF Y$="C" THEN GOTO 3000
 123 IF Y$="M" THEN GOTO 5000
 125 IF Y$="S" THEN STOP 
 130 GOTO 95
 135 CLS 
 140 PRINT "           DATA UPDATE"
 143 IF L=190 THEN PRINT "FILE FULL"
 144 IF L=190 THEN PAUSE 40000
 145 IF L=190 THEN GOTO 60
 146 PRINT 
 150 PRINT "ENTER DATE (AS 12-30-83):"
 155 INPUT B$(1,1 TO 8)
 158 LET L=L+1
 160 FOR X=L TO 190
 165 LET A$(X,1 TO 2)=B$(1,1 TO 2)
 170 LET A$(X,3 TO 4)=B$(1,4 TO 5)
 172 LET A$(X,5 TO 6)=B$(1,7 TO 8)
 175 PRINT "ENTER HIGH TEMPERATURE (AS +076)"
 180 INPUT C$(1,1 TO 4)
 185 LET A$(X,7 TO 10)=C$(1,1 TO 4)
 190 PRINT "ENTER LOW TEMPERATURE (AS -006)"
 195 INPUT D$(1,1 TO 4)
 200 LET A$(X,11 TO 14)=D$(1,1 TO 4)
 205 PRINT "ENTER BAROMETER (IN INCHES)"
 210 INPUT E$(1,1 TO 5)
 215 LET A$(X,15 TO 19)=E$(1,1 TO 5)
 220 PRINT "ENTER GENERAL WEATHER CONDITION",,"1=FAIR",,"2=CLOUDY",,"3=RAIN"
 223 PRINT ,"4=SNOW",,"5=THUNDERSHOWERS","6=SNOW FLURRIES",,"7=HEAVY RAIN"
 225 INPUT F$(1,1)
 230 LET A$(X,20)=F$(1,1)
 235 PRINT "ENTER PRECIPITATION (INCHES)"
 240 PRINT "AS:02.75"
 245 INPUT G$(1,1 TO 5)
 248 LET A$(X,21 TO 25)=G$(1,1 TO 5)
 250 PRINT "SNOWFALL AMOUNT (AS 07)"
 255 INPUT H$(1,1 TO 2)
 258 LET A$(X,26 TO 27)=H$(1,1 TO 2)
 260 CLS 
 265 PRINT "ENTER WIND DIRECTION AND SPEED:"
 270 PRINT "USE THIS CODE:","01=N",,"02=NE",,"03=E",,"04=SE",,"05=S",,"06=SW"
 273 PRINT ,"07=W",,"08=NW"
 275 PRINT 
 280 PRINT "ENTER DIRECTION AND SPEED","AS FOUR DIGIT NUMBER ""0312"""
 285 INPUT I$(1,1 TO 4)
 290 LET A$(X,28 TO 31)=I$(1,1 TO 4)
 295 CLS 
 300 PRINT "DATE: ";A$(X,1 TO 6)
 305 PRINT "HI TEMP: ";A$(X,7 TO 10)
 310 PRINT "LO TEMP: ";A$(X,11 TO 14)
 315 PRINT "BAROMETER: ";A$(X,15 TO 19)
 320 PRINT "CONDITIONS: ";A$(X,20)
 330 PRINT "PRECIPITATION: ";A$(X,21 TO 25)
 335 PRINT "SNOWFALL: ";A$(X,26 TO 27)
 340 PRINT "WINDS: ";A$(X,28 TO 31)
 342 PRINT "USE THIS CODE:","01=N",,"02=NE",,"03=E",,"04=SE",,"05=S",,"06=SW"
 343 PRINT ,"07=W",,"08=NW"
 345 PRINT 
 350 PRINT "%I%S% %T%H%I%S% %C%O%R%R%E%C%T% %?"
 355 INPUT Z$
 360 IF Z$="N" THEN GOTO 135
 365 LET L=X
 370 IF Z$="Y" THEN CLS 
 375 IF Z$="Y" THEN GOTO 65
 380 CLS 
 385 PRINT "        FORECAST"
 390 PRINT "ENTER BAROMETRIC PRESSURE:"
 395 INPUT A
 400 PRINT 
 405 PRINT "IS BAROMETER: ","1. STEADY",,"2. SLOW RISE",,"3. RAPID RISE"
 406 PRINT ,"4. SLOW FALL",,"5. RAPID FALL"
 407 PRINT "RAPID CHANGE IS ANY CHANGE ","IN EXCESS OF 0.06 PER HOUR."
 410 INPUT B
 415 PRINT 
 420 PRINT "WIND FROM:"
 425 PRINT ,"1=N",,"2=NE",,"3=E",,"4=SE",,"5=S",,"6=SW",,"7=W",,"8=NW"
 430 INPUT C
 433 CLS 
 435 IF A>=30.2 AND B=4 AND C>=6 AND C<=8 THEN GOTO 625
 440 IF A>=30.2 AND B=1 AND C>=6 AND C<=8 THEN GOTO 620
 445 IF A>=30.1 AND B=1 AND C>=6 AND C<=8 THEN GOTO 600
 450 IF A>=30.1 AND B=3 AND C>=6 AND C<=8 THEN GOTO 605
 455 IF A>=30.1 AND B=4 AND C>=6 AND C<=8 THEN GOTO 610
 460 IF A>=30.1 AND B=5 AND C>=6 AND C<=8 THEN GOTO 615
 465 IF A>=30.1 AND B=4 AND (C=4 OR C=5) THEN GOTO 630
 470 IF A>=30.1 AND B=5 AND (C=4 OR C=5) THEN GOTO 635
 475 IF A>=30.1 AND B=4 AND C>=2 AND C<=4 THEN GOTO 640
 480 IF A>=30.1 AND B=5 AND C>=2 AND C<=4 THEN GOTO 645
 485 IF A>=30.1 AND B=4 AND (C=3 OR C=2) THEN GOTO 650
 490 IF A>=30.1 AND B=5 AND (C=3 OR C=2) THEN GOTO 655
 492 IF A<=29.8 AND B=5 AND C>=1 AND C<=3 THEN GOTO 680
 493 IF A<=29.8 AND B=5 AND C>=3 AND C<=5 THEN GOTO 675
 494 IF A<=29.8 AND B=3 THEN GOTO 685
 495 IF A<=30.1 AND B=4 AND C<=4 AND C>=2 THEN GOTO 660
 500 IF A<=30.1 AND B=5 AND C<=4 AND C>=2 THEN GOTO 665
 505 IF A<=30.1 AND B=2 AND (C=5 OR C=6) THEN GOTO 670
 600 PRINT "FAIR, LITTLE IN TEMP","FOR NEXT DAY OR TWO."
 601 PAUSE 40000
 602 GOTO 60
 605 PRINT "FAIR TODAY, RAINY AND WARMER","WITHIN 48 HOURS"
 606 PAUSE 40000
 607 GOTO 60
 610 PRINT "WARMER, RAIN WITHIN 18 TO 24","HOURS"
 616 PAUSE 40000
 617 GOTO 60
 620 PRINT "CONTINUED FAIR WITH LITTLE","OR NO CHANGE IN TEMPERATURE"
 621 PAUSE 40000
 622 GOTO 60
 625 PRINT "FAIR AND WARMER FOR NEXT 48 HOURS"
 626 PAUSE 40000
 627 GOTO 60
 630 PRINT "RAIN WITHIN 24 HOURS"
 631 PAUSE 40000
 632 GOTO 60
 635 PRINT "WINDY, WITH RAIN WITHIN 12","TO 24 HOURS"
 636 PAUSE 40000
 637 GOTO 60
 640 PRINT "RAIN IN 12 TO 18 HOURS"
 641 PAUSE 40000
 642 GOTO 60
 645 PRINT "WINDY AND RAIN WITHIN 12 HOURS"
 646 PAUSE 40000
 647 GOTO 60
 650 PRINT "IN SUMMER WITH LIGHT WINDS: ","RAIN MAY NOT FALL FOR SEVERAL","DAYS"
 651 PRINT "IN WINTER: RAIN WITHIN 24 HOURS"
 652 PAUSE 40000
 653 GOTO 60
 655 PRINT "IN SUMMER RAIN LIKELY WITHIN","12 TO 24 HOURS"
 656 PRINT ,,"IN WINTER: RAIN OR SNOW WITH    INCREASING WINDS"
 657 PAUSE 40000
 658 GOTO 60
 660 PRINT "RAIN FOR NEXT DAY OR TWO"
 661 PAUSE 40000
 662 GOTO 60
 665 PRINT "RAIN, WITH HIGH WINDS FOLLOWED","WITHIN 24 HOURS BY CLEARING "
 666 PRINT "AND TURNING COLDER"
 667 PAUSE 40000
 668 GOTO 60
 670 PRINT "CLEARING WITHIN A FEW HOURS","FAIR FOR NEXT SEVERAL DAYS"
 671 PAUSE 40000
 672 GOTO 60
 675 PRINT "%S%E%V%E%R%E% %S%T%O%R%M% %W%A%R%N%I%N%G","WINDY,WITH RAIN OR SNOW IMMINENT"
 676 PRINT ,,"FOLLOWED WITHIN 24 HOURS BY","CLEARING AND COLDER"
 677 PAUSE 40000
 678 GOTO 60
 680 PRINT "%S%E%V%E%R%E% %S%T%O%R%M% %W%A%R%N%I%N%G","SEVERE NORTHEAST GALES"
 681 PRINT ,,"HEAVY RAIN OR SNOW, FOLLOWED IN WINTER BY A COLD WAVE"
 682 PAUSE 40000
 683 GOTO 60
 685 PRINT "CLEARING AND COLDER"
 686 PAUSE 40000
 687 GOTO 60
 700 CLS 
 705 FOR T=1 TO L
 706 SCROLL 
 710 PRINT A$(T)
 720 SCROLL 
 730 NEXT T
 740 PAUSE 200
 750 GOTO 60
 900 CLS 
 905 PRINT "      %W%E%A%T%H%E%R% %N%O%R%M%S"
 925 PRINT 
 930 PRINT "      TEMP"
 935 PRINT "  HI LO MO  RAIN   SNOW"
 940 PRINT "J 38 23 30   2.83    9.1"
 945 PRINT "F 41 24 32   2.70    9.6"
 950 PRINT "M 51 31 41   3.19    6.5"
 955 PRINT "A 64 42 53   3.02    0.3"
 960 PRINT "M 75 52 63   3.61    0.0"
 965 PRINT "J 83 61 72   3.61    0.0"
 970 PRINT 
 975 PRINT "J 87 65 76   3.61    0.0"
 980 PRINT "A 85 63 74   3.76    0.0"
 985 PRINT "S 78 56 67   3.21    0.0"
 990 PRINT "O 67 45 56   2.82    0.1"
 995 PRINT "N 53 35 44   2.66    2.1"
1000 PRINT "D 40 25 33   2.94    7.7"
1005 PRINT 
1010 PRINT "YR 63 43 53 37.96"
1015 PRINT 
1020 PRINT "DATA FROM NWS HBG.,PA."
1025 PRINT "           ELEVATION 338 FT."
1030 PAUSE 40000
1040 GOTO 60
2000 CLS 
2001 FOR I=1 TO 10
2002 PRINT 
2003 NEXT I
2005 PRINT "        %W%E%A%T%H%E%R% %A%N%A%L%Y%S%I%S"
2040 PAUSE 400
2050 CLS 
2055 PRINT "THIS PROGRAM IS DESIGNED TO","STORE A LIMITED AMOUNT OF DATA"
2056 PRINT "IN THE FILE PORTION OF THE","PROGRAM. IT IS SUGGESTED"
2057 PRINT "THAT FOR STORAGE OF MORE THAN ","SIX MONTHES A WEATHER FILE BE"
2058 PRINT "MANTAINED."
2060 PRINT 
2065 PRINT "THIS PROGRAM WILL OFFER A","FORECAST OF EXPECTED LOCAL"
2066 PRINT "WEATHER CONDITIONS, USING","BAROMETRIC PRESSURE AND WIND"
2067 PRINT "DIRECTION",,,,"YOU WILL BE SURPRISED AT"
2068 PRINT "THE ACCURACY OF THIS METHOD,","YET IT IS BASED ON SOUND"
2069 PRINT "SCIENTIFIC PRINCIPLES."
2070 PRINT 
2075 PRINT "%P%R%E%S%S% %A%N%Y% %K%E%Y% %T%O% %C%O%N%T%I%N%U%E"
2080 PAUSE 40000
2085 CLS 
2090 RETURN 
3000 CLS 
3010 PRINT "ENTER DATE (AS 12-05-83)"
3015 INPUT B$(1,1 TO 8)
3018 FAST 
3020 LET C$(1,1 TO 2)=B$(1,1 TO 2)
3025 LET C$(1,3 TO 4)=B$(1,4 TO 5)
3030 FOR A=1 TO L
3035 IF C$(1,1 TO 4)=A$(A,1 TO 4) THEN GOTO 3050
3040 NEXT A
3042 SLOW 
3045 PRINT "%D%A%T%E% %N%O%T% %F%O%U%N%D"
3046 PAUSE 40000
3047 GOTO 60
3050 CLS 
3055 SLOW 
3066 PRINT "DATE: ";A$(A,1 TO 6)
3070 PRINT "HI TEMP: ";A$(A,7 TO 10)
3075 PRINT "LO TEMP: ";A$(A,11 TO 14)
3080 PRINT "BAROMETER: ";A$(A,15 TO 19)
3085 PRINT "CONDITION: ";A$(A,20)
3090 PRINT "PRECIPITATION: ";A$(A,21 TO 25)
3095 PRINT "SNOWFALL: ";A$(A,26 TO 27)
4000 PRINT "WINDS: ";A$(A,28 TO 31)
4010 PAUSE 40000
4020 GOTO 60
5000 CLS 
5005 PRINT "ENTER DATE TO CHANGE:"
5010 INPUT B$(1,1 TO 8)
5011 LET C$(1,1 TO 2)=B$(1,1 TO 2)
5012 LET C$(1,3 TO 4)=B$(1,4 TO 5)
5015 FAST 
5020 FOR N=1 TO L
5025 IF A$(N,1 TO 4)=C$(1,1 TO 4) THEN GOTO 5100
5030 NEXT N
5040 SLOW 
5050 PRINT "DATE NOT IN FILE"
5055 PAUSE 40000
5060 GOTO 60
5100 CLS 
5110 PRINT "ENTER: "
5120 PRINT TAB 5;"DATE (AS 6 DIGITS)","         (120583)"
5125 INPUT A$(N,1 TO 6)
5130 PRINT TAB 5;"HI TEMP"
5135 INPUT A$(N,7 TO 10)
5140 PRINT TAB 5;"LOW TEMP"
5145 INPUT A$(N,11 TO 14)
5150 PRINT TAB 5;"BAROMETER"
5155 INPUT A$(N,15 TO 19)
5160 PRINT TAB 5;"CONDITION"
5165 PRINT ,"1. FAIR",,"2. CLOUDY",,"3. RAIN",,"4. SNOW",,"5. THUNDERSHOWERS"
5167 PRINT ,"6. SNOW FLURRIES","7. HEAVY RAIN"
5170 INPUT A$(N,20)
5175 PRINT TAB 5;"RAIN"
5180 INPUT A$(N,21 TO 25)
5185 PRINT TAB 5;"WINDS"
5190 INPUT A$(N,28 TO 31)
5195 PRINT TAB 5;"SNOWFALL"
6000 INPUT A$(N,26 TO 27)
6005 LET X=N
6007 CLS 
6010 GOTO 300
9000 SAVE "1024%3"
9010 RUN 

People

No people associated with this content.

Scroll to Top