intro=TEXT_SLIDE("Warm air, warm water, and a river with memory","Bonneville, McNary and Lower Granite: an exploratory study of temperature, Chinook passage and shared migration patterns.","We examine the available record from 2000, illustrate daily air-water relationships in summer 2024, and compare three-equation models on a fixed 2025 sample.") climate_note=TEXT_SLIDE("The climate question needs two time scales","Within a summer, hot days and warm water share a seasonal cycle. Across summers, warmer mean air temperatures also accompany warmer mean water temperatures.","Earlier exact-date calculations for 13 complete June-August air summers between 2007 and 2024 gave air-water correlations of 0.863 at Bonneville, 0.847 at McNary and 0.803 at Lower Granite. These are descriptive associations, not attribution of a long-term trend.") water_record=SERIES_BETWEEN(LIST(DART("BON","TEMPERATURE"),DART("MCN","TEMPERATURE"),DART("LWG","TEMPERATURE")),20000101,20251231) water_history=SET_TITLE(LINE_CHART(water_record),"Available daily water temperatures, 2000-2025 - Celsius") record_note=TEXT_SLIDE("The long record is not a uniform warming story","Coverage differs by dam, and the historical Lower Granite series does not follow the same trend as the two Columbia River dams. Check source continuity and river operations before interpreting historical changes.","The paired summer results concern covariation. They do not establish that all three dams warmed at the same rate, or that air temperature alone explains water temperature.") air2024=SET_NAME((AQS("41","059","1003","62101",20240601,20240831,1,"1 HOUR","","No Events")-32)*5/9,"Hermiston mean air temperature C") bon_water2024=SERIES_BETWEEN(DART("BON","TEMPERATURE"),20240601,20240831) mcn_water2024=SERIES_BETWEEN(DART("MCN","TEMPERATURE"),20240601,20240831) lwg_water2024=SERIES_BETWEEN(DART("LWG","TEMPERATURE"),20240601,20240831) air_bon=SET_TITLE(POLY_SCATTER(LIST(bon_water2024,air2024),1),"Summer 2024: Bonneville water versus Hermiston air") air_mcn=SET_TITLE(POLY_SCATTER(LIST(mcn_water2024,air2024),1),"Summer 2024: McNary water versus Hermiston air") air_lwg=SET_TITLE(POLY_SCATTER(LIST(lwg_water2024,air2024),1),"Summer 2024: Lower Granite water versus Hermiston air") air_note=TEXT_SLIDE("Reading the air-water scatter plots","Each point is a daily observation in June-August 2024. Hermiston Municipal Airport, Oregon, is one regional air-temperature proxy, not a local air station at every dam. AQS Fahrenheit values are converted to Celsius.","These daily plots are regenerated by this script. The 13-summer correlations reported earlier are a separate aggregation from our prior analysis. Serial dependence and seasonality mean daily points are not independent replications.") route_note=TEXT_SLIDE("Distance makes a plausible lag, not a fish tag","Approximate river distances: Bonneville to McNary 236 km; McNary to Lower Granite 225 km; Bonneville to Lower Granite 461 km. The Lower Granite route enters the Snake River.","We use a preselected 5-13 day Bonneville passage average as an exploratory predictor of later McNary counts. Stock composition, tributary destinations, intervening dams and river conditions prevent treating aggregate lags as individual travel times.") fish=SAME_DATE_RANGE(LIST(DART("BON","CHINOOK"),DART("MCN","CHINOOK"),DART("LWG","CHINOOK"))) fish2025=SERIES_BETWEEN(fish,20250401,20251031) bon=EXTRACT(fish2025,series:0) mcn=EXTRACT(fish2025,series:1) lwg=EXTRACT(fish2025,series:2) bon_lag5=LAG(bon,5) bon_lag13=LAG(bon,13) bon_arrival=(LAG(bon,5)+LAG(bon,6)+LAG(bon,7)+LAG(bon,8)+LAG(bon,9)+LAG(bon,10)+LAG(bon,11)+LAG(bon,12)+LAG(bon,13))/9 bon_arrival=SET_NAME(bon_arrival,"Bonneville passage mean lag 5 to 13 days") all_data=SERIES_BETWEEN(SAME_DATE_RANGE(LIST(bon,DART("BON","TEMPERATURE"),DART("BON","OUTFLOW"),DART("BON","SPILL"),mcn,DART("MCN","TEMPERATURE"),DART("MCN","OUTFLOW"),DART("MCN","SPILL"),lwg,DART("LWG","TEMPERATURE"),DART("LWG","OUTFLOW"),DART("LWG","SPILL"),bon_arrival)),20250414,20250924) bon_data_months=ADD_MONTHLY_DUMMY_SERIES(LIST(EXTRACT(all_data,series:0),EXTRACT(all_data,series:1),EXTRACT(all_data,series:2),EXTRACT(all_data,series:3))) bon_data=LIST(EXTRACT(bon_data_months,series:0),EXTRACT(bon_data_months,series:1),EXTRACT(bon_data_months,series:2),EXTRACT(bon_data_months,series:3),EXTRACT(bon_data_months,series:7),EXTRACT(bon_data_months,series:8),EXTRACT(bon_data_months,series:9),EXTRACT(bon_data_months,series:10),EXTRACT(bon_data_months,series:11)) mcn_base_data_months=ADD_MONTHLY_DUMMY_SERIES(LIST(EXTRACT(all_data,series:4),EXTRACT(all_data,series:5),EXTRACT(all_data,series:6),EXTRACT(all_data,series:7))) mcn_base_data=LIST(EXTRACT(mcn_base_data_months,series:0),EXTRACT(mcn_base_data_months,series:1),EXTRACT(mcn_base_data_months,series:2),EXTRACT(mcn_base_data_months,series:3),EXTRACT(mcn_base_data_months,series:7),EXTRACT(mcn_base_data_months,series:8),EXTRACT(mcn_base_data_months,series:9),EXTRACT(mcn_base_data_months,series:10),EXTRACT(mcn_base_data_months,series:11)) mcn_migration_data_months=ADD_MONTHLY_DUMMY_SERIES(LIST(EXTRACT(all_data,series:4),EXTRACT(all_data,series:5),EXTRACT(all_data,series:6),EXTRACT(all_data,series:7),EXTRACT(all_data,series:12))) mcn_migration_data=LIST(EXTRACT(mcn_migration_data_months,series:0),EXTRACT(mcn_migration_data_months,series:1),EXTRACT(mcn_migration_data_months,series:2),EXTRACT(mcn_migration_data_months,series:3),EXTRACT(mcn_migration_data_months,series:4),EXTRACT(mcn_migration_data_months,series:8),EXTRACT(mcn_migration_data_months,series:9),EXTRACT(mcn_migration_data_months,series:10),EXTRACT(mcn_migration_data_months,series:11),EXTRACT(mcn_migration_data_months,series:12)) lwg_data_months=ADD_MONTHLY_DUMMY_SERIES(LIST(EXTRACT(all_data,series:8),EXTRACT(all_data,series:9),EXTRACT(all_data,series:10),EXTRACT(all_data,series:11))) lwg_data=LIST(EXTRACT(lwg_data_months,series:0),EXTRACT(lwg_data_months,series:1),EXTRACT(lwg_data_months,series:2),EXTRACT(lwg_data_months,series:3),EXTRACT(lwg_data_months,series:7),EXTRACT(lwg_data_months,series:8),EXTRACT(lwg_data_months,series:9),EXTRACT(lwg_data_months,series:10),EXTRACT(lwg_data_months,series:11)) bon_reg=REGRESSION(bon_data) mcn_base=REGRESSION(mcn_base_data) mcn_migration=REGRESSION(mcn_migration_data) lwg_reg=REGRESSION(lwg_data) base_system=SIMU_REGRESSION(bon_reg,mcn_base,lwg_reg) migration_system=SIMU_REGRESSION(bon_reg,mcn_migration,lwg_reg) base_sur=SUR_REGRESSION(base_system) migration_sur=SUR_REGRESSION(migration_system) passage_chart=SET_TITLE(LINE_CHART(fish2025),"Daily Chinook counts at three dams - April-October 2025") arrival_chart=SET_TITLE(LINE_CHART(LIST(mcn,bon_arrival)),"McNary counts and Bonneville counts averaged over lags 5-13") model_note=TEXT_SLIDE("Three equations on one fixed sample","All models use April 14-September 24, 2025, the 164-day common sample established in our earlier run. Each equation includes local water temperature, outflow, spill, an intercept and May-September indicators; April is the reference month.","The baseline contains three local equations. The migration specification adds the Bonneville 5-13 day lag average only to McNary. A changing predictor set makes this a useful SUR comparison. SAME_DATE_RANGE may interpolate source data, so alignment does not certify that every underlying reading was observed.") sur_note=TEXT_SLIDE("What SUR contributes","SIMU_REGRESSION collects the three equations. SUR_REGRESSION estimates them jointly using contemporaneous cross-equation error covariance.","SUR can improve efficiency when predictor sets differ and equation errors covary. It does not automatically eliminate within-equation serial correlation. Interpret conventional t statistics cautiously; where supplied, HAC diagnostics address inference rather than changing the residual sequence.") base_label=TEXT_SLIDE("Baseline SUR","Three local passage equations: temperature, outflow, spill and monthly controls.","The following output is generated by SUR_REGRESSION, including its system summaries and equation results.") migration_label=TEXT_SLIDE("Migration-augmented SUR","The same three-equation system, with the lagged Bonneville passage predictor added to McNary.","Compare the McNary coefficient, fit and Durbin-Watson statistic with the baseline on the identical sample. A better fit is evidence of useful predictive structure, not proof of a causal temperature or migration effect.") ols_label=TEXT_SLIDE("The direct McNary comparison","The next two model tables show separate-equation OLS before and after adding the migration predictor.","The earlier run improved McNary R-squared from about 0.524 to 0.686 and DW from 0.611 to 0.826. These are reference values; the displayed model tables are the results from this run.") mcn_base_model=EXTRACT(mcn_base,model) mcn_migration_model=EXTRACT(mcn_migration,model) mcn_base_fit=EXTRACT(mcn_base,actualvsfitted) mcn_migration_fit=EXTRACT(mcn_migration,actualvsfitted) mcn_base_acf=EXTRACT(mcn_base,autocorrelation) mcn_migration_acf=EXTRACT(mcn_migration,autocorrelation) mcn_base_hac=EXTRACT(mcn_base,hac) mcn_migration_hac=EXTRACT(mcn_migration,hac) residual_note=TEXT_SLIDE("Autocorrelation is part of the result","The following fit and autocorrelation charts are for the separate-equation McNary regressions, before and after the migration predictor. They are not SUR residual plots.","River conditions and fish passage persist across days. Remaining dependence limits conventional inference and independent-day interpretations. We report it and retain this exploratory model rather than selecting more lags until DW approaches two.") spectral_note=TEXT_SLIDE("Spectral analysis: shared cycles and phase","Welch transfer functions compare daily passage series in April-October 2025. The first argument is the response and the second is the input: McNary versus Bonneville, Lower Granite versus Bonneville, and Lower Granite versus McNary.","A 64-day HANN window with 50 percent overlap provides five segments from 214 days. Focus on coherent bands and consistent phase patterns. Periods are days for these daily series. Phase wraps, short samples and common seasonality can produce misleading travel-time readings.") spec_bon_mcn=SPECTRAL_TRANSFER_FUNCTION_WELCH(mcn,bon,64,0.5,HANN) spec_bon_lwg=SPECTRAL_TRANSFER_FUNCTION_WELCH(lwg,bon,64,0.5,HANN) spec_mcn_lwg=SPECTRAL_TRANSFER_FUNCTION_WELCH(lwg,mcn,64,0.5,HANN) resid_bon=EXTRACT(bon_reg,residuals) resid_mcn=EXTRACT(mcn_migration,residuals) residual_spectral_note=TEXT_SLIDE("What remains after the regressions","The final transfer function compares Bonneville and migration-augmented McNary OLS residuals on the common 164-day sample, using the same 64-day window and 50 percent overlap.","Coherence here indicates shared variation not removed by the chosen regressors. It does not establish independence when low, nor cure serial correlation when high. This shorter sample provides only four Welch segments.") spec_residual=SPECTRAL_TRANSFER_FUNCTION_WELCH(resid_mcn,resid_bon,64,0.5,HANN) conclusion=TEXT_SLIDE("A useful contribution without analysis paralysis","Warmer air accompanies warmer water; migration-related predictors help explain daily passage; the three dams share variation across both equations and frequencies.","The contribution is an integrated, reproducible exploratory analysis. It does not identify individual survival, attribute trends to climate change alone, or turn aggregate phase lags into tagged-fish travel times. Remaining autocorrelation is reported openly.") sources=TEXT_SLIDE("Data and interpretation","Water temperature, Chinook passage, outflow and spill: Columbia River DART. Air: EPA AQS parameter 62101, state 41, county 059, site 1003; one-hour sample duration, daily mean, No Events selection.","DART metadata: https://www.cbr.washington.edu/dart/metadata/river . Distance and passage-rate context: CRITFC 2013 adult passage report, Table 10, https://www.critfc.org/wp-content/uploads/2015/05/15-02.pdf . Distances and lag ranges are approximate.") SLIDESHOW(intro,climate_note,water_history,record_note,air_note,air_bon,air_mcn,air_lwg,route_note,passage_chart,arrival_chart,model_note,sur_note,base_label,base_sur,migration_label,migration_sur,ols_label,mcn_base_model,mcn_migration_model,mcn_base_hac,mcn_migration_hac,residual_note,mcn_base_fit,mcn_migration_fit,mcn_base_acf,mcn_migration_acf,spectral_note,spec_bon_mcn,spec_bon_lwg,spec_mcn_lwg,residual_spectral_note,spec_residual,conclusion,sources)