A repository of examples of using WxData in both Linux Shell and Windows Powershell for creating automated ETL Pipelines for various types of weather data.
Example 1
In Example 1 we create a pipeline in both Linux Shell gfs_pipeline.sh and Windows Powershell gfs_pipeline.ps1 that does the following:
- Creates a Python 3.12 environment
gfs_850mb_temperatureand installs WxData via pip. - Using the WxData CLI - downloads the latest GFS0P25 850mb Temperature Forecast to a directory called
GFS0P25/Temperature. - Executes a Python script
gfs_graphics.pythat ingests the GRIB2 data and creates graphics of the GFS0P25 850mb Temperature Forecast for CONUS.
Example 2
In Example 2 we create automated ETL pipelines in both Linux Shell gfs_pipeline.sh and Windows Powershell gfs_pipeline.ps1 that does the following:
The WxData Function Handles all of these steps when prompted by the user
- Creates a Python 3.12 environment called
wx_envand installs WxData via pip - Using the WxData CLI - downloads GFS data in parallel. We download various datasets from the GFS0P25 primary parameters & levels, GFS0P25 secondary parameters & levels and GFS0P50.
- Since we download these datasets in parallel, we are also spreading out the network traffic between the 3 source servers (NCEP/NOMADS, Amazon Web Services and Google Cloud) to minimize the number of requests on each source server to prevent temporary rate-limit bans.
- Subset the GFS data for CONUS.
- Decode the GRIB2 keys into plain-language.
- Convert from GRIB2 to NETCDF.
- Export the NETCDF data as a
.ncfile.
Example 3
In Example 3 we create a pipeline in both Linux Shell gfs_pipeline.sh and Windows Powershell gfs_pipeline.ps1 that does the following:
-
Creates a Python 3.12 environment called
gfs_pipelineand installs WxData via conda-forge. -
Executes a Python Wrapper Script
wrapper.py- This wrapper script uses
run_external_scripts()from WxData.
- This wrapper script uses
-
This Python wrapper script
wrapper.pythen executes two downstream Python scripts in the following order:i)
download_gfs.pywhich uses WxData to download the latest GFS0P25 850mb Temperature Forecast.ii)
gfs_graphics.pywhich creates graphics of the GFS0P25 850mb Temperature Forecast for CONUS.
Example 4
In Example 4 we create automated ETL pipelines in both Linux Shell gfs_pipeline_with_proxy.sh and Windows Powershell gfs_pipeline_with_proxy.ps1 does the following:
-
Creates a Python 3.12 environment called
wx_envand installs WxData via pip. -
Using the WxData CLI - Downloads GFS data in parallel using a proxy server
https://proxy-address:proxy-port. We download various datasets from the GFS0P25 primary parameters & levels, GFS0P25 secondary parameters & levels and GFS0P50.- Since we download these datasets in parallel, we are also spreading out the network traffic between the 3 source servers (NCEP/NOMADS, Amazon Web Services and Google Cloud) to minimize the number of requests on each source server to prevent temporary rate-limit bans.
-
Subset the GFS data for CONUS.
-
Decode the GRIB2 keys into plain-language.
-
Convert from GRIB2 to NETCDF.
-
Export the NETCDF data as a
.ncfile.
Example 5
In Example 5 we create automated ETL pipelines in both Linux Shell ecmwf_pipeline.sh and Windows Powershell ecmwf_pipeline.ps1 that does the following:
- Creates a Python 3.14 environment called
ecmwf_gphand installs WxData via pip. - Using the WxData CLI - downloads the ECMWF IFS and ECMWF AIFS 500mb Geopotential Height Forecast for the first 144 hours in parallel.
- Since we download these datasets in parallel, we are also spreading out the network traffic between different source servers. There are 3 available source servers for ECMWF data (ECMWF Open-Data, Amazon Web Services and Google Cloud). In this example, download the ECMWF IFS forecast from ECMWF Open-Data and ECMWF AIFS forecast from Google Cloud.
For Both ECMWF IFS & ECMWF AIFS
-
Subset the ECMWF 500mb Geopotential Height forecast data for Europe.
-
Decode the GRIB2 keys into plain-language.
-
Convert from GRIB2 to NETCDF.
-
Export the NETCDF data as a
.ncfile. -
Executes a Python script
ecmwf_500mb_gph.pythat finds and creates graphics of the ECMWF IFS + AIFS Mean 500mb Geopotential Height Forecast for Europe.
Example 6
In Example 6 we create automated ETL pipelines in both Linux Shell weather_data_pipeline.sh and Windows Powershell weather_data_pipeline.ps1 that does the following:
-
Creates a Python 3.14 environment called
wx_pipelineand installs WxData via pip. -
Using the WxData CLI - downloads the 2-meter temperature forecast for the following weather forecast models in parallel from the following source servers:
When doing bulk-data downloads it is good practice to spread out the traffic between multiple source servers if possible. This prevents temporary rate-limit bans that could disrupt your automation.
- GFS0P25 - NCEP/NOMADS
- ECMWF High Resolution IFS - ECMWF Open Data
- ECMWF AIFS - Google Cloud
- GDPS - MSC Open Data (There are no alternative source servers for Canadian data)
For All Datasets
-
Subset the 2-meter temperature forecast for CONUS.
-
Decode the GRIB2 keys into plain-language.
-
Convert from GRIB2 to NETCDF.
-
Export the NETCDF data as a
.ncfile.
Example 7
In Example 7 we create automated ETL pipelines in both Linux Shell get_upper_air.sh and Windows Powershell get_upper_air.ps1 that does the following:
- Creates a Python 3.14 environment called
soundingsand installs WxData via pip - Using the WxData CLI - downloads the latest observed upper-air sounding data from University of Wyoming for San Diego, CA (NKX), Upton, NY (OKX) and Norman, OK (OUN) as
.csvfiles to our current working directory.
Example 8
In Example 8 we create automated ETL pipelines in both Linux Shell get_current_nexrad2.sh get_archived_nexrad2.sh and Windows Powershell get_current_nexrad2.ps1 get_archived_nexrad2.ps1 that does the following:
- Creates a Python 3.14 environment
current_radarorarchive_radardepending on current or archived and installs WxData via pip. - Using the WxData CLI - downloads the NEXRAD II radar data for Upton, NY (KOKX). The archived data is for the starting point of
2025-12-25:18. Both datasets go 4-hours back from the starting point.