Example #1
0
\t\t<th>Format</th></tr></thead>
<tr>
    <th></th>
\t<th></th>
    <th>Year</th><th>Month</th><th>Day</th>
    <th>Hour</th><th>Minute</th>
    <td rowspan="3"><select name="fmt">
\t\t<option value="shp">ESRI Shapefile</option>
\t\t<option value="csv">Comma Delimited</option>
\t\t</select></td>
</tr>

<tr>
  <td rowspan='2'>
EOF;
$content .= networkMultiSelect(array("NEXRAD", "TWDR"), 'ALL', array("ALL" => "ALL"), "radar") . "</td>\n    <th>Start:</th>\n    <td>\n     " . yearSelect2(2005, date("Y"), "year1") . "\n    </td>\n    <td>\n     " . monthSelect2(0, "month1") . "\n    </td>\n    <td>\n     " . daySelect2(0, "day1") . "\n    </td>\n    <td>\n     " . gmtHourSelect(0, "hour1") . "\n    </td>\n    <td>\n     " . minuteSelect(0, "minute1") . "\n    </td>\n  </tr>\n\n  <tr>\n    <th>End:</th>\n    <td>\n     " . yearSelect2(2005, date("Y"), "year2") . "\n    </td>\n    <td>\n     " . monthSelect2(0, "month2") . "\n    </td>\n    <td>\n     " . daySelect2(0, "day2") . "\n    </td>\n    <td>\n     " . gmtHourSelect(0, "hour2") . "\n    </td>\n    <td>\n     " . minuteSelect(0, "minute2") . "\n    </td>\n  </tr>\n</table>";
$content .= <<<EOF
<p><input type="submit" value="Giveme data right now!">
</form>

<h4>Shapefile DBF schema:</h4>
<pre>
Field 0: Type=C/String, Title='VALID', Timestamp in UTC
Field 1: Type=C/String, Title='STORM_ID', 2 character Storm ID
Field 2: Type=C/String, Title='NEXRAD', 3 character NEXRAD ID
Field 3: Type=N/Integer, Title='AZIMUTH', Azimuth of storm in degrees from North
Field 4: Type=N/Integer, Title='RANGE', Range of storm in miles from RDA
Field 5: Type=C/String, Title='TVS', Tornado Vortex Signature
Field 6: Type=C/String, Title='MESO', Mesocyclone strength (1=weak,25=strongest)
Field 7: Type=N/Integer, Title='POSH', Probability of Hail
Field 8: Type=N/Integer, Title='POH', Probability of Hail
Example #2
0
            border: 2px solid black;
        }
</style>


<p>This application plots a timeseries of data from an Iowa RWIS site 
of your choice.  You can optionally select which variables to plot and
for which time period in the archive.</p>

