Dear Matlab Forums,
As part of my thesis I'm investigating the accuracy of BOM's forecast data. I'm trying to see how accurate their maximum predictions are to determine if evasive action may need to be taken for fixed marine structures. I have the historic wavebuoy data, but want to know if BOMs forecasts have been accurate.
BOM is absolutely fantastic at providing data in erratic text format and seems not to care much about useable CSV formats – it's killing me.
What I want from the data:
- The date
- The most far reaching swell and seas size forecasts
The data comes in the following formats:
*11:30 28/05/2008* 100398833 CGWEB=11:30*AIFS_ID=11400* CGWEBIDW11400 Australian Government Bureau of Meteorology Western Australia Local Waters Forecast Yanchep to Mandurah and Offshore to Rottnest Island Issued at 11:30 am WST on Wednesday 28 May 2008 Valid until midnight Friday Please Be Aware Wind gusts can be 40 percent stronger than the averages given here, and maximum wave may be up to twice the height. Warnings Nil. Synoptic Situation A moderate cold front is currently passing over Perth. Fresh W/SW winds behind front will ease during the afternoon and evening. Forecasts: Wednesday until midnight: W/SW winds 18/23 knots easing to 13/18 knots during the afternoon and becoming SW'ly 10/15 knots in the evening. Seas 1.5m to 2.0m. Swell rising to 3.0m. Swell at Cottesloe: rising to 1.0m. Winds on Melville Water: similar. Thursday: S/SW winds 8/13 knots tending S/SE 5/10 knots in the evening. Seas to 1.0m. Swell to 3.0m easing later. Friday: E/NE winds 8/13 knots tending N/NE 10/15 knots in the evening and increasing to N/NE 15/20 knots towards midnight. Current Swell Observations: Rottnest Waverider Buoy: 1.7m Cottesloe Waverider Buoy: 0.6m Current swell height information is supplied by the Department for Planning and Infrastructure and is current only at the time of issue of this forecast The next routine forecast will be issued at 4:30 pm WST Wednesday.*16:30 28/05/2008* 100444518 CRAFA=16:30 CGFCS=16:30XCH10SYD-0296501221=16:31 ENOVAFM=16:30 CGIDF=16:30*AIFS_ID=11400* CRAFA CGFCS XCH10SYD ENOVAFM PROD CGIDFIDW11400 Australian Government Bureau of Meteorology Western Australia Local Waters Forecast Yanchep to Mandurah and Offshore to Rottnest Island Issued at 4:30 pm WST on Wednesday 28 May 2008 Valid until midnight Saturday Please Be Aware Wind gusts can be 40 percent stronger than the averages given here, and maximum wave may be up to twice the height. Warnings Nil. Synoptic Situation A moderate cold front is currently passing over Perth. Fresh W/SW winds behind front will ease during the evening. Forecasts: Wednesday until midnight: W/SW winds 15/20 knots easing to SW'ly 10/15 knots during the evening. Seas 1.0m to 1.5m. Swell to 2.5m to 3.5m. Swell at Cottesloe: to 1.0m. Winds on Melville Water: similar. Thursday: S'ly winds 8/13 knots tending SE'ly 8/13 knots in the evening. Inshore winds tending E/SE 5/10 knots for a period early to mid morning. Seas to 1.0m. Swell 2.5m to 3.0m Swell at Cottesloe: to 1.0m. Winds on Melville Water: will be similar. Friday: E'ly winds 8/13 knots tending NE'ly 10/15 knots towards midnight. Seas to 1.0m. Swell to 2.0m, easing. Saturday: N'ly winds 13/18 knots increasing to NW'ly 20/25 knots during the morning. Current Swell Observations: Rottnest Waverider Buoy: 2.2m Cottesloe Waverider Buoy: 0.8m Current swell height information is supplied by the Department for Planning and Infrastructure and is current only at the time of issue of this forecast The next routine forecast will be issued at 11:30 pm WST Wednesday.
I've noticed the XCH10SYD code is used whenever a swell & seas forecast are produced – which is a great identifier of the information I'm looking for. Therefore I'm trying to find a way of getting my program to search through the 96,000 lines of ".txt" to search out the "XCH10SYD" classifier. When its found, the program saves the relevant time and date (listed a few lines above), then saves the furthest forecast's date (in this example it's Friday) and associated maximum swell and seas figures.
Things to note:
- Sometimes seas/swell are listed as "Seas 1.0m", othertimes they're listed as "Seas to 1.0m", and sometimes its listed as "Seas 1.0m to 2.0m". In the latter case, I'm only interested in the maximum value.
- Sometimes when a particularly long forecast is produced, the number of lines of text changes. ie The code can't really be hard coded to extract data from a particular spot, but has to be flexible to actively search for the numerical data.
- The HH:MM DD/MM/YYYY and AIFS identifiers seem to be consistent in their location and format. (Perhaps the only consistent aspect of the txt file.
If anyone can even provide advice on where to start, it would be much appreciated. I'm really not a pro in this field, but keen to learn. This is just way beyond my current skillset. Thank you!
Best Answer