I am not a Perl programmer, but rather PHP. I just finished the same task. If you've already figured this out, congrats! If not, here are some hints.
First thing to keep in mind is what data are you hoping to extract? The watches and warnings issued for storms are not standard in this or any of the other standard package. There is a new form the NHC publishes when watches/warnings are issued. I do not know the header but they can be found on the NHC's website.
The other thing is with the wind fields and forecasts. All wind fields will not be present (if a storm has 40kt winds, they will not issue wind fields for 50kts and 64 kts respectively). Same thing with the forecasted wind fields. Not all forecasts will have all the usual wind fields anyway. i.e. even if a storm is expected to have 100kt winds in 3 days, the 3 day forecast will only list 50kt wind radii. Make sense?
Regarding the forecasts, there will not always be all five time periods for obvious reasons: if the storm makes landfall or is expected to dissipate. You should check your forecast line to make sure it contains valid data. If not, just break out of that portion of your script.
Other items are optional: the eye diamter for example. For a complete advisory, I used Katrina (2005), advisory 13. That forecast/advisory lists all the fields with valid data. Also, be careful about corrected advisories. You may get an advisory just issued five minutes ago and then five minutes from you getting hte info, the NHC will correct something. Could be winds, lat, lon, anything vital. If your running a chron job, run it continuously till at least 30 minutes after the scheduled advisory release (0300Z, 0900Z, 1500Z and 2100Z (Z is same as UTC)).
Other than that, most everything is pretty simple. When I get my site up, I do plan on posting this info as an XML file for other programs/sites to use. Let me know if you're interested. I don't/won't charge for it but an acknowledgement would be nice!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.