Skip to content
Snippets Groups Projects
Commit 1e890ac1 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent f9d6ce70
No related branches found
No related tags found
No related merge requests found
......@@ -71,14 +71,13 @@ def process_cld_prob(grd_k):
def process_cloud_frac(grd_k):
keep = np.invert(np.isnan(grd_k))
num_keep = np.sum(keep)
grd_by_cat = get_cloud_frac_5cat(grd_k)
# if at least 20% mixed pass
keep_mix = np.where(keep, np.logical_and(grd_by_cat > 0, grd_by_cat < 4), False)
frac_mix = np.sum(keep_mix)/num_keep
if frac_mix < 0.20:
keep_mix = np.logical_and(grd_by_cat > 0, grd_by_cat < 4)
frac_mix = np.sum(keep_mix)/keep_mix.size
if frac_mix < 0.20: # at least 20% mixed to pass
return None
grd_k = np.where(np.invert(keep), 0, grd_k) # Convert NaN to 0
return grd_k
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment