Skip to content
Snippets Groups Projects
Commit a6634048 authored by rink's avatar rink
Browse files

fix fcst time offset in get_bounding_gfs_files

parent 58ba80f9
No related branches found
No related tags found
No related merge requests found
......@@ -185,6 +185,23 @@ def value_to_index(nda, value):
return idx
def find_bin_index(nda, value):
idxs = np.arange(nda.shape[0])
above = nda >= value
if not above.any():
return -1
below = nda < value
if not below.any():
return -1
iL = idxs[above].max()
return iL
# array solzen must be degrees, missing values must NaN. For small roughly 50x50km regions only
def is_day(solzen, test_angle=80.0):
solzen = solzen.flatten()
......
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