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

snapshot...

parent 03794e57
Branches
No related tags found
No related merge requests found
......@@ -151,3 +151,13 @@ def value_to_index(nda, value):
diff = np.abs(nda - value)
idx = np.argmin(diff)
return idx
# array solzen must be degrees, missing values must NaN
def is_night(solzen, threshold):
solzen = solzen.flatten()
solzen = solzen[np.invert(np.isnan(solzen))]
if np.max(solzen) > threshold:
return True
else:
return False
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment