wxdata 1.4__tar.gz → 1.4.2__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.
Files changed (85) hide show
  1. {wxdata-1.4/src/wxdata.egg-info → wxdata-1.4.2}/PKG-INFO +1 -11
  2. {wxdata-1.4 → wxdata-1.4.2}/README.md +0 -10
  3. {wxdata-1.4 → wxdata-1.4.2}/pyproject.toml +1 -1
  4. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/post_processors/rtma_post_processing.py +30 -0
  5. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/rtma/process.py +29 -0
  6. {wxdata-1.4 → wxdata-1.4.2/src/wxdata.egg-info}/PKG-INFO +1 -11
  7. {wxdata-1.4 → wxdata-1.4.2}/LICENSE +0 -0
  8. {wxdata-1.4 → wxdata-1.4.2}/setup.cfg +0 -0
  9. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/__init__.py +0 -0
  10. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/aigefs/__init__.py +0 -0
  11. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/aigefs/aigefs.py +0 -0
  12. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/aigefs/paths.py +0 -0
  13. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/aigefs/url_scanners.py +0 -0
  14. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/aigfs/__init__.py +0 -0
  15. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/aigfs/aigfs.py +0 -0
  16. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/aigfs/paths.py +0 -0
  17. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/aigfs/url_scanners.py +0 -0
  18. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/calc/__init__.py +0 -0
  19. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/calc/derived_fields.py +0 -0
  20. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/calc/kinematics.py +0 -0
  21. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/calc/thermodynamics.py +0 -0
  22. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/calc/unit_conversion.py +0 -0
  23. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/client/__init__.py +0 -0
  24. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/client/client.py +0 -0
  25. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/ecmwf/__init__.py +0 -0
  26. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/ecmwf/ecmwf.py +0 -0
  27. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/ecmwf/file_funcs.py +0 -0
  28. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/ecmwf/keys.py +0 -0
  29. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/ecmwf/parsers.py +0 -0
  30. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/ecmwf/paths.py +0 -0
  31. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/ecmwf/url_scanners.py +0 -0
  32. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/fems/__init__.py +0 -0
  33. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/fems/fems.py +0 -0
  34. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/fems/raws_sigs.py +0 -0
  35. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/gefs/__init__.py +0 -0
  36. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/gefs/exception_messages.py +0 -0
  37. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/gefs/file_funcs.py +0 -0
  38. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/gefs/gefs.py +0 -0
  39. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/gefs/paths.py +0 -0
  40. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/gefs/process.py +0 -0
  41. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/gefs/url_scanners.py +0 -0
  42. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/gfs/__init__.py +0 -0
  43. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/gfs/exception_messages.py +0 -0
  44. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/gfs/gfs.py +0 -0
  45. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/gfs/paths.py +0 -0
  46. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/gfs/url_scanners.py +0 -0
  47. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/hgefs/__init__.py +0 -0
  48. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/hgefs/hgefs.py +0 -0
  49. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/hgefs/paths.py +0 -0
  50. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/hgefs/url_scanner.py +0 -0
  51. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/metars/__init__.py +0 -0
  52. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/metars/_clean_data.py +0 -0
  53. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/metars/metar_obs.py +0 -0
  54. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/noaa/__init__.py +0 -0
  55. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/noaa/nws.py +0 -0
  56. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/post_processors/__init__.py +0 -0
  57. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/post_processors/aigefs_post_processing.py +0 -0
  58. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/post_processors/aigfs_post_processing.py +0 -0
  59. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/post_processors/ecmwf_post_processing.py +0 -0
  60. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/post_processors/gefs_post_processing.py +0 -0
  61. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/post_processors/gfs_post_processing.py +0 -0
  62. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/post_processors/hgefs_post_processing.py +0 -0
  63. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/rtma/__init__.py +0 -0
  64. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/rtma/file_funcs.py +0 -0
  65. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/rtma/keys.py +0 -0
  66. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/rtma/rtma.py +0 -0
  67. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/rtma/url_scanners.py +0 -0
  68. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/soundings/__init__.py +0 -0
  69. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/soundings/_exceptions.py +0 -0
  70. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/soundings/wyoming_soundings.py +0 -0
  71. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/utils/__init__.py +0 -0
  72. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/utils/coords.py +0 -0
  73. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/utils/exceptions.py +0 -0
  74. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/utils/file_funcs.py +0 -0
  75. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/utils/file_scanner.py +0 -0
  76. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/utils/nomads_gribfilter.py +0 -0
  77. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/utils/progress_bar.py +0 -0
  78. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/utils/recycle_bin.py +0 -0
  79. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/utils/scripts.py +0 -0
  80. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/utils/tools.py +0 -0
  81. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata/utils/xmacis2_cleanup.py +0 -0
  82. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata.egg-info/SOURCES.txt +0 -0
  83. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata.egg-info/dependency_links.txt +0 -0
  84. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata.egg-info/requires.txt +0 -0
  85. {wxdata-1.4 → wxdata-1.4.2}/src/wxdata.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wxdata
