Archive for the weather Category

Hurricanes of July and August

Posted in Seasons, weather with tags on July 15, 2016 by marksun

storms20160715 15 July  2016 is the first Hurricane month of 2016.  This year the first storms of the year in the Eastern Pacific have formed but they have so far all weakened.   Accuweather is predicting 14 named storms, seven hurricanes (3 major and 2 mexian landfalls).  Nobody is coming out and saying it,  but the overall situation for Hawaii is trending towards a relatively mild hurricane season.    (Graphic source: weather underground).

Blas  – cloud remants bring moisture and high humidity to HI around 14 July 16
Celia – 7/15 weakening tropical depresion   22º  142º
Darby – 7/15/July  Darby forms – 7/22 Darby still a TS and ETA on BI of 20W tonight- Sat. with a forecast track right on the chain.

Factors for Hawaii:

  1. La Niña : cooler ocean waters are a negative factor for tropical storm development and strength. The cooling la nina forecast is persistence through August, September and October.  Critical SS Temp: 80°.
  2. Wind shear is forecast to be present in the E Pacific hurricane zone –  probably refers to the subtropical jet which is a factor in breaking up hurricanes in the Pacific.

Crappy WX of July

7/18 Celia produces SE winds, rain and flood adv on Oa and Kauai 6/18
7/18 –Darby impact forecast 23-24 timeframe as a TD with a forecast track (7/18) just N of BI on Friday.

14 August – the last named storm was Javier which affected Mexico.  Howard fizzled but it’s cloud field brought heavy rain and wind of spotty TS strength. Ivette tracked south and brought some increased moisture and wind but otherwise a non-event.

Nobody is talking about it but what seems to be happening is that the current large scale la nina  and wind shear regime have suppressed hurricane activity in the central pacific for the first half of August.  14 August there are no storms of note, with two weak disturbances out there at 132 and 137W.  Neither will become hurricanes. This also means that we won’t see storm type weather for at least a week – so any rain we get (for example while camping on the 19-21st!) will be trade showers or upper trough type stuff – not necessarily great dry wx but better than tropical cyclones!




SMTC – for the Hawaiian Islands

Posted in Computers, weather with tags , , , , on February 23, 2016 by marksun

Sun Moon and Tide Calendar for the Hawaiian Islands

Way back when, I wrote this sun moon and tide calendar program in C. There were a number of critical information sources to make this possible.  In a way the foundation for me was based on a little booklet of  astronomical calculations (Astronomical Formulae for Calculators, Jean Meus 1979) which provided detailed methods to calculate all kinds of astronomical numbers like rise and set times, azimuths, altitudes, you name it.  The scientific calculator had arrived and now the average guy could do some serious calculation relatively quickly.  Tide calculation is a bit rougher, but I found somewhere in Hamilton Library at the UH  from the Government called Numerical Tide Prediction which opened the door to doing it yourself.  There was a Fortran program and I got a copy.

SMTC  required building a C library from Meus’ equations, and translating the government fortran to C, and a few other odds and ends involving the Hawaiian lunar calendar, a primitive map system, and innumerable computing problems that had to be solved to make this work on pre-Windows PC.   For all that, it’s remarkable how well the system held up. The last  release of SMTC was in March 1995.   Some of the code goes back to 1989 and earlier, so this project started  in the 80’s – when my kids were born. Now SMTC lives again on a VM on this Windows 8.1 machine which won’t even run an EXE file that old.  It’s satisfying to see this primitive program is still producing accurate and useable results – good enough for “Hawaiian” time.  I have the source code still and I would seriously like to port it to a modern language that would allow it to run on Windows, Linux and web platforms.


Figure 1. SMTC main tide display.  Harbor, lat/long, Date, Sunrise, Sunset, Moonrise and Moonset calculated for the harbor in HST, Lunar night in the old Hawaiian system, graphical tide chart computed for each hour using Honolulu Harbors harmonic tidal constants.