<form method="GET" action="sf_fe.php" name="olselect">
EOF;
if (strlen($station) > 0) {
    $ys = yearSelect2(1995, $syear, "syear");
    $ms = monthSelect2($smonth, "smonth");
    $ds = daySelect2($sday, "sday");
    $ds2 = daySelect2($days, "days");
    $nselect = networkSelect("IA_RWIS", $station);
    $c0 = iemdb('rwis');
    $q0 = "SELECT * from sensors WHERE station = '" . $station . "' ";
    $r0 = pg_exec($c0, $q0);
    $row = @pg_fetch_array($r0, 0);
    $ns0 = $row['sensor0'];
    $ns1 = $row['sensor1'];
    $ns2 = $row['sensor2'];
    $ns3 = $row['sensor3'];
    pg_close($c0);
    $cgiStr = "&mode={$mode}&sday={$sday}&smonth={$smonth}&syear={$syear}&days={$days}&";
    $table = "<table border=\"1\" cellpadding=\"3\" cellspacing=\"0\">\n      <tr><th colspan=\"3\">Plot Options</th></tr>\n      <tr><td><b>Restrict Plot:</b>\n      <br><input type=\"checkbox\" name=\"limit\" value=\"yes\" ";
    if (isset($_GET["limit"])) {
        $table .= "CHECKED";
    }
Example #3
0
<?php

/* Daily Data download for the ISUAG Network */
include "../../../config/settings.inc.php";
include "../../../include/forms.php";
define("IEM_APPID", 12);
include "../../../include/myview.php";
$t = new MyView();
$t->title = "ISU AgClimate Legacy Daily Data Request";
$t->thispage = "networks-agclimate";
$ys = yearSelect2(1986, date("Y"), "startYear");
$ms = monthSelect(1, "startMonth");
$ds = daySelect2(1, "startDay");
$ys2 = yearSelect2(1986, date("Y"), "endYear");
$ms2 = monthSelect(date("m"), "endMonth");
$ds2 = daySelect2(date("d"), "endDay");
$t->content = <<<EOF
 <ol class="breadcrumb">
  <li><a href="/agclimate">ISU AgClimate</a></li>
  <li class="active">Legacy Network Daily Download</li>
 </ol>

<h4>Daily Data Request Form</h4>

<div class="alert alert-info">
This download page is for the legacy sites.  To download data from the new
ISU Soil Moisture network, please visit 
<a class="alert-link" href="daily.php">this page</a>.
</div>

<p>This interface allows the download of daily summary data from the legacy
Example #4
0
<table class="table">
<thead><tr><th colspan="6">Time Interval</th>
\t\t<th>Format</th></tr></thead>
<tr>
\t<th></th>
    <th>Year</th><th>Month</th><th>Day</th>
    <th>Hour</th><th>Minute</th>
    <td rowspan="3"><select name="fmt">
\t\t<option value="shp">ESRI Shapefile</option>
\t\t<option value="csv">Comma Delimited</option>
\t\t</select></td>
</tr>

<tr>
EOF;
$content .= "\n    <th>Start:</th>\n    <td>\n     " . yearSelect2(2015, date("Y"), "year1") . "\n    </td>\n    <td>\n     " . monthSelect2(0, "month1") . "\n    </td>\n    <td>\n     " . daySelect2(0, "day1") . "\n    </td>\n    <td>\n     " . gmtHourSelect(0, "hour1") . "\n    </td>\n    <td>\n     " . minuteSelect(0, "minute1") . "\n    </td>\n  </tr>\n\n  <tr>\n    <th>End:</th>\n    <td>\n     " . yearSelect2(2015, date("Y"), "year2") . "\n    </td>\n    <td>\n     " . monthSelect2(0, "month2") . "\n    </td>\n    <td>\n     " . daySelect2(0, "day2") . "\n    </td>\n    <td>\n     " . gmtHourSelect(0, "hour2") . "\n    </td>\n    <td>\n     " . minuteSelect(0, "minute2") . "\n    </td>\n  </tr>\n</table>";
$content .= <<<EOF
<p><input type="submit" value="Giveme data right now!">
</form>

<h4>Shapefile DBF schema:</h4>
<pre>
Field 0: Type=C/String, Title='VALID', Timestamp in UTC
Field 1: Type=C/String, Title='URGENT', Was this an urgent PIREP
Field 2: Type=C/String, Title='AIRCRAFT', Reported Aircraft type
Field 3: Type=C/String, Title='REPORT', The PIREP Report
Field 4: Type=N/Double, Title='LAT', Latitude
Field 5: Type=N/Double, Title='LON', Longitude 
</pre>

<h4>Archive notes:</h4>
Example #5
0
$p2 = make_select("phenomena2", $phenomena2, $vtec_phenomena);
$s2 = make_select("significance2", $significance2, $vtec_significance);
$p3 = make_select("phenomena3", $phenomena3, $vtec_phenomena);
$s3 = make_select("significance3", $significance3, $vtec_significance);
$p4 = make_select("phenomena4", $phenomena4, $vtec_phenomena);
$s4 = make_select("significance4", $significance4, $vtec_significance);
$e2 = sprintf("<input type='checkbox' name='enabled2'%s>Include</input>", $enabled2 ? " checked='checked'" : "");
$e3 = sprintf("<input type='checkbox' name='enabled3'%s>Include</input>", $enabled3 ? " checked='checked'" : "");
$e4 = sprintf("<input type='checkbox' name='enabled4'%s>Include</input>", $enabled4 ? " checked='checked'" : "");
$y1 = yearSelect2(2005, $year1, 'year1');
$m1 = monthSelect2($month1, 'month1');
$d1 = daySelect2($day1, 'day1');
$h1 = gmtHourSelect($hour1, 'hour1');
$y2 = yearSelect2(2005, $year2, 'year2');
$m2 = monthSelect2($month2, 'month2');
$d2 = daySelect2($day2, 'day2');
$h2 = gmtHourSelect($hour2, 'hour2');
$t->content = <<<EOF
 <ol class="breadcrumb">
 <li><a href="/nws/">NWS Resources</a></li>
 <li>WWA Product Counts by WFO</li>
 </ol>
 <h3>WWA Product Counts by WFO</h3>
 
 <p>This application generates a map of the number of VTEC encoded Watch, Warning, 
 and Advisory (WWA) events by NWS Forecast Office for a time period of your choice.  
 The archive of products goes back to October 2005.  Note: Not all VTEC products go back to
 2005.  You can optionally plot up to 4 different VTEC phenomena and significance 
 types.
 
 <div class="alert alert-warning">Please be patient, this app may take 10-30 seconds to
Example #6
0
 * Download front end for daily data from the ISUSM network
 */
include "../../../config/settings.inc.php";
include "../../../include/myview.php";
$t = new MyView();
$t->title = "ISU Soil Moisture Hourly Data Request";
$t->thispage = "networks-agclimate";
include "../../../include/network.php";
$nt = new NetworkTable("ISUSM");
include "../../../include/forms.php";
$yselect = yearSelect2(2013, date("Y"), "year1");
$mselect = monthSelect(date("m"), "month1");
$dselect = daySelect2(date("d"), "day1");
$yselect2 = yearSelect2(2013, date("Y"), "year2");
$mselect2 = monthSelect(date("m"), "month2");
$dselect2 = daySelect2(date("d"), "day2");
$sselect = "";
while (list($key, $val) = each($nt->table)) {
    $sselect .= sprintf("<br /><input type=\"checkbox\" name=\"sts\" value=\"%s\">%s (%s County, %s)", $key, $val["name"], $val["county"], $key);
}
$t->content = <<<EOF
<h3 class="heading">Hourly Data Request Form:</h3>

<div class="alert alert-info">
This download page is for the recently installed (2013) ISU Soil Moisture sites.  
To download data from the legacy ISU AgClimate network, please visit 
<a class="alert-link" href="hourlyRequest.php">this page</a>.
</div>


<P><b>Information:</b>  This interface accesses the archive of daily and hourly weather
Example #7
0
<?php

include "../../../config/settings.inc.php";
include "../../../include/myview.php";
$t = new MyView();
$t->title = "Birthday Weather";
$t->thispage = "archive-birthday";
include "../../../include/forms.php";
include "../../../include/imagemaps.php";
$startYear = isset($_GET['startYear']) ? $_GET['startYear'] : 1951;
$cselect = networkSelect("IACLIMATE", "IA0200", array(), "city");
$mselect = monthSelect2("1", "month");
$dselect = daySelect2("1", "day");
$t->content = <<<EOF
<H3 class="heading">The Weather on your Birthday!!</H3>
<BR>

If you were born in Iowa between 1900 and 2005, you can fill out the form below and discover the weather
conditions at a location near to you.  Just follow the instructions below.


<BR><BR>

<form method="GET" action="/cgi-bin/onsite/birthday/getweather.py">

<p><H3 class="subtitle">1. Select the city nearest to you:</H3><p>
{$cselect}

<p><H3 class="subtitle">2. Enter your Birthdate:</H3><p>

<table><TR><TH>Year:</TH><TH>Month:</TH><TH>Day:</TH></TR>
Example #8
0
</script>
<style type='text/css'>
        #map {
            width: 100%;
            height: 200px;
            border: 2px solid black;
        }
