Make HRRR base URL configurable, default to skippy proxy in dev
This commit is contained in:
parent
20eb559bb0
commit
5aeec4f55e
2 changed files with 7 additions and 2 deletions
|
|
@ -95,6 +95,9 @@ config :microwaveprop, srtm_tiles_dir: Path.expand("~/srtm/tiles")
|
|||
# Cache raw HRRR GRIB2 files locally (dev only — do not delete)
|
||||
config :microwaveprop, hrrr_cache_dir: Path.expand("~/hrrr")
|
||||
|
||||
# Proxy HRRR downloads through local caching nginx (set to nil to use S3 directly)
|
||||
config :microwaveprop, hrrr_base_url: "http://skippy:8080"
|
||||
|
||||
# Freshness monitor watches for stale propagation scores
|
||||
config :microwaveprop, start_freshness_monitor: true
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ defmodule Microwaveprop.Weather.HrrrClient do
|
|||
|
||||
require Logger
|
||||
|
||||
@hrrr_base "https://noaa-hrrr-bdp-pds.s3.amazonaws.com"
|
||||
@hrrr_base_default "https://noaa-hrrr-bdp-pds.s3.amazonaws.com"
|
||||
|
||||
defp hrrr_base, do: Application.get_env(:microwaveprop, :hrrr_base_url, @hrrr_base_default)
|
||||
|
||||
# Fine-grained levels below 900mb (~1km) for duct detection, plus standard upper levels.
|
||||
# Every 25mb from 1000-900 for ~80m vertical spacing near surface.
|
||||
|
|
@ -110,7 +112,7 @@ defmodule Microwaveprop.Weather.HrrrClient do
|
|||
:pressure -> "hrrr.t#{hour_str}z.wrfprsf#{fh_str}.grib2"
|
||||
end
|
||||
|
||||
"#{@hrrr_base}/hrrr.#{date_str}/conus/#{file}"
|
||||
"#{hrrr_base()}/hrrr.#{date_str}/conus/#{file}"
|
||||
end
|
||||
|
||||
def parse_idx(text) do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue