diff --git a/lib/microwaveprop/propagation/recalibrator.ex b/lib/microwaveprop/propagation/recalibrator.ex index c7705892..f082516c 100644 --- a/lib/microwaveprop/propagation/recalibrator.ex +++ b/lib/microwaveprop/propagation/recalibrator.ex @@ -29,6 +29,13 @@ defmodule Microwaveprop.Propagation.Recalibrator do require Logger + # Nx is `only: [:dev, :test]` in mix.exs because the recalibrator is a + # research / weight-fitting tool that never runs in prod (no scheduled + # job, no cron, no LiveView entry point). Silence the prod-compile + # warnings about Nx.* being undefined — this module wouldn't be called + # without a developer explicitly invoking it. + @compile {:no_warn_undefined, Nx} + @factor_keys ~w(humidity time_of_day td_depression refractivity sky season wind rain pwat pressure)a @doc """ diff --git a/lib/microwaveprop/weather/frontal_analysis.ex b/lib/microwaveprop/weather/frontal_analysis.ex index 94f08526..00f9b3b4 100644 --- a/lib/microwaveprop/weather/frontal_analysis.ex +++ b/lib/microwaveprop/weather/frontal_analysis.ex @@ -21,6 +21,11 @@ defmodule Microwaveprop.Weather.FrontalAnalysis do All grid math uses Nx for vectorized 2D operations. """ + # Nx is `only: [:dev, :test]` in mix.exs. This module is a research + # tool — no prod code path invokes it — so silence the prod-compile + # warnings about Nx.* being undefined. + @compile {:no_warn_undefined, Nx} + @doc """ Detect fronts from a 2D grid of surface temperature and pressure.