</style>
EOF;
$t->bodyextra = "onload=\"init();\"";
$y1select = yearSelect2(2012, 2010, "year1");
$m1select = monthSelect2(1, "month1");
$d1select = daySelect2(1, "day1");
$y2select = yearSelect2(2012, 2010, "year2");
$m2select = monthSelect2(1, "month2");
$d2select = daySelect2(1, "day2");
$t->content = <<<EOF
<h3>Soil Moisture &amp; Ocean Salinity (SMOS) Satellite Data</h3>

<p>The <a href="http://www.esa.int/SPECIALS/smos/">SMOS</a> satellite is a polar
orbiting satellite operated by the European Space Agency.  The satellite provides
estimates of soil moisture in the approximate top 5 centimeters of soil and the
amount of vegetation on the land surface.  
<a href="mailto:bkh@iastate.edu">Dr Brian Hornbuckle</a> leads a 
<a href="http://bkh.public.iastate.edu/research/index.html">local research
team</a> here at Iowa State that works with this data.  The IEM collects processed
data from this satellite, generates analysis plots, and makes the raw data available.

<h4>Download Data</h4>
<p>This form allows you to download a single grid cell's worth of data based on 
the latitude and longitude pair you provide.  Data is only available here from 
Example #9
0
<?php

// List out HPD data for a date and station of your choice
require_once "../../config/settings.inc.php";
define("IEM_APPID", 91);
require_once "../../include/myview.php";
require_once "../../include/imagemaps.php";
require_once "../../include/forms.php";
require_once "../../include/database.inc.php";
$station = isset($_GET["station"]) ? $_GET['station'] : null;
$year = isset($_GET["year"]) ? $_GET["year"] : date("Y");
$month = isset($_GET["month"]) ? $_GET["month"] : date("m");
$day = isset($_GET["day"]) ? $_GET["day"] : date("d");
$yselect = yearSelect2(2008, $year, "year");
$mselect = monthSelect2($month, "month");
$dselect = daySelect2($day, "day");
$table = "<p>Please select a station and date.</p>";
if ($station) {
    $dbconn = iemdb('other');
    $rs = pg_prepare($dbconn, "SELECT", "select * from hpd_alldata\n\t\t\tWHERE station = \$1 and valid >= \$2 and valid < \$3\n\t\t\tORDER by valid ASC");
    $valid = mktime(0, 0, 0, $month, $day, $year);
    $sts = date("Y-m-d 00:00", $valid);
    $ets = date("Y-m-d 23:59", $valid);
    $rs = pg_execute($dbconn, "SELECT", array($station, $sts, $ets));
    $table = '<table class="table table-striped"><tr><th>Valid</th><th>Precip</th><th>Counter</th><th>Temp C</th><th>Battery</th></tr>';
    for ($i = 0; $row = @pg_fetch_assoc($rs, $i); $i++) {
        $table .= sprintf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>", $row["valid"], $row["calc_precip"], $row["counter"], $row["tmpc"], $row["battery"]);
    }
    $table .= "</table>";
}
$t = new MyView();
Example #10
0
$month1 = isset($_REQUEST['month1']) ? intval($_REQUEST['month1']) : date("m", $d2);
$day1 = isset($_REQUEST['day1']) ? intval($_REQUEST['day1']) : date("d", $d2);
$hour1 = isset($_REQUEST['hour1']) ? intval($_REQUEST['hour1']) : 0;
$year2 = isset($_REQUEST['year2']) ? intval($_REQUEST['year2']) : date("Y", $now);
$month2 = isset($_REQUEST['month2']) ? intval($_REQUEST['month2']) : date("m", $now);
$day2 = isset($_REQUEST['day2']) ? intval($_REQUEST['day2']) : date("d", $now);
$hour2 = isset($_REQUEST['hour2']) ? intval($_REQUEST['hour2']) : date("H", $now);
$opt = isset($_REQUEST['opt']) ? $_REQUEST['opt'] : '1';
$sselect = networkSelect("ISUSM", $station);
$y1 = yearSelect2(2012, $year1, "year1");
$m1 = monthSelect($month1, "month1");
$d1 = daySelect2($day1, "day1");
$h1 = hourSelect($hour1, "hour1");
$y2 = yearSelect2(2012, $year2, "year2");
$m2 = monthSelect($month2, "month2");
$d2 = daySelect2($day2, "day2");
$h2 = hourSelect($hour2, "hour2");
$ar = array("1" => "3 Panel Plot", "2" => "Just Soil Temps", "3" => "Daily Max/Min 4 Inch Soil Temps", "4" => "Daily Solar Radiation", "5" => "Daily Potential Evapotranspiration");
$oselect = make_select("opt", $opt, $ar);
$img = sprintf("smts.py?opt=%s&amp;station=%s&amp;year1=%s&amp;year2=%s" . "&amp;month1=%s&amp;month2=%s&amp;day1=%s&amp;day2=%s&amp;" . "hour1=%s&amp;hour2=%s", $opt, $station, $year1, $year2, $month1, $month2, $day1, $day2, $hour1, $hour2);
$t->content = <<<EOF
<ol class="breadcrumb">
 <li><a href="/agclimate/">AgClimate Network</a></li>
 <li class="active">Soil Moisture Plots</li>
