1.9.4
Add City calculation Fix profile selection to new calcs
This commit is contained in:
+11
-5
@@ -122,13 +122,14 @@ export const POLLEN_TYPES = {
|
||||
// label - short display name
|
||||
// note - shown in column header tooltip to flag modified calculation
|
||||
export const UTCI_ENVIRONMENTS = {
|
||||
open: { shortLabel: null, label: 'Open / Exposed', dirFactor: 1.00, difFactor: 1.00, globFactor: 1.00, taOffset: 0.0, note: null },
|
||||
forest: { shortLabel: 'Forest', label: 'Forest / Woodland', dirFactor: 0.15, difFactor: 0.40, globFactor: 0.20, taOffset: -2.0, note: 'Canopy-shaded estimate - direct radiation reduced 85%, air temp adjusted for evapotranspiration cooling' },
|
||||
alpine: { shortLabel: 'Alpine', label: 'High Altitude / Alpine', dirFactor: 1.15, difFactor: 1.10, globFactor: 1.12, taOffset: -1.0, note: 'Alpine estimate assuming approx. 2000 m elevation - radiation enhanced ~15% through thinner atmosphere, adjusted for exposed ridge conditions' },
|
||||
open: { shortLabel: null, label: 'Grass / Open Field', dirFactor: 1.00, difFactor: 1.00, globFactor: 1.00, taOffset: 0.0, note: null },
|
||||
urban: { shortLabel: 'City', label: 'Town / City', dirFactor: 0.70, difFactor: 0.75, globFactor: 0.82, taOffset: 2.5, note: 'Urban heat island estimate - UHI raises air temp ~2–3 °C, building canyons reduce direct and diffuse solar load, reflections from concrete and glass partially offset sky-view reduction' },
|
||||
beach: { shortLabel: 'Beach', label: 'Beach / Lakeside', dirFactor: 1.12, difFactor: 1.06, globFactor: 1.10, taOffset: 0.0, note: 'Reflected radiation from water and sand surfaces increases effective solar load - no shade, higher UV dose' },
|
||||
river: { shortLabel: 'Riverbank', label: 'River / Riverbank', dirFactor: 0.50, difFactor: 0.60, globFactor: 0.55, taOffset: -2.5, note: 'Shaded riverbank estimate - canopy and valley walls reduce direct sun, evaporative cooling from water surface lowers apparent air temp' },
|
||||
desert: { shortLabel: 'Desert', label: 'Desert / Arid', dirFactor: 1.22, difFactor: 1.10, globFactor: 1.18, taOffset: 3.5, note: 'Extreme radiation load from high albedo sand and bare ground - ground-level heat significantly raises effective felt temperature' },
|
||||
forest: { shortLabel: 'Forest', label: 'Forest / Woodland', dirFactor: 0.15, difFactor: 0.40, globFactor: 0.20, taOffset: -2.0, note: 'Canopy-shaded estimate - direct radiation reduced 85%, air temp adjusted for evapotranspiration cooling' },
|
||||
openwater: { shortLabel: 'Open Water', label: 'Open Water', dirFactor: 1.14, difFactor: 1.08, globFactor: 1.12, taOffset: 0.0, note: 'Open water - full solar exposure with additional radiation reflected from the water surface, no shade or shelter, no ground heat contribution' },
|
||||
alpine: { shortLabel: 'Alpine', label: 'High Altitude / Alpine', dirFactor: 1.15, difFactor: 1.10, globFactor: 1.12, taOffset: -1.0, note: 'Alpine estimate assuming approx. 2000 m elevation - radiation enhanced ~15% through thinner atmosphere, adjusted for exposed ridge conditions' },
|
||||
desert: { shortLabel: 'Desert', label: 'Desert / Arid', dirFactor: 1.22, difFactor: 1.10, globFactor: 1.18, taOffset: 3.5, note: 'Extreme radiation load from high albedo sand and bare ground - ground-level heat significantly raises effective felt temperature' },
|
||||
};
|
||||
|
||||
// Maps OUTDOORS_VARIANTS keys to a default UTCI_ENVIRONMENTS key.
|
||||
@@ -139,11 +140,16 @@ export const VARIANT_DEFAULT_ENV = {
|
||||
forest: 'forest',
|
||||
park: 'forest',
|
||||
beach: 'beach',
|
||||
sailing: 'beach',
|
||||
sailing: 'openwater',
|
||||
hiking: 'alpine',
|
||||
wintersports:'alpine',
|
||||
fishing: 'river',
|
||||
naturist: 'beach',
|
||||
urban: 'urban',
|
||||
farming: 'open',
|
||||
construction:'urban',
|
||||
office: 'urban',
|
||||
windowcleaning:'urban',
|
||||
};
|
||||
|
||||
// Left-to-right order of the profile buttons in the top filter bar.
|
||||
|
||||
@@ -154,6 +154,9 @@ export function useAppState() {
|
||||
const hasIndoor = profile.cols['indoorT'] || profile.cols['managedT'];
|
||||
setIndoorMode(hasIndoor ? 'on' : 'off');
|
||||
setIndoorManaged(false);
|
||||
if (hasIndoor) setBuildingTypeAndSave('brick');
|
||||
const defaultEnv = VARIANT_DEFAULT_ENV[key];
|
||||
if (defaultEnv) setUtciEnvAndSave(defaultEnv);
|
||||
} else {
|
||||
// Custom profile initializes from config - blank slate, user picks columns.
|
||||
const customCols = FILTER_PROFILES.custom?.cols;
|
||||
|
||||
Reference in New Issue
Block a user