Skip to content

Commit

Permalink
Merge branch 'main' into reclass
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrover1 authored Jan 4, 2024
2 parents 54b3436 + 297e9eb commit 9e2578d
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion continuous_integration/environment-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- cartopy
- cvxopt
- xarray
- metpy
- metpy<1.6
- pytest-cov
- pytest-mpl
- coveralls
Expand Down
4 changes: 2 additions & 2 deletions doc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ dependencies:
- netcdf4
- pytest
- wradlib
- metpy
- metpy<1.6
- cartopy
- cvxopt
- xarray
- sphinx
- sphinx<7.2
- ipython
- pandoc
- pkg-config
Expand Down
17 changes: 10 additions & 7 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@
"sphinx.ext.napoleon",
"sphinx_copybutton",
"sphinx_gallery.gen_gallery",
"sphinx_gallery.load_style",
"sphinx_design",
"nbsphinx",
"myst_nb",
"ablog",
]

exclude_patterns = ["_build", "**.ipynb_checkpoints"]

# only include examples if the BUILD_PYART_EXAMPLES env. variable is set
extensions.append("sphinx_gallery.gen_gallery")
sphinx_gallery_conf = {"examples_dirs": "../../examples", "gallery_dirs": "examples"}
sphinx_gallery_conf = {
"examples_dirs": "../../examples",
"gallery_dirs": "examples",
"abort_on_example_error": True,
}


# Configuration options for plot_directive. See:
Expand Down Expand Up @@ -124,7 +124,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -203,7 +203,7 @@
post_auto_excerpt = 2

# Don't execute the jupyter notebooks
jupyter_execute_notebooks = "off"
nb_execution_mode = "off"

# Extra variables that will be available to the templates. Used to create the
# links to the Github repository sources and issues
Expand Down Expand Up @@ -263,6 +263,9 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)

# Make MyST generate anchors for headings
myst_heading_anchors = 2

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
Expand Down
4 changes: 2 additions & 2 deletions examples/retrieve/plot_convective_stratiform.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

######################################
# How the algorithm works
# ----------
# -----------------------
# This first section describes how the convective-stratiform algorithm works (see references for full details). This
# algorithm is a feature detection algorithm and classifies fields as "convective" or "stratiform". The algorithm is
# designed to detect features in a reflectivity field but can also detect features in fields such as rain rate or
Expand Down Expand Up @@ -446,7 +446,7 @@

######################################
# Summary of recommendations and best practices
# ----------
# ---------------------------------------------
# * Tune your parameters to your specific purpose
# * Use a rescaled field if possible (i.e. linear reflectivity, rain or snow rate)
# * Keep ``estimate_flag=True`` to see uncertainty in classification
Expand Down
9 changes: 4 additions & 5 deletions examples/retrieve/plot_feature_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

######################################
# How the algorithm works
# ----------
# -----------------------
# The feature detection algorithm works by identifying features that exceed the background value by an amount that
# varies with the background value. The algorithm is heavily customizable and is designed to work with a variety of
# datasets. Here, we show several examples of how to use the algorithm with different types of radar data.
Expand All @@ -33,7 +33,7 @@

######################################
# Part 1: Warm-season convective-stratiform classification
# ----------
# --------------------------------------------------------
# **Classification of summer convective example**
#
# Our first example classifies echo from a summer convective event.
Expand Down Expand Up @@ -397,8 +397,7 @@

######################################
# Part 2: Cool-season feature detection
# ----------
######################################
# -------------------------------------
# **Winter storm example**
#
# In this example, we will show how to algorithm can be used to detect features (snow bands) in winter storms. Here, we
Expand Down Expand Up @@ -778,7 +777,7 @@ def quick_image_mute(field, muted_ref):
plt.show()
######################################
# Summary of recommendations and best practices
# ----------
# ---------------------------------------------
# * Tune your parameters to your specific purpose
# * Use a rescaled field if possible (i.e. linear reflectivity, rain or snow rate)
# * Keep ``estimate_flag=True`` to see uncertainty in classification
Expand Down
4 changes: 2 additions & 2 deletions examples/retrieve/plot_hydrometeor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
=========================================
=============================================
Calculate and Plot hydrometeor classification
=========================================
=============================================
Calculates a hydrometeor classification and displays the results
"""
Expand Down
2 changes: 1 addition & 1 deletion pyart/io/nexrad_level2.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def _decompress_records(file_handler):
cbuf = file_handler.read() # read all data from the file
decompressor = bz2.BZ2Decompressor()
skip = _structure_size(VOLUME_HEADER) + CONTROL_WORD_SIZE
buf = decompressor.decompress(cbuf[skip:])
buf = bytearray(decompressor.decompress(cbuf[skip:]))
while len(decompressor.unused_data):
cbuf = decompressor.unused_data
decompressor = bz2.BZ2Decompressor()
Expand Down

0 comments on commit 9e2578d

Please sign in to comment.