wxdata 1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wxdata-1.1/LICENSE +21 -0
- wxdata-1.1/PKG-INFO +372 -0
- wxdata-1.1/README.md +345 -0
- wxdata-1.1/pyproject.toml +42 -0
- wxdata-1.1/setup.cfg +4 -0
- wxdata-1.1/src/wxdata/__init__.py +144 -0
- wxdata-1.1/src/wxdata/calc/__init__.py +3 -0
- wxdata-1.1/src/wxdata/calc/derived_fields.py +44 -0
- wxdata-1.1/src/wxdata/calc/kinematics.py +29 -0
- wxdata-1.1/src/wxdata/calc/thermodynamics.py +49 -0
- wxdata-1.1/src/wxdata/calc/unit_conversion.py +63 -0
- wxdata-1.1/src/wxdata/client/__init__.py +1 -0
- wxdata-1.1/src/wxdata/client/client.py +464 -0
- wxdata-1.1/src/wxdata/ecmwf/__init__.py +7 -0
- wxdata-1.1/src/wxdata/ecmwf/ecmwf.py +745 -0
- wxdata-1.1/src/wxdata/ecmwf/file_funcs.py +110 -0
- wxdata-1.1/src/wxdata/ecmwf/paths.py +47 -0
- wxdata-1.1/src/wxdata/ecmwf/url_scanners.py +745 -0
- wxdata-1.1/src/wxdata/fems/__init__.py +7 -0
- wxdata-1.1/src/wxdata/fems/fems.py +677 -0
- wxdata-1.1/src/wxdata/fems/raws_sigs.py +1789 -0
- wxdata-1.1/src/wxdata/gefs/__init__.py +7 -0
- wxdata-1.1/src/wxdata/gefs/exception_messages.py +90 -0
- wxdata-1.1/src/wxdata/gefs/file_funcs.py +175 -0
- wxdata-1.1/src/wxdata/gefs/gefs.py +1171 -0
- wxdata-1.1/src/wxdata/gefs/paths.py +58 -0
- wxdata-1.1/src/wxdata/gefs/process.py +3154 -0
- wxdata-1.1/src/wxdata/gefs/url_scanners.py +2525 -0
- wxdata-1.1/src/wxdata/gfs/__init__.py +5 -0
- wxdata-1.1/src/wxdata/gfs/exception_messages.py +30 -0
- wxdata-1.1/src/wxdata/gfs/gfs.py +1112 -0
- wxdata-1.1/src/wxdata/gfs/paths.py +51 -0
- wxdata-1.1/src/wxdata/gfs/url_scanners.py +1629 -0
- wxdata-1.1/src/wxdata/metars/__init__.py +1 -0
- wxdata-1.1/src/wxdata/metars/metar_obs.py +106 -0
- wxdata-1.1/src/wxdata/noaa/__init__.py +1 -0
- wxdata-1.1/src/wxdata/noaa/nws.py +532 -0
- wxdata-1.1/src/wxdata/rtma/__init__.py +4 -0
- wxdata-1.1/src/wxdata/rtma/file_funcs.py +68 -0
- wxdata-1.1/src/wxdata/rtma/keys.py +56 -0
- wxdata-1.1/src/wxdata/rtma/process.py +291 -0
- wxdata-1.1/src/wxdata/rtma/rtma.py +512 -0
- wxdata-1.1/src/wxdata/rtma/url_scanners.py +677 -0
- wxdata-1.1/src/wxdata/soundings/__init__.py +1 -0
- wxdata-1.1/src/wxdata/soundings/wyoming_soundings.py +682 -0
- wxdata-1.1/src/wxdata/utils/__init__.py +27 -0
- wxdata-1.1/src/wxdata/utils/coords.py +121 -0
- wxdata-1.1/src/wxdata/utils/ecmwf_post_processing.py +1058 -0
- wxdata-1.1/src/wxdata/utils/file_funcs.py +204 -0
- wxdata-1.1/src/wxdata/utils/file_scanner.py +155 -0
- wxdata-1.1/src/wxdata/utils/gefs_post_processing.py +3100 -0
- wxdata-1.1/src/wxdata/utils/gfs_post_processing.py +2011 -0
- wxdata-1.1/src/wxdata/utils/nomads_gribfilter.py +187 -0
- wxdata-1.1/src/wxdata/utils/recycle_bin.py +74 -0
- wxdata-1.1/src/wxdata/utils/rtma_post_processing.py +299 -0
- wxdata-1.1/src/wxdata/utils/scripts.py +57 -0
- wxdata-1.1/src/wxdata/utils/tools.py +212 -0
- wxdata-1.1/src/wxdata.egg-info/PKG-INFO +372 -0
- wxdata-1.1/src/wxdata.egg-info/SOURCES.txt +60 -0
- wxdata-1.1/src/wxdata.egg-info/dependency_links.txt +1 -0
- wxdata-1.1/src/wxdata.egg-info/requires.txt +10 -0
- wxdata-1.1/src/wxdata.egg-info/top_level.txt +1 -0
wxdata-1.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Eric J. Drewitz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
wxdata-1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wxdata
|
|
3
|
+
Version: 1.1
|
|
4
|
+
Summary: An open source library for downloading and pre/post-processing various types of weather data. Friendly for VPN/PROXY connections.
|
|
5
|
+
Author: Eric J. Drewitz
|
|
6
|
+
Project-URL: Documentation, https://github.com/edrewitz/wxdata/blob/main/Documentation/Landing%20Page.md
|
|
7
|
+
Project-URL: Repository, https://github.com/edrewitz/wxdata/tree/main
|
|
8
|
+
Keywords: meteorology,atmospheric sciences
|
|
9
|
+
Classifier: Programming Language :: Python
|
|
10
|
+
Classifier: Topic :: Scientific/Engineering
|
|
11
|
+
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: metpy>=1.5.1
|
|
17
|
+
Requires-Dist: numpy>=1.24
|
|
18
|
+
Requires-Dist: pandas>=2.2
|
|
19
|
+
Requires-Dist: xarray>=2023.1.0
|
|
20
|
+
Requires-Dist: netcdf4>=1.7.1
|
|
21
|
+
Requires-Dist: cartopy>=0.21.0
|
|
22
|
+
Requires-Dist: beautifulsoup4>=4.13.4
|
|
23
|
+
Requires-Dist: requests>=2.32.4
|
|
24
|
+
Requires-Dist: cfgrib>=0.9.10.4
|
|
25
|
+
Requires-Dist: dask>=2025.5.1
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# WxData
|
|
29
|
+
|
|
30
|
+
<img src="https://github.com/edrewitz/wxdata/blob/main/icons/weather%20icon.jpg" width="200" alt="Alt text" /> <img src="https://github.com/edrewitz/wxdata/blob/main/icons/python%20logo.png" width="200" alt="Alt text" />
|
|
31
|
+
|
|
32
|
+
[](https://anaconda.org/conda-forge/wxdata) [](https://anaconda.org/conda-forge/wxdata) [](https://anaconda.org/conda-forge/wxdata)  [](https://anaconda.org/conda-forge/wxdata) [](https://anaconda.org/conda-forge/wxdata)
|
|
33
|
+
|
|
34
|
+
[](https://doi.org/10.5281/zenodo.17811303)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
Anaconda Downloads
|
|
39
|
+
|
|
40
|
+
[](https://anaconda.org/conda-forge/wxdata)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
PIP Downloads:
|
|
44
|
+
|
|
45
|
+

|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
**(C) Eric J. Drewitz 2025**
|
|
50
|
+
|
|
51
|
+
An open-source package that helps meteorologists and weather enthusiats download, pre-process and post-process various types of weather data.
|
|
52
|
+
|
|
53
|
+
This package only retrieves open-source publicly available weather data.
|
|
54
|
+
|
|
55
|
+
This package provides the following extra functionality compared to existing packages for downloading weather data:
|
|
56
|
+
|
|
57
|
+
**How To Install**
|
|
58
|
+
|
|
59
|
+
Copy and paste either command into your terminal or anaconda prompt:
|
|
60
|
+
|
|
61
|
+
*Install via Anaconda*
|
|
62
|
+
|
|
63
|
+
`conda install wxdata`
|
|
64
|
+
|
|
65
|
+
*Install via pip*
|
|
66
|
+
|
|
67
|
+
`pip install wxdata`
|
|
68
|
+
|
|
69
|
+
1) Friendly for users working on VPN/PROXY connections.
|
|
70
|
+
- Users input their PROXY IP address as a dictionary and pass it into the function to avoid SSL errors
|
|
71
|
+
- If the user is on a VPN/PROXY Connection the following is needed:
|
|
72
|
+
|
|
73
|
+
proxies=None ---> proxies={
|
|
74
|
+
'http':'http://url',
|
|
75
|
+
'https':'https://url'
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[e.g. get_observed_sounding_data('nkx', proxies=proxies)]
|
|
79
|
+
|
|
80
|
+
For more information on configuring proxies: https://requests.readthedocs.io/en/latest/user/advanced/#proxies
|
|
81
|
+
|
|
82
|
+
- Some data access functions work on VPN/PROXY connections without needing to define VPN/PROXY settings:
|
|
83
|
+
- METARs
|
|
84
|
+
- NOAA Storm Prediction Center/National Weather Service Products
|
|
85
|
+
- FEMS
|
|
86
|
+
|
|
87
|
+
- Data access methods that users need to define VPN/PROXY IP addresses if using a VPN/PROXY connection:
|
|
88
|
+
- Various Forecast Models
|
|
89
|
+
- Observed Sounding Data from University of Wyoming
|
|
90
|
+
- Real-Time Mesoscale Analysis
|
|
91
|
+
|
|
92
|
+
1) Converts GRIB variable keys into variable keys that are in plain language.
|
|
93
|
+
- (e.g. 'r2' ---> '2m_relative_humidity')
|
|
94
|
+
|
|
95
|
+
2) Has a scanner that checks if the data files on your PC are up to date with those on the data server.
|
|
96
|
+
- This is a safeguard to protect newer developers from getting temporary IP address bans from the various data servers.
|
|
97
|
+
- Improves performance by preventing the potential of repetative downloading the same dataset.
|
|
98
|
+
|
|
99
|
+
3) Preserves system memory via the following methods:
|
|
100
|
+
- Clears out old data files before each new data download.
|
|
101
|
+
- Optional setting `clear_recycle_bin=True` in all functions.
|
|
102
|
+
- When `clear_recycle_bin=True` the computer's recycle/trash bin is cleared with each run of the script using any WxData function.
|
|
103
|
+
- If a user wishes to not clear out their recycle bin `set clear_recycle_bin=False`.
|
|
104
|
+
|
|
105
|
+
## WxData Examples
|
|
106
|
+
|
|
107
|
+
*Regular Users*
|
|
108
|
+
1) [Downloading METAR Data](https://github.com/edrewitz/WxData-JupyterLab-Examples/blob/main/metars.ipynb)
|
|
109
|
+
2) [Downloading Observed Sounding Data](https://github.com/edrewitz/WxData-JupyterLab-Examples/blob/main/soundings.ipynb)
|
|
110
|
+
3) [Downloading the first 72 hours of the ECMWF IFS and ECMWF AIFS](https://github.com/edrewitz/WxData-JupyterLab-Examples/blob/main/ecmwf.ipynb)
|
|
111
|
+
4) [Downloading the GEFS members p01 and p02 for only Temperature](https://github.com/edrewitz/WxData-JupyterLab-Examples/blob/main/gefs.ipynb)
|
|
112
|
+
5) [Downloading the Real-Time Mesoscale Analysis (RTMA)](https://github.com/edrewitz/WxData/blob/main/Documentation/RTMA%20Post%20Processing.md)
|
|
113
|
+
6) [Downloading the RAWS SIG Group Fuels Data and the NFDRS Forecast for the RAWS SIG Groups for the South Ops Geographic Area Coordination Center](https://github.com/edrewitz/WxData-JupyterLab-Examples/blob/main/fems.ipynb)
|
|
114
|
+
7) [Downloading the SPC Convective Outlook for CONUS](https://github.com/edrewitz/WxData-JupyterLab-Examples/blob/main/spc.ipynb)
|
|
115
|
+
8) [Downloading NWS Maximum Temperature Forecast for Hawaii](https://github.com/edrewitz/WxData-JupyterLab-Examples/blob/main/nws_hi.ipynb)
|
|
116
|
+
9) [Downloading the GFS0P25 then performing pixel and line queries on the data](https://github.com/edrewitz/WxData-JupyterLab-Examples/blob/main/GFS.ipynb)
|
|
117
|
+
10) [Downloading various datasets from the Applied Climate Information System (ACIS)](https://github.com/edrewitz/WxData-JupyterLab-Examples/blob/main/xmacis2.ipynb)
|
|
118
|
+
|
|
119
|
+
*Advanced Users*
|
|
120
|
+
1) [Using the `client` module to download the latest HadCRUT5 Analysis netCDF file and open this dataset in xarray](https://github.com/edrewitz/WxData-JupyterLab-Examples/blob/main/hadcrut5.ipynb)
|
|
121
|
+
2) [Downloading the GFS0P25 for temperature fields and using run_external_scripts() to post-process this GFS0P25 dataset in an external Python script](https://github.com/edrewitz/WxData-JupyterLab-Examples/blob/main/external_scripts.ipynb)
|
|
122
|
+
|
|
123
|
+
## WxData Documentation
|
|
124
|
+
|
|
125
|
+
***Global Forecast System (GFS)***
|
|
126
|
+
1. [GFS0P25](https://github.com/edrewitz/WxData/blob/main/Documentation/GFS0P25.md)
|
|
127
|
+
2. [GFS0P25 SECONDARY PARAMETERS](https://github.com/edrewitz/WxData/blob/main/Documentation/GFS0P25%20Secondary%20Parameters.md)
|
|
128
|
+
3. [GFS0P50](https://github.com/edrewitz/WxData/blob/main/Documentation/GEFS0P50.md)
|
|
129
|
+
|
|
130
|
+
***Global Ensemble Forecast System (GEFS)***
|
|
131
|
+
1. [GEFS0P50](https://github.com/edrewitz/wxdata/blob/main/Documentation/GEFS0P50.md#global-ensemble-forecast-system-050-x-050-degree-gefs0p50)
|
|
132
|
+
2. [GEFS0P50 SECONDARY PARAMETERS](https://github.com/edrewitz/wxdata/blob/main/Documentation/GEFS0P50%20Secondary%20Parameters.md#global-ensemble-forecast-system-050-x-050-degree-secondary-parameters-gefs0p50-secondary-parameters)
|
|
133
|
+
3. [GEFS0P25](https://github.com/edrewitz/wxdata/blob/main/Documentation/GEFS0P25.md#global-ensemble-forecast-system-025-x-025-degree-gefs0p25)
|
|
134
|
+
|
|
135
|
+
***ECMWF Open Data***
|
|
136
|
+
1. [ECMWF IFS](https://github.com/edrewitz/WxData/blob/main/Documentation/ECMWF_IFS.md)
|
|
137
|
+
2. [ECMWF AIFS](https://github.com/edrewitz/WxData/blob/main/Documentation/ECMWF_AIFS.md)
|
|
138
|
+
3. [ECMWF High Resolution IFS](https://github.com/edrewitz/WxData/blob/main/Documentation/ECMWF_High_Res_IFS.md)
|
|
139
|
+
4. [ECMWF IFS Wave](https://github.com/edrewitz/WxData/blob/main/Documentation/ECMWF_IFS_Wave.md)
|
|
140
|
+
|
|
141
|
+
***Real-Time Mesoscale Analysis (RTMA)***
|
|
142
|
+
1. [RTMA](https://github.com/edrewitz/wxdata/blob/main/Documentation/rtma.md#real-time-mesoscale-analysis-rtma)
|
|
143
|
+
2. [RTMA Comparison](https://github.com/edrewitz/wxdata/blob/main/Documentation/rtma%20comparison.md#real-time-mesoscale-analysis-rtma-24-hour-comparison)
|
|
144
|
+
|
|
145
|
+
***NOAA Storm Prediction Center Outlooks And National Weather Service Forecasts***
|
|
146
|
+
1. [Get NDFD Grids](https://github.com/edrewitz/wxdata/blob/main/Documentation/noaa.md#noaa-get-storm-prediction-center-outlooks-and-national-weather-service-forecasts-ndfd-grids)
|
|
147
|
+
|
|
148
|
+
***METAR Observations***
|
|
149
|
+
1. [METAR Observations](https://github.com/edrewitz/wxdata/blob/main/Documentation/metars.md#metar-observations)
|
|
150
|
+
|
|
151
|
+
***FEMS RAWS Network***
|
|
152
|
+
1. [Get Single Station RAWS Data](https://github.com/edrewitz/wxdata/blob/main/Documentation/single_raws.md#fems-get-single-raws-station-data)
|
|
153
|
+
2. [Get Each SIG of RAWS Data for a Geographic Area Coordination Center](https://github.com/edrewitz/wxdata/blob/main/Documentation/raws%20sig.md#fems-get-raws-sig-data-for-a-geographic-area-coordination-center-region)
|
|
154
|
+
3. [Get NFDRS Forecast Data for Each SIG for a Geographic Area Coordination Center](https://github.com/edrewitz/wxdata/blob/main/Documentation/nfdrs%20forecast.md#fems-get-nfdrs-forecast-data-for-a-raws-sig-for-a-geographic-area-coordination-center-region)
|
|
155
|
+
|
|
156
|
+
***Observed Atmospheric Soundings***
|
|
157
|
+
1. [University Of Wyoming Soundings](https://github.com/edrewitz/wxdata/blob/main/Documentation/wyoming_soundings.md)
|
|
158
|
+
|
|
159
|
+
***GFS Post-Processing***
|
|
160
|
+
1. [Primary GFS Post-Processing](https://github.com/edrewitz/WxData/blob/main/Documentation/Primary%20GFS%20Post%20Processing.md)
|
|
161
|
+
2. [Secondary GFS Post-Processing](https://github.com/edrewitz/WxData/blob/main/Documentation/Secondary%20GFS%20Post%20Processing.md)
|
|
162
|
+
|
|
163
|
+
***GEFS Post-Processing***
|
|
164
|
+
1. [Primary GEFS Post-Processing](https://github.com/edrewitz/WxData/blob/main/Documentation/Primary%20GEFS%20Post-Processing.md)
|
|
165
|
+
2. [Secondary GEFS Post-Processing](https://github.com/edrewitz/WxData/blob/main/Documentation/Secondary%20GEFS%20Post%20Processing.md)
|
|
166
|
+
|
|
167
|
+
***ECMWF Post-Processing***
|
|
168
|
+
1. [ECMWF IFS and ECMWF High Resolution IFS](https://github.com/edrewitz/WxData/blob/main/Documentation/ECMWF%20IFS%20Post%20Processing.md)
|
|
169
|
+
2. [ECMWF AIFS](https://github.com/edrewitz/WxData/blob/main/Documentation/ECMWF%20AIFS%20Post%20Processing.md)
|
|
170
|
+
3. [ECMWF IFS Wave](https://github.com/edrewitz/WxData/blob/main/Documentation/ECMWF%20IFS%20Wave%20Post%20Processing.md)
|
|
171
|
+
|
|
172
|
+
***Real-Time Mesoscale Analysis Post-Processing***
|
|
173
|
+
1. [RTMA](https://github.com/edrewitz/WxData/blob/main/Documentation/RTMA%20Post%20Processing.md)
|
|
174
|
+
|
|
175
|
+
***xmACIS2 Climate Data***
|
|
176
|
+
1. [xmACIS2 Client](https://github.com/edrewitz/WxData/blob/main/Documentation/xmacis2_client.md)
|
|
177
|
+
|
|
178
|
+
***Cyclic Points For Hemispheric Plots***
|
|
179
|
+
1. [Cyclic Points](https://github.com/edrewitz/wxdata/blob/main/Documentation/cyclic_point.md#using-wxdata-to-add-cyclic-points-for-hemispheric-plots)
|
|
180
|
+
|
|
181
|
+
***Shifting Longitude From 0 to 360 --> -180 to 180***
|
|
182
|
+
1. [shift_longitude](https://github.com/edrewitz/WxData/blob/main/Documentation/shift_longitude.md)
|
|
183
|
+
|
|
184
|
+
***Pixel Query***
|
|
185
|
+
1. [pixel_query](https://github.com/edrewitz/WxData/blob/main/Documentation/pixel_query.md)
|
|
186
|
+
|
|
187
|
+
***Line Query***
|
|
188
|
+
1. [line_query](https://github.com/edrewitz/WxData/blob/main/Documentation/line_query.md)
|
|
189
|
+
|
|
190
|
+
***Running External Python Scripts In Your Workflow***
|
|
191
|
+
|
|
192
|
+
1 [run_external_scripts](https://github.com/edrewitz/WxData/blob/main/Documentation/run_external_scripts.md)
|
|
193
|
+
|
|
194
|
+
## Importing Functions from WxData
|
|
195
|
+
|
|
196
|
+
"""
|
|
197
|
+
This file hosts all of the functions in the WxData Python library that directly interact with the user.
|
|
198
|
+
|
|
199
|
+
(C) Eric J. Drewitz 2025
|
|
200
|
+
"""
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
"""
|
|
204
|
+
This section of functions are for users who want full wxdata functionality.
|
|
205
|
+
|
|
206
|
+
These functions do the following:
|
|
207
|
+
|
|
208
|
+
1) Scan for the latest available data.
|
|
209
|
+
- If the data on your local machine is not up to date, new data will download automatically.
|
|
210
|
+
- If the data on your local machine is up to date, new data download is bypassed.
|
|
211
|
+
- This is a safeguard that prevents excessive requests on the data servers.
|
|
212
|
+
|
|
213
|
+
2) Builds the wxdata directory to store the weather data files.
|
|
214
|
+
- Scans for the directory branch and builds the branch if it does not exist.
|
|
215
|
+
|
|
216
|
+
3) Downloads the data.
|
|
217
|
+
- Users can define their VPN/PROXY IP Address as a (dict) in their script and pass their
|
|
218
|
+
VPN/PROXY IP address into the function to avoid SSL Certificate errors when requesting data.
|
|
219
|
+
- Algorithm allows for up to 5 retries with a 30 second break between each retry to resolve connection
|
|
220
|
+
interruptions while not overburdening the data servers.
|
|
221
|
+
|
|
222
|
+
4) Pre-processes the data via filename formatting and correctly filing in the wxdata directory.
|
|
223
|
+
|
|
224
|
+
5) Post-processing by doing the following tasks:
|
|
225
|
+
- Remapping GRIB2 variable keys into plain language variable keys.
|
|
226
|
+
- Fixing dataset build errors and grouping all variables together.
|
|
227
|
+
- Transforms longitude from 0 to 360 degrees into -180 to 180 degrees.
|
|
228
|
+
- Subsetting the data to the latitude/longitude boundaries specified by the user.
|
|
229
|
+
- Converting temperature from kelvin to units the user wants (default is Celsius).
|
|
230
|
+
- Returning a post-processed xarray.array to the user.
|
|
231
|
+
|
|
232
|
+
6) Preserves system memory by doing the following:
|
|
233
|
+
- Deleting old data files before each new download.
|
|
234
|
+
- When clear_recycle_bin=True, the user's recycle bin is also cleared.
|
|
235
|
+
"""
|
|
236
|
+
|
|
237
|
+
# Global Forecast System (GFS)
|
|
238
|
+
from wxdata import(
|
|
239
|
+
gfs_0p25,
|
|
240
|
+
gfs_0p25_secondary_parameters,
|
|
241
|
+
gfs_0p50
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
# Global Ensemble Forecast System (GEFS)
|
|
246
|
+
from wxdata import(
|
|
247
|
+
gefs_0p50,
|
|
248
|
+
gefs_0p50_secondary_parameters,
|
|
249
|
+
gefs_0p25
|
|
250
|
+
)
|
|
251
|
+
|
|
252
|
+
# European Centre for Medium-Range Weather Forecasts (ECMWF)
|
|
253
|
+
from wxdata import(
|
|
254
|
+
ecmwf_ifs,
|
|
255
|
+
ecmwf_aifs,
|
|
256
|
+
ecmwf_ifs_high_res,
|
|
257
|
+
ecmwf_ifs_wave
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
# FEMS RAWS Network
|
|
261
|
+
from wxdata import(
|
|
262
|
+
get_single_station_data,
|
|
263
|
+
get_raws_sig_data,
|
|
264
|
+
get_nfdrs_forecast_data
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
# Real-Time Mesoscale Analysis (RTMA)
|
|
268
|
+
from wxdata import(
|
|
269
|
+
rtma,
|
|
270
|
+
rtma_comparison
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
# NOAA
|
|
274
|
+
# Storm Prediction Center Outlooks
|
|
275
|
+
# National Weather Service Forecasts
|
|
276
|
+
from wxdata import get_ndfd_grids
|
|
277
|
+
|
|
278
|
+
# Observed Upper-Air Soundings
|
|
279
|
+
# (University of Wyoming Database)
|
|
280
|
+
from wxdata import get_observed_sounding_data
|
|
281
|
+
|
|
282
|
+
# METAR Observational Data (From NOAA)
|
|
283
|
+
from wxdata import download_metar_data
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
"""
|
|
287
|
+
This section hosts the utility functions accessable to the user.
|
|
288
|
+
|
|
289
|
+
These functions provide helpful utilities when analyzing weather data.
|
|
290
|
+
|
|
291
|
+
Utility functions are geared towards the following types of users:
|
|
292
|
+
|
|
293
|
+
1) Users who want to use their own scripts to download the data however, they
|
|
294
|
+
would like to use the wxdata post-processing capabilities.
|
|
295
|
+
|
|
296
|
+
2) Users who want to make hemispheric graphics or any graphics where cyclic points
|
|
297
|
+
resolve missing data along the prime meridian or international dateline.
|
|
298
|
+
"""
|
|
299
|
+
# Global Forecast System (GFS)
|
|
300
|
+
from wxdata import gfs_post_processing
|
|
301
|
+
|
|
302
|
+
# Global Ensemble Forecast System (GEFS)
|
|
303
|
+
from wxdata import gefs_post_processing
|
|
304
|
+
|
|
305
|
+
# European Centre for Medium-Range Weather Forecasts (ECMWF)
|
|
306
|
+
from wxdata import ecmwf_post_processing
|
|
307
|
+
|
|
308
|
+
# Real-Time Mesoscale Analysis (RTMA)
|
|
309
|
+
from wxdata import process_rtma_data
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
# WxData function using cartopy to make cyclic points
|
|
313
|
+
# This is for users who wish to make graphics that cross the -180/180 degree longitude line
|
|
314
|
+
# This is commonly used for Hemispheric graphics
|
|
315
|
+
# Function that converts the longitude dimension in an xarray.array
|
|
316
|
+
# From 0 to 360 to -180 to 180
|
|
317
|
+
from wxdata import(
|
|
318
|
+
cyclic_point,
|
|
319
|
+
shift_longitude
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
# Functions to pixel query and query pixels along a line between points A and B
|
|
323
|
+
from wxdata import(
|
|
324
|
+
pixel_query,
|
|
325
|
+
line_query
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
# These are the wxdata HTTPS Clients with full VPN/PROXY Support
|
|
329
|
+
# Client List:
|
|
330
|
+
# - get_gridded_data()
|
|
331
|
+
# - get_csv_data()
|
|
332
|
+
# - get_xmacis_data()
|
|
333
|
+
from wxdata import client
|
|
334
|
+
|
|
335
|
+
# This function executes a list of Python scripts in the order the user lists them
|
|
336
|
+
from wxdata import run_external_scripts
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
## Citations
|
|
345
|
+
|
|
346
|
+
**MetPy**: May, R. M., Goebbert, K. H., Thielen, J. E., Leeman, J. R., Camron, M. D., Bruick, Z.,
|
|
347
|
+
Bruning, E. C., Manser, R. P., Arms, S. C., and Marsh, P. T., 2022: MetPy: A
|
|
348
|
+
Meteorological Python Library for Data Analysis and Visualization. Bull. Amer. Meteor.
|
|
349
|
+
Soc., 103, E2273-E2284, https://doi.org/10.1175/BAMS-D-21-0125.1.
|
|
350
|
+
|
|
351
|
+
**xarray**: Hoyer, S., Hamman, J. (In revision). Xarray: N-D labeled arrays and datasets in Python. Journal of Open Research Software.
|
|
352
|
+
|
|
353
|
+
**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
|
|
354
|
+
|
|
355
|
+
**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).
|
|
356
|
+
|
|
357
|
+
**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).
|
|
358
|
+
|
|
359
|
+
**dask**: Dask Development Team (2016). Dask: Library for dynamic task scheduling. URL http://dask.pydata.org
|
|
360
|
+
|
|
361
|
+
**cfgrib**: Author: ECMWF, Year: (2025), Title: cfgrib: A Python interface to map GRIB files to xarray, Source: https://github.com/ecmwf/cfgrib
|
|
362
|
+
|
|
363
|
+
## Data Sources
|
|
364
|
+
|
|
365
|
+
1) [National Oceanic and Atmospheric Administration/National Center for Environmental Prediction](https://nomads.ncep.noaa.gov/)
|
|
366
|
+
2) [European Centre for Medium-Range Weather Forecasts](https://data.ecmwf.int/forecasts/)
|
|
367
|
+
3) [University of Wyoming](http://www.weather.uwyo.edu/upperair/sounding.shtml)
|
|
368
|
+
4) [National Oceanic and Atmospheric Administration/National Weather Service](https://tgftp.nws.noaa.gov/)
|
|
369
|
+
5) [National Oceanic and Atmospheric Administration/Aviation Weather Center](https://aviationweather.gov/)
|
|
370
|
+
6) [Applied Climate Information System (ACIS)](https://www.rcc-acis.org/docs_webservices.html)
|
|
371
|
+
|
|
372
|
+
|