C S1./S-- E£L /39- AFCL9 A UNITED STATES DEPARTMENT OF COMMERCE PUBLICATION rxS U.S. DEPARTMENT OF COMMERCE Environmental Science Services Administration Research Laboratories ESSA Technical Report ERL 139-APCL 9 Plotter Subroutine for Meteorogical Flight Path (PATH] HEINZ H. GROTE BOULDER, COLORADO December 1969 ESSA RESEARCH LABORATORIES The mission of the Research Laboratories is to study the oceans, inland waters, the lower and upper atmosphere, the space environment, and the earth, in search of the under- standing needed to provide more useful services in improving man's prospects for survival as influenced by the physical environment. Laboratories contributing to these studies are: Earth Sciences Laboratories: Geomagnetism, seismology, geodesy, and related earth sciences; earthquake processes, internal structure and accurate figure of the Earth, and distribution of the Earth's mass. Atlantic Oceanographic and Meteorological Laboratories and Pacific Oceanographic Laboratories: Oceanography, with empnasis on ocean basins and borders, and oceanic processes; sea-air interactions: and land-sea interactions. (Miami, Florida) Atmospheric Physics and Chemistry Laboratory: Cloud physics and precipitation; chemical composition and nucleating substances in the lower atmosphere; and laboratory and field experiments toward developing feasible methods of weather modification. Air Resources Laboratories: Diffusion, transport, and dissipation of atmospheric con- taminants; development of methods for prediction and control of atmospheric pollu- tion. (Silver Spring, Maryland) Geophysical Fluid Dynamics Laboratory: Dynamics and physics of geophysical fluid systems; development of a theoretical basis, through mathematical modeling and computer simulation, for the behavior and properties of the atmosphere and the oceans. (Princeton, New Jersey) National Severe Storms Laboratory: Tornadoes, squall lines, thunderstorms, and other severe local convective phenomena toward achieving improved methods of forecasting, de- tecting, and providing advance warnings. (Norman, Oklahoma) Space Disturbances Laboratory: Nature, behavior, and mechanisms of space disturb- ances; development and use of techniques for continuous monitoring and early detection and reporting of important disturbances. Aeronomy Laboratory: Theoretical, laboratory, rocket, and satellite studies of the phys- ical and chemical processes controlling the ionosphere and exosphere of the earth and other planets. Wave Propagation Laboratory: Development of new methods for remote sensing of the geophysical environment; special emphasis on propagation of sound waves, and electromag- netic waves at millimeter, infrared, and optical frequencies. Institute for Telecommunication Sciences: Central federal agency for research and serv- ices in propagation of radio waves, radio properties of the earth and its atmosphere, nature of radio noise and interference, information transmission and antennas, and methods for the more effective use of the radio spectrum for telecommunications. Research Flight Facility: Outfits and operates aircraft specially instrumented for re- search; and meets needs of ESSA and other groups for environmental measurements for aircraft. (Miami, Florida) ENVIRONMENTAL SCIENCE SERVICES ADMINISTRATION BOULDER, COLORADO 80302 U.S. DEPARTMENT OF COMMERCE Maurice H. Stans, Secretary ENVIRONMENTAL SCIENCE SERVICES ADMINISTRATION Robert M. White, Administrator RESEARCH LABORATORIES Wilmot N. Hess, Director ESSA TECHNICAL REPORT ERL 139-APCL 9 Plotter Subroutine for Meteorological Flight Path (PATH) HEINZ H. GROTE ATOMOSPHERIC PHYSICS AND CHEMISTRY LABORATORY BOULDER, COLORADO December 1969 For sale by the Superintendent of Documents, U.S. Government Printing Office, Washington, D.C. 20402 Price 30 cents. U, & Depository v- TABLE OF CONTENTS Page 1. INTRODUCTION 1 2. VARIABLES 4 3. PROGRAM TESTPATH 8 4. FURTHER DETAILS ON SUBROUTINE PATH 9 5. ACKNOWLEDGMENT 11 6. REFERENCES 12 APPENDIX A. PATH Lettering 13 APPENDIX B. Time Scale for PATH Lettering 14 APPENDIX C. TESTPATH Printout 15 APPENDIX D. PATH Printout 16 iii PLOTTER SUBROUTINE FOR METEOROLOGICAL FLIGHT PATH (PATH) Heinz H. Grote This paper describes a subroutine PATH that works in connection with the plotter subroutine CRTPLT to provide a two-dimensional plot of a meteorological flight path with wind vectors, time notations, and a legend. 1. INTRODUCTION The subroutine PATH works in connection with the plotter subrou- tine CRTPLT (Tucker, 19&8) to provide a two-d ; mens ional plot of a meteorological flight path with wind vectors, time notations, and a legend Figure 1 shows an example of a plot. The legend provides the following reference information: (1) The flight number LID is expressed as a six-digit number and an index letter according to the convention used by ESSA' s Research Flight Facility. The first two digits represent the year, the next two the month, and the last two the day of the flight. The letter stands for the particular airplane. (2) The altitude ALT in kilometers is a reference value brought in from the main program. CENTER LONGITUDE 106.372 DEGREES i — f = 5 KM LATITUDE -58.543 DEGREE? WIND 1 ' = 10 N/S FLIGHT N<3 69G815 B ALTITUDE 1.2 KM Figure 1. Example of plot. (3) Longitude LOC and latitude LAC in degrees refer to the small circle in the middle of the plot. These reference values are brought in from the main program. Together with the scale notation, every point on the plot is deter- mined by this location reference under the assumption that the earth's surface can be represented by a plane. j The relation between distances in geographic degrees of longitude d\ and latitude dcp to linear distance values a and b in kilometers is given by the equation a = C. dX b = C . dcp cos cp, where a and b are in (km); d X, dcp, and cp are in geo- graphical degreees; and C is approximately a constant with the value C = 111. 32 geographical degree (4) The reference length is equal to a distance that is de- termined automatically by the program in such a way that the following scale lengths are obtained for a corresponding span (SPAN introduced from the main program) of the flight path in its largest dimension Dimension Scale Length 55 km 2 km 137.5 km 5 km 27 5 km 10 km above 27 5 km 20 km (5) The wind reference length is equal to a wind speed that is determined automatically by the program. Scale lengths for a maximum wind speed (WM intro- duced from the main program) are: Wind Speed Scale Length 10 m/sec 5 m/sec 20 m/sec 10 m/sec 50 m/sec 25 m/sec above 50 m/sec 50 m/sec (6) A wind reference arrow is provided with its origin at the reference coordinate point. Scaled according to the wind reference length, its value is brought in from the main program as WXA, WYA. If this vector is omitted, the represented wind vectors stand for the wind as measured at each flight point. If this vector has a value, it generally represents the mean wind over the plotted area or a closed loop withinthis plot; the wind vectors then give the deviation of the wind at each location from this mean wind. 2. VARIABLES The variables, listed in alphabetical order, that enter the subrou- tine are as follows: ALT a representative flight altitude (km) printed under legend (2) with one digit after the decimal point, so that hundreds of meters can be represented. IFS a six-digit number that determines the scaling. The center two digits are without significance and serve only as a separa- tor. The first two digits are the numbers inserted under legend (4) as the plotting scale values. The last two are the numbers inserted under legend (5) as the wind scale values. If IFS is zero, automatic scaling is used, as ex- plained under (5) and (6). IN the number of coordinate points X, Y. INCW determining the spacing of the wind vectors on the plot. INCW = 1 means that a wind vector is drawn for every coordinate point. INCW = 2 indicates that a wind vector is drawn for every second coordinate point. JT the time array, consisting of six digits. The first two stand for the hours (in 24-hour notation), the second two digits for the minutes, and the last two for the seconds. The capacity of the array is 500. LID the identification array, containing eight places. LID(l) consists of two digits and represents the most significant digits of the year of the flight. LID(2) is the number of the month incremented by 1000 in order to maintain leading zeroes in printing. LID(3) is the number of the day incremented by 1000 in order to maintain leading zeroes in printing. LID(4) is the airplane identifier in Hollerith notation. (The airplane identifier B thus has to be expressed as 1 HB. ) LID(5) is the day in two-digit presentation. LID(6) is the first eight letters of the month in Hollerith notation. (The month of August is thus expressed as 6HAUGUST. ) LID(7) is the extension of the month from the ninth letter in two-digit Hollerith notation. If the month has less than nine letters LID(7) = 2 H/\ A . (For the month of September LID(7) = 2 HR/\ . ) LID(8) is equal to LID(l) and contains the last two digits of the year. LAC the reference longitude in geographical degrees as explained under legend (3). LOC the reference latitude in geographical degrees as explained under legend (3). MT the spacing of the records in seconds. This value deter- mines the time lettering on the plot. The first time on the plot is a four-digit number representing hours and minutes. The following time values are generally expressed by only two digits representing minutes. Four digits are printed only at intervals of MV/100. Time values are printed only for every MV/100 minutes. The values of MU and MV as they correspond to MT values are as follows: 120 10000* 2000 ^Represents 1 hour due to the conversion from the 60-bit time system to the decimal system. MT 5 10 20 30 60 MU 500 1000 2000 3000 10000* MV 100 100 200 500 1000 SPAN WM wx WXA WY WYA X the largest extension of the flight path in kilometers in either longitudinal or latitudinal direction. This value is used for the automatic scaling as explained under legend (5). the largest wind speed (m/sec). This value is used for the automatic scaling as explained under legend (6). an array of 500 words that contains the x- component of the presented wind, either absolute or relative to the mean wind as explained under legend (7). the x-component of the reference wind as explained under legend (7). an array of 500 words that contains the y- component of the presented wind. the y- component of the reference wind as explained under legend (7). is an array of 500 words that contains the x-coordinates of the points of the flight path in a plane coordinate sys- tem with distances from the reference point in kilometers, an array of 500 words that contains the y- coordinates of the points of the flight path in a plane coordinate system with distances from the reference point in kilometers. 3o PROGRAM TESTPATH To test the subroutine PATH, the program TESTPATH was run through the ESSA-Boulder computational facility. The resulting plot is shown in figure 1, and the essential parts of the printout are pro- duced in appendix C. The variables in TESTPATH and PATH are compared in table 1 Table 1. Comparison of Variables TESTPATH PATH TESTPATH PATH ALA LAC ALO LOC ALT ALT IFS IFS IW INCW JJ JT LT MT NM IN OX X owx wx OWY WY SPAN SPAN WXA WYA WMAX WM In TESTPATH ZDR is the conversion factor to express degrees in radians. The test path consists of three circles (loops 1 and 4, 2 and 5, 3 and 6). Loop 7 establishes the winds. (Since IW = 2, only every sec- cond value is being used in this presentation. ) WXA and WYA are the mean values established by dividing the sums SWX and SWY by the number of points (100). The second OWX, OWY is then the relative 8 wind after subtraction of the mean wind WXA, WYA. 4. FURTHER DETAILS ON SUBROUTINE PATH ID the identification printed on the microfilm. It contains the name of the user, his telephone number, and the pro- ject number in Hollerith notation. UK = 2 J . Since Hollerith quantities with three characters are used in the plot routine, integer values have to be shifted by- five characters for conversion (Control Data Corporation, 1967, 1.1, "Word Structure"): 666166666 IMX = IN + 1. The number of the reference point X(IMX), Y(IMX) - 0. 0. XD(1) = 16 * KK. The plot contains 1024 points. After subtraction of the legend, 880 points remain in the y-direction. In the x-direction some space is needed for time notations, so that a square of 880 points is used as a basis. Since the length of the reference line is 32 points, the span that can be re- presented is 880 1024 * 32 * KK KK = 2 KK = 5 KK = 10 SPAN = 55 km SPAN = 137. 5 km SPAN = 275 km Because of the legend the plot is not distributed symmetri- cally. The legend takes about 14 percent of one dimension, so that the upper part takes (100-14): 2 = 43 percent above zero^and the total lower part extends to (100-14): 2 + 14 = 57 percent below zero. Since the total span is 32 * KK, the upper y-limit is now 0. 43 * 32 = 13. 76 * KK, while the lower limit is now 0. 57 * 32 = 18. 24 * KK. Thereby: XD (1) = 16. 00 * KK XD(2)= -16. 00 * KK YD (1) = 13.76 * KK YD (2) = -18.24 * KK The variables used for plotting are: X, Y, IN the coordinates of the points representing the flight and their number. 3H+0L; X, Y, circle marks denoting points on the flight path and in IMX the center. XD, YD, ID limits of the plot and identification of the customer. XL, YL, KS, KA lettering of the legend. 3H+0L; XS, YS scale end marks and scale lines. XT, YT, JZ, K time numerals. XW, YW wind vector. 10 Further variables in the subroutine PATH are: SSC a lettering scale factor. The size of the letters in plot-size is 12 points, while the total number of possible points is 1024. The total span is 32 * KK. Thus the scale value for one letter is SSC = — ^ — * 32 * KK 1024 SSC = 0. 375 * KK LS a switch that makes it possible to print four digits of time for the first labeled time value JC. JC the first time value to be printed. It has to be an integer of MU. NS a switch that bypasses the selection of two digits for the time print. It is activated for the first time value to be printed. IZ the time values in Hollerith notation. If only two digits are to be printed the last two digits are blanks: 3H + a . 5. ACKNOWLEDGMENT The author wishes to thank Mrs. J. M. Tucker for her assistance in the debugging of the presented work. 11 6. REFERENCES Tucker, J. M. (1968), Cathode ray tube plotter subroutine, ESSA Tech. Memo. RLTM-OATS 3. Control Data Corporation (1967), 3800 Computer Systems Reference Manual: FORTRAN. 12 APPENDIX A U co PATH Lettering 1 C E -3 -2 CO 00 CO 50 51 .A. 34 U 35 8 3 N -1 II 52 (1) 36 * 4 T J 53 (0) 37 <# 5 E 1 >H 54 /\ 38 „ 6 R 2 55 K M 39 J 7 F -41 56 40 >* 8 L -40 57 A -41 9 I -39 58 L -40 10 G -38 59 T -39 11 H -37 60 I -38 12 T -36 61 T -37 13 S\ -35 u co co o 62 U -36 14 15 16 N O A -34 -33 -32 63 64 65 D E A -35 _ 34 U CO _33co 17 ( 6 ) -31 *tf 66 A -32* 18 ( 9 ) -30 ii 67 ( 1 ) -3 W 19 ( ) -29 J 68 ( 2 ) -30 ■ 20 ( 8 ) -28 >* 69 • -29 " -28^ 21 ( 1 ) -27 70 ( 3 ) 22 ( 5 ) -26 71 A -27 23 s-. -25 72 K -26 24 ( B ) -24 73 M -25 25 L -12 74 L -12 26 O -11 75 A -11 27 N -10 76 T -10 28 G - 9 77 I - 9 29 I - 8 78 T - 8 30 T - 7 79 U - 7 31 U - 6 80 D - 6 32 D - 5 81 E - 5 33 E - 4 82 A - 4 34 (") - 3 83 A - 3 35 ( 1 ) - 2 84 ( a) - 2 36 ( o ) - 1 u CO 85 ( 4 ) " l U 37 ( 3 ) co 86 ( o ) $ 38 39 40 ( 8 ) ( 1 ) 1 2 3 o 87 88 89 ( 3 ) ( 7 ) 1 .;;. 2 (\j 3 | 41 ( 1 ) 4 II 90 ( 6 ) 4 „ 42 A 5 91 A 5 J 43 D 6 92 D 6 >< 44 E 7 93 E 7 45 G 8 94 G 8 46 R 9 95 R 9 47 E 10 96 E 10 48 E 11 97 E 11 49 S 12 98 S 12 99 W 24 100 I 25 101 N 26 102 D 27 103 A 28 104 A 29 u 105 •\ 30 CO CO 106 A 31 107 A 32 r\) 108 A 33 ■^ 109 = 34 II 110 35 J 111 ( 2 ) 36 >h 112 ( 5 ) 37 113 38 114 M 39 115 / 40 116 S 41 13 APPENDIX B Time Scale for PATH Lettering MU MV 1600 500 100 1.1.1.1.1 41 min of data [Sec] 01 02 MT 1.1.1.1.1.1.1.1.1.1.1 [1605] 5 2 digits every minute 4 digits every 5 min 1600 1000 100 1 01 02 03 04 05 1 1 1 1 1 [1610] 10 1 hour, 23 min of data 2 digits every minute I 4 digits every 10 min 1600 02 04 06 08 10 2000 200 1..1..1..1..1..1..1..1..1..1..1 [1620] 20 2 hours, 46 min of data | 2 digits every 2 min I 4 digits every 20 min 1600 05 10 15 3000 500 1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 [1630] 30 4 hours , 10 min of data 2 digits every 5 min. 4 digits every 30 min 1600 10 20 30 10000 1000 1 .... 1 .... 1 .... 1 .... 1 1 [1700] 60 8 hours, 20 min of data 2 digits every 10 min 4 digits every hour 1600 20 40 1700 10000 2000 1 .... 1 .... 1 .... 1 .... 1 ... 1 .... 1 120 16 hours, 40 min of data 2 digits every 20 min. 4 digits every hour MT 5 10 20 30 60 120 MU 500 1000 2000 3000 10000 10000 MV v 100 100 200 500 1000 2000 14 APPENDIX C TESTPATH Printout PROGRAM TESTPATH TENSION LTO( P ) » JJ( ^0 ) ,0X ( ^00 ) ,0Y( ^n, , yx (*00) »0WY( «S00 ) 1 FOPMAT (^X»l0r|7 .3 ) 9 FORMAT (5X*WXA = *F7.^,^X*WYA = * c 7 . ? , ^X* SWX = *FiO.^* 15X*5WY = *Fl0,3) DATA (ALA=-48.5^8)»( ALO=106*372 ) » ( ALT = ! • *> *4 ) ♦ ( I FS = ) » ( IW=7) » 1 ( L 10=69 » lCC8> 1015 >1HR» 15 »6HAUGUST*2HH »6 C M,(LT = 60)» 2 (NM=10 0) » (SPAN=6C.C) »(WMAX=1 5.0) » (ZDR=n #01 745329253) DO 1 1=1 i 2 JJ(1 )=(2257+I )*100 1 CONTINUE DO 2 1=3,6? JJ( I )=(2297+I )*100 ? CONTINUF no 3 I=63»l00 JJ( I )s(_63 + -I )*100 3 CONTINUE DO 4 1=1,27 A = { 758-6*1 )*ZDR OX( I )=18.0*C0S( AJ-6.0 OY( I ) =1 P.^*SIN( A 1 + 17.0 u CONTINUE DO 5 1=28,73 A=( ?07-4*I )*ZDR 0X( I )=30.0*COS( A )-6.^ OY( ! ) =-aO.O*SIN( A ) 5 CONTINUE DO 6 I=74»l00 A= (708-6*1 )*ZDR OX( I ) =18.0*COS( A 5-6.0 OY( I )=18.0*?IN( A) -12.0 6 CONTINUE SWX=SWY=0.0 DO 7 j=l ,50 0WX( J)=1 0.0*COS( ( ?80-4*J)*ZOR )-l ?.o 0WY( J ) = 15.0*5 IN ( ( 4 70-8*J)*ZDR )+ 8.0 SWX=SWX+OWX (J ) swy=swy+owy( j) 7 continue pPTMT 1 ,OWX ,OWY WXA=SWX/50.0 WYA=SWY/*0.0 no p j = l ,50 0WX( J)=OWX( J)-WXA 0WY( J) =0WY( JJ-WYA 8 CONTINUE PRI NT ? , WX A , WY A , SWX , SWY P°INT l iOWX ,OWY CALL PATH (LID»ALT , IW»NM» JJ»LT»SPAN ♦ 1 W^AX,WXA,WYA,OX,OY »OWX »0WY»AL0 • ALA » I^S ) ENH 15 APPENDIX D PATH Printout SUBROUTINE PATH(LID»ALT» I NOV* IN»JT»MT» 1 S»AN » WM » WX A » WYA » X , Y , WX t'WY * LOC 9 LAC 9 I F S ) TYPF REAL LOOLAC DIMFNSION IZ (4) »JT(R00) >KS(116) »LID ( p ) »MUT (ft ) »vvT(6) >WX< 5 00) 9 1 W Y ( q ) ♦ X ( r C C ) , X n ( -> ) 9 XL ( 1 1 A ) * XS ( ? ) , X T ( l ) > XV ( 7 ) * Y ( e ) 9 Y n ( ? 5 , 2 YL ( 1 16 )' » YS ( ? ) # YT ( 4 ) t YW ( 2 ) DATA ( ID=33HH.GROTE EXT. 6270 PN 21F503190) DATA ( IJK=1073741824) DATA KS=3H+0C»^H+0E 9 3H+0N j^H+OT ,3H+OF , 3H + OR 9 l'3H-t-0F9^ 1 - l + n L 23H+0 93H+0 ^m+OL 9-SH + OO 4^m+o »o,o»o r^h+OD »3H+0F ft-3u + 0= ,'H+O 7-^M-fCA »^H+ Ol 8^H + 9^H+0 P3H + DL. »^>H + 0A 1 ? (3H+ »3H+0I »3H+0G»3H+0H »3H+0T 9 3H+0 >3H+0N »3H+0O » »0,0,0,C,0»3H+0 t0» ^H + OM^H + ^n ,^m+0I »^M+OT ,^u+OU ,^u + pn,3H+0F 9 93H+0. ,0,^,0,3H+n , ,^H4-0r,^H + ^P,?H+0' r 93M+0F,'3H + 0c, jO^C^H+O »3M+Q*»3H+0M» ,3H4-CT 9 3H+0T *3H+0T*3H+0U *3H+0n j^M + n^, 9O jOf^H+0, 9O »3H+0 ,3H+0K *3H+0M , 9 3H+0T9 3H+0I 9 3 w +0T9 3H + OU9 3H-t-Cn,?H+OE9 ) ,n,o, ^M+' »o»n»c-»?H+o » ^^M+Qn ,?H+0r»3H+0G» 3H+0R »^M+0f r »3m+0F *^H-».0S » 33H+0W»3H+0I »3H+ON»3H+OD»6(3H+0 ) »3H+0= 9 a^m+0 »0»0»?H+0 >3H+0M»^H+0/»3M+0S) HaTa (MUTsT 00 ti 00 »?0 Ot «? 00 »i 000 » 9 000) t.(MVT = «;00»l. 000*20-00 t 1 •20^' n ,1 Or ' r » n 9l r '00 ri ) IMX=IN+1 X(TV!X)=0.0 Y ( t m X ) = . IF ( IFS.NP.O) o7*9? 07 Kf=I p S/l0000 K1=KK/10 K2=KK-K1*10 L = tfs-'<:k.*i.OOOO L1=L/10 L2=L-L1*1C GOTO 99 Kl=2 K2 = IF (SPAN .LE. 275.0) Kl = l I c (SPAN! .L^. 137. 5) <1 =0 K2 = 5 IF (SPAM .LE. Ll=5 L2=0 IF (WM.L'F.50) 49 7 LI =? L? = 5 IF (VM.LF.70) 5 97 98 1 ? 1 93 2*3 5 5.0) K 2 = 2 16 6*7 5 Ll=l L2 = IF (WM.LE.10) f L1=0 L? = ^ "7 K89 8* JX=JT( T)/]0000 JY=( JT( I )-JX*10000)/lC0 I7)^SSr DO 18 KA=50,56 T8 XL_(KM = (K & -16)*SSC DO 19 KA=57,73 19 XL(KA)=(KA-98)*SSC DO 20 KA=74»98 20 XL(KA)=(KA-86)*SSC DO 21 KA=99,116 2\ XL(KA)=(Q 24 < A = 57, 116 18 ?Ia Yl ( K & ) =-£.?*5SG KS(17)=LID( 1)/10*IJK IF (KS(17).EQ.O) KS(17)=1H KS<18)=(LlD(l )-LlD(l)/lO*lO)*IJK NM=LID(2)-LID( 2 )/ 100*100 icS ( i ° 1 sN M /1 C *I J 1 *' KS( ?0)=(NM-NV/]0*10)*IJK NN = LID(3)-I_ID(3)/100*1C0 =LAB*IJK AND. (L02 .EG. 0)) KS(36)=2H+G <5( PL ) =^M + 0- 19 Lac=INT( 1.000. 0*LAC) LAr = LAc--(LA r /T00 0)*i000 LAG=la c /100