# KMDT / KCXY Station Bias Characterization
## Harrisburg International Airport vs Capital City Airport — South-Central Pennsylvania

**CPA Weather Lab | Independent Climate Research | Camp Hill, PA**  
**Analysis Period:** 1948–1965 (Cooperative Observer) + 2001–2025 (ASOS)  
**Data Sources:** GHCND, IEM ASOS Daily, IEM ASOS Hourly (four files totaling ~750,000 observations)

---

## 1. Station Metadata and Physical Context

| Parameter | KMDT (Harrisburg Intl) | KCXY (Capital City) |
|-----------|----------------------|---------------------|
| GHCND ID | USW00014711 | USW00014751 |
| Latitude | 40.1962°N | 40.2171°N |
| Longitude | 76.7725°W | 76.8515°W |
| Elevation | 91.1 m | 106.0 m |
| Siting | Susquehanna River floodplain | Upland terrace |
| Separation | — | 3.3 statute miles |

MDT sits 14.9 meters lower than CXY in the Susquehanna River floodplain. This elevation and siting difference is the root cause of nearly every systematic bias identified in this analysis. The Susquehanna River — one of the largest rivers in the eastern United States — runs within roughly 0.5 miles of MDT and directly influences its temperature, dewpoint, humidity, fog frequency, and precipitation climate relative to the upland CXY site.

---

## 2. Data Architecture and Quality Control

### 2.1 Sources by Variable

| Variable | Source | Era | Availability |
|----------|--------|-----|--------------|
| PRCP, TMAX, TMIN, SNOW | GHCND | 1941–1965, 2001–2025 | 99.5–100% |
| AWND, WSF2, WSF5, WDF2, WDF5 | GHCND | 2001–2025 | 93–100% |
| Max Dewpoint, Avg/Min/Max RH | IEM ASOS daily | 1948–1965, 2001–2025 | 99.8–100% |
| Hourly temp, wind, vis, wxcodes | IEM ASOS hourly | 1948–1965, 2001–2025 | 93–100% |

### 2.2 Precipitation Corrections Applied

**MDT March 2017 gauge malfunctions:**
- 2017-03-14: GHCND raw 1.73" → corrected 0.7554" (CXY × monthly ratio method; validated against MRMS QPE and 3 surrounding COOP stations)
- 2017-03-15: GHCND raw 0.02" → corrected 0.2100" (IDW interpolation from surrounding network)

**CXY ASOS snow undercatch (11 events, 2005–2017):**  
GHCND and IEM both showed 0.00" on dates where MDT recorded measurable snowfall and MRMS QPE confirmed precipitation at both sites. Each was corrected to MDT × monthly mean liquid precip ratio, consistent with the measured snow-to-liquid ratios for each event.

### 2.3 Known Data Gaps

- **CXY snowfall modern era:** Completely absent from both GHCND and IEM for 2001–2025. ASOS at CXY does not reliably measure snowfall accumulation. No modern CXY/MDT snow ratio analysis is possible.
- **MDT min dewpoint artifact:** IEM records 32.0°F exactly as minimum dewpoint on 164 days (1948–1965). Of these, 33 are confirmed artifacts (CXY simultaneously showed >40°F). These were reconstructed using CXY + monthly median offset. The remaining 131 ambiguous cases were excluded from min dewpoint analysis. **Decision: use max dewpoint only for all dewpoint analysis.**
- **Early era MSLP:** Sea level pressure available only at synoptic hours (10.9% of early hourly record) vs 99.3% modern.

### 2.4 Statistical Methodology

All bias statistics use **bootstrap resampling** (n=1,000 iterations, seed=42) to compute 95% confidence intervals on the monthly median ratio or offset. Bootstrap was chosen over parametric CIs because precipitation ratios and temperature offsets are not normally distributed and have varying dispersion by season. Monthly medians were computed from annual values (one ratio or offset per year per calendar month), giving 17–25 independent annual observations per month depending on era.

