Paul Pukite's climate and geosciences sites
git clone https://github.com/pukpr/pukpr.github.io
$env:max_iters=3
$env:align=1
$env:PYPATH=".."
python3 ..\lte_mlr.py ts.dat --cc --random --low 1940 --high 1970
The numbered subdirectories under examples/mlr/ contain optimized MLR model
parameters for each station. The script below summarizes the common-mode
parameter set shared across stations and the station-by-station excursions
relative to that common baseline. It works entirely from the model parameters
(not the raw data), which makes it easier to compare parametric excursions.
Run it from the repository root:
python3 examples/mlr/common_mode_analysis.py \
--params-root examples/mlr \
--station-metadata examples/IDCodeName.txt \
--out-dir results/common_mode_mlr
Outputs:
results/common_mode_mlr/common_mode_periods.csv β shared harmonic periods.results/common_mode_mlr/common_mode_params.csv β overall parameter means and spread.results/common_mode_mlr/station_excursions.csv β each stationβs parameter
deviations from the common-mode baseline.results/common_mode_mlr/top_excursions.csv β largest station excursions per
parameter/period to highlight where deviations are strongest.The fitted output CSVs include a latent forcing column that reflects the shared forcing contribution (the modeled latent layer used across stations). To visualize the shared forcing and group stations by similar MLR parameters, run:
python3 examples/mlr/common_mode_forcing_analysis.py \
--data-root examples/mlr \
--out-dir results/common_mode_forcing \
--groups 4 \
--low 1940 \
--high 1970
Outputs:
results/common_mode_forcing/common_mode_forcing.png β grouped forcing time-series plot.results/common_mode_forcing/common_mode_forcing_timeseries.csv β mean forcing per group.results/common_mode_forcing/forcing_group_assignments.csv β station-to-group mapping.To fit station-specific g() responses against an analytic common forcing (sample-and-hold + alias), run the alternative common-mode forcing fit script:
python3 examples/mlr/common_mode_forcing_fit.py \
--data-root examples/mlr \
--out-dir results/common_mode_forcing_fit \
--low 1940 \
--high 1970 \
--shift-candidates "0.0 0.5 -0.5" \
--dtw-weight 0.0
Outputs:
results/common_mode_forcing_fit/*_common_forcing_fit.csv β per-station time, observed, model, forcing, residual.results/common_mode_forcing_fit/*_common_forcing_fit.json β fitted coefficients and metrics.results/common_mode_forcing_fit/common_mode_forcing_fit_summary.csv β summary of fitted metrics across stations.description: NINO34 => NINO34 in PACIFIC

| config | location |
description: NINO4 => NINO4 in PACIFIC

| config | location |
description: Brest => BREST in FRANCE

| config | location |
description: Seattle => SEATTLE in UNITED STATES

| config | location |
description: Portland (ME) => PORTLAND (MAINE) in UNITED STATES

| config | location |
description: Los Angeles => LOS ANGELES in UNITED STATES

| config | location |
description: Aarhus => AARHUS in DENMARK

| config | location |
description: SOI at Darwin => Darwin SOI in PACIFIC

| config | location |
description: Indian Ocean Dipole => IOD in INDIAN

| config | location |
description: M6, Atlantic Nino => M6, Atlantic Nino in ATLANTIC

| config | location |
description: Tropical North Atlantic Oscillation => TNA Tropical N. Atlantic in ATLANTIC

| config | location |
description: San Francisco => SAN FRANCISCO in UNITED STATES

| config | location |
description: Helsinki => HELSINKI in FINLAND

| config | location |
description: Newlyn => NEWLYN in UNITED KINGDOM

| config | location |
description: Pensacola => PENSACOLA in UNITED STATES

| config | location |
description: Stockholm => STOCKHOLM in SWEDEN

| config | location |
description: MSL at Ft. Denison, Sydney β sites 196+65 => Ft Denison in PACIFIC

| config | location |
description: Indian Ocean Dipole East => IOD East in INDIAN

| config | location |
description: North Atlantic Oscillation => NAO in ATLANTIC

| config | location |
description: Tropical South Atlantic Oscillation => TSA Tropical S. Atlantic in ATLANTIC

| config | location |
description: Warnemunde => WARNEMUNDE 2 in GERMANY

| config | location |
description: Honolulu => HONOLULU in UNITED STATES

| config | location |
description: Ketchikan => KETCHIKAN in UNITED STATES

| config | location |
description: Trieste => TRIESTE in ITALY

| config | location |
description: Kemi => KEMI in FINLAND

| config | location |
description: La Jolla => LA JOLLA (SCRIPPS PIER) in UNITED STATES

| config | location |
description: Atlantic Multidecadal Oscillation => AMO in ATLANTIC

| config | location |
description: Wl Nino Modoki => EMI ENSO Modoki Index in PACIFIC

| config | location |
description: Indian Ocean Dipole West => IOD West in INDIAN

| config | location |
description: NINO12 => NINO12 in PACIFIC

| config | location |
description: Pacific Decadal Oscillation => PDO in PACIFIC

| config | location |
description: Fremantle => FREMANTLE in AUSTRALIA

| config | location |
description: Galveston => GALVESTON II, PIER 21, TX in UNITED STATES

| config | location |
description: Charleston => CHARLESTON I in UNITED STATES

| config | location |
description: Poti => POTI in GEORGIA

| config | location |
description: Arctic Oscillation => AO in ARCTIC

| config | location |
description: ENSO reconstruction between 210-220 longitude => ic3tsfc (Reconstruction) in PACIFIC

| config | location |
description: M4, North Pacific Gyre Oscillation => M4, N. Pacific Gyre Oscillation in PACIFIC

| config | location |
description: NINO3 => NINO3 in PACIFIC

| config | location |
description: Quasi Biennial Oscillation at 30hBar => QBO 30 Equatorial in WORLD

| config | location |
description: Cuxhaven => CUXHAVEN 2 in GERMANY

| config | location |
description: Wismar => WISMAR 2 in GERMANY

| config | location |
description: Sevastopol => in

| config | location |
description: Korsor => KORSOR in DENMARK

| config | location |
description: Hornbaek => HORNBAEK in DENMARK

| config | location |
description: Mantyluo => MANTYLUOTO in FINLAND

| config | location |
description: Smogen => SMOGEN in SWEDEN

| config | location |
description: Pietarsaari => PIETARSAARI / JAKOBSTAD in FINLAND

| config | location |
description: Swinoujscie => SWINOUJSCIE in POLAND

| config | location |
description: Vlissingen => VLISSINGEN in NETHERLANDS

| config | location |
description: Furuogrund => FURUOGRUND in SWEDEN

| config | location |
description: Hoek Van Holland => HOEK VAN HOLLAND in NETHERLANDS

| config | location |
description: Den Helder => DEN HELDER in NETHERLANDS

| config | location |
description: West-Terschelling => WEST-TERSCHELLING in NETHERLANDS

| config | location |
description: Turku => TURKU / ABO in FINLAND

| config | location |
description: Delfzijl => DELFZIJL in NETHERLANDS

| config | location |
description: Raahe => RAAHE / BRAHESTAD in FINLAND

| config | location |
description: Foglo => FOGLO / DEGERBY in Γβ¦LAND ISLANDS

| config | location |
description: Harlingen => HARLINGEN in NETHERLANDS

| config | location |
description: Kaskinen => KASKINEN / KASKO in FINLAND

| config | location |
description: Tregde => TREGDE in NORWAY

| config | location |
description: Ijmuiden => IJMUIDEN in NETHERLANDS

| config | location |
description: Oscarsborg => OSCARSBORG in NORWAY

| config | location |
description: KLAGSHAMN => KLAGSHAMN in SWEDEN

| config | location |
description: Stavanger => STAVANGER in NORWAY

| config | location |
description: Holyhead => HOLYHEAD in UNITED KINGDOM

| config | location |
description: Vaasa => VAASA / VASA in FINLAND

| config | location |
description: Bergen => BERGEN in NORWAY

| config | location |
description: Oslo => OSLO in NORWAY

| config | location |
description: Landsort => LANDSORT in SWEDEN

| config | location |
description: Olands => OLANDS NORRA UDDE in SWEDEN

| config | location |
description: Kungholmsfort => KUNGSHOLMSFORT in SWEDEN

| config | location |
description: Hanko => HANKO / HANGO in FINLAND

| config | location |
description: Ystad => YSTAD in SWEDEN

| config | location |
description: Varberg => VARBERG in SWEDEN

| config | location |
description: Oulu => OULU / ULEABORG in FINLAND

| config | location |
description: Esbjerg => ESBJERG in DENMARK

| config | location |
description: Fredericia => FREDERICIA in DENMARK

| config | location |
description: Kobenhavn => KOBENHAVN in DENMARK

| config | location |
description: Ratan => RATAN in SWEDEN

| config | location |
description: Hirtshals => HIRTSHALS in DENMARK

| config | location |
description: Frederikshavn => FREDERIKSHAVN in DENMARK

| config | location |
description: North Shields => NORTH SHIELDS in UNITED KINGDOM

| config | location |
description: Slipshavn => SLIPSHAVN in DENMARK

| config | location |
$name="183"
$name1=$name + "d"
cp data\$name1.dat .\$name\ts.dat
cp data\$name1.dat.p .\$name\ts.dat.p
cd $name
python3 ..\lte_mlr.py ts.dat --cc --random --low 1940 --high 1970
cd ..
cp nino34\index.md $name
python3 ..\..\pysindy\plot_lte_scatter.py --header --out lte.png --lo 1940 --high 1970
python3 ..\..\..\..\python\plot_sinusoids_from_json_with_bars.py --out-ts ts-sin.png --out-bars ts-bar.png --start 1920-01 --end 2030-01 ..\warne.dat.p ts.dat.p
python3 ..\..\pysindy\cc.py --low 1940 --high 1970