</ol>

<h3>Soil Moisture and Precipitation Timeseries</h3>

<p>This application plots a timeseries of soil moisture and precipitation from
a ISU Soil Moisture station of your choice.  Please select a start and end time
and click the 'Make Plot' button below.
Example #11
0
$t = new MyView();
$t->title = "Atmospheric Structure Instrumentation";
$t->thispage = "networks-other";
$channels = array("ch1" => "Wind Speed @48.5m [m/s]", "ch2" => "Wind Speed @48.5m [m/s]", "ch3" => "Wind Speed @32m [m/s]", "ch4" => "Wind Speed @32m [m/s]", "ch5" => "Wind Speed @10m [m/s]", "ch6" => "Wind Speed @10m [m/s]", "ch7" => "Wind Direction @47m [deg]", "ch8" => "Wind Direction @40m [deg]", "ch9" => "Wind Direction @10m [deg]", "ch10" => "Air Temperature @3m [C]", "ch11" => "Air Temperature @48.5m [C]", "ch12" => "Barometer @48.5m [mb]");
$c = "";
while (list($key, $ch) = each($channels)) {
    $c .= sprintf("<tr><td>%s</td><td>%s</td></tr>", $key, $ch);
}
$nselect = networkSelect("ISUASI", $station);
$ys = yearSelect2(2012, $syear, "syear");
$ms = monthSelect($smonth, "smonth");
$ds = daySelect2($sday, "sday");
$hs = hourSelect($shour, "shour");
$ye = yearSelect2(2012, $eyear, "eyear");
$me = monthSelect($emonth, "emonth");
$de = daySelect2($eday, "eday");
$he = hourSelect($ehour, "ehour");
$t->content = <<<EOF
<h3 class="heading">Atmospheric Structure Data</h3>