3
- Version: 1.4
3
+ Version: 1.4.2
4
4
  Summary: A Python library that acts as a client to download, pre-process and post-process weather data. Friendly for users on VPN/PROXY connections.
5
5
  Author: Eric J. Drewitz
6
6
  Project-URL: Documentation, https://github.com/edrewitz/wxdata/blob/main/Documentation/Landing%20Page.md
@@ -127,16 +127,6 @@ ii) Set up a new environment with an earlier version of Python (must be Python >
127
127
 
128
128
 
129
129
  For more information on configuring proxies: https://requests.readthedocs.io/en/latest/user/advanced/#proxies
130
-
131
- - Some data access functions work on VPN/PROXY connections without needing to define VPN/PROXY settings:
132
- - METARs
133
- - NOAA Storm Prediction Center/National Weather Service Products
134
- - FEMS
135
-
136
- - Data access methods that users need to define VPN/PROXY IP addresses if using a VPN/PROXY connection:
137
- - Various Forecast Models
138
- - Observed Sounding Data from University of Wyoming
139
- - Real-Time Mesoscale Analysis
140
130
 
141
131
  1) Converts GRIB variable keys into variable keys that are in plain language.
142
132
  - (e.g. 'r2' ---> '2m_relative_humidity')
@@ -98,16 +98,6 @@ ii) Set up a new environment with an earlier version of Python (must be Python >
98
98
 
99
99
 
100
100
  For more information on configuring proxies: https://requests.readthedocs.io/en/latest/user/advanced/#proxies
101
-
102
- - Some data access functions work on VPN/PROXY connections without needing to define VPN/PROXY settings:
103
- - METARs
104
- - NOAA Storm Prediction Center/National Weather Service Products
105
- - FEMS
106
-
107
- - Data access methods that users need to define VPN/PROXY IP addresses if using a VPN/PROXY connection:
108
- - Various Forecast Models
109
- - Observed Sounding Data from University of Wyoming
110
- - Real-Time Mesoscale Analysis
111
101
 
112
102
  1) Converts GRIB variable keys into variable keys that are in plain language.
113
103
  - (e.g. 'r2' ---> '2m_relative_humidity')
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "wxdata"
3
- version = "1.4"
3
+ version = "1.4.2"
4
4
  description = "A Python library that acts as a client to download, pre-process and post-process weather data. Friendly for users on VPN/PROXY connections."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -15,10 +15,36 @@ _warnings.filterwarnings('ignore')
15
15
  from wxdata.utils.exceptions import eccodes_error_message as _eccodes_error_message
16
16
  from wxdata.calc.thermodynamics import relative_humidity as _relative_humidity
17
17
  from wxdata.utils.file_funcs import clear_idx_files_in_path as _clear_idx_files_in_path
18
+ from wxdata.utils.coords import shift_longitude as _shift_longitude_regrid
18
19
 
19
20
  _sys.tracebacklimit = 0
20
21
  _logging.disable()
21
22
 
23
+ def _shift_longitude(ds):
24
+
25
+ """
26
+ This function shifts the longitude of dimension (x,y) from 0 to 360 to -180 to 180
27
+
28
+ Required Arguments:
29
+
30
+ 1) ds (xarray.array) - The xarray data array of RTMA Data
31
+
32
+ Optional Arguments: None
33
+
34
+ Returns
35
+ -------
36
+
37
+ A RTMA dataset with longitude from -180 to 180
38
+ """
39
+
40
+ lon = ((ds['longitude'].values + 180.0) % 360.0) - 180.0
41
+
42
+ ds = ds.assign(
43
+ longitude=(("y", "x"), lon)
44
+ )
45
+
46
+ return ds
47
+
22
48
  def _rows_and_cols(model):
23
49
 
24
50
  """
@@ -293,10 +319,14 @@ def process_rtma_data(filename,
293
319
 
294
320
  _clear_idx_files_in_path(directory)
295
321
 
322
+ ds1 = _shift_longitude_regrid(ds1)
323
+
296
324
  return ds1
297
325
 
298
326
  else:
299
327
 
328
+ ds = _shift_longitude(ds)
329
+
300
330
  _clear_idx_files_in_path(directory)
301
331
 
302
332
  return ds
@@ -14,10 +14,37 @@ import warnings
14
14
  warnings.filterwarnings('ignore')
15
15
 
16
16
  from wxdata.calc.thermodynamics import relative_humidity
17
+ from wxdata.utils.coords import shift_longitude as shift_longitude_regrid
18
+ from wxdata.utils.file_funcs import clear_idx_files_in_path as clear_idx_files_in_path
17
19
 
18
20
  sys.tracebacklimit = 0
19
21
  logging.disable()
20
22
 
23
+ def shift_longitude(ds):
24
+
25
+ """
26
+ This function shifts the longitude of dimension (x,y) from 0 to 360 to -180 to 180
27
+
28
+ Required Arguments:
29
+
30
+ 1) ds (xarray.array) - The xarray data array of RTMA Data
31
+
32
+ Optional Arguments: None
33
+
34
+ Returns
35
+ -------
36
+
37
+ A RTMA dataset with longitude from -180 to 180
38
+ """
39
+
40
+ lon = ((ds['longitude'].values + 180.0) % 360.0) - 180.0
41
+
42
+ ds = ds.assign(
43
+ longitude=(("y", "x"), lon)
44
+ )
45
+
46
+ return ds
47
+
21
48
  def rows_and_cols(model):
22
49
 
23
50
  """
@@ -284,8 +311,10 @@ def process_rtma_data(path,
284
311
  ds1['10m_wind_speed'] = mpcalc.smooth_gaussian(ds1['10m_wind_speed'], n=8)
285
312
  ds1['10m_wind_gust'] = mpcalc.smooth_gaussian(ds1['10m_wind_gust'], n=8)
286
313
 
314
+ ds1 = shift_longitude_regrid(ds1)
287
315
  return ds1
288
316
 
289
317
  else:
290
318
 
319
+ ds = shift_longitude(ds)
291
320
  return ds
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wxdata
3
- Version: 1.4
3
+ Version: 1.4.2
4
4
  Summary: A Python library that acts as a client to download, pre-process and post-process weather data. Friendly for users on VPN/PROXY connections.
5
5
  Author: Eric J. Drewitz
6
6
  Project-URL: Documentation, https://github.com/edrewitz/wxdata/blob/main/Documentation/Landing%20Page.md
@@ -127,16 +127,6 @@ ii) Set up a new environment with an earlier version of Python (must be Python >
127
127
 
128
128
 
129
129
  For more information on configuring proxies: https://requests.readthedocs.io/en/latest/user/advanced/#proxies
130
-
131
- - Some data access functions work on VPN/PROXY connections without needing to define VPN/PROXY settings:
132
- - METARs
133
- - NOAA Storm Prediction Center/National Weather Service Products
134
- - FEMS
135
-
136
- - Data access methods that users need to define VPN/PROXY IP addresses if using a VPN/PROXY connection:
137
- - Various Forecast Models
138
- - Observed Sounding Data from University of Wyoming
139
- - Real-Time Mesoscale Analysis
140
130
 
141
131
  1) Converts GRIB variable keys into variable keys that are in plain language.
142
132
  - (e.g. 'r2' ---> '2m_relative_humidity')
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes