Skip to content

Commit

Permalink
ENH: Add instrument parameter check for sinarame. (#1532)
Browse files Browse the repository at this point in the history
* ENH: Add check fro instrument parameters.

* FIX: Add dict definition.
  • Loading branch information
zssherman authored Mar 20, 2024
1 parent 02f83be commit b54157f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pyart/aux_io/sinarame_h5.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,14 @@ def read_sinarame_h5(
)

# instrument_parameters
instrument_parameters = None
# Check if no attributes for instrument parameters.
if len(hfile["how"].attrs) == 0:
instrument_parameters = None
# Grab each instrument parameter and its value for the hfile object.
else:
instrument_parameters = {}
for i in hfile["how"].attrs.keys():
instrument_parameters[i] = hfile["how"].attrs[i]

return Radar(
_time,
Expand Down

0 comments on commit b54157f

Please sign in to comment.