In the 70’s  and 80’s I became interested in the traditional and the nearly lost Hawaiian Lunar (Mahina) Calendar. At that time there were already a couple published calendars, one a large wall calendar by the Hawaiian Civic Club – really the groundbreaking compilation of information from the very few authoritative sources – David Malo’s Hawaiian Antiquities, and writing by Kepilino (Kepelino’s Traditions of Hawaii).  The Hawaiians and other Polynesians certainly were in possession of an extensive body of knowledge of the moon’s phases, and how the mahina, or nights of the moon, related to tides, fishing, agriculture, and the many rhythmic cycles of day to day life.  I had a go at publishing Hawaiian Sun Moon and Tide Calendars for a few years myself but as a business venture it was a disaster!  SMTC the computer program came as a next step and for me fused Hawaiian traditional knowledge with the mathematics based knowledge of the Western world – calendar math, well known and painstakingly derived astronomical formula relating to the sun, moon, major planets.

Tides  have been the subject of scientific scrutiny  for hundreds of years and the flow of water has long been known to respond to lunar and solar gravitational influences, local ocean currents and heights, wind, etc.   At some point some genius subjected tide observations to  harmonic analysis, the theory being that the tide height at any point was the sum of multiple separate simple harmonic fluctuations that varied in wavelength, height, and phase.  In Hawaii, 38 separate components have been discovered to explain most of the variation in the height of the tides in.  In the late 80’s I found this method in a paper called Numerical Tide Prediction, which also mentioned the existence of a Fortran program.  I was able to get a copy, must have been sent to me by mail on floppy disk, and I got it working using a tiny Borland Fortran compiler.  The program implemented the numerical method in a way that can only be understood in the computer language Fortran. In other words it was terrible.  To make it usable, I rewrote the core of NTP in C and incorporated this code in  in SMTC.  This program written in the late 80’s and early 90’s is still accurate in 2016 with no input or adjustment at all.  The validity of the method has certainly stood the test of time, while at another level illustrates the importance and short term, at least, constancy of rhythms in nature.  Based on math alone, tides can be predicted with an amazing degree of precision, give or take the deviations caused by another fundamental force in nature – the noise of day to day randomness of our environment, weather, wind, storm waves and so on.

In SMTP, the Hawaiian lunar phase name are computed by calculating the age of the moon since the  astronomical new moon.  The first night is Hilo, the first sliver of the moon appearing like a twisted strand of silver fiber in the twilight of  the western sky after sunset.  It’s real easy to waffle around with the full moon, and quarters, but the sky tells the story when it comes to the new moon when the moons orbit brings its face to the point where it is directly opposite the sun, dark,  from the perspective of we earthlings.  In virtually all folk-lore, the new moon is the dark night with no moon, and the next night the moon’s light reappears in the western horizon.  The ancients would have had to deal with the realities of nature and the fact that the lunar month is never in exact synchrony with the solar day.  The astronomical lunar or synodic month varies from about 29.18 to 29.93 days with a long-term average duration of 29.530587981  (see Wikipedia – lunar month). Malo and Kepilino both say the ancients dealt with this by alternating 29 and 30 night months, with the result of some months ending in either Mauli or Muku, adding an intercalenary night every so often, etc. etc.  My guess is that in the old days there was no need to calculate out a new moon or full moon for anything like years in the future.  Errors would creep into a simple integer accounting system for the moon. Those in the know who observed the sky were probably practical observers and called the nights as they saw them. In any case they were fully capable of predicting lunar phases accurately months in advance if needed.

To render the individual moon, I did the spherical math to project the terminator out from the lunar phase angle more or less for the heck of it.  Who cares eh? Next time around I’d use a jpeg icon.  Back then jpeg had not been invented yet.


Figure 3 – tides for a seven day period

Sadly, SMTC program is hard-coded to have a lifetime from 1940 to 2025.   It depends on a binary database file called ntp4025.db which must be in the same directory as smtc.exe.  So after 2025 – the original SMTP will cease to work.  I think that the tide harmonics were thought to have a finite useful life and would not be valid beyond 2025 so I figured, we’ll just go with that.  I may have thought that there would be replacement by then.  Or that nobody would care. Shucks.


Figure 3. Harbor selection screen.  As you page through the harbors, the location is plotted on the map.  These are hand-digitized lat/long baseline maps.  Crazy.

