Skip to content

Commit

Permalink
fixed error in attenuation.py in case of missing radar.instrument_par…
Browse files Browse the repository at this point in the history
…ameters
  • Loading branch information
wolfidan committed Jan 22, 2024
1 parent 9a53baf commit f18c0c5
Show file tree
Hide file tree
Showing 14 changed files with 7,229 additions and 18,536 deletions.
612 changes: 106 additions & 506 deletions pyart/__check_build/_check_build.c

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions pyart/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
=====================================
"""
import logging

logging.getLogger('numpy').setLevel(logging.ERROR)

import importlib.metadata as _importlib_metadata
from os import environ as _environ

Expand Down
2,373 changes: 711 additions & 1,662 deletions pyart/correct/_fast_edge_finder.c

Large diffs are not rendered by default.

1,792 changes: 452 additions & 1,340 deletions pyart/correct/_unwrap_1d.c

Large diffs are not rendered by default.

1,802 changes: 454 additions & 1,348 deletions pyart/correct/_unwrap_2d.c

Large diffs are not rendered by default.

1,802 changes: 454 additions & 1,348 deletions pyart/correct/_unwrap_3d.c

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions pyart/correct/attenuation.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,14 @@ def calculate_attenuation_philinear(
"""
# select the coefficients as a function of frequency band
if (pia_coef is None) or (pida_coef is None):
if "frequency" in radar.instrument_parameters:
frequency_avail = False
if hasattr(radar, 'instrument_parameters'):
if "frequency" in radar.instrument_parameters:
frequency_avail = True
if frequency_avail:
pia_coef, pida_coef = _get_param_attphilinear(
radar.instrument_parameters["frequency"]["data"][0]
)
radar.instrument_parameters["frequency"]["data"][0]
)
else:
pia_coef, pida_coef = _param_attphilinear_table()["C"]
warn(
Expand Down
4,567 changes: 1,594 additions & 2,973 deletions pyart/io/_sigmetfile.c

Large diffs are not rendered by default.

1,884 changes: 469 additions & 1,415 deletions pyart/io/nexrad_interpolate.c

Large diffs are not rendered by default.

3,150 changes: 801 additions & 2,349 deletions pyart/map/_gate_to_grid_map.c

Large diffs are not rendered by default.

1,836 changes: 456 additions & 1,380 deletions pyart/map/_load_nn_field_data.c

Large diffs are not rendered by default.

2,775 changes: 863 additions & 1,912 deletions pyart/map/ckdtree.c

Large diffs are not rendered by default.

1,301 changes: 395 additions & 906 deletions pyart/retrieve/_gecsx_functions_cython.c

Large diffs are not rendered by default.

1,857 changes: 463 additions & 1,394 deletions pyart/retrieve/_kdp_proc.c

Large diffs are not rendered by default.

0 comments on commit f18c0c5

Please sign in to comment.