Skip to content

Commit

Permalink
ENH: Check for ER codes and strings. (#813)
Browse files Browse the repository at this point in the history
  • Loading branch information
zssherman authored Apr 5, 2024
1 parent a2f8557 commit b3bb31f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions act/utils/inst_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ def decode_present_weather(ds, variable=None, decoded_name=None):
# Get data and fill nans with -9999
data = ds[variable]
data = data.fillna(-9999)
data.values[data.values == 'ER'] = -9999

# Check if string codes instead of ints
data = data.astype('int64')

# Get the weather type for each code
wx_type = [weather[d] for d in data.values]
Expand Down

0 comments on commit b3bb31f

Please sign in to comment.