**Mann-Kendall trend tests** were applied to the annual offset/ratio series for each variable using the `pymannkendall` package. Tests were run separately for the early period, modern period, and combined series. The combined series includes the 35-year gap, which can affect MK results — this is noted in the interpretation of each variable.

---

## 3. Precipitation Analysis

### 3.1 Key Finding
**MDT is persistently wetter than CXY in both eras.** Annual median ratio = 1.066 (early) and 1.084 (modern). MDT receives approximately 7–8% more liquid equivalent precipitation than CXY measured over the full record.

### 3.2 Monthly Ratio Summary

| Month | Early Median | Early 95% CI | Modern Median | Modern 95% CI | CI Overlap? |
|-------|-------------|-------------|--------------|--------------|-------------|
| Jan | 1.110 | [1.018, 1.200] | 1.123 | [1.094, 1.168] | YES |
| Feb | 1.039 | [0.919, 1.150] | 1.063 | [1.011, 1.123] | YES |
| Mar | 1.128 | [1.035, 1.246] | 1.112 | [1.052, 1.168] | YES |
| Apr | 1.083 | [0.963, 1.195] | 1.117 | [1.063, 1.175] | YES |
| May | 1.069 | [0.968, 1.153] | 1.069 | [0.992, 1.138] | YES |
| Jun | 1.072 | [0.930, 1.120] | 1.068 | [0.916, 1.254] | YES |
| **Jul** | **0.873** | [0.710, 1.000] | **1.110** | [1.015, 1.234] | **NO** |
| Aug | 0.951 | [0.827, 1.081] | 1.093 | [1.013, 1.183] | YES |
| Sep | 1.064 | [0.938, 1.191] | 1.074 | [0.993, 1.148] | YES |
| Oct | 1.091 | [0.972, 1.214] | 1.053 | [0.985, 1.125] | YES |
| Nov | 1.127 | [1.024, 1.229] | 1.113 | [1.057, 1.163] | YES |
| Dec | 1.105 | [0.962, 1.197] | 1.065 | [1.024, 1.139] | YES |

**July is the only non-overlapping month.** The early era shows MDT slightly drier than CXY in July (0.873), while the modern era shows MDT clearly wetter (1.110). This is likely related to convective storm track differences combined with the shift from cooperative observer precipitation measurement to ASOS heated tipping bucket during summer convective events.

### 3.3 Stability
Mann-Kendall test on the combined annual ratio series: **no trend (p=0.143)**. The MDT wet bias is a stationary physical feature that has not grown or shrunk over the period of record. This is the strongest possible outcome for homogenization purposes — the correction factor is stable.

### 3.4 Physical Drivers
The MDT wet bias reflects several reinforcing mechanisms:
1. **Susquehanna moisture enhancement (~3–4%):** River evaporation into the boundary layer increases the moisture available for precipitation at MDT vs the upland CXY site
2. **Valley terrain convergence (~2–3%):** The Susquehanna Valley creates weak low-level convergence that can locally enhance precipitation at MDT
3. **Frozen precipitation gauge differences (~2–3%):** ASOS heated tipping bucket at MDT's lower, warmer floodplain converts more marginal snow events to liquid measurement vs CXY at higher, colder elevation
4. **Gauge wind exposure (~1–2%):** Gauge siting differences affect wind-induced undercatch

### 3.5 Homogenization Recommendation
**Use modern monthly ratios for pre-1991 record merger.** Annual ratio 1.084 (modern) is the best defensible adjustment factor. Monthly factors range from 0.87 (July) to 1.12 (November). The early era validates the direction and approximate magnitude of the modern factors. July should be flagged as uncertain and excluded from any analysis requiring high precision.

---

## 4. Temperature Analysis

### 4.1 TMAX
MDT maximum temperature shows **a sign reversal between eras** that is the most striking finding in the temperature analysis. In the early cooperative observer era (1948–1965), MDT ran warmer than CXY during summer months (June offset: +0.667°F, July: +0.758°F). In the modern ASOS era (2001–2025), MDT is consistently cooler than CXY in every month (June: -0.330°F, July: -0.187°F).

This sign reversal is assessed as an **instrumentation era artifact** rather than a real physical change. Cooperative observer thermometer shelters had different exposure characteristics than ASOS hygrothermometer siting standards. The Mann-Kendall test on the combined TMAX offset series shows a significant decreasing trend (p=0.000, Tau=-0.504), meaning MDT TMAX has been progressively cooling relative to CXY across both eras.

**Implication:** Do not apply a fixed TMAX offset for homogenization. The TMAX relationship is not stable across eras. Apply era-specific TMAX factors only.

### 4.2 TMIN
MDT minimum temperature shows a **physically robust warm-season warm bias** that is confirmed in both eras. MDT runs 0.7–1.1°F warmer overnight from May through October in both the early and modern periods. This is the **Susquehanna River thermal storage signature** — the river absorbs solar energy through summer and releases it at night, keeping MDT's floodplain boundary layer warmer than the upland CXY site during overnight hours.

The diurnal temperature cycle analysis (from hourly IEM data) confirms this: MDT and CXY temperatures converge near solar noon when boundary layer mixing is strong, then diverge at night as the river's thermal influence asserts itself.

Winter months (December–January–March) show a TMIN sign reversal similar to TMAX — MDT is warmer overnight in the early era but cooler in the modern era during winter. This is also assessed as an instrumentation artifact combined with cold air drainage physics: MDT's floodplain position causes cold air pooling in winter when the river's thermal influence is weaker.

**Implication:** Use warm-season TMIN offsets (May–October) for homogenization. Flag winter months as uncertain.

### 4.3 CI Overlap Summary
- TMAX: CIs overlap in 8 of 12 months (June, May, January, March do not overlap — sign reversal months)
- TMIN: CIs overlap in 9 of 12 months (January, March, December do not overlap)

---

## 5. Dewpoint and Humidity Analysis

### 5.1 Max Dewpoint
**MDT is consistently moister than CXY in every month of both eras.** This is the most physically interpretable and methodologically clean finding in the analysis. Max dewpoint source is IEM ASOS daily, which is 100% complete for both stations in both periods. Min dewpoint was excluded due to the 32°F floor artifact at MDT.

Monthly offsets range from +1.8°F (October, modern) to +3.5°F (March, early). The seasonal pattern is physically coherent:
- **Peak in late winter/early spring (Feb–Apr):** River-to-air temperature differential is greatest when the river remains liquid but air temperatures are near freezing. Maximum evaporation into cold, dry air.
- **Lowest in late summer/fall (Aug–Oct):** Both stations are in the same well-mixed humid air mass during summer. The river's relative contribution to MDT's moisture is smallest when ambient humidity is highest.

**The 1962–1965 drought period dramatically collapses the early era offset**, with MDT max dewpoint going below CXY in 1963–1964. This is a meteorological anomaly (northeastern drought) not a structural change in the MDT-CXY relationship. Excluding those four years, the early era offset pattern is fully consistent with the modern era.

**Modern era MK test: NO TREND (p=0.981, Tau=+0.007).** This is the most stable variable in the entire analysis. The Susquehanna moisture signature is perfectly stationary from 2001–2025.

### 5.2 Average RH
IEM provides min, mean, and max RH for both stations in both periods (100% availability). Results corroborate the dewpoint analysis: MDT runs 2–6% higher average RH than CXY in the early era, and 2–4% higher in the modern era. Same seasonal pattern, same physical driver.

### 5.3 Homogenization Recommendation
**Use modern MaxDP offsets for all homogenization.** The modern offset is stable, physically robust, and well-supported by both the dewpoint and RH analyses. Larger early-era offsets are partly explained by drought meteorology. Direction of the bias (MDT moister) is fully validated in both eras.