So while SMTC shows its age and has a primitive patina, it is not trivial. To this day nothing comes close to packing the functionality of this little program into a single bundle.  So I think it’s worth revisiting but it will probably take another labor of love to pull off.  The target platform this time is the Raspberry π.

ntp4025.db and notes to self.  I apologize in advance for this paragraph but if I don’t write this down I’ll forget.  It should be edited out in due time.  This 25.6kb binary  data file was generated in 1989 and I don’t see the source that created it but most likely a dump of structs.  ntplib.c calls init_tables with a callto loadannv(yr,lastyr,npdb_file) — there is some kind of annual data lookup.   For some time I preferred binary data files, probably to hide and keep it to myself… ego!  Ah youth!  Well, actually back then with 10MB hard drives and 360K floppy disks, small was beautiful.  But would an ascii data set really have been smaller than 25K?  These days I vastly prefer clear text ascii data.  We take it to extremes of course.  People think that XML is god’s gift to programmers, but markup language is a back to the future thing isn’t it?  Remember “Wordstar”?  Probably not!  Anyway were it not for ntp4025.db SMTC could live forever or at least as long XP lives – somewhere?

Bad idea.  But waaayyy too late now … we’d have to reverse engineer it, but more than likely, we’ll know how to work around it.

– the harmonic constants for Honolulu are online here.

These NOAA pages are a remarkable instance of full disclosure of valuable and hard-won information and totally define information that should remain in the public domain.  Great service NOAA!  Impressive.

Just in case…  printing out the Honolulu harmonic components which enable the computation of tide charts.  These are likely to be the latest and most accurate set of constants.

Just for fun I ran a check of the SMTC source code to see how much drift there may be in the harmonic constants for Honolulu after 20+ years. In ntplib.c , the  array float amp[38]  corresponds to Amplitude,  array a[38] is Speed, and  epoch[38] is Phase.  The constants have been revised a bit:  e.g. M2 Amplitude is 0.58 in the harmonic chart below, and in my constants from 1995 M2 the value is .0546.  The numbers still track however.  SMTC tide predictions are still close to currently published tides for Honolulu.  I would say that the discrepancy is practically speaking unimportant – nature is way more complex than the computer model – what is remarkable is how well tide and astronomical calculations hold up.

Just wondering about what might change.  SMTC almost certainly uses the 1960-1978 epoch tidal datum.  Maybe the depth of the water has changed, or currents and coastline changed.  Looking over these numbers (and I haven’t checked the program) I wonder how important these zero amplitude constituents are… M4 or M6 for example… there are a number of them.

Tidal Datum Analysis Period- Epoch
01/01/1983 – 12/31/2001  – current epoch
1960-1978 – superceded epoch
Constituent # Name Amplitude Phase Speed Description
1 M2 0.58 129.6 28.984104 Principal lunar semidiurnal constituent
2 S2 0.19 113.8 30.0 Principal solar semidiurnal constituent
3 N2 0.11 125.1 28.43973 Larger lunar elliptic semidiurnal constituent
4 K1 0.52 76.5 15.041069 Lunar diurnal constituent
5 M4 0.0 0.0 57.96821 Shallow water overtides of principal lunar constituent
6 O1 0.28 76.2 13.943035 Lunar diurnal constituent
7 M6 0.0 0.0 86.95232 Shallow water overtides of principal lunar constituent
8 MK3 0.0 0.0 44.025173 Shallow water terdiurnal
9 S4 0.0 0.0 60.0 Shallow water overtides of principal solar constituent
10 MN4 0.0 0.0 57.423832 Shallow water quarter diurnal constituent
11 NU2 0.02 135.6 28.512583 Larger lunar evectional constituent
12 S6 0.0 0.0 90.0 Shallow water overtides of principal solar constituent
13 MU2 0.02 89.1 27.968208 Variational constituent
14 2N2 0.01 118.6 27.895355 Lunar elliptical semidiurnal second-order constituent
15 OO1 0.02 91.4 16.139101 Lunar diurnal
16 LAM2 0.0 122.3 29.455626 Smaller lunar evectional constituent
17 S1 0.0 0.0 15.0 Solar diurnal constituent
18 M1 0.02 95.3 14.496694 Smaller lunar elliptic diurnal constituent
19 J1 0.03 83.6 15.5854435 Smaller lunar elliptic diurnal constituent
20 MM 0.0 0.0 0.5443747 Lunar monthly constituent
21 SSA 0.0 0.0 0.0821373 Solar semiannual constituent
22 SA 0.13 191.0 0.0410686 Solar annual constituent
23 MSF 0.0 0.0 1.0158958 Lunisolar synodic fortnightly constituent
24 MF 0.02 37.2 1.0980331 Lunisolar fortnightly constituent
25 RHO 0.01 76.2 13.471515 Larger lunar evectional diurnal constituent
26 Q1 0.05 74.3 13.398661 Larger lunar elliptic diurnal constituent
27 T2 0.01 114.3 29.958933 Larger solar elliptic constituent
28 R2 0.0 113.1 30.041067 Smaller solar elliptic constituent
29 2Q1 0.01 76.0 12.854286 Larger elliptic diurnal
30 P1 0.16 76.6 14.958931 Solar diurnal constituent
31 2SM2 0.0 0.0 31.015896 Shallow water semidiurnal constituent
32 M3 0.0 0.0 43.47616 Lunar terdiurnal constituent
33 L2 0.02 134.0 29.528479 Smaller lunar elliptic semidiurnal constituent
34 2MK3 0.0 0.0 42.92714 Shallow water terdiurnal constituent
35 K2 0.05 107.0 30.082138 Lunisolar semidiurnal constituent
36 M8 0.0 0.0 115.93642 Shallow water eighth diurnal constituent
37 MS4 0.0 0.0 58.984104 Shallow water quarter diurnal constituent

