Skip to content

Commit

Permalink
Had to hack the 7-day forcast b/c NWS hasn't updated St David's forecast
Browse files Browse the repository at this point in the history
for over a week.

Added a notice to wildfire-prep.html about the SWCC not updating
the SW Sitrep until the PL > 1.
  • Loading branch information
azfirefighter committed Jan 14, 2021
1 parent 8ad624a commit 9782588
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion _includes/wildfire-prep.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<a href="assets/Southwest_Situation_Report.pdf" target="_blank"><img src="https://img.shields.io/badge/Southwest-1-blue"></a>&nbsp;<a href="assets/National_Situation_Report.pdf" target="_blank"><img src="https://img.shields.io/badge/National-1-green"></a>&nbsp;<font size="-3">Click one for the appropriate situation report.</font>
<a href="assets/Southwest_Situation_Report.pdf" target="_blank"><img src="https://img.shields.io/badge/Southwest-1-blue"></a>&nbsp;<a href="assets/National_Situation_Report.pdf" target="_blank"><img src="https://img.shields.io/badge/National-1-green"></a><br><font size="-3">Click one for the appropriate situation report.</font>
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% include header.html %}
<font color='yellow'>{% include date.txt %}</font></h6>
<p id="prep"><div id="shadowbox"><b>WILDFIRE PREPAREDNESS LEVELS</b><br>{% include wildfire-prep.html %}<br>
SW Sitrep is NOT published by the SWCC until the PL > 1.</div></p>
<font color="red" size="-1">SW Sitrep is NOT updated by the SWCC until the PL > 1.</font></div></p>
<p id="burns"><div id="shadowbox"><b>DAILY PRESCRIBED BURNS (STATEWIDE)</b><br>{% include RX_Planned_AZ.html %}</div></p>
<p id="dngr"><div id="shadowbox"><b>SOUTHWEST AREA FIRE DANGER</b><br>
<a href="https://gacc.nifc.gov/swcc/predictive/intelligence/daily/UPLOAD_Files_toSWCC/F_01_50_Daily_Fire_Danger_DISPATCH.jpg" border=0><img src="https://gacc.nifc.gov/swcc/predictive/intelligence/daily/UPLOAD_Files_toSWCC/F_01_50_Daily_Fire_Danger_DISPATCH.jpg" width="50%"></a><br>
Expand Down
3 changes: 2 additions & 1 deletion config
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ url='https://www.lltodd.family/firewx'
email='weather-noreply@stdavidfire.com'
from='weather-noreply@www.lltodd.family'
office=TWC
zipcode=85630
#zipcode=85630
location='"Benson, AZ"'
user=root
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ github: azfirefighter
author: Jason Todd
license: LICENSE
logo: SDFD-trans.png
title: Trial and Error
title: SDFD Fire Weather Update
---

7 changes: 4 additions & 3 deletions weather.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ sed -n '1p' levels.txt > sw-level.txt
sed -n '2p' levels.txt > nat-level.txt
export sw=$(cat sw-level.txt)
export us=$(cat nat-level.txt)
echo "<a href=\"assets/Southwest_Situation_Report.pdf\" target=\"_blank\"><img src=\"https://img.shields.io/badge/Southwest-$sw-blue\"></a>&nbsp;<a href=\"assets/National_Situation_Report.pdf\" target=\"_blank\"><img src=\"https://img.shields.io/badge/National-$us-green\"></a>&nbsp;<font size=\"-3\">Click one for the appropriate situation report.</font>" > _includes/wildfire-prep.html
echo "<a href=\"assets/Southwest_Situation_Report.pdf\" target=\"_blank\"><img src=\"https://img.shields.io/badge/Southwest-$sw-blue\"></a>&nbsp;<a href=\"assets/National_Situation_Report.pdf\" target=\"_blank\"><img src=\"https://img.shields.io/badge/National-$us-green\"></a><br><font size=\"-3\">Click one for the appropriate situation report.</font>" > _includes/wildfire-prep.html
rm level*.txt
rm SW_Wildfire_Prep.csv
##########################################################
Expand Down Expand Up @@ -81,7 +81,8 @@ mv wwa.txt _includes
# Remember to just create a LINK to this file hosted on the web since there can be SO much data.
##########################################################
# Get the 7 day forecast for St David and format it.
$wxcast forecast $zipcode > 7dayfcast.txt
#$wxcast forecast $location > 7dayfcast.txt
$wxcast forecast "Benson, AZ" > 7dayfcast.txt # Quick hack
sed -i 's/No forecast found for location\: 85630 coordinates\: 31\.902220000000057\,\-110\.21934499999998/The NWS has no forecast available to download for Saint David\./' 7dayfcast.txt
sed -i 's/$/<br>/' 7dayfcast.txt
sed -i 's/Today/<b>Today<\/b>/' 7dayfcast.txt
Expand Down Expand Up @@ -126,7 +127,7 @@ mv 7dayfcast.txt _includes
# Get the full Fire Weather Forecast and split out the Discussion
$wxcast text $office FWF > fwf-raw.txt
sed -n '/.DISCUSSION.../,/^$/p' fwf-raw.txt > fwf-disc.txt
sed -i 's/.DISCUSSION.../<b>DISCUSSION: <\/b><br>/' fwf-disc.txt
sed -i '/.DISCUSSION.../d' fwf-disc.txt
sed -i 's/$/<br>/' fwf-disc.txt
mv fwf-disc.txt _includes
##########################################################
Expand Down

0 comments on commit 9782588

Please sign in to comment.