Skip to content

Commit

Permalink
fix: add vtec ends constraint for ufn wwa
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Feb 5, 2024
1 parent 04c2a79 commit 6587b78
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions htdocs/plotting/auto/scripts/p52.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ def plotter(fdict):
df[col] = df[col].dt.tz_localize(ZoneInfo("UTC"))
df["wfo"] = station
df["endts"] = df[["maxexpire", "maxinitexpire"]].max(axis=1)
# Flood warnings, for example, could have an issuance until-further-notice
# which is not helpful for this plot, so don't allow a maxinitexpire
# to be 5 days greater than the maxexpire
df.loc[
(df["maxinitexpire"] - df["maxexpire"]).dt.total_seconds() > 432000,
"endts",
] = df["maxexpire"]
df["label"] = df.apply(
lambda x: vtec.get_ps_string(x["phenomena"], x["significance"]),
axis=1,
Expand Down

0 comments on commit 6587b78

Please sign in to comment.