edrewitz
WxData
Python

A Python package of end-to-end weather data clients & raw data clients with VPN/PROXY support, data processors that decode variable keys from GRIB format into a plain-language format & various tools for assisting Python automated workflows, querying meteorological datasets and filling gaps in meteorological data.

Last updated Jul 7, 2026
25
Stars
1
Forks
0
Issues
+1
Stars/day
Attention Score
53
Language breakdown
Python 100.0%
Files click to expand
README

WxData

Alt text Alt text

Conda Recipe Conda Version Conda Platforms PyPI Anaconda-Server Badge Anaconda-Server Badge

DOI

Anaconda Downloads

Conda Downloads

PIP Downloads:

PyPI - Downloads

(C) Eric J. Drewitz 2025-2026

A Python package consisting of the following:

1) End-to-end weather data clients with VPN/PROXY support 2) Raw data clients with VPN/PROXY support 3) Data processors that decode variable keys from GRIB format into a plain-language format 4) Various tools for assisting Python automated workflows, querying meteorological datasets and filling gaps in meteorological data.

Table of Contents

1) Installation Instructions 2) Server List (For End-To-End Clients That Can Rotate Between Servers) 3) Proxy Server Configuration 4) What makes WxData unique among various meteorological Python packages? 5) WxData Tutorials 6) WxData Documentation 7) Importing Functions from WxData 8) Citations 9) Data Sources

Installation Instructions

How To Install

Copy and paste either command into your terminal or anaconda prompt:

Install via Anaconda

conda install wxdata

Install via pip

pip install wxdata

How To Update To The Latest Version

Copy and paste either command into your terminal or anaconda prompt:

Update via Anaconda

This is for users who initially installed WxData through Anaconda

conda update wxdata

Update via pip

This is for users who initially installed WxData through pip

pip install --upgrade wxdata

Important Compatibility Information

When a new version of Python comes out, it might not be compatible with the C++ eccodes library immediately (especially on pip/pypi versions).

This issue arises when the user is post-processing GRIB data.

There are two options to resolve this issue:

i) Install wxdata via Anaconda/Miniconda3 --> conda install wxdata

ii) Set up a new environment with an earlier version of Python (must be Python >= 3.10) and then pip install wxdata


Server List

Alt text Alt text

End-To-End clients with multiple servers to pull data from can find the different options for source by the table below

source='noaa' - NOAA/NCEP/NOMADS OR NOAA/NWS/FTP

source='ecmwf' - ECMWF Open-Data Server

source='aws' - Amazon Web Services (AWS)

source='google' - Google Cloud

| Client | NOAA/NCEP/NOMADS | ECMWF Open-Data | Amazon AWS | Google Cloud | NOAA/NWS/FTP | | -------- | -------- | -------- | -------- | -------- | -------- | | GFS0P25 |Y|N|Y|Y|N| | GFS0P25 SECONDARY PARAMETERS |Y|N|Y|Y|N| | GFS0P50 |Y|N|Y|Y|N| | GEFS0P50 |Y|N|Y|Y|N| | GEFS0P50 SECONDARY PARAMETERS |Y|N|Y|Y|N| | GEFS0P25 |Y|N|Y|Y|N| | ECMWF IFS |N|Y|Y|Y|N| | ECMWF IFS Ensemble |N|Y|Y|Y|N| | ECMWF AIFS|N|Y|Y|Y|N| | ECMWF AIFS Ensemble|N|Y|Y|Y|N| | ECMWF IFS Wave |N|Y|Y|Y|N| | ECMWF IFS Wave Ensemble |N|Y|Y|Y|N| | Get NDFD Grids |N|N|Y|N|Y| | RTMA |Y|N|Y|N|N|


Proxy Server Configuration

Friendly for users working on VPN/PROXY connections

Depending on which client, the proxy-address:port must be entered as either a dictionary or a string.

The clients that use a string for proxies are:

1) All ECMWF clients.

2) METAR Observations Client. 3) pixel_query() tool if the user needs to download the airport station codes list.

All other clients use proxies as a dictionary

Example: We want to download the latest Observed Sounding Data for San Diego, CA (NKX) proxies=None ---> proxies={ 'http':'http://your-proxy-address:port', 'https':'http://your-proxy-address:port' } soundingdata = getobservedsoundingdata('nkx', proxies=proxies) Example: We want to download the ECMWF IFS Data: proxies=None ---> proxies="http://your-proxy-address:port" ---> ds = ecmwf_ifs(proxies=proxies)

Alt text

For more information on configuring proxies: https://requests.readthedocs.io/en/latest/user/advanced/#proxies


What makes WxData unique among various meteorological Python packages?

1) Converts GRIB variable keys into variable keys that are in plain language. - (e.g. 'r2' ---> '2mrelativehumidity') 2) Has a scanner that checks if the data files on your PC are up to date with those on the data server. - This is a safeguard to protect newer developers from getting temporary IP address bans from the various data servers. - Improves performance by preventing the potential of repetative downloading the same dataset.

3) Preserves system memory via the following methods: - Clears out old data files before each new data download. - Optional setting clearrecyclebin in all functions. - When clearrecyclebin=True the computer's recycle/trash bin is cleared with each run of the script using any WxData function. - If a user wishes to not clear out their recycle bin set clearrecyclebin=False. - Default: clearrecyclebin=False. 4) Has built-in support for users on VPN/PROXY connections.

5) Consists of both observational and model data.

6) Has additional tools to assist querying data, resolving gaps in data and automating your Python workflow.

7) Utilizes byte-range requests to subset and speed up download times.

8) Several end-to-end clients have the ability to pull from multiple servers (NOAA/NCEP/NOMADS, ECMWF Open-Data, Amazon Web Services (AWS), Google Cloud and NOAA/NWS/FTP).

9) Clients can automatically rotate to a new server when experiencing connectivity issues to the initial server.


WxData Tutorials

Regular Users 1) Downloading METAR Data 2) Downloading Observed Sounding Data 3) Downloading the first 72 hours of the ECMWF IFS and ECMWF AIFS 4) Downloading the GEFS members p01 and p02 for only Temperature 5) Downloading the Real-Time Mesoscale Analysis (RTMA) 6) Downloading the SPC Convective Outlook for CONUS 7) Downloading NWS Maximum Temperature Forecast for Hawaii 8) Downloading the GFS0P25 then performing pixel and line queries on the data 9) Downloading various datasets from the Applied Climate Information System (ACIS) 10) Downloading AIGFS Data 11) Downloading AIGEFS Data 12) Downloading and plotting the Climate Prediction Center 6-10 Day Precipitation Outlook 13) Downloading OUN Sounding Data and Using The WxData Linear Anti Aliasing Tool To Interpolate 100 Points Between Each Observed Data Point And Visualize Both Data Sets 14) Downloading Subsets Of ECMWF IFS Ensemble and AIFS Ensemble Data 15) Downloading the ECMWF IFS 500 mb Geopotential Height Initial Analysis And Plot A North Pole Stereographic Resolving The Meridian With The WxData Cyclic Point Tool 16) Downloading Observed Fuels Data For The Past Year For Acton RAWS and Plotting 1000-HR Dead Fuel Moisture 17) Downloading the 7-Day NFDRS Forecast for Acton RAWS and Plotting Forecast 100-HR Dead Fuel Moisture 18) Downloading Current RAWS and METAR Data and Plotting Current Relative Humidity Observations Across California and Nevada 19) Downloading Current RAWS Data and Plotting Current Energy Release Components (ERCs) Observations Across California and Nevada 20) Downloading NEXRAD II Radar Data and then plotting it in Py-ART 21) Downloading 30 Days of 6hrly CFS Data and plotting the 30-Day time-mean for mean sea level pressure across the Northern Hemisphere

Advanced Users 1) Using the client module to download the latest HadCRUT5 Analysis netCDF file and open this dataset in xarray 2) Downloading the GFS0P25 for temperature fields and using runexternalscripts() to post-process this GFS0P25 dataset in an external Python script 3) Downloading GFS Data Using Byte-Range Requests


WxData Documentation

Documentation Sections

End-To-End Data Clients

Global Forecast System (GFS)

AI Global Forecast System (AIGFS) Climate Forecast System (CFS) Hybrid Global Ensemble Forecast System (HGEFS) Global Ensemble Forecast System (GEFS) AI Global Ensemble Forecast System (AIGEFS) ECMWF Open Data Real-Time Mesoscale Analysis (RTMA) NOAA Storm Prediction Center Outlooks/Climate Prediction Center Outlooks/National Weather Service Forecasts METAR Observations FEMS RAWS Network Observed Atmospheric Soundings NEXRAD II Radar Data

Post-Processors

GFS Post-Processing

AIGFS Post-Processing CFS Post-Processing GEFS Post-Processing AIGEFS Post-Processing HGEFS Post-Processing ECMWF Post-Processing Real-Time Mesoscale Analysis Post-Processing

Raw Data Clients

xmACIS2 Climate Data

Custom Gridded Data Custom CSV Data Custom Excel Data AWS Open Data Byte-Range Requests

Data Querying Tools

Pixel Query

Line Query

Data Transformation & Gap Filling Tools

Cyclic Points For Hemispheric Plots

Shifting Longitude From 0 to 360 --> -180 to 180 Linear Anti-Aliasing Between Two Points

Automated Python Workflow Tools

Running External Python Scripts In Your Workflow

1 runexternal_scripts


Importing Functions from WxData

""" This file hosts all of the functions in the WxData Python library that directly interact with the user. (C) Eric J. Drewitz 2025-2026 """ """ This section of functions are for users who want full wxdata functionality. These functions do the following: 1) Scan for the latest available data. - If the data on your local machine is not up to date, new data will download automatically. - If the data on your local machine is up to date, new data download is bypassed. - This is a safeguard that prevents excessive requests on the data servers. 2) Builds the wxdata directory to store the weather data files. - Scans for the directory branch and builds the branch if it does not exist. 3) Downloads the data. - Users can define their VPN/PROXY IP Address as a (dict) in their script and pass their VPN/PROXY IP address into the function to avoid SSL Certificate errors when requesting data. - Algorithm allows for up to 5 retries with a 30 second break between each retry to resolve connection interruptions while not overburdening the data servers. 4) Pre-processes the data via filename formatting and correctly filing in the wxdata directory. 5) Post-processing by doing the following tasks: - Remapping GRIB2 variable keys into plain language variable keys. - Fixing dataset build errors and grouping all variables together. - Transforms longitude from 0 to 360 degrees into -180 to 180 degrees. - Subsetting the data to the latitude/longitude boundaries specified by the user. - Converting temperature from kelvin to units the user wants (default is Celsius). - Returning a post-processed xarray.array to the user. 6) Preserves system memory by doing the following: - Deleting old data files before each new download. - When clearrecyclebin=True, the user's recycle bin is also cleared. """ # Global Forecast System (GFS) # - GFS 0.25x0.25 Degree Primary Parameters # - GFS 0.25x0.25 Degree Secondary Parameters # - GFS 0.5x0.5 Degree from wxdata.gfs.gfs import( gfs_0p25, gfs0p25secondary_parameters, gfs_0p50 ) # AI Global Forecast System (AIGFS) from wxdata.aigfs.aigfs import aigfs # Hybrid Global Ensemble Forecast System (HGEFS) from wxdata.hgefs.hgefs import hgefsmeanspread # Global Ensemble Forecast System (GEFS) # - GEFS 0.5x0.5 Degree Primary Parameters # - GEFS 0.5x0.5 Degree Secondary Parameters # - GEFS 0.25x0.25 Degree from wxdata.gefs.gefs import( gefs_0p50, gefs0p50secondary_parameters, gefs_0p25 ) # Climate Forecast System (CFS) # - CFS Flux Products # - CFS Pressure Products from wxdata.cfs.cfs import( cfs_flux, cfs_pressure ) # AI Global Ensemble Forecast System (AIGEFS) # - AIGEFS Pressure Members (Pressure Level Variables) # - AIGEFS Surface Members (Surface Level Variables) # - AIGEFS Single (AIGEFS Ensemble Mean & AIGEFS Ensemble Spread) from wxdata.aigefs.aigefs import( aigefspressuremembers, aigefssurfacemembers, aigefs_single ) # European Centre for Medium-Range Weather Forecasts (ECMWF) # - ECMWF IFS # - ECMWF IFS Ensemble # - ECMWF AIFS # - ECMWF AIFS Ensemble # - ECMWF IFS Wave # - ECMWF IFS Wave Ensemble from wxdata.ecmwf.ecmwf import( ecmwf_ifs, ecmwfifsens, ecmwf_aifs, ecmwfaifsens, ecmwfifswave, ecmwfifswave_ens ) # FEMS RAWS Network # - Single Station Weather Observations # - Single Station Fuels Observations # - Multi Station Weather Observations # - Multi Station Fuels Observations # - Current Weather Observations - Multi Station # - Current Fuels Observations - Multi Station # - Current Weather Observations - All Stations By State # - Current Fuels Observations - All Stations By State # - Single Station NFDRS Forecast # - Multi Station NFDRS Forecast # - Single Station Weather Forecast # - Multi Station Weather Forecast from wxdata.fems.observations import( getsinglerawsstationweather_observations, getsinglerawsstationfuels_observations, getmultirawsstationweather_observations, getmultirawsstationfuels_observations, getcurrentmultirawsstationweatherobservations, getcurrentmultirawsstationfuelsobservations, getcurrentallrawsstationweatherobservations, getcurrentallrawsstationfuelsobservations, getsinglerawsstationnfdrs_forecast, getmultirawsstationnfdrs_forecast, getsinglerawsstationweather_forecast, getmultirawsstationweather_forecast ) # FEMS RAWS Network # - Single Station Meta Data # - Multi Station Meta Data from wxdata.fems.meta_data import( getsinglerawsstationmeta_data, getmultirawsstationmeta_data ) # Real-Time Mesoscale Analysis (RTMA) # - RTMA Latest # - RTMA Comparison Between Two Times from wxdata.rtma.rtma import( rtma, rtma_comparison ) # NOAA # - Storm Prediction Center Outlooks # - Climate Prediction Center Outlooks # - National Weather Service Forecasts from wxdata.noaa.nws import( getndfdgrids, getcpcoutlook ) # Observed Upper-Air Soundings # (University of Wyoming Database) from wxdata.soundings.wyomingsoundings import getobservedsoundingdata # METAR Observational Data (From NOAA) from wxdata.metars.metarobs import downloadmetar_data # NEXRAD2 Radar Data # - NEXRAD2 Radar Single Station # - NEXRAD2 Radar Multi Station from wxdata.radar.nexrad2 import( downloadcurrentsinglestationnexrad2radardata, downloadcurrentmultistationnexrad2radardata ) """ This section hosts all the functions and modules that involve post-processing the data. These are the functions and modules that: 1) Re-map the GRIB2 Variable Keys into Plain Language Keys 2) Build the xarray.array of the various datasets. """ # Global Forecast System (GFS) import wxdata.postprocessors.gfspostprocessing as gfspost_processing # AI Global Forecast System (AIGFS) import wxdata.postprocessors.aigfspostprocessing as aigfspost_processing # Hybrid Global Ensemble Forecast System (HGEFS) import wxdata.postprocessors.hgefspostprocessing as hgefspost_processing # Global Ensemble Forecast System (GEFS) import wxdata.postprocessors.gefspostprocessing as gefspost_processing # AI Global Ensemble Forecast System (AIGEFS) import wxdata.postprocessors.aigefspostprocessing as aigefspost_processing # European Centre for Medium-Range Weather Forecasts (ECMWF) import wxdata.postprocessors.ecmwfpostprocessing as ecmwfpost_processing # Climate Forecast System (CFS) import wxdata.postprocessors.cfspostprocessing as cfspost_processing # Real-Time Mesoscale Analysis (RTMA) from wxdata.postprocessors.rtmapostprocessing import processrtma_data """ This section hosts the utility functions accessable to the user. These functions provide helpful utilities when analyzing weather data. Utility functions are geared towards the following types of users: 1) Users who want to use their own scripts to download the data however, they would like to use the wxdata post-processing capabilities. 2) Users who want to make hemispheric graphics or any graphics where cyclic points resolve missing data along the prime meridian or international dateline. """ # WxData function using cartopy to make cyclic points # This is for users who wish to make graphics that cross the -180/180 degree longitude line # This is commonly used for Hemispheric graphics # Function that converts the longitude dimension in an xarray.array # From 0 to 360 to -180 to 180 from wxdata.utils.coords import( cyclic_point, shift_longitude ) # Functions to pixel query and query pixels along a line between points A and B # Function to interpolate to n amount of points in between x and y values respectively from wxdata.utils.tools import( pixel_query, line_query, linearantialiasing ) # This function executes a list of Python scripts in the order the user lists them from wxdata.utils.scripts import runexternalscripts """ This section hosts the various data clients that retrieve various types of data. These clients can be easily configured to work on VPN/PROXY connections. """ # These are the wxdata HTTPS Clients with full VPN/PROXY Support # Client List: # - getgriddeddata() # - getcsvdata() # - getexceldata() # - getxmacisdata() # - getawsopen_data() # - byterangerequest() import wxdata.client.client as client


Citations

MetPy: May, R. M., Goebbert, K. H., Thielen, J. E., Leeman, J. R., Camron, M. D., Bruick, Z., Bruning, E. C., Manser, R. P., Arms, S. C., and Marsh, P. T., 2022: MetPy: A Meteorological Python Library for Data Analysis and Visualization. Bull. Amer. Meteor. Soc., 103, E2273-E2284, https://doi.org/10.1175/BAMS-D-21-0125.1.

xarray: Hoyer, S., Hamman, J. (In revision). Xarray: N-D labeled arrays and datasets in Python. Journal of Open Research Software.

cartopy: Phil Elson, Elliott Sales de Andrade, Greg Lucas, Ryan May, Richard Hattersley, Ed Campbell, Andrew Dawson, Bill Little, Stephane Raynaud, scmc72, Alan D. Snow, Ruth Comer, Kevin Donkers, Byron Blay, Peter Killick, Nat Wilson, Patrick Peglar, lgolston, lbdreyer, … Chris Havlin. (2023). SciTools/cartopy: v0.22.0 (v0.22.0). Zenodo. https://doi.org/10.5281/zenodo.8216315

NumPy: Harris, C.R., Millman, K.J., van der Walt, S.J. et al. Array programming with NumPy. Nature 585, 357–362 (2020). DOI: 10.1038/s41586-020-2649-2. (Publisher link).

Pandas: Pandas: McKinney, W., & others. (2010). Data structures for statistical computing in python. In Proceedings of the 9th Python in Science Conference (Vol. 445, pp. 51–56).

dask: Dask Development Team (2016). Dask: Library for dynamic task scheduling. URL http://dask.pydata.org

cfgrib: Author: ECMWF, Year: (2025), Title: cfgrib: A Python interface to map GRIB files to xarray, Source: https://github.com/ecmwf/cfgrib

requests: K. Reitz, "Requests: HTTP for Humans". Available: https://requests.readthedocs.io/.

Beautiful Soup: Richardson, L. (2025). Beautiful Soup (Version 4.14.3) [Computer software]. https://www.crummy.com/software/BeautifulSoup/

shapeography: Eric J. Drewitz. (2026). edrewitz/shapeography: shapeography 1.0 Released (shapeography1.0). Zenodo. https://doi.org/10.5281/zenodo.18676845

geopandas: Kelsey Jordahl, Joris Van den Bossche, Martin Fleischmann, Jacob Wasserman, James McBride, Jeffrey Gerard, … François Leblanc. (2020, July 15). geopandas/geopandas: v0.8.1 (Version v0.8.1). Zenodo. http://doi.org/10.5281/zenodo.3946761

tqdm: da Costa-Luis, (2019). tqdm: A Fast, Extensible Progress Meter for Python and CLI. Journal of Open Source Software, 4(37), 1277, https://doi.org/10.21105/joss.01277

ecmwf-opendata: European Centre for Medium-Range Weather Forecasts (2026). ecmwf-opendata[Computer software]. GitHub. https://github.com/ecmwf/ecmwf-opendata

openpyxl: Gazoni, E., & Clark, C. (2024). openpyxl: A Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files (Version 3.1.5) [Computer software]. https://openpyxl.readthedocs.io/

pyart: Helmus, J.J. & Collis, S.M., (2016). The Python ARM Radar Toolkit (Py-ART), a Library for Working with Weather Radar Data in the Python Programming Language. Journal of Open Research Software. 4(1), p.e25. DOI: 10.5334/jors.119.


Data Sources

1) National Oceanic and Atmospheric Administration/National Center for Environmental Prediction 2) European Centre for Medium-Range Weather Forecasts 3) University of Wyoming 4) National Oceanic and Atmospheric Administration/National Weather Service 5) National Oceanic and Atmospheric Administration/Aviation Weather Center 6) National Oceanic and Atmospheric Administration/Climate Prediction Center 7) Applied Climate Information System (ACIS) 8) USDA Fire Environment Mapping System 9) Amazon AWS Unidata NEXRAD2 Bucket

🔗 More in this category

© 2026 GitRepoTrend · edrewitz/WxData · Updated daily from GitHub