Hurricanes of August 2015

Posted in weather with tags on August 31, 2015 by marksun

three-cat-4s Aug2015

9/1/15  Three CAT 4 Storms, Kilo, Ignacio and Jimena

There were four storms in August, Guillermo (2 Aug), Kilo (15 Aug), Igancio (31 Aug) and Jimena (ok September) that concern us here in the Hawaiian Islands.  As of Today 9/1/15, Ignacio is looking like it will track to the North.  Jimena also is forecast to track to the north when it passes Hawaii in it’s westward track.

The hurricane threat to Hawaii is growing due to the increased frequency of hurricanes on the one hand,  and on the other, the sheer growth in the numbers of people and structures threatened.  There is just more of us and our stuff at stake.  My little townhouse in Aiea was build in the 60’s and hurricanes could not have been further from the mind of the developer, intent of flipping his parcel of former sugar cane land, carefully scraped free of topsoil into terraced developements for homes. If one of these hurricanes hit us dead on we’re going to be like the first two of the three little pigs cowering behind the shaking doors and walls of wood, and sheetrock,  Yikes.

We speculate about whether the changing climate is the cause of these hurricanes but that’s in a sense a wierd way of looking at the situation — hurricanes have always been around – the current climate just contains more of them.  Hurricanes and everything else that spins, churns, and blows in the Earth’s atmosphere is how the planetary solution for what to do with energy.  The ocean is especially warm in the equatorial Pacific right now.  This happens every so many years with enough regularity for humans to recognize a pattern when we see it — we call it el Nino after the name given to it by Peruvian sailors in the 19th century who noted that warm ocean current events occurred around the Christmas season.  I learned about el Nino in the late 70’s from my Climatology professor Jen Hu Chang at the University of Hawaii… Back then there was speculation that the heat in the water was doing something on a large even planetary scale,   All atmospheric phenomena are nature’s solution to what to do with energy on a planet blanketed by a thick atmosphere, fat with  water billowing out of oceans through evaporation to form islands of water floating in the skies.  Hurricanes are of the more spectacular and transient genera of such energy systems.

These days there is also the cold water counterpart that is called la Nina… I’m sorry but this is silly and frivolous play on words, and I wish “they” had come up with another name.  I am not going to talk about “ln” anymore.  I would rather it was called “cold phase ocean oscillation” or “cold ocean”.  The expression “El nino” comes out of deep cultural perhaps nautical tradition with poetic and deep associative linguistic allusions – “la nina” to me is derivative and somehow insulting to baby girls…