<p>The IEM is collecting and providing data from an instrumentation project
that outfitted two towers with wind and temperature sensors.  
(Insert more details here).

<h3>Plots of this data</h3>
<form method="GET" name="plot">
<input type="hidden" name="action" value="plot" />

<strong>Select station:</strong>{$nselect}

<table>
Example #12
0
$t = new MyView();
$t->thispage = "networks-awos";
$t->title = "AWOS One Minute Data Download";
include "../../../include/iemprop.php";
$awos_archive_end = strtotime(get_iemprop("awos.1min.end"));
include "../../../include/imagemaps.php";
include "../../../include/forms.php";
$bogus = 0;
$ys1 = yearSelect2(1995, date("Y"), "year1");
$ms1 = monthSelect($bogus, "month1");
$ds1 = daySelect2($bogus, "day1");
$mi1 = minuteSelect($bogus, "minute1");
$hs1 = hour24Select($bogus, "hour1");
$ys2 = yearSelect2(1995, date("Y"), "year2");
$ms2 = monthSelect($bogus, "month2");
$ds2 = daySelect2($bogus, "day2");
$mi2 = minuteSelect($bogus, "minute2");
$hs2 = hour24Select($bogus, "hour2");
$aend = date('d M Y', $awos_archive_end);
$sselect = networkMultiSelect("AWOS", '', array(), 'station[]');
$t->content = <<<EOF
<ol class="breadcrumb">
 <li><a href="/AWOS/">AWOS Network</a></li>
 <li class="active">Download One Minute Data</li>
</ol>

<p>The Iowa Department of Transportation (DOT) manages the 
network of AWOS sensors in the state of Iowa.  While 20 minute interval data
is published to the world in real-time, they also collect one minute interval
data internally.  Each month, the DOT kindly provides us with the previous
month's archive of one minute data.  We process this data into our database