Skip to content

Commit

Permalink
Merge pull request #607 from akrherz/231206
Browse files Browse the repository at this point in the history
mnt: sundry updates
  • Loading branch information
akrherz authored Dec 7, 2023
2 parents 6e5f881 + 97a1ad5 commit cabad57
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
4 changes: 2 additions & 2 deletions deployment/php_fpm_systemd_override.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# libcurl in conda-forge is openssl 3.2, so trying to avoid it
[Service]
Environment=LD_PRELOAD=/opt/miniconda3/envs/prod/lib/libstdc++.so:/opt/miniconda3/envs/prod/lib/libtiff.so:/opt/miniconda3/envs/prod/lib/libcurl.so

Environment=LD_PRELOAD=/opt/miniconda3/envs/prod/lib/libstdc++.so:/opt/miniconda3/envs/prod/lib/libtiff.so
6 changes: 4 additions & 2 deletions htdocs/geojson/agclimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,12 @@ def get_data(cursor, ts):
as srad_wm2,
coalesce(m.tair_c_avg_qc, h.tair_c_avg_qc) as tair_c_avg,
coalesce(m.t4_c_avg_qc, h.t4_c_avg_qc) as t4_c_avg_qc,
coalesce(m.t12_c_avg_qc, h.t12_c_avg_qc) as t12_c_avg_qc,
coalesce(
m.t12_c_avg_qc, h.t12_c_avg_qc, m.sv_t14_qc)
as t12_c_avg_qc,
coalesce(m.t24_c_avg_qc, h.t24_c_avg_qc) as t24_c_avg_qc,
coalesce(m.t50_c_avg_qc, h.t50_c_avg_qc) as t50_c_avg_qc,
coalesce(m.vwc12_qc, h.vwc12_qc) as vwc12_qc,
coalesce(m.vwc12_qc, h.vwc12_qc, m.sv_vwc14_qc) as vwc12_qc,
coalesce(m.vwc24_qc, h.vwc24_qc) as vwc24_qc,
coalesce(m.vwc50_qc, h.vwc50_qc) as vwc50_qc,
coalesce(m.ws_mph_max, h.ws_mph_max) as ws_mph_max,
Expand Down
16 changes: 10 additions & 6 deletions htdocs/geojson/vtec_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import datetime

import simplejson as json
from pyiem.exceptions import IncompleteWebRequest
from pyiem.util import get_dbconnc, html_escape
from pyiem.webutil import iemapp
from pymemcache.client import Client
Expand Down Expand Up @@ -158,12 +159,15 @@ def application(environ, start_response):
wfo = environ.get("wfo", "MPX")
if len(wfo) == 4:
wfo = wfo[1:]
year = int(environ.get("year", 2015))
phenomena = environ.get("phenomena", "SV")[:2]
significance = environ.get("significance", "W")[:1]
etn = int(environ.get("etn", 1))
sbw = int(environ.get("sbw", 0))
lsrs = int(environ.get("lsrs", 0))
try:
year = int(environ.get("year", 2015))
phenomena = environ.get("phenomena", "SV")[:2]
significance = environ.get("significance", "W")[:1]
etn = int(environ.get("etn", 1))
sbw = int(environ.get("sbw", 0))
lsrs = int(environ.get("lsrs", 0))
except ValueError:
raise IncompleteWebRequest("Invalid request, missing required params")
cb = environ.get("callback", None)

mckey = (
Expand Down
7 changes: 5 additions & 2 deletions htdocs/sites/hist.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ $wsuri = sprintf("/api/1/daily.json?%s", http_build_query($arr));
$wsuri_csv = sprintf("/api/1/daily.txt?%s", http_build_query($arr));
$jobj = iemws_json("daily.json", $arr);

if ($mode == "monthly") {
if ($jobj === FALSE){
$htmlout = "<p>No data was found for this request.</p>";
}
else if ($mode == "monthly") {
$t->title = sprintf("%s Data Calendar for %s", $station, $nicemonthdate);
$db = array();
foreach ($jobj["data"] as $bogus => $row) {
Expand Down Expand Up @@ -246,7 +249,7 @@ for the peak winds are hopefully the local valid time
(<strong>{$metadata["tzname"]}</strong>) at the site. There
is a <a href="/request/daily.phtml?network={$network}">download interface</a> for most of this
summary information.</p>
<table class="table table-striped table-bordered" id="thetable">
<thead>
<tr>
Expand Down

0 comments on commit cabad57

Please sign in to comment.