Skip to content

Commit

Permalink
used open_radar_data
Browse files Browse the repository at this point in the history
  • Loading branch information
RBhupi committed Jun 6, 2024
1 parent 45f7a65 commit 5b8c7c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 181 deletions.
167 changes: 0 additions & 167 deletions examples/retrieve/hydrometeor-class.ipynb

This file was deleted.

17 changes: 3 additions & 14 deletions examples/retrieve/plot_hydrometeor_class_x_band.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,16 @@
.. note::
The script initially attempts hydrometeor classification without specific radar frequency information for band selection.
"""
import glob

import matplotlib.pyplot as plt
import numpy as np
from open_radar_data import DATASETS

import pyart

hour = "19"
day = "25"
month = "08"
year = "2022"
filename = DATASETS.fetch("gucxprecipradarcmacppiS2.c1.20220314.025840.nc")
radar = pyart.io.read_cfradial(filename)

glob_str = f"/Users/bhupendra/projects/sail/data/test/gucxprecipradarcmacS2.c1.{year}{month}{day}.{hour}*"
files = sorted(glob.glob(glob_str))
files

# %%
radar = pyart.io.read(files[0])
radar = radar.extract_sweeps([0])
figure = plt.figure(figsize=(15, 4))

ax1 = plt.subplot(1, 3, 1)
Expand Down Expand Up @@ -86,7 +77,6 @@
# Add radar frequency to the radar object
# Incorporating radar frequency into the radar object enhances processing pipeline.

# %%
# Add X-band frequency information to radar.instrument_parameters
radar.instrument_parameters["frequency"] = {
"long_name": "Radar frequency",
Expand All @@ -100,7 +90,6 @@
# Let's run the classification again and the warning should change telling the radar frequency from instrument parameters is used.


# %%
hydromet_class = pyart.retrieve.hydroclass_semisupervised(
radar,
refl_field="corrected_reflectivity",
Expand Down

0 comments on commit 5b8c7c4

Please sign in to comment.