Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OFCL correction by CARQ bug of discarding corrected dataframe #66

Closed
SorooshMani-NOAA opened this issue Mar 14, 2023 · 0 comments · Fixed by #68
Closed

OFCL correction by CARQ bug of discarding corrected dataframe #66

SorooshMani-NOAA opened this issue Mar 14, 2023 · 0 comments · Fixed by #68
Assignees

Comments

@SorooshMani-NOAA
Copy link
Collaborator

SorooshMani-NOAA commented Mar 14, 2023

The unfiltered_data setter function calculates the corrected values based on Holland-B and CARQ values, but then doesn't update the dataframe and discards the correction:

# fill OFCL maximum wind radius with the first entry from the CARQ advisory
forecast.loc[
mrd_missing, "radius_of_maximum_winds"
] = carq_forecast["radius_of_maximum_winds"].iloc[0]
# fill OFCL background pressure with the first entry from the CARQ advisory central pressure (at sea level)
forecast.loc[radp_missing, "background_pressure"] = carq_forecast[
"central_pressure"
].iloc[0]
# fill OFCL central pressure (at sea level) with the 3rd hour entry, preserving Holland B
forecast.loc[
mslp_missing, "central_pressure"
] = relation.central_pressure(
max_sustained_wind_speed=forecast.loc[
mslp_missing, "max_sustained_wind_speed"
],
background_pressure=forecast.loc[
mslp_missing, "background_pressure"
],
holland_b=holland_b,
)
if len(self.__advisories_to_remove) > 0:
dataframe = dataframe[
~dataframe["advisory"].isin(
[value.value for value in self.__advisories_to_remove]
)
]
self.__advisories_to_remove = []
self.__unfiltered_data = dataframe

Note that forecast is updated, but dataframe is not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant