A Computer Model
_ A COMPUTER MODEL FOR SIMULATION OF A WATER CONDENSATION SYSTEM ‘John Munro ~ July 1986. "Agreement No. 14-08-0001-G1050 . Information Bulletin. ‘No. 3). _ Water Resources Research Center . Caribbean Research Institute . College of the Virgin Islands — St. Thomas, U.S.V.I. 00802 ‘The research on. which this report is based was. “financed in ., part by. the _ United’. “States Department. of “the Interior; Geological . ‘Survey, . through’ the Virgin. Islands Water Resources Research Center. ee, Oo, = “eenténts of this publication. do not necessarily reflect the — “views and. policies of the U.S... Department of the Interior, ..,;nor does: mention . of trade names or commercial - products. constitute their endorsement . by thé United States _ Government, | : . meee Abstract _ 7 Pure drinking water and a sufficient. household water ‘supply are ‘concerns of people e everywhere, particularly in areas. such as the United Sta water supplies. of inadequate tes Virgin Islands, Household quality, especially on st. …
Download the original document · Plain text (TXT) · Browse the archive · How this archive works
Original source: https://www.uvi.edu/files/documents/Research_and_Public_Service/WRRI/A_Computer_Model.pdf
SHA-256 418d4e686543bbd8d8c38510f9c0519c5acd6cbfb89d5d7112739ce0d6e548d7
Re-using this document
Our description, tagging, arrangement, extracted text and machine transcripts are released under CC0 1.0. We assert nothing about the document itself.
Archive identifier LF-418d4e686543
Document text
_ A COMPUTER MODEL FOR SIMULATION OF A WATER CONDENSATION SYSTEM ‘John Munro ~ July 1986. "Agreement No. 14-08-0001-G1050 . Information Bulletin. ‘No. 3). _ Water Resources Research Center . Caribbean Research Institute . College of the Virgin Islands — St. Thomas, U.S.V.I. 00802 ‘The research on. which this report is based was. “financed in ., part by. the _ United’. “States Department. of “the Interior; Geological . ‘Survey, . through’ the Virgin. Islands Water Resources Research Center. ee, Oo, = “eenténts of this publication. do not necessarily reflect the — “views and. policies of the U.S... Department of the Interior, ..,;nor does: mention . of trade names or commercial - products. constitute their endorsement . by thé United States _ Government, | : . meee Abstract _ 7 Pure drinking water and a sufficient. household water ‘supply are ‘concerns of people e everywhere, particularly in areas. such as the United Sta water supplies. of inadequate tes Virgin Islands, Household quality, especially on st. ‘Thomas, can cause health problems, and insufficient water _ €an be inconvenient, disruptive, and expensive. ‘The system modelled here produces distilled (pure) water by condensation from warm, moist air. ‘Weather conditions such as air temperature and humidity determine . the quantity of water actually produced. To simulate the operation of this unit, local KAA weather observations were compiled for a one-year period from July, 1984 through June, 1985. Computer program listings for. summarizing and averaging inde data and for simulating the operation of the water condensation process are inc luded. Formats: of monthly weather observations and summarized. data on ‘computer. disk ‘files are also described. Table of Contents Introduction - - ° we - "Description of device re ars . ‘Water. condensation. theory ee “pata collection. - , oe Data forms and content oe ae Data editing vee er ° Summarizing hourly” to daily values... ga a ee . Calculations eh, a : * BO : Conditions of operation . Page | Airflow, volume calculations . .. °°. __ Approximating production data ee . | Precision of observed and derived | | Simulation model - - eo. eae “structure . os ee Correspondence to device fees | Procedure for model changes . » Simulated water production - Tabl “References 9. ee ee oo , "Appendices — a. Computer. program - ~ simulation b. Computer program | - calculate he 15-hour averages 2. 24= hour averages — wt oo . B®: ® 8. @ 8° s eli. a rr eras model land summarize averages clr. ee ee ee a 10 10° , 12 oa? ae 15 16 aly 200 ag oe ss Ce a. f.. - Pigure 2. | Table of contents, continued Computer. program - least squares approximation | “Sample. FAA data logging form no - | Water production data file Summary data file Raw data file. Computer configuration and directory “Figur res Figure 1. Diagram of water condensing device . as a function of temperature ~ii- Saturation water: vapor pressure and density 30 31 32 33 (34 °° 35 “Introduction : : The availability of a sufficient water supply has been an: increasing ' problem: in the Ue 8. Virgin. Islands as “resident and visitor population and water “demand have increased over the: past few decades. More recently an additional problem, _perh haps more serious, has arisen: although the water supply ‘quantity has been of concern, the quality of the. public "water supply has occasionally been below legally defined water quality standards, ‘posing. potential health. , dangers/hazards. | oe | The. heaviest. population growth has. been. “occurring in. ‘the rurai/suburban areas; and these areas . are typically , ‘distant Or ‘isolated from present urban water distribution — systems. Because of the terrain, especially on ‘st. John and st, Thomas, these, areas. are. also. ‘the most costly for ‘installation and maintenance. of a centralized water distribution system. The domestic water demand in these ‘areas is currently met primarily through rooftop catchment. and cisterns (808) and groundwater (208). Occasionally the ‘catchment systems are supplemented by water haulers ato increased cost and inconvenience. . ” The water condensation units under study would be at. the demand location, so that transportation costs or terrain “need not be considered. in addition, the quality/purity < of this water. is. essentially that. of "distilled water", a "consistently higher. than that ‘supplied through catchment cistern systems. — ‘The particular object of this. study is” ‘to. simulate ‘the operation of this unit using actual weather. data and , ~ determine t the expected quantities | of pure water that would be produced. | | Description of device | The Airwell (TM) water collecting system may be "constructed and installed with a variety of materials and ‘physical dimensions and arrangenents. A typical system as” “specified in the patent description is. shown in Figure 1. ALL pipes and fittings are made from schedule 40 : | > polywinyl chloride (Pvc) pipe, with standard dimension material. In this configuration. the vertical 10 foot intet and 20 foot exhaust pipes are both of an diameter pipe, end the four horizontal heat: exchanger. pipes are of 1- ~1/2" "diameter pipe, each 20 feet, long. i ‘These dimensions: match: the volume of the intake, ae and heat exchanger portions: of. the unit. rf the “number of heat exchanger pipes. were. increased to provide’ : "additional water. production, the. size (or number) of the - inlet and exhaust pipes should also be increased to. maintain this 4 volume ‘matching cco S. Patent Office, 1982). ee eo : AIR INLET. @ Rae. et ain. Ss Worm on @nters EXHAUST Ihrough o simole Hee TURBINE - oo aA ai gevce The wond- driven turbine vend peel the water ine moy draws fhe warn hurt | ¥ y | extend Gbove ground monic the AIRWEL Lond K ase wevel-or t: © the point of exhausts the con! de MJ i USeIn YO home hordes ar bock inte A the otmospriare - See 7 oe! ances et ee ~~ po Se 4 es a ¥ A i] af ff if HEAT. EXCHANGE PIPES. The Gils COO Io the ew DOIN! dst pastes Through the hed a: ce change Does Dew foams he inne sur tore of the Spas JX henicinantihinsane aod 3 as 3 Ss) cramamomacene ge ~ } ON - are “the wate’ flows trom the collector mor- Hod to the storage: tonk.1emowng it fore Ptgnt wo. 445 853 me oe How Figu re 2 .- Di agran : of wat er condensing device As. stated i in the product descri ipti on broch ure (Airwell, Inc.» 1983) the operation of this de evice begins with the entry of warm air into the inlet pipes: Te: is possible, but» : S eldom necessary, to incorporate a cyclonic separator at the. gen Ge She ae ee eee This emoves particles from the path, ce ‘Theale nevine fe cool as it tr avels underground: to the- cheat exchang é pipe ° When the dew point is reached, water. iptna’ts coin nse ‘onto the inner Pipe. surfaces, and: flows y gravity to the collec Or manifold and ‘into the storage ; ao tank. 7 This: water is then ‘pumped from the storage tank as “needed for consumption or further storage. me ‘The cool airy now dehunidified ‘from the | condensation az "process, passes ‘through the outlet ‘pipe and is exhausted “back into the atmosphere. | os phe “exhaust. turbine which causes” the airflow through | otha e system operates with very low wind speeds; ‘engine , ing data in the pate nt ‘description | were based on minimum speeds. 2 f five miles per hour. Although: an. air flo ow eontrol unit is iuded in this desion): the inventor "reported ‘that field “experiments have shown that water produc tion was not: signific: cantly reduced, by omitti ing this, “component. y ‘since the air. circulation is usually provided by. Boe wind-powered. fan on. the exhaust: stack. the system does. not | . 2 ~ require other exter: 1a ‘power. for. a ts. condensing operations. Water condensation theory | The condensation process is based on warm, moisture-laden air being ‘cooled to or ‘beyond the dew point. At this temperature the water vapor in ‘the air changes: to a. Liquid ‘state, begins to condense; and is thus. removed from the air. The amount of condensed water produced. depends on the initial humidity (vapor pressure) of the warm air and: a _ the amount. of ‘cooling realized {the temperature difference 7 between the warm incoming air and the cooled exhaust air). LIQUID Hes 5. 40F 7 ° — 4] 2 - VA : 4200 2 | a WAPORS 140 © “40 + 7 en . : Temperature ec) “Figure 2. — saturation water vapor. pressure and density an apa function of temperature. = Since the underground temperature is effectively ae | constant, higher surface air temperatures will. result in’ “greater temperature differences. “The ‘condensation begins as / goon as the dew point is ‘reached, Bo with greater. humidity, as cooling takes place, ‘the dew point will ‘be reached sooner, and. larger amounts of water will be produced while, the air passes ‘through the device Dats collection | _ The critical data needed. for this simulation include weather conditions of air temperature, relative humidity, “and for passive operation, wind speed. when the - air "temperature and Bee see erate relative : humidity. can be calculated. , 7 Initially the simulation ‘was. intended to utilize daily Or “hourly data. Pirst attempts: were made to locate all . sources of computer-based weather data; ‘failing this, manual or printed data was sought. None was found that directly corresponded. to the model. ‘parameters. There were several souces of . ‘records such as the National Weather. "Service, which include temperature and wind speed. for -. wartous.’ locations. in the Virgin. Islands. However, these are ‘printed (not. computer- readable), do not provide consistent daily. information, and over the last ‘decade, with changes in - federal agency structures, responsibility, ‘and ‘funding, ‘there are. inconsistencies and gaps in the data. . JIt was finally determined that. the weather’ data "aintained | at the Federal Aviation Administration (FAA) office at the cyril EB. ‘Ring airport on. st. Thomas: was . potentially most useful, although it was available. only from carbon copies of handwritten reports. Data forms and content - . | Each. ‘day: FAA personnel make standard weather observations” “on an hourly basis from 0645 = 2045 local time (1045-0045 GMT). The data includes air “remperature: dew... "point, wind. ‘speed, and other values such « as wind direction, | "cloud cover and ceilings, visibility. | etc. (see sample data, sheet, appendix d). In addition the maximum and minimum “temperatures and cumulative rainfall are recorded at three ws times during each. day: 0745, 1345 5, and 1945 local times (1145, 1745, and 2345 GMT), ee The data. observations were: made and recorded by various ; FAA ‘employees during the 15- hour days, seven days per week. ‘some readings (such, as. air. temperature) could be made ; directly from an- instrument (dry-bulb thermometer) ,_ but others: (such as dew point) required the observer to perform 2 ‘some ata manipulation and table~lookup (using. the dry-bulb and wet-bulb temperatures) to determine the ‘dew point. - ghere’ were also operational inconsistencies. in some of. the a cumulative readings. such as rainfall and maximum/minimam - temperatures. . . . | From the data sheets it was ‘noted that occasionally observations, were not available; missing observations were indicated by ‘the letter ‘mt in the. affected field. In other cases the recorded data was inconsistent when compared with Lothar: fields for that day. “For example, ‘the dew point, may “equal but ean never exceed the air. température; “the daily miaximuin temperature should not be. less than any of the three "recorded temperature maxima; and the daily, minimum should ~ not be greater | than any of the recorded temperature minima. | Data editing os aoe : | , The hourly: data was entered from the carbon-copy data sheets for Suly, 1984, ‘through June, 1985, Missing» temperatures and dewpoints: were indicated by ‘Zero. values, since zero. will not occur for either parameter at this Da location. Initial data screening Andicatea that: less t ‘than one. | “percent of the ‘temperature and dew point observations | were mis si ing; the miss sing data were x replaced by values oS extrapolated from adjacent observations. In the data for one month. (Oct 84), it was found that several days of data | were missing. -Tt-is conjectured that this was the result oF ‘prodedival. problems rather than instrument ‘malfunction or. failure. As a result, for purposes of this model, data from . adjacent days. were used to approximate. the. missing | ‘observations. - , . Suiimarizing hourly. to daily values. | 7 The hourly weather data. (recorded to. an accuracy of one. segree, F ‘for ‘temperature and, dew point) was available for 15 hours each day, but the: water condensation production data was based on 24- hour, operation. ‘Thus. the hourly data had to be summarized: to give. daily averages; this was done based | on 15~hour and 24~ hour days. - | . | | a , The. 15- “hour summary files were calculated using ‘Tecoracd (or extrapolated) data values for the, 15 observations taken daily while the FAA tower is | staffed © (0645-2045, local time). Since the, 15- hour averages do not | os Bo ee el a a * take into. account| the temperatures and dew: points during the - "remaining n nine. hours each day (from 2045. to 0645 local. time), 24= hour averages were also calculated. “Two nethods were used to approximate the. values for the. “nine missing observations. “One method calculated an average “estimate for the, nine observations using the last “observation (2045 local time) ‘from the previous day, and the first. observation (0645, local time) for the current day. This involved carrying forward “observations between daily ata records, ‘and also between files for the first and last - days of each ‘month. ‘the: second method estimated values for the nine missing *qbcsryat iene each day, using the average of the first and = os ‘last observations of that day. This method was: ‘procedurally core much simpler, and eliminated the. complexity of. carrying data values. across ‘record or ‘file boundaries. Using data. from three separate months, both methods eee used, giving averages. for 10-day sample periods. The “overall difference between the two resulting averages was less than. 0. 5 deg Pr with no detectable pattern of higher or lower averages. | Therefore the simpler method. was chosen me giving estimates of the nine missing observations ‘for each | day based on first and last observations for. that day. - ‘For both 15- hour and (24- hour calculations, the "daily" average, maximum, and minimum values were calculated: for air temperature, humidity ‘(based ‘on. temperature and dew point observations) , and wind speed. During these summary way st fe 3). calculations, frequency distributions of the observed values were accumulated and printed out as histograms. This was " in done. to help ensure ‘reasonableness of the data and its “manipulation. | | | ‘Calculations — | Since the temperature and dew point. observations were recorded in degrees Fahrenheit, Celsius values were > calculated from Fahrenheit values with the standard formula: : degC = 5/9 * (deg - 32). | | , The ‘relative humidity value. was 4: aipsoataeled ‘te: each hourly set of temperature and. dew point observations using this £ formula. ‘Tinsley, Sry Kohler, Paulhus, 1975]. an ae 112-0.1*Ta+Ta relative humidity ($)= -------------- (11240. 9*Ta) * 8 where Ta= air. temperature and Td= dew point temperature, both in degrees Celsius. Conditions of operation In the Airwell water condensation system, the main ae parameters for determining the quantity of water ‘produced _ “are the air temperature and humidity. For a passive system the wind: speed must also exceed a threshold level, originally determined to be 5S mph. Optionally, a motor— driven fan could provide the necessary air circulation, ~feauiring a’ small amount of electrical power (typically , about 0. 1 vA). for a ‘conventional muffin fan. From the engineering data in the patent description for this system it can be seen that water production increases with increased temperature and/or increased. humidity (and of course decreases. as. temperature or humidity decreases) . "However | the surface air temperature and humidity vary : throughout the day and ‘night, with the general pattern of “increasing humidity and decreasing temperature in fhe evening and night | time, and decreasing humidity and increasing temperature in the. morning and midday hours. oe the heat - exchange portion: of ‘this device (the horizontal 7 pipes) is ‘in a virtually isothermal environment, sO the temperature differential is. usually smaller when the- humidity is greater, and vice versa. Thus the condensation rate ‘tends to level out despite the daily temperature/hunidity changes. Airflow, volume. calculations. AS ment ioned in. the. patent, ‘the quantity of water Le produced by this device was “initially calculated from the ree “quantity (in pounds) of air passing through the heat. exchanger, and the amount of water per pound of air cat the Sa: various temperature and humidity levels. Air. density and water (vapor). figures were "based on standard psychrometric - charts; assumed air flow rates and. the physical dimensions of the components: ‘determined the quantities: of. air passing through the device, — =) Abbroxinating production data che . | ~The engineering data obtained ‘from the patent and from the product description brochure gives water. production figures for temperatures: of 70, 80, and 90 degrees F, and nae for relative humidities of 100, 90, 80, 70, etc. per cent. To facilitate product ion calculations for the model, a table “of. water ‘production. quantities was calculated for temperatures. from 50 to 100. degrees” FE in one 2 degree _ increments, and ‘relative. humidity from. 50 to loo percent in “one percent increments. . . . , Te should be noted that the. quantity. of water produced “hee assumed. to be a ‘linear function over. these ranges of temperature and humidity. “Thus a least-squares se | “approximation method. was. used to determine the coefficients _ “for: ‘the formula used to. generate this table of values _ ‘(appendix ele Although alternative tables could be SS "generated. using other (non-linear) methods, the increased’: "complexity of that. process would not significantly increase the accuracy of the water production calculations. “Tt. is interesting to note that during discussions with — the inventor, he stated that. the actual water ‘production in | eieta | tests was: consistently. greater than. the values shown | in patent 2 and product description tables. “Precision of ‘observed and derived data “There: are three important areas where the accuracy of numeric values must be considered. Precise humidity or. dewpoint values based on standard sychrometric. tables depend on. thermometer readings accurate to 0.1 degreee Fo (Miller and Thompson, . 1975). ~ But. the weather observations were collected manually, and it is only reasonable to. expect that the temperatures were read to the. nearest Fahrenheit degree, since they were “recorded as integer degrees Pe. . : The- formula to approximate relative humidity using ; calculations based on temperature and dew point data is . accurate to within 0.6 percent (Linsley,Jr, Kohler, and “Paulhus, 1975). oe | 7 The engineering computations are based on n temperature differentials and the amount of water vapor in the air. (humidity) . These production figures in. liters were | calculated for 24- -hour time periods and rounded to the nearest. liter, ‘Cor. quart in. the brochure table) . | within the ‘range of production quantities (4 to 36 liters. of water)» that rounding error could range from 1. 5 to 13 percent. considering these levels of. accuracy, and that of “obs serving and recording the temperatures, the approximated humidity valnes would be well within the. accuracy of the o observed weather data and water condensation figures used. | Simulation model structure — : . | . The. model is ‘comprised of several discrete ‘routines, ° The water production data is read into an. array. at the oe beginning of the program. If a larger condensation system eae were to be used, or if other production. figures were determined for a modified configuration, the production data could be changed without affecting the remainder of the. "model. ‘The weather ‘summary files are. based. on daily averages . for one month | at a ‘time, ‘The user. may provide additional ‘data file names for subsequent simulations, and may also. indicate the number of days to. be ineluded for. that ‘month. this is helpful when checking program modifications since ito. allows: small data files to be used. . : “The ‘temperature and humidity are determinea directly i from ‘the monthly summary files.’ Te ‘another format were “used, this. segment could be. changed to provide edit) “checking conversion, or. other calculations as. appropriate. The water production data units, are quarts per 24-hour day. The simulation results: were converted into gallons. to correspond to consumption data which is also in gallons. "Correspondence to. device. : | . _ The: ‘computer model used aia not. attempt to. simalate the. "individual components of this ‘condensing system, | “The: water production data had already integrated the. airflow, water vapor | pressure and density, ‘temperature, and humidity, “Therefore, the water ‘condensing system 1 was: considered as one” device in this. ‘model. i Procedure. for ‘model changes Te additional weather data becomes available, or ig “hourly production rather ‘than daily production is desired, : the model can be easily modified to meet. those changes. ‘The. water production data file would be converted from daily. to hourly production quantities, and the input-calculation— | routines would be modified to. cycle through hourly observations rather ‘than daily. It should also be. noted that the temperature and humidity ranges. are ‘from 70- -90 degrees Fy ‘and 40- 908 ~~ relative: humidity. If a wider range Of humidity or. temperatures” is necessary, the program range checks must be “modified to correspond to. the new. desired temperature or humidity ranges. os The. water production data units can be changed from quarts and gallons by. inserting the appropriate conversion formulas, - but the production. values. must also be. changed accordingly. Table I. Simulated wate £ production eae ‘Monthly - figures include maximum and minimum daily production, othe total quantity produced, and the average daily production . during: the month being simulated, All quantities are in U. S. gall Ons. -yr/mo daily — daily monthly. daily data max min tot. ave 15/24 hr. 8407. 4.75. 3.80 128.00 «S403 a7 3475 128.75 4.15 24 9408 5.25 «4.00 141.25 456 5625 400 -142,75. 460 g409 «5.25: 4,25 -:144,500 42. ceo B00 4625..°241625° A712 g410. «5.25 «3.75. 139.2502 44 “5,00 «3.75. 138.50 4.47 24 paid 5.00 «3.00. 124e50. 8 ee "3,00 2.75 «122.7509 B412 «4.25 2.00. «93.75 8302 800-2625 94.75 306 2 8801 3.75 2.25 91.00 ° 2.94 °° 15 “3,752.25 91.25 = 9k B00 1675 72,50 2459 2a 8503. 3.50 2.25 «8625-278 5 B80 2.25 87,000 2.8L kk 9504 3.50 2.00 85.75 2.86 #15 3.50. «1.50. 86.50. 2.88 2A 8505. 4,75 «2.75. 107.0035 "4,782.75 -120275 357k 8506 4.25 3.00 108.75 ° 3.68 GS $625 2.78 124000380 a Cae . Results | | “The simulations showed that one condensing unit (with four heat exchanger pipes, twenty feet. long, as specified in | the patent description) would supply enough pure water to _ meet the drinking water neéds. of a four-person family. (Approximately 4 gallons or 8-9% of the daily estimated _ water demand is. assumed to be used for direct | consumption) . _ However, there would not be sufficient capacity ‘to provide "additional water needed for household Operation. “There. are several possibilities for increasing the | water production. The ‘number of. condensing pipes could be increased - (requiring a “corresponding increase. in air volume) , ‘thus providing. a larger condensing area. Multiple units. could be. installed, probably feeding a single storage “reservoir. “However, before such a choice is made, a. careful analysis should be done since it may not be. cost- -effective awh th this s condensing method to produce the: ‘total samount of water needed. for, general household use in the Virgin Islands. as; Conclusion ‘within the various household domestic water demands, 7 quality of drinking water is most critical, : and the condensed water from these units easily meéts: those high standards. The water. produced by such condensing systems should be used specifically for these household domestic — . water needs; other sources, including cisterns and 3 "groundwater can provide water of lesser quality for less strict demands such as. washing and waste disposal. | Based” ‘on. these simulations using the weather. data . “collected, one condensing system would be able to meet this _ important pure water demand for one four-person household throughout the year. Of course, proper management and - storage procedures. would: be required to maintain the purity | of the water. | produced, and to. ensure its availability. 1g) “Conclusion | | Within. ‘the various household donestic water demands, “quality of ‘drinking water is most critical, and ‘the oS condensed water from these. units easily meets those high "standards. The water produced by: such condensing systems should be used specifically for these household domestic water: needs; other sources, ‘including cisterns ana “groundwater: can provide water of lesser quality for less “strict demands ‘such as washing and waste disposal. “Based on these. simulations using the weather. data collected, one ‘condensing system would be able to meet. thie important pure water demand for: one ‘four-person household throughout ‘the year. Of course, “proper. management and storage procedures would be required to maintain the. purity of the water produced, and to ensure its availability. ‘REFERENCES . Airwell, Inc., *"Airwell: Pure. Water. Collection system: , ‘Airwell, EnC., Alexandria, Minn.» 1983. Chow, -V. Toe Editor, Handbook ‘of: Applied Aydrology, McGraw-Hill, L964, ; ; . Coffin & . Richardson, Inc., "water conservation under conditions of extreme scarcity: the U. 8. ‘Virgin Islands", Technical — Completion, Report,. Coffin: & Richardson, Inc.; Boston, Masse, | . i981. - binsley, Srey Re Rey Kohler, M. a “ana 1: paudhus:, J. be Her Ayarology - for Engineers, 2nd ‘Edition, McGraw-Hill, 1975.0 Miller and Thompson, Elements of Meteorology, Third Edition, ‘Charlies EB. Merrill ‘Publ. Oss ‘1973. a - Peebles. Rep pratt, A. and smith, He, "Waterplan: AU fo comprehensive water management framework for the U. Ss. Virgin . Islands", Technical Report No. 2, Virgin Islands Water Research > Center, Caribbean Research: Institute, College of the Virgin Joe ‘Islands,.1979.00 00. -Stoiaken, Le, "The ‘Airwell': Making water. from thin. air" Alternative Sources of Energy sr No. 56, July/Aug, 1982. “Torres-Sierra, H. and Dacosta, Rey "Estimated water use in ost. Thomas, USVI, July 83-Jun3 84", Technical Report. No. 21, . -- Caribbean. Research Institute, College: of the Virgin Takands ¢° ° 1985. ; 8s Ss. ‘Patent: Office, | Ue s. ‘patent No. 4, 351, 651, "Apparatus for xtracting potable water", U.S. Dept. of Commerce, Patent. and ademark ‘Office, Washingtony. D. Cos 1982. Professi onal resources: ‘Courneya,. ‘Calice Ger i inventor, Alexandria, MN ‘Brekson, Paul, FAA St. Thomas ,. Vi. Steven, consulting engineer, St. Thomas, VI Jason “ee Soils Engineer, Phoenix, AL emith, Henry He Ph. Des Coordinator, Water Resources Research: Center, Caribbean Research. Institute, CME St. ‘Thomas ». MI. ; Technical and data entry personne - Barry, Gy Emmons, Key Lucas, Ter “Webster, Ee “Appendix. a == simulation model 10. REM SIMULATION OP WATER CONDENSING SYSTEM | 20. REM Initial program 28 May 86 JDMunro 40° REM ~ 60. > REM: 60 REM 70° REM. 80 REM - 90 REM 2100 REM. The ‘table of production values is accessed by. two subscripts, The first is determined by » subtracting 40 from the relative humidity. The second is determined by subtracting 70. from the. temperature, — Example: production for | 85% r.h., 80° deg F temp, is: in HP (85-40, 80- ~70) Or. -HP(45, 10) 110 MAXFILES=2 Co 120 DIM HP(51,21) 130 REM start mo es 140 REM get hum/prod data 156 :GOSUB 1000 : 160 REM get input file name and number of days 170 GOSUB 2000 | ae 180 REM main loop -190 FOR D=1 TO ND. 200 GOSUB 3000 © 210 NEXT. D “9290 PRINT 230 REM end — 240 GosuB 4000. 250 REM repeat. ‘for another file? 260 GOTO. 170 1000 REM get hum/prod. data_ - 1010 - INPUT "hum/prod file name" 7H 1020 OPEN HS FOR. INPUT AS #2. rae 1030 REM get Depa ee ton table data Mg 1040 FOR T=70 TO 90. 1050 INPUT: #2,D$ — “1060, PRINT T; 1070 FOR H=40 TO 90 rT ee 41080 HP(H-40, y7-70) “VAL (MIDS (DS, 6+(H-40) #2, 2)) ~. 1990 NEXT H- (1100 NEXT T | 2110 PRINT) = 1120 CLOSE #2... “1130 RETURN ares 2000 REM start. routine ° me an <n, nee 2010 INPUT "summary file name(' end’ to stop) "78S os 2020 IF F$="end" THEN STOP =... " . 3030 INPUT “how many days" ;ND . 2040 REM initialize . a 2050 REM max, min, “total production : 2060 PX=0sPN=99:PT=0:N=0 2. = . 2070 REM open Files _. 2080 OPEN F$ FOR INPUT AS an ©2090 RETURN” ae 20. 3000 REM main loop routine ees 3010 INPUT #1,TS - 3020 PRINT N+1; 0. . 30306 LT=VAL (MIDS (TS, ll, 2))- 3040 LH=VAL(MIDS(T$,17,2)) 3050 REM check for out. of wange vatacs - 3060 IF LH<40 THEN LH=40:PRINT "hum for 3070 IF LT<70 THEN LT=70: PRINT. "tmp for 3080 AM=HP(LH-40,LT-70) | oe 3090 REM add to total production > 3100 PT=PT+AM 3110 REM check for max and min prod. . 3120 IF PX<AM THEN PX=AM_ 3130 IF PN>AM THEN PN= AM - 3140 N=N4]. 3150 RETURN | 4000 REM end-=print out “monthly results - 4010 PRINT "data for "FS 4020 REM production is divided by 4 to ae quarts. 4030 PRINT "max daily prod="PXx/4; 4040 PRINT " min daily prod="PN/4 4050 PRINT "tot prod(gals)="PT/4 _ day"D | day"D > get gallons from 4060 PRINT "ave. daily prod="P1/4/N oe 4070. CLOSE #1- 4080 RETURN ; Appendix b(1) -- 1S~hour averages | _ 10 _MAXFILES= 2 20 REM freq dist, max ,minyave etc t ap ,w,rh pes - 30 DIM ‘Tx (31)',TN(31) ,TB(31) ,DX (31) ,DN(31) ,DA(31) , WX (31) ,WN(31) ,WA(31) ,FT(40), PD (50) sFW(50) , EW(31), _ PH(50) ,HX(31),HN(31) ,HA(31) . 40 REM open files init tots get mo/days 50 PRINT "15-hour summary". 60 INPUT. "month (file name) ";F1S$ 70 IF F1lS="end"_ THEN: STOP 80 INPUT “how many days?" ;ND. . 90 INPUT "output file name:";F2S . 100 FDS="n":INPUT "freg dist (y/n) "7 RS: IF RS="y ... OR R$="Y¥" THEN FDS="y 110 PRINT "£1S="F1$ 120 OPEN F1$ FOR INPUT AS #1 ‘130 PRINT "£2S="F2S 140. OPEN F2$ FOR OUTPUT AS $2. 150 FOR I=] TO ND i - 160 TX(I)=0:TN(I)=99; TB (I) =0; Dx(D) =O; DN(I) =993 :DA(T) =0: WX (I)=0:WN(I)=99:WA(I)=0:2ZW(I) =0: HX (I) =0: BN (T) "9933 HA(I): =0 170 NEXT T (180 PRINT oo 190 REM min tot/ave max #obs. temp — 200 TM(1) =99:TM(2)=0:TM(3)=0:TM(4)=0 210 REM min tot/ave max #obs dewpt 220 DM(1)=99:DM(2)=0:DM(3) =0:DM(4) =0 230 REM min tot/ave max #obs wind — - 240 WM(1)=99:WM(2)=0:WM(3)=0:WM(4)=0 — _ 250 REM min tot/ave max #obs rel. hum — 260. HM(1)=99:HM(2)=0:HM(3)=0:HM(4)=0 270 REM init. total rainfall for month 280 TR=0 = 290. FOR D=1 TO ND: GOSUB 580: NEXT D -300 REM end of processing - : 310° PRINT #2,;"":PRINT #2,""sPRINT #2, ves "15-hour summary from ";F1$. - 320 .REM print monthly: max/min/ave: ~. 330 -LPRINT 340 LPRINT. "data: from "FS 350 LPRINT "15-hour summary" - 360 TM(2)= =INT(TM(2) /TM(4) +. 5) 7 370 LPRINT "temp max min ave="TM (3) ; TM (1) 3 'TM(2). 380 PRINT #2,"temp max min ave= "TM(3); ;TM(1) 3 TM (2) 390 DM(2) =INT(DM(2) /DM(4) +. 5) 35 . -400 LPRINT "dewpt max min ave="DM (3) ;DM(1) ;DM(2) - 410 PRINT #2,"dewpt max min ave="DM(3) 7 7;DM(1) ; 7DM(2)” 420 WM(2)= SINT (WM(2)/WM(4) +. 5) 430 LPRINT "wind max min ave="WM(3) ; >WM(1)-3 WM (2) 440 PRINT. #2,"wind max min ave="WM (3) ; 7M (1) 7WM (2) 450 HM (2): SINT (HM (2) /HI(4) + 5). cae : 22” 460 LPRINT "rel hum max min ave="HM(3); HM(1); HM(2) 470 480 490 500 510 520 ~ 530: 5.40 ~ 550 560 570 580 590 600 610 ~. 620 - 630 ~ 640 650. 660 670 680. - 690 ~. 700 710 720 730 740— 750. 760 770 780 790 800 B10 ~ g20 830 840 ~~ 860 870 880 890 900, 910 920 930 940. 950. 960° 970 PRINT. #2,"rel hum max min ave="HM (3) ; HM(1); AM (2) LPRINT. "total rainfall ="TR PRINT #2,"total rainfall ="TR REM print freq distrs IF FDS="n" THEN 560 — GOSUB 1310:REM temps >.> GOSUB 1400:REM dew pts GOSUB 1490:REM. wind -GOSUB 1580: REM rel humidity CLOSE #1:CLOSE #2. GOTO 50: REM that's all, just in case ‘REM for each day | TQ=0 sDQ=0 : WO=0 : HQ=0 INPUT #1,T$ PRINT: MID$ (TS, 5,2); INPUT #1,RS : ‘FOR H=1 TO 15 REM. get. temperature | T=VAL (MIDS (T$,7+(H-1) *6, 2)) IF T=0 THEN LPRINT D;H;"00";:GOTO 720 ‘TB(D)=TB(D)+T; TM (4) =TM(4) +1: TOPTOrL IF T>TX(D) THEN TX(D)=T:XT=H | IF T<TN(D) THEN TN(D) =T: NT=H ‘IF T<60 THEN T=61: ‘FT (T-60) =FT (T-60) +1 7 REM get dewpoint DP=VAL (MID$ (TS, 9+ (H-1 1)*6, 2)) IF DP=0 THEN LPRINT "DP"D;H;:GOTO. 810 DA(D) =DA(D)+DP: DM(4) =DM(4) +1: DQ=DO+1 IF. DP>DX(D) THEN DX (D)=DP:XD=H IF DP<DN(D) THEN. DN(D) =DP: ND=H IF DP<50 THEN DP=51 . , FD (DP-50) =FD (DP~ 50) +1. , oe IF T<=DP THEN LPRINT nt<= ap=""; ‘DE? D; +H; PT0eDPr0 REM get wind W=VAL(MIDS$ (T$, 114(H- ~1) *6,2)) : ne IF .W=0 THEN ZW(D)= 2W(D) +1: LPRINT "w"D: H;. :GOTO 890° ‘WA (D) =WA(D) +W: WM (4) =WM(4) +1: WO=WO+1 IF. WWX (D) THEN WX.(D) =W:XW=H IF W<WN(D) THEN WN(D).=Ws NW=H : IF W>50..THEN LPRINT. "W>50";D; Hy sW=50_ FW(W).=FW(W) 41 : REM calc rel hum - : . IF (T=0)OR. (DP= 0) THEN RH= 51: LPRINT "temp ap="DP 5: GOTO 980. REM calc rel hun. TC=5/9* (T-32) :DC= oe time -32) RH=INT((((112=.1*TC+DC)/(112+.9*TC))* 8) *100+, 5) HA(D)=HA(D)+RH: HM (4) =HM(4) +1: BQ=HO+1] IF RH>HX (D)THEN HX (D) =RH: XH=H IF RH<HN(D) THEN. HN(D) =RH:NH=H IF RH<50 THEN RH=51 So 23 a 980. PH (RH 50) =FH (RH 50) +2, 990 NEXT H - . 1060 REM get rainfall 1010 REM rf=val(mid$(t$,71)) 1020 REM print day info .. 1030 TM(2)=TM(2)+TB(D) °DM(2)=DM(2)+DA(D) = WM (2) =WM(2)+WA(D) :HM(2)=HM(2)+HA(D) - 1040 REM calculate averages rounded. . 1050 TB(D) =INT (TB(D)/TQ+.5) sDA(D) = =INT(DA(D) /DQ+. 5) 3 WA (D) =INT (WA(D) /WQ+.5): :HA{D) TINE (HA(D) /EQ+. 5). 1060 TXS=MIDS(STRS(100+TX(D)) ,3,2) 1070 TNS=MID$ (STRS$(100+TN(D)),3,2) 1080 TAS=MIDS (STRS (100+TB(D)) ,3,2) -1090 DXS=MID$ (STRS(100+DX(D)),3,2) | - 1100 DNS=MIDS (STRS(100+DN(D)), 3,2) 1110 DAS$=MIDS (STRS$(100+DA(D)) ,3,2) 1120 WXS=MIDS (STRS.(100+WX(D)),3,2) — 1130 WNS=MIDS(STRS (100+WN(D)),3, 2). 1140 WAS=MIDS (STRS(100+WA(D)) ,3,2). 1150 HXS=MID$ (STRS$(100+HX(D)),3,2) 1160 HNS=MIDS (STRS(100+HN(D)),3,2)° ~ 1170 HAS=MIDS(STRS(100+HA(D)),3,2). 1180 RFS=MIDS(STRS(10. 00014RF) , 3,4). 11900 PRINT #2,MIDS(TS,1,6) ;TXS$; TNS; TAS; HXS; HNS; HAS; - ° WXS;WNS; WAS; RFS — . 1200 PRINT MIDS (TS,1,6); 7 TXS; ENS ; TAS; XS; ENS; HAS; WKS sWNS;WAS;RFS. - - 1210 IF TX(D) >TM(3) THEN TM (3) =TX (D) 1220 IF DX(D)>DM(3) THEN DM(3)=DX(D). ° 1230 IF .WX(D) >WM(3) THEN WM(3)=WxX(D) 1240 IF HX(D)>HM(3) THEN HM(3)=HX(D). _ 1250. IF TN(D)<TM(1) THEN TM(1)=TN(D) 1260 IF DN(D)<DM(1). THEN DM(1)=DN(D) 1270 IF WN(D)<WM(1) THEN WM(1)=WN(D) _ 1280 IF HN(D)<HM(1) THEN HM(1)=HN(D) 1290 TR=TR+RF 1300 RETURN ~ 1310 REM:temp freq dists = = = —— : : 1320 LPRINT "temperature freq dists" 1330. FOR T=60 TO 100. 1340 IF FT(T-60)=0 THEN 1370 1350 LPRINT." "D"="PT(T-60) "3"; . 1360 LPRINT ‘TAB(12); SERENCS (Hit (PX (2-60) /2) ,"**) 1370 NEXT T 1380 LPRINT 1390. RETURN. . 1400 REM dew pt freq dists. 1410 LPRINT "dew point freq dists" 1420 FOR D=50. TO 100. — 1430 IF FD(D-50)=0 THEN 1460 1440 LPRINT ." "D"="FD(D-50)."3"; oe 1450 LPRINT. ‘TAB(12)3 STRINGS (INT (FD (D-50) /2) o"*") ~~ 1460 NEXT D ; ae ay a 1470 1480 1490 1500 1510. 1520 1530 1540 1550 1560 1570. 1580: 1590 1600 1610— 1620. 1630. 1640 1650 1660. -LPRINT RETURN | REM wind freq dists LPRINT "wind freq dists": FOR W=1 TO 50. IF FW(W)=0 THEN 1550. 2 LPRINT "eWt="PW(W) 3:2 LPRINT TAB(12).; SPRINGS (INT (FW(W) /2) 5 *#*) NEXT W. LPRINT. RETURN REM rel humidity freq dists LPRINT "rel humidity freq dists" FOR R=50 TO 100 : . IF FH (R-50) =0 THEN 1640 LPRINT " "R"="FH(R-50) "3 ar LPRINT TAB(12); STRINGS (INT (PH(R-50) /2) ,"**) NEXT R. LPRINT — RETURN 25 Appendix b(2) ~~ 24 hour averages 16 REM Summarize hourly observations, with 24 hour : ¢alculation routine , 20 REM added to the summary process ~ 7 30 REM freq dist, max,minyave etc t,dp,w,rh — 40 REM 15 June 86 jdm mod for 24-hour. summary 50 MAXFILES= 2 a 60 DIM TX(31),TN(31) /TB (31) »DX (31) ,DN(31) ,DA(32) pWX(31), ws WN(31) ,WA(31) ,FT (40) ,FD(50) rPW(50) , 20(31) -FH (50) HX (31); HBN(31),HA(31).- 70 REM open files. init. tots. get mo/days : . 80 PRINT "24-hour summary” — - Ly 90 INPUT "month(£file name)";F1S~ 100 IF F1$="end" THEN STOP 120 INPUT "how many - Gays?" ;ND_ 120 INPUT "output file name;:* F28 OS ee 130 EDS="n": INPUT Ere, dist (y/n) "ERS: IF RSs" y" OR RS="ye ; THEN FDS="y" . . 140 PRINT. mE ge "Pls. 450 OPEN F1$ FOR INPUT AS 41 160 PRINT "£2S="F2$_ : 170 OPEN F2S FOR ‘OUTPUT AS 2 ~ 180 FOR I=] TO ND: fos - ae . 190 TX(I)=0: TN(I)=99: TB (1) =0 :Dx (1) =0: DCT). =99; DA(t)=0: - WX (I) =0:WN(I) = =99: WAT) =O: 2Ww(X) =O HX(T)=0: -HN(I) =993 _ HA(I)=0. oe . . : 200 NEXT I. “210 PRINT -°< 220. REM min ‘tot/ave - max, “fobs ‘temp. 230 TM(1)}=993TM(2)=0;TM(3)=0:TM(4) =0 _240 REM min tot/ave max. #obs dewpt — 250 DM(1)=99: DM(2)=0: DM(3) =03DM(4) =0 260 REM min tot/ave max #obs wind _ 270 WM(1)=99:WM(2)=0: WM (3) =0:WM(4)= =O - 280 REM min tot/ave max #o0bs rel hum : 290. HM(1)= =99:HM(2)=0: -HM(3)=0:HM(4)=0 0 > | -. 300 REM init. total rainfall for month ae 310. TR=0 — ee 320. FOR. D= 1 TO ND: .GOSUB 610: :NEXT Do 330 REM end of ‘processing. “ 340. PRINT #2,°" sPRINT #2, "":PRINT 42, - #24=hour summary from "3FI1S - 350 REM. print monthly max/min/ave 360 LPRINT - . 370 LPRINT "data from "PLS" 380 LPRINT "24-hour summary” 2 390 TH (2) =CNT(TM(2) /TM(4) 4.5) 400 LPRINT. “temp. max min ave="TM (3); 1 (1) 3 7M (2) 410 PRINT $2,"temp max min. ave="TM (3) j 7TM(1); 77M (2) 420 DM(2) =INT (DM (2) /DM(4) +. 5) _ .430 LPRINT “dewpt max min ave="DM(3); ;DM(1) 3 5DM(2) - yo GAO PRINT WasMdewpe ‘max min | ave="DM (3) ;DM(1) 7DM (2) Set _ 26 oe 9601 ae 460 470 480 490 ~~ 500 ~.. §10 - 530 540. 550° 560 570. 580 590 600 610 "620 630. 640 650 660 680 - 690 700 ~ 710 7206 730 740° 750 760 770 780. 790 800 ~ B10. 820 - 830 B40 850 B60. 870 880. ~ 890 » 900 930: 940 “950 WM (2) NT (WM (2) /vm (4) +. 5) eee LPRINT "wind. max min. ave="WM(3) ; 5 wo (1) ; WM(2) PRINT. $2," wind max min ave= "WM (3) 5 ;WM (1) 7 WM (2) oo HM (2) =INT (HM (2) /HM(4) +. 5)- LPRINT "rel hum max min ave="HM(3); HM(1); HM (2) — PRINT #2," rel hum max min ave="HM (3) ; HM (1) 3 HM (2) . LPRINT "total rainfall ="TR ; PRINT #2,%total rainfall ="TR- REM print. freq distrs— IF FD$="n" THEN 590.” GOSUB 1440:REM temps vo GOSUB 1530:REM dew pts _ GOSUB 1620:REM wind. GOSUB 1710: REM rel humidity CLOSE #1:CLOSE #2. — oe GOTO 80: REM check for more a REM for each day. ‘TQ=0 :DQ=0: WO=0 : HOQ=0 INPUT #1,TS PRINT. MIDS (TS, 5. 12a INPUT #1,R8 00° ‘FOR H=1 TO 15 REM get. temperature. T=VAL (MIDS (TS, 7+(H-1)*6, 2)). IF T=0 THEN LPRINT D; +H; "00"; GOTO 750 ‘TB(D) =TB(D)+T: TM (4) =M(4) +1: #TQ=TOQ+1 IF T>TX(D) THEN TX(D)=T:XT=H - IF T<TN(D) THEN: TN(D) =T: NT=H- IF T<60: THEN T=61 ee FT (T-60) =FT(T-60) +1 REM get. dewpoint - DP=VAL(MIDS(TS, 94 (H-1) *6, 2)). a : IF DP=0 THEN LPRINT "DP"D; ;H; : GOTO 840 DA(D) =DA(D)+DP: DM (4) =DM(4) 41: DQ=DQ+1 IF DP>DX(D) THEN DX(D)=DP:XD=H © IF DP<DN(D) THEN DN(D)=DP: ND=H es IF DP<50 THEN DP=51 | FD (DP~50) =FD(DP-50) +1 ~ IF T<=DP THEN LPRINT "ecadp="9sDP 7 D; Hy 270; DP= 0 koe REM get wind | W=VAL (MIDS (TS, 11+(H-1)*6, 2))- IF W=0 THEN Z2W(D) =ZW(D)+1: LPRINT "w"D; A; :cOTO 920 . WA(D) =WA(D) +W: WM (4) =WM (4) 41: WO=WO+1 ae IF W>WX (D) THEN WX (D)=Ws XW=H | IF W<WN(D) THEN WN(D)=W: ‘NW=H | IF W>50 THEN LPRINT "W>50"7D; ;Hy: WE50- FW(W)=FW(W) 41 one REM. check for. reasonable temp and dew. pts” Oe IF (T=0)OR (DP= =0) THEN RH=51: LPRINT "terre ap="DP} GOTO 1010 0." an Se, ee oe REM cale rel hum — Eo - TC=5/9* (T-32) :DC= 5/9* (DP- =32) 7 . on RH= ANE (C(112" eANTC+DC) / (212+ 9#3C))* a) #100+. 5) 27° 8 “gg08 HA(D) =HA(D) +RH: GM (4)-<BM (4) 42: HO=HO+L 980 IF RH>HX(D)THEN HX (D) =RH:XH=H 990 IF RH<HN(D) THEN HN (D) =RH: N= H 1000 1010 1020 1630 1040 1050 1060 1070: 1080. 1090 WF 1100: 1110 1120 1130 1140 1156 -- . 4160 1170 1180 1190 1200 1210 1220 1230 1240 ~ 1250. 1260 1270 1280: 1290 1300 : a 1310 1320 1340. 1350. 1360 1370 - 1380 3, WNS=MIDS$(STRS(100+WN(D)) ,3, WAS=MIDS (STRS(100+WA(D)):,3, 03 3, -HNS=MIDS$ (STRS (100+HN(D)), IF RH<50 THEN RH=51 FH(RE~50) =PH(RH-50) +1 NEXT. H ‘REM get 9 nighttime values. for 24- ‘hr summary T1=VAL (MIDS (TS,7+(1-1)*6,2)). ‘TF=VAL (MIDS (T$,7+(15- 1)*6, 2)) D1=VAL (MIDS (T$,9+(1- 1)*6,2)) | DF=VAL (MIDS (T$,9+(15-1)*6, 2)) W1L=VAL (MIDS (T$,11+(1-1) *6,2).) WF=VAL (MIDS (T$,11+(15~-1) *6,2)) NT=(T1+TF)/2: ND=(D1+DF) /2: NW= (W1+WF) /2 TC=5/9* (NT=32) :DC=5/9* (ND-32) NH=INT( (((112-.1*TC+DC) /(112+. 9*TC) )* 8) *100+. 5) ‘TB(D) =TB(D)+9*NT:TM (4) =TM (4) +9:TQ=T0+9 - HA (D)=HA(D)+9*NH:HM (4) =HM(4) +9 :HQ=HO+9. WA (D) =WA(D) +9*NW: WM (4) =WM(4) +9: WO=WO+9. REM print day info TM(2)=TM(2)+TB(D): :DM (2) =DM(2) DA (D) (2) <1 (2) 4 (0) = HM (2) =HM(2)+HA(D). . TB (D)=INT(TB(D) /TQ+.5).:DA(D) =INT(DA(D)/DQ+. 5) 2. WA (D)-=INT(WA(D) /WO+.5) sHA(D) TWP CERI) AHO 5) TXS=MIDS (STRS (100+TX (D)) 732) TNS=MIDS(STRS(100+TN(D)),3,2) TAS=MIDS$ (STR$(100+TB(D)) ,3,2) DXS=MIDS$(STR$(100+DX(D)),3,2) .. ‘DNS=MIDS$ (STRS$(100+DN(D)) ,3,2) ._ DA$=MIDS (STRS (100+DA(D) ) ,3,2) WXS=MIDS (STRS$ (100+WxX (D)) ,3,2). 2) 2) HXS=MID$ (STRS (100+HX (D) 72) 2) HAS=MID$ (STR$(100+HA(D)) ;3,2)_ RFS=MIDS(STRS$(10. ,00014RF) , 3,4) PRINT #2,MIDS(TS,1, 6); ;TXS; TNS; aks ;HNS; HAS; oS WXS3WNS; WAS; RFS 1330 PRINT. MIDS (T$,1,6) :TX$; TNS; TAS; BX$; ANS HAS; WKS ;WNS; WAS; RFS IF TX(D)>TM(3) THEN PM (3) =x (D)_ - iF DX(D)>DM(3) THEN DM(3)=DX(D) IF WX(D)>WM(3) ‘THEN WM(3) =WX(D) - IF 4X (D)>HM(3). THEN HM(3)=HX(D) ~ IF TN(D)<TM(1). THEN TM(1)=TN(D) IF DN(D)<DM({1) THEN DM(1)=DN(D) IF WN(D) <WM(1). THEN WM(1)=WN(D) — IF. HN(D)<HM(1) THEN ‘HM(1)=HN(D). ReTR#RFo - RETURN Te Nf, ) REM temp freq. dists : ) BERING Pemperature freq dists" — 2B: “1460. 1470 1480 1490 1500 °1510 1520 1530 (1540 1550 1560 ~» 1570_ 1580 1580 1600: ‘1610 1620 1630 1640 1650. 1660 1670 1680 4690 1 - 1700 1710 1720: 1730 1740 1750 1760 1770 1780 --1790° FOR. T=60- TO ‘100 ee IF FT(T-60)=0 THEN 1500. LPRINT " "PT" s"*pp(T-—60)* 3 phe LPRINT TAB(12); STRINGS (ENE (P (4-60) /2) .™4™) NEXT To. . 7 LPRINT RETURN : REM dew pt freq ¢ dists re LPRINT "dew point freq dists™ FOR D=50 TO 100 ; IF FD(D~50)=0 THEN 1590. . LPRINT. *- "D*="FD (D- 50)"; z"3 LPRINT. TAB(12) 3 | SURINGS (INP (ED (D-50) /2) aaM). NEXT D : LPRINT RETURN | : REM wind. freq dists boa LPRINT "wind freq dists" FOR Wel TO 50 i IF FW(W)=0 THEN 1680 WME woe og LPRINT " "W"="FW(W) "3s": LPRINT. TAB(12) 7 STRINGS (INT (FW(W) /2) .**") NEXT Wo ‘LPRINT ves ane RETURN = : REM ‘rel humidity. freq dists ne LPRINT "rel humidity freq. dists" FOR R=50 TO 100. : mn IF. FH(R-50) =0 THEN 1770 LPRINT " "R*®="FH(R-50) "3 "3. LPRINT TAB(12)3 j SPRINGS (INT (FH(R-50) /2) ,"4*) a NEXT R- LPRINT | RETURN — ee. eee “Appendix: ce least squares: 10 REM least. squares approximation May, 86 gDMunro 20 REM initialize sums - 30 GOSUB 100° a 40 REM input and add to. sums 50 GOSUB 300. 60 REM calculate and print answers — 706 GOSUB 500 80. REM that's all . oe : 85 INPUT “hard copy title. (rtn to ignore) "7R$_ 88 IF R$<>"* THEN GOSUB 700 30° END - 4 100 REM - initialize sums - 110. SB=0: SX=0 :SY=0:XQ=0: xO=0 :N=0 170 RETURN 300 REM input. and add to. sums. 310 ‘INPUT "temp,quan";X,Y° 320 IF X=0Q THEN RETURN | 320 SB=SB+(x*yY) ; 330 SX=SX+X “340 SY=S¥+¥ 350: XQ=XQ+ (X*X) 360 YO=YO+ (¥*¥) 370. NeEN+1 .380 GOTO 310- : 500 REM calculate and print answers 510 PRINT. "sumxy="SB;" sumx="SX3" suny="S¥; *sum(xsq) ="XQ; "sumx="SX;" n="N- , 520 B=(N*SB - (SK*SY)) /(N*XO - /SK*SY) 530 A=(SY/N)-{(B*(SX/N)) . - 8540 PRINT "a="A;" be"B - .§50 REM std error | . ee ~ §55 S= (YO - A*SY ~ B*SB) / ‘(N- ~ ay 558 8 E=SOR(S) oo - 560. PRINT "std error. of est imate="SE 570 CN=(N*SB = SX*SY)> 575, CD=SOR((N*XQ-S X*SX) # (NFYQ- SY*SY)) 578 CC=CN/CD - a “580. PRINT "corr. coeff="CC. 585 VA=CC#CC poe Sg na ‘580 PRINT coeff of determination (var) ="VA . 699° RETURN | ~700 REM lpeint answers 710 LPRINT RS 720 LPRINT ‘sumxy="SB3" sumx="Sx;" sumy="SY; ane "sum(xsq) "XO; "sum(ysq) ="YQ7" n="N- 730. LPRINT Ya=n"Aec® b="B.. 740 LPRINT “std error of estimate="SE a 750 LPRINT "corr.coeff="CC_ . 760 LPRINT “coeff of determination (var) ="VA_ “770 RETURN -