---

## 6. Snowfall Analysis

### 6.1 Early Era (1948–1965): CXY Is Snowier
This is the most counterintuitive finding in the analysis. While MDT receives 7–8% more liquid equivalent precipitation than CXY, **CXY receives more snowfall** — with an overall MDT/CXY snow ratio of 0.879. MDT receives approximately 88% of CXY's snowfall accumulation.

This directly contradicts the liquid precip ratio and has a clear physical explanation: **the rain-snow line sits differently at the two sites.** MDT's lower elevation and river floodplain position keeps surface temperatures slightly higher than CXY during marginal temperature events near 32°F. Events that fall as snow at the higher, cooler CXY site fall as rain or rain-snow mix at MDT, recording as liquid precip (increasing the MDT liquid ratio) while simultaneously reducing MDT snowfall (decreasing the MDT snow ratio).

Monthly snow ratios (where at least 3 snow months existed):
- January: 0.847 | February: 0.887 | March: 0.882 | December: 0.827

### 6.2 Modern Era: No Comparison Possible
CXY snowfall is completely absent from GHCND and IEM for the modern era. ASOS at CXY does not reliably capture snowfall accumulation — the heated tipping bucket measures liquid equivalent only, and snow accumulation depth requires a separate snow board observer that is not present at the automated CXY site. The early-era MDT/CXY snow ratio should not be applied to modern data without independent validation.

---

## 7. Wind Analysis

### 7.1 Measurement Comparison Caveat
The early era GHCND provides WSFG (fastest instantaneous gust, mph) and WDFG (direction of that gust). The modern era GHCND provides AWND (24-hour average wind speed, mph), WSF2 (fastest 2-minute average, mph), WSF5 (fastest 5-second average, mph), WDF2, and WDF5. These measure fundamentally different quantities. The early peak gust of 21 mph median and modern daily mean of 6.7 mph are both physically reasonable and not contradictory. Seasonal pattern comparison is valid; absolute magnitude comparison is not.

### 7.2 Seasonal Pattern
Both eras confirm that **spring (March–April) is the windiest period at MDT**. Early era April median peak gust = 25.3 mph; March = 25.1 mph. Modern era April AWND = 7.4 mph median (highest of the year). Summer is consistently the calmest period in both eras.

### 7.3 Directional Frequency
| Direction | Early % | Modern % | Delta |
|-----------|---------|---------|-------|
| N | 10.9 | 6.5 | -4.4 |
| NE | 4.1 | 3.2 | -0.9 |
| E | 6.1 | 7.5 | +1.4 |
| SE | 10.3 | 18.4 | **+8.1** |
| S | 11.2 | 8.2 | -3.0 |
| SW | 11.7 | 5.8 | **-5.9** |
| W | 15.6 | 14.5 | -1.1 |
| NW | 30.2 | 35.9 | **+5.7** |

The dominant NW sector is confirmed in both eras. The most notable shift is the SE frequency nearly doubling in the modern era (+8.1%). This could reflect real changes in synoptic flow patterns, increased cold air damming frequency, or the measurement difference between peak gust direction (early) and 2-minute average direction (modern).

---

## 8. Fog and Visibility Analysis

### 8.1 Key Finding
**MDT is consistently foggier than CXY in every month of both eras.** The Susquehanna River generates radiative and evaporative fog when river surface temperature exceeds air temperature — most common in autumn and early winter.

| Period | Station | Dense Fog (%) | Low Vis ≤1mi (%) |
|--------|---------|--------------|-----------------|
| Early 1948–65 | MDT | 0.80 | ~4.5 |
| Early 1948–65 | CXY | 0.70 | ~3.8 |
| Modern 2001–25 | MDT | 0.10 | ~1.5 |
| Modern 2001–25 | CXY | ~0.00 | ~0.8 |

The dramatic decline from early to modern era reflects both changes in how ASOS forward scatter sensors detect fog vs human observation, and real reduction in dense fog reporting by the automated system. The relative difference (MDT > CXY) is preserved in both eras.

**November is the foggiest month at MDT in both eras** — when river cooling season begins and the largest river-to-air temperature differentials develop. This is the period of maximum Susquehanna fog production.

### 8.2 CAD Relevance
During cold air damming events, low-level NE flow advects moisture into the Susquehanna Valley. MDT's floodplain position means fog and reduced visibility during CAD events tend to persist longer and occur more frequently than at CXY. The hourly visibility record is a potential diagnostic tool for identifying CAD onset and persistence at MDT.

---

## 9. Weather Type Frequency (Modern Era)

From IEM hourly METAR codes (2001–2025):

| Code | Description | MDT % | CXY % | MDT > CXY? |
|------|-------------|-------|-------|-----------|
| BR | Mist | 12.1 | 10.8 | YES |
| -RA | Light rain | 5.5 | 5.3 | slight |
| HZ | Haze | 3.0 | 2.9 | slight |
| -SN | Light snow | 1.1 | 1.1 | similar |
| RA | Moderate rain | 0.9 | 0.9 | similar |
| FG | Fog | 0.77 | 0.42 | **YES significantly** |
| FZFG | Freezing fog | 0.14 | 0.08 | YES |
| -FZRA | Light freezing rain | 0.10 | 0.09 | slight |
| TS | Thunderstorm | 0.11 | 0.10 | similar |
| TSRA | Thunderstorm+rain | 0.07 | 0.06 | similar |

Mist (BR) dominates at both sites but is more common at MDT, consistent with the river moisture signature. Fog (FG) frequency at MDT is nearly double CXY, which is the most definitive weather type signal of the Susquehanna floodplain vs upland contrast. Thunderstorm frequency is essentially equal between the two sites.

---

## 10. Cross-Era Stability Assessment Summary

| Variable | Early Era MK | Modern Era MK | Combined MK | CI Overlap | Recommendation |
|----------|-------------|--------------|------------|-----------|----------------|
| PRCP | p=0.001 (decr.) | p=0.088 (no) | p=0.143 (no) | 11/12 | **USE modern ratio** |
| TMAX | p=0.000 (decr.) | p=0.000 (decr.) | p=0.000 (decr.) | 8/12 | **CAUTION — era-specific only** |
| TMIN | p=0.000 (incr.) | p=0.000 (decr.) | p=0.024 (decr.) | 9/12 | **USE warm season (May-Oct)** |
| MaxDP | p=0.006 (decr.) | p=0.981 (no) | p=0.001 (decr.) | 7/12 | **USE modern offset** |
| AvgRH | computed | p≈0.9 (no) | computed | ~10/12 | **USE modern offset** |

Note: The early era PRCP and MaxDP MK results showing decreasing trends are dominated by the 1962–1965 drought, which was a meteorological anomaly affecting both the precipitation ratio and the dewpoint offset. Neither trend is structural. The combined MK trend for PRCP is not significant (p=0.143), confirming this.

---

## 11. Application to CAD Climatology

This bias analysis was developed specifically to support the Pennsylvania Cold Air Damming (CAD) climatology project adapting the Bailey et al. (2003) objective detection algorithm. Key applications:

**Station selection:** CXY is the preferred CAD detection station for the central Pennsylvania line. The 4.0% NE wind flow frequency at CXY (vs 3.2% at MDT) reflects CXY's upland position being more diagnostically sensitive to the backing of winds that characterizes CAD onset.

**Precipitation homogenization:** For the ~35-year gap (1966–2000) where CXY data must be extended backward using MDT as reference, the modern precip ratio (1.084 annual) provides the most defensible adjustment. Monthly factors should be used where event-level precision is required.

**Temperature homogenization:** Apply the warm-season (May–October) TMIN offset (+0.7 to +1.1°F, MDT warmer) for any overnight temperature comparisons in the merged record. Flag TMAX comparisons as instrumentation-era dependent.

**Dewpoint and humidity:** The MaxDP offset (MDT consistently moister, +0.6 to +1.5°F modern) and RH offset (+2 to +4%, modern) are the most stable and physically robust adjustment factors. These are directly applicable to the Bailey CAD detection algorithm's use of low-level moisture flux parameters.

---

## 12. Data Files Produced

### Excel Workbooks
1. `01_Early_Era_Analysis_1948_1965.xlsx` — Full bias characterization for the cooperative observer era
2. `02_Modern_Era_Analysis_2001_2025.xlsx` — ASOS era analysis with corrected precipitation and full wind variables
3. `03_Cross_Era_Comparison.xlsx` — Side-by-side era comparison, MK stability, CI overlap assessment
4. `04_MDT_Station_Complete.xlsx` — MDT monthly summaries both eras (GHCND + IEM)
5. `05_CXY_Station_Complete.xlsx` — CXY monthly summaries both eras (note: no modern snowfall)
6. `06_Wind_Analysis.xlsx` — Early vs modern wind comparison, directional frequencies

### HTML Interactive Dashboards
1. `html1_wind_roses.html` — Wind roses MDT early/modern, CXY modern, direction comparison
2. `html2_precipitation.html` — Annual scatter, monthly means, ratio time series with CI
3. `html3_temperature.html` — Diurnal cycles, TMAX/TMIN cross-era, annual series
4. `html4_dewpoint_rh.html` — MaxDP and RH cross-era, annual stability, drought annotation
5. `html5_fog_visibility.html` — Fog frequency, low-visibility, mean vis, scatter comparison
6. `html6_weather_types.html` — METAR code heatmaps, MDT vs CXY frequency bar chart
7. `html7_stability.html` — MK heatmap, CI overlap grid, tabbed annual series
8. `html8_crossera_summary.html` — All variables tab-selectable, overlay chart, homogenization assessment

---

## 13. Methodological Notes and Limitations

**Bootstrap CI interpretation:** The 95% CIs represent the uncertainty in the monthly median ratio/offset given 17–25 annual observations. They do not account for year-to-year autocorrelation in weather patterns, which may make the true uncertainty slightly larger than reported. For a research-grade analysis, a block bootstrap approach would be preferable, but the standard bootstrap is appropriate for this climatological application.

**IEM vs GHCND source differences:** Temperature (TMAX, TMIN) for the primary analysis uses GHCND, which applies documented QC flags. The IEM daily data is derived from hourly ISD observations and may differ from GHCND on individual days. For variables unique to IEM (dewpoint, RH), no independent cross-check is available. The 100% availability and physically coherent seasonal patterns provide confidence in the IEM data quality.

**Instrumentation era effects:** The 35-year gap between the early and modern periods coincides with the transition from cooperative observer methodology to ASOS. Many of the cross-era differences documented here — particularly in TMAX and the magnitude of the dewpoint offset — likely reflect instrumentation differences as much as real physical changes. This is acknowledged throughout the analysis and drives the conservative recommendation to use era-specific factors where possible.

**Precipitation corrections:** The 13 corrections applied to modern GHCND/IEM data are conservative and well-documented. The MDT March 2017 corrections have three independent lines of evidence (MRMS, IDW, CXY comparison). The CXY snow undercatch corrections are based on MDT as a reference and carry uncertainty proportional to the inter-station variability in snowfall, which is high.

---

*Analysis completed: March 2026*  
*Contact: CPA Weather Lab, Camp Hill PA*  
*Methodology: Bootstrap resampling (n=1,000, seed=42) | Mann-Kendall (pymannkendall) | GHCND + IEM ASOS*
