Lays the groundwork for a Day 2-7 propagation outlook driven by NCEP GEFS ensemble-mean output, picking up where HRRR's 18-hour horizon leaves off. - GefsClient: NOMADS URL builder, forecast-hour list (3h to +240, 6h to +384), ensemble-mean message inventory, and a Magnus dewpoint derivation (pgrb2a publishes RH rather than Td) - gefs_profiles table + GefsProfile schema mirroring hrrr_profiles so the scorer can run over rows from either source - Weather.upsert_gefs_profile/1 and upsert_gefs_profiles_batch/1 No worker or UI yet — those land in follow-up commits.
33 lines
1.1 KiB
Elixir
33 lines
1.1 KiB
Elixir
defmodule Microwaveprop.Repo.Migrations.CreateGefsProfiles do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:gefs_profiles, primary_key: false) do
|
|
add :id, :binary_id, primary_key: true
|
|
add :valid_time, :utc_datetime, null: false
|
|
add :lat, :float, null: false
|
|
add :lon, :float, null: false
|
|
add :run_time, :utc_datetime
|
|
add :forecast_hour, :integer
|
|
add :profile, {:array, :map}, default: []
|
|
add :pwat_mm, :float
|
|
add :surface_temp_c, :float
|
|
add :surface_dewpoint_c, :float
|
|
add :surface_pressure_mb, :float
|
|
add :surface_refractivity, :float
|
|
add :min_refractivity_gradient, :float
|
|
add :ducting_detected, :boolean, default: false
|
|
add :duct_characteristics, {:array, :map}
|
|
add :wind_u_mps, :float
|
|
add :wind_v_mps, :float
|
|
add :cloud_cover_pct, :float
|
|
add :precip_mm, :float
|
|
|
|
timestamps(type: :utc_datetime)
|
|
end
|
|
|
|
create unique_index(:gefs_profiles, [:lat, :lon, :valid_time])
|
|
create index(:gefs_profiles, [:valid_time])
|
|
create index(:gefs_profiles, [:run_time])
|
|
end
|
|
end
|