Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tom Rink
python
Commits
a6634048
Commit
a6634048
authored
3 years ago
by
rink
Browse files
Options
Downloads
Patches
Plain Diff
fix fcst time offset in get_bounding_gfs_files
parent
58ba80f9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/util/util.py
+17
-0
17 additions, 0 deletions
modules/util/util.py
with
17 additions
and
0 deletions
modules/util/util.py
+
17
−
0
View file @
a6634048
...
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment