gpmmatch 1.5.4__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.
gpmmatch-1.5.4/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2025 Valentin Louf
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,206 @@
1
+ Metadata-Version: 2.4
2
+ Name: gpmmatch
3
+ Version: 1.5.4
4
+ Summary: Volume matching of ground radar and GPM satellite data.
5
+ Author-email: Valentin Louf <valentin.louf@bom.gov.au>
6
+ License: Apache-2.0
7
+ Project-URL: Documentation, https://github.com/vlouf/gpmmatch#readme
8
+ Project-URL: Source, https://github.com/vlouf/gpmmatch
9
+ Project-URL: Tracker, https://github.com/vlouf/gpmmatch/issues
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Education
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: numpy
25
+ Requires-Dist: scipy
26
+ Requires-Dist: pandas
27
+ Requires-Dist: h5py
28
+ Requires-Dist: netCDF4
29
+ Requires-Dist: xarray
30
+ Requires-Dist: pyodim
31
+ Requires-Dist: pyproj
32
+ Dynamic: license-file
33
+
34
+ # 🛰️ gpmmatch 🛰️
35
+
36
+ gpmmatch is a Python library for matching satellite and ground-based radar volumes. It is primarily designed for use with GPM (Global Precipitation Measurement) data, but also supports the latest TRMM (Tropical Rainfall Measuring Mission) products.
37
+
38
+ ## ⚠️ Branch and Radar Format Compatibility
39
+
40
+ > **Important Notice on Branch Usage and Radar Format Support**
41
+
42
+ The `master` branch of this repository uses **`pyodim`** for radar data I/O and is **only compatible with ODIM HDF5 radar format**. This branch is used in **operational environments**, and **ODIM is the only officially supported radar format** for production use.
43
+
44
+ If you are working with other radar formats (e.g., NEXRAD, UF, SIGMET, etc.), please use the `pyart` branch, which integrates with the **Py-ART** library and supports a wider range of radar data formats.
45
+
46
+ | Branch | Radar I/O Library | Supported Formats | Intended Use |
47
+ |----------|-------------------|---------------------------|--------------------------|
48
+ | `master` | `pyodim` | ODIM only | Operational (official) |
49
+ | `pyart` | `Py-ART` | Multiple radar formats | Research & development |
50
+
51
+ Please ensure you are using the appropriate branch and radar I/O backend for your application.
52
+
53
+ ---
54
+
55
+ ## 🚀 Installation
56
+
57
+ Install gpmmatch directly from the repository:
58
+
59
+ ```bash
60
+ pip install git+https://github.com/vlouf/gpmmatch.git
61
+ ```
62
+
63
+ Or clone and install locally:
64
+
65
+ ```bash
66
+ git clone https://github.com/vlouf/gpmmatch.git
67
+ cd gpmmatch
68
+ pip install .
69
+ ```
70
+
71
+ ## 🛠️ Dependencies
72
+
73
+ The following Python libraries are required to use `gpmmatch` (automatically installed with the package):
74
+
75
+ - `numpy` - Array operations and numerical computing
76
+ - `scipy` - Scientific computing and spatial operations
77
+ - `pandas` - Data manipulation and time handling
78
+ - `h5py` - HDF5 file reading for GPM data
79
+ - `netCDF4` - NetCDF file I/O
80
+ - `xarray` - Multi-dimensional labeled arrays and datasets
81
+ - `pyodim` - ODIM HDF5 radar format reader (master branch only)
82
+ - `pyproj` - Cartographic projections and coordinate transformations
83
+
84
+ **Python Version:** Requires Python 3.9 or later
85
+
86
+ ## ✨ Key Features
87
+
88
+ - **Volume Matching**: Spatially and temporally match GPM satellite and ground radar observations
89
+ - **Calibration Monitoring**: Real-time monitoring of weather radar network calibration using GPM as reference
90
+ - **Phase-Aware DFR Conversion**: Advanced reflectivity conversion accounting for hydrometeor phase (ice, melting layer, liquid) using GPM bright band detection
91
+ - **Attenuation Correction**: Built-in attenuation correction for C-band and X-band radars using:
92
+ - ZPHI method (preferred when KDP is available)
93
+ - Gunn-East method (fallback)
94
+ - **Multi-Pass Processing**: Iterative volume matching with automatic offset computation and convergence detection
95
+ - **Parallax Correction**: Automatic geometric correction for satellite viewing angle
96
+
97
+ ## 📓 Example Jupyter Notebook
98
+
99
+ A comprehensive example Jupyter notebook is available in the [notebooks](notebooks/) directory:
100
+
101
+ - **[notebooks/Example.ipynb](notebooks/Example.ipynb)**: Step-by-step tutorial demonstrating:
102
+ - How to perform volume matching of GPM data against ground radar data
103
+ - Downloading sample radar data from the Australian weather radar network archive
104
+ - Processing and analyzing the matched data
105
+ - Creating publication-quality plots using Matplotlib
106
+
107
+ ## 📖 Usage
108
+
109
+ ### Basic Volume Matching
110
+
111
+ ```python
112
+ import gpmmatch
113
+
114
+ # Perform volume matching
115
+ matchset = gpmmatch.volume_matching(
116
+ gpmfile="GPM_data.HDF5",
117
+ grfile="radar_data.h5",
118
+ gr_beamwidth=1.0,
119
+ radar_band="C",
120
+ refl_name="DBZH",
121
+ fname_prefix="my_radar",
122
+ phase_aware_dfr=True, # Use phase-aware DFR conversion
123
+ correct_attenuation=True # Apply attenuation correction
124
+ )
125
+ ```
126
+
127
+ ### Multi-Pass Processing with Offset Convergence
128
+
129
+ ```python
130
+ # Multi-pass processing with automatic offset computation
131
+ gpmmatch.vmatch_multi_pass(
132
+ gpmfile="GPM_data.HDF5",
133
+ grfile="radar_data.h5",
134
+ radar_band="C",
135
+ refl_name="DBZH",
136
+ fname_prefix="my_radar",
137
+ output_dir="./output",
138
+ offset_thld=0.5, # Convergence threshold in dB
139
+ phase_aware_dfr=True
140
+ )
141
+ ```
142
+
143
+ ### Key Parameters
144
+
145
+ - `gpmfile`: Path to GPM HDF5 data file
146
+ - `grfile`: Path to ground radar ODIM HDF5 file
147
+ - `radar_band`: Radar frequency band ('S', 'C', or 'X')
148
+ - `refl_name`: Name of reflectivity field in radar data (e.g., 'DBZH', 'corrected_reflectivity')
149
+ - `gr_beamwidth`: Ground radar 3dB beamwidth in degrees
150
+ - `phase_aware_dfr`: Enable phase-aware DFR conversion (recommended, default: True)
151
+ - `correct_attenuation`: Apply attenuation correction for C/X-band (default: True)
152
+ - `kdp_name`: Name of KDP field for ZPHI attenuation correction (default: 'KDP')
153
+
154
+ ## Citation
155
+
156
+ If you use `gpmmatch` in your research, please cite the following paper:
157
+
158
+ **Louf, Valentin, and Alain Protat**. *Real-Time Monitoring of Weather Radar Network Calibration and Antenna Pointing.* Journal of Atmospheric and Oceanic Technology, April 24, 2023. https://doi.org/10.1175/JTECH-D-22-0118.1.
159
+
160
+ BibTeX:
161
+ ```bibtex
162
+ @article {Louf2023,
163
+ author = "Valentin Louf and Alain Protat",
164
+ title = "Real-Time Monitoring of Weather Radar Network Calibration and Antenna Pointing",
165
+ journal = "Journal of Atmospheric and Oceanic Technology",
166
+ year = "2023",
167
+ publisher = "American Meteorological Society",
168
+ volume = "40",
169
+ number = "7",
170
+ doi = "10.1175/JTECH-D-22-0118.1",
171
+ pages= "823 - 844",
172
+ }
173
+ ```
174
+
175
+ Other references for the reflectivity conversion:
176
+
177
+ - Rain DFR: Louf, V., A. Protat, R. A. Warren, S. M. Collis, D. B. Wolff, S. Raunyiar, C. Jakob, and W. A. Petersen, 2019: An Integrated Approach to Weather Radar Calibration and Monitoring Using Ground Clutter and Satellite Comparisons. *J. Atmos. Oceanic Technol.*, **36**, 17–39, https://doi.org/10.1175/JTECH-D-18-0007.1
178
+
179
+ - Ice scattering: Tyynelä, J., J. Leinonen, A. Moisseev, and T. Nousiainen, 2011: Radar Backscattering from Snowflakes: Comparison of Fractal, Aggregate, and Soft Spheroid Models. *J. Atmos. Oceanic Technol.*, **28**, 1365–1372, https://doi.org/10.1175/JTECH-D-11-00004.1
180
+
181
+ - Ice scattering: Leinonen, J., 2014: High-level interface to T-matrix scattering calculations: architecture, capabilities and limitations. *Opt. Express*, **22**(2), 1655–1660, https://doi.org/10.1364/OE.22.001655
182
+
183
+ - GPM bright band: Awaka, J., M. Le, V. Chandrasekar, N. Yoshida, T. Higashiuwatoko, T. Kubota, and T. Iguchi, 2016: Rain Type Classification Algorithm Module for GPM Dual-Frequency Precipitation Radar. *J. Atmos. Oceanic Technol.*, **33**, 1887–1898, https://doi.org/10.1175/JTECH-D-16-0016.1
184
+
185
+ ## License
186
+
187
+ This library is open source and made freely available according to the below
188
+ text:
189
+
190
+ Copyright 2020 Valentin Louf
191
+ Copyright 2023 Commonwealth of Australia, Bureau of Meteorology
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.
204
+
205
+ A copy of the license is also provided in the LICENSE file included with the
206
+ source distribution of the library.
@@ -0,0 +1,173 @@
1
+ # 🛰️ gpmmatch 🛰️
2
+
3
+ gpmmatch is a Python library for matching satellite and ground-based radar volumes. It is primarily designed for use with GPM (Global Precipitation Measurement) data, but also supports the latest TRMM (Tropical Rainfall Measuring Mission) products.
4
+
5
+ ## ⚠️ Branch and Radar Format Compatibility
6
+
7
+ > **Important Notice on Branch Usage and Radar Format Support**
8
+
9
+ The `master` branch of this repository uses **`pyodim`** for radar data I/O and is **only compatible with ODIM HDF5 radar format**. This branch is used in **operational environments**, and **ODIM is the only officially supported radar format** for production use.
10
+
11
+ If you are working with other radar formats (e.g., NEXRAD, UF, SIGMET, etc.), please use the `pyart` branch, which integrates with the **Py-ART** library and supports a wider range of radar data formats.
12
+
13
+ | Branch | Radar I/O Library | Supported Formats | Intended Use |
14
+ |----------|-------------------|---------------------------|--------------------------|
15
+ | `master` | `pyodim` | ODIM only | Operational (official) |
16
+ | `pyart` | `Py-ART` | Multiple radar formats | Research & development |
17
+
18
+ Please ensure you are using the appropriate branch and radar I/O backend for your application.
19
+
20
+ ---
21
+
22
+ ## 🚀 Installation
23
+
24
+ Install gpmmatch directly from the repository:
25
+
26
+ ```bash
27
+ pip install git+https://github.com/vlouf/gpmmatch.git
28
+ ```
29
+
30
+ Or clone and install locally:
31
+
32
+ ```bash
33
+ git clone https://github.com/vlouf/gpmmatch.git
34
+ cd gpmmatch
35
+ pip install .
36
+ ```
37
+
38
+ ## 🛠️ Dependencies
39
+
40
+ The following Python libraries are required to use `gpmmatch` (automatically installed with the package):
41
+
42
+ - `numpy` - Array operations and numerical computing
43
+ - `scipy` - Scientific computing and spatial operations
44
+ - `pandas` - Data manipulation and time handling
45
+ - `h5py` - HDF5 file reading for GPM data
46
+ - `netCDF4` - NetCDF file I/O
47
+ - `xarray` - Multi-dimensional labeled arrays and datasets
48
+ - `pyodim` - ODIM HDF5 radar format reader (master branch only)
49
+ - `pyproj` - Cartographic projections and coordinate transformations
50
+
51
+ **Python Version:** Requires Python 3.9 or later
52
+
53
+ ## ✨ Key Features
54
+
55
+ - **Volume Matching**: Spatially and temporally match GPM satellite and ground radar observations
56
+ - **Calibration Monitoring**: Real-time monitoring of weather radar network calibration using GPM as reference
57
+ - **Phase-Aware DFR Conversion**: Advanced reflectivity conversion accounting for hydrometeor phase (ice, melting layer, liquid) using GPM bright band detection
58
+ - **Attenuation Correction**: Built-in attenuation correction for C-band and X-band radars using:
59
+ - ZPHI method (preferred when KDP is available)
60
+ - Gunn-East method (fallback)
61
+ - **Multi-Pass Processing**: Iterative volume matching with automatic offset computation and convergence detection
62
+ - **Parallax Correction**: Automatic geometric correction for satellite viewing angle
63
+
64
+ ## 📓 Example Jupyter Notebook
65
+
66
+ A comprehensive example Jupyter notebook is available in the [notebooks](notebooks/) directory:
67
+
68
+ - **[notebooks/Example.ipynb](notebooks/Example.ipynb)**: Step-by-step tutorial demonstrating:
69
+ - How to perform volume matching of GPM data against ground radar data
70
+ - Downloading sample radar data from the Australian weather radar network archive
71
+ - Processing and analyzing the matched data
72
+ - Creating publication-quality plots using Matplotlib
73
+
74
+ ## 📖 Usage
75
+
76
+ ### Basic Volume Matching
77
+
78
+ ```python
79
+ import gpmmatch
80
+
81
+ # Perform volume matching
82
+ matchset = gpmmatch.volume_matching(
83
+ gpmfile="GPM_data.HDF5",
84
+ grfile="radar_data.h5",
85
+ gr_beamwidth=1.0,
86
+ radar_band="C",
87
+ refl_name="DBZH",
88
+ fname_prefix="my_radar",
89
+ phase_aware_dfr=True, # Use phase-aware DFR conversion
90
+ correct_attenuation=True # Apply attenuation correction
91
+ )
92
+ ```
93
+
94
+ ### Multi-Pass Processing with Offset Convergence
95
+
96
+ ```python
97
+ # Multi-pass processing with automatic offset computation
98
+ gpmmatch.vmatch_multi_pass(
99
+ gpmfile="GPM_data.HDF5",
100
+ grfile="radar_data.h5",
101
+ radar_band="C",
102
+ refl_name="DBZH",
103
+ fname_prefix="my_radar",
104
+ output_dir="./output",
105
+ offset_thld=0.5, # Convergence threshold in dB
106
+ phase_aware_dfr=True
107
+ )
108
+ ```
109
+
110
+ ### Key Parameters
111
+
112
+ - `gpmfile`: Path to GPM HDF5 data file
113
+ - `grfile`: Path to ground radar ODIM HDF5 file
114
+ - `radar_band`: Radar frequency band ('S', 'C', or 'X')
115
+ - `refl_name`: Name of reflectivity field in radar data (e.g., 'DBZH', 'corrected_reflectivity')
116
+ - `gr_beamwidth`: Ground radar 3dB beamwidth in degrees
117
+ - `phase_aware_dfr`: Enable phase-aware DFR conversion (recommended, default: True)
118
+ - `correct_attenuation`: Apply attenuation correction for C/X-band (default: True)
119
+ - `kdp_name`: Name of KDP field for ZPHI attenuation correction (default: 'KDP')
120
+
121
+ ## Citation
122
+
123
+ If you use `gpmmatch` in your research, please cite the following paper:
124
+
125
+ **Louf, Valentin, and Alain Protat**. *Real-Time Monitoring of Weather Radar Network Calibration and Antenna Pointing.* Journal of Atmospheric and Oceanic Technology, April 24, 2023. https://doi.org/10.1175/JTECH-D-22-0118.1.
126
+
127
+ BibTeX:
128
+ ```bibtex
129
+ @article {Louf2023,
130
+ author = "Valentin Louf and Alain Protat",
131
+ title = "Real-Time Monitoring of Weather Radar Network Calibration and Antenna Pointing",
132
+ journal = "Journal of Atmospheric and Oceanic Technology",
133
+ year = "2023",
134
+ publisher = "American Meteorological Society",
135
+ volume = "40",
136
+ number = "7",
137
+ doi = "10.1175/JTECH-D-22-0118.1",
138
+ pages= "823 - 844",
139
+ }
140
+ ```
141
+
142
+ Other references for the reflectivity conversion:
143
+
144
+ - Rain DFR: Louf, V., A. Protat, R. A. Warren, S. M. Collis, D. B. Wolff, S. Raunyiar, C. Jakob, and W. A. Petersen, 2019: An Integrated Approach to Weather Radar Calibration and Monitoring Using Ground Clutter and Satellite Comparisons. *J. Atmos. Oceanic Technol.*, **36**, 17–39, https://doi.org/10.1175/JTECH-D-18-0007.1
145
+
146
+ - Ice scattering: Tyynelä, J., J. Leinonen, A. Moisseev, and T. Nousiainen, 2011: Radar Backscattering from Snowflakes: Comparison of Fractal, Aggregate, and Soft Spheroid Models. *J. Atmos. Oceanic Technol.*, **28**, 1365–1372, https://doi.org/10.1175/JTECH-D-11-00004.1
147
+
148
+ - Ice scattering: Leinonen, J., 2014: High-level interface to T-matrix scattering calculations: architecture, capabilities and limitations. *Opt. Express*, **22**(2), 1655–1660, https://doi.org/10.1364/OE.22.001655
149
+
150
+ - GPM bright band: Awaka, J., M. Le, V. Chandrasekar, N. Yoshida, T. Higashiuwatoko, T. Kubota, and T. Iguchi, 2016: Rain Type Classification Algorithm Module for GPM Dual-Frequency Precipitation Radar. *J. Atmos. Oceanic Technol.*, **33**, 1887–1898, https://doi.org/10.1175/JTECH-D-16-0016.1
151
+
152
+ ## License
153
+
154
+ This library is open source and made freely available according to the below
155
+ text:
156
+
157
+ Copyright 2020 Valentin Louf
158
+ Copyright 2023 Commonwealth of Australia, Bureau of Meteorology
159
+
160
+ Licensed under the Apache License, Version 2.0 (the "License");
161
+ you may not use this file except in compliance with the License.
162
+ You may obtain a copy of the License at
163
+
164
+ http://www.apache.org/licenses/LICENSE-2.0
165
+
166
+ Unless required by applicable law or agreed to in writing, software
167
+ distributed under the License is distributed on an "AS IS" BASIS,
168
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
169
+ See the License for the specific language governing permissions and
170
+ limitations under the License.
171
+
172
+ A copy of the license is also provided in the LICENSE file included with the
173
+ source distribution of the library.
@@ -0,0 +1,34 @@
1
+ """
2
+ GPM volume matching package.
3
+
4
+ Volume matching of ground radar and GPM satellite data.
5
+ """
6
+
7
+ from .gpmmatch import (
8
+ NoRainError,
9
+ generate_filename,
10
+ get_radar_coordinates,
11
+ get_gr_reflectivity,
12
+ has_valid_data,
13
+ volume_matching,
14
+ vmatch_multi_pass,
15
+ MIN_SAMPLE_POINTS,
16
+ MIN_REFL_SAMPLES,
17
+ MAX_OFFSET_THRESHOLD,
18
+ )
19
+
20
+ __author__ = "Valentin Louf"
21
+ __email__ = "valentin.louf@bom.gov.au"
22
+
23
+ __all__ = [
24
+ "NoRainError",
25
+ "generate_filename",
26
+ "get_radar_coordinates",
27
+ "get_gr_reflectivity",
28
+ "has_valid_data",
29
+ "volume_matching",
30
+ "vmatch_multi_pass",
31
+ "MIN_SAMPLE_POINTS",
32
+ "MIN_REFL_SAMPLES",
33
+ "MAX_OFFSET_THRESHOLD",
34
+ ]