Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions stormevents/nhc/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -1347,19 +1347,18 @@ def movingmean(dff):
else:
carq_forecast = carq_tracks[list(carq_tracks)[0]]

# Get CARQ from forecast hour 0 and isotach 34kt (i.e. the first item)
carq_ref = carq_forecast.loc[carq_forecast.forecast_hours == 0].iloc[0]

# get the Holland B parameter for filling in central pressure
relation = HollandBRelation()
holland_b = relation.holland_b(
max_sustained_wind_speed=carq_forecast["max_sustained_wind_speed"],
background_pressure=carq_forecast["background_pressure"],
central_pressure=carq_forecast["central_pressure"],
max_sustained_wind_speed=carq_ref["max_sustained_wind_speed"],
background_pressure=carq_ref["background_pressure"],
central_pressure=carq_ref["central_pressure"],
)

holland_b[holland_b == numpy.inf] = numpy.nan
holland_b = numpy.nanmean(holland_b)

# Get CARQ from forecast hour 0 and isotach 34kt (i.e. the first item)
carq_ref = carq_forecast.loc[carq_forecast.forecast_hours == 0].iloc[0]

# find locations where the pertinent variables are missing
columns_of_interest = forecast[
["radius_of_maximum_winds", "central_pressure", "background_pressure"]
]
Expand Down
Loading