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

Revise snow probability computation #177

Open
guidocioni opened this issue Aug 29, 2024 · 0 comments
Open

Revise snow probability computation #177

guidocioni opened this issue Aug 29, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@guidocioni
Copy link
Owner

guidocioni commented Aug 29, 2024

At the moment snow probability is computed in the same way precipitation probability is computed here

df[f"{var}_prob"] = (
((df.iloc[:, df.columns.str.match(columns_regex)] >= 0.1).sum(axis=1) / members)
* 100.0
).astype(int)
df[f"{var}_mean"] = df.iloc[:, df.columns.str.match(columns_regex)].mean(axis=1)
df.loc[df[f"{var}_prob"] < 5, [f"{var}_prob", f"{var}_mean"]] = np.nan

So we take the fraction of ensemble members that have snowfall >= 0.1cm.

I think we should instead interpret the snow probability as fraction of members that have precipitation AND this precipitation is frozen.
So we should only consider the members that have precipitation >=0.1mm, and over these members see which members have snowfall. This should give a more appropriate estimation of snow probability.

Also, the logic of computing both probabilities I think should go into the get_ensemble_data function instead than sitting in this function that is only used to create the figure.

@guidocioni guidocioni added the bug Something isn't working label Aug 29, 2024
@guidocioni guidocioni self-assigned this Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant