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

snapshot...

parent 79fa6500
No related branches found
No related tags found
No related merge requests found
......@@ -153,11 +153,11 @@ def value_to_index(nda, value):
return idx
# array solzen must be degrees, missing values must NaN
def is_night(solzen, threshold):
# array solzen must be degrees, missing values must NaN. For small 50x50km regions only
def is_night(solzen, test_angle=80.0, threshold=0.10):
solzen = solzen.flatten()
solzen = solzen[np.invert(np.isnan(solzen))]
if np.max(solzen) > threshold:
if (np.sum(solzen > test_angle) / len(solzen)) > threshold:
return True
else:
return False
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