openeemeter / eeweather

Fetch NCDC ISD, TMY3, or CZ2010 weather data that corresponds to ZIP Code Tabulation Areas or Latitude/Longitude.
http://eeweather.openee.io/
Apache License 2.0
50 stars 19 forks source link

Copy shared station metadata dataframe when ranking for thread-safety #93

Closed jason-recurve closed 2 months ago

jason-recurve commented 2 months ago

Your checklist for this pull request

Please review the guidelines for contributing to this repository.

Description

We ran into transient issues when calling rank_stations() in a multithreaded process--the cached attribute all_station_metadata was previously being directly modified and could result in mismatched station distance calculations.