diff --git a/tools/transpile-engine/transpile.py b/tools/transpile-engine/transpile.py index 5df57350..11da0be9 100644 --- a/tools/transpile-engine/transpile.py +++ b/tools/transpile-engine/transpile.py @@ -91,7 +91,7 @@ CLIMATE_DEFAULTS: dict[str, float] = { "lake_thermal_conductivity": 0.05, "river_moisture_transport": 0.075, "mountain_rain_shadow_block": 0.9, - "solar_min": 0.15, + "solar_min": 0.05, "solar_max": 0.70, } @@ -145,7 +145,7 @@ const CLIMATE_DEFAULTS: Record = { lake_thermal_conductivity: 0.05, river_moisture_transport: 0.075, mountain_rain_shadow_block: 0.9, - solar_min: 0.15, + solar_min: 0.05, solar_max: 0.70, } @@ -714,6 +714,19 @@ def _emit_aerosol_forcing() -> str: const aerosol_cfg = ((this.spec['aerosol'] ?? {}) as Record) if (Object.keys(aerosol_cfg).length === 0) return const { tiles, width: w, height: h } = grid + + // Phase 0: Natural aerosol sources — background, desert dust, volcanic outgassing + const bg = this.p('aerosol_background', 0.002) + const dustRate = this.p('aerosol_desert_dust', 0.005) + const volcanicRate = this.p('aerosol_volcanic_outgas', 0.015) + for (let i = 0; i < tiles.length; i++) { + const tile = tiles[i] + let inject = bg + if (tile.biome_id === 'desert') inject += dustRate + else if (tile.biome_id === 'volcano') inject += volcanicRate + ;(tile as any).sulfate_aerosol = Math.max(0.0, ((tile as any).sulfate_aerosol ?? 0) + inject) + } + let any_aerosol = false for (let i = 0; i < tiles.length; i++) { if (((tiles[i] as any).sulfate_aerosol ?? 0) > 0.001) { any_aerosol = true; break } @@ -930,7 +943,7 @@ def assemble(fns: dict[str, dict[str, str]]) -> str: # temperature band is controlled by climate_params.json, not hardcoded. result = result.replace( "solarByRow(row, h)", - "solarByRow(row, h, this.p('solar_min', 0.15), this.p('solar_max', 0.70))", + "solarByRow(row, h, this.p('solar_min', 0.05), this.p('solar_max', 0.70))", ) return result