diff --git a/src/main.ts b/src/main.ts index 65ea711..01d8808 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2465,8 +2465,39 @@ function activateBoard(record: MountedBoard): void { // are: one honest station cannot describe a 600 km corridor. California uses // the local climatology model; the detailed SF and SoCal boards keep their // live observations. + // + /* + * And the merged board uses climatology too, which took a 400 in production + * to notice. + * + * `carriesMetroDetail` is true of it — it carries both metros' districts — + * so it asked, at `entry.city.center`, which is the middle of the *state*: + * `GET /api/v1/weather?lat=37.30&lng=-119.25` → `400 bad_request, "Nothing + * this deployment serves is near 37.3,-119.25"`. The API is right. What it + * serves is San Francisco and the Southland, five hundred and sixty + * kilometres apart, and the point midway between them is farm country in the + * Sierra foothills that no station on this deployment describes. + * + * The sky already had this problem and solved it by asking per source + * (`skyRegions`, above). Weather does not get the same answer, because the + * two feeds are not the same shape: aircraft from two regions *merge* — they + * are disjoint sets of objects in one sky — and two observations do not. One + * board cannot be simultaneously foggy at the Golden Gate and clear over + * Riverside, and picking either one and applying it statewide is a worse lie + * than the climatology model, which at least varies with latitude and season. + * + * So this follows the rule the comment above already states rather than + * inventing an exception to it: a board that spans more than one served + * region takes the model. The metros keep their live observations on their + * own boards, and the day the atmosphere is regional rather than per board, + * this is the line that changes. + */ + const spansManyWeatherRegions = ONE_CALIFORNIA && id === "california"; weatherWatch = - carriesMetroDetail(entry.city) && access.can.liveEnvironment && access.feeds?.weather + carriesMetroDetail(entry.city) && + !spansManyWeatherRegions && + access.can.liveEnvironment && + access.feeds?.weather ? tera.watchWeather(entry.city.center, () => { updateSun(); renderChrome();