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
04362855
Commit
04362855
authored
3 years ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
minor
parent
e8a8148f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/icing/pireps.py
+5
-1
5 additions, 1 deletion
modules/icing/pireps.py
with
5 additions
and
1 deletion
modules/icing/pireps.py
+
5
−
1
View file @
04362855
import
datetime
from
datetime
import
timezone
from
dateutil
import
tz
import
re
from
pathlib
import
Path
import
h5py
...
...
@@ -160,6 +161,9 @@ def pirep_icing(filename, lon_range=[-180, 180], lat_range=[-63, 63]):
def
pirep_icing_from_boeing
(
dirname
=
'
/ships19/cloud/scratch/ICING/BOEING/icing/2020/
'
,
lon_range
=
[
-
180
,
180
],
lat_range
=
[
-
63
,
63
]):
# This data is relative to US Pacific time
pac_tz
=
tz
.
gettz
(
'
America/Los_Angeles
'
)
flist
=
[]
for
path
in
Path
(
dirname
).
rglob
(
'
*.nc
'
):
flist
.
append
(
path
)
...
...
@@ -191,7 +195,7 @@ def pirep_icing_from_boeing(dirname='/ships19/cloud/scratch/ICING/BOEING/icing/2
nrpts
=
ice_bool
.
shape
[
0
]
if
nrpts
>
0
:
for
k
in
range
(
nrpts
):
dto
=
datetime
.
datetime
(
year
=
years
[
k
],
month
=
mons
[
k
],
day
=
days
[
k
],
hour
=
hours
[
k
],
minute
=
mins
[
k
],
second
=
secs
[
k
])
dto
=
datetime
.
datetime
(
year
=
years
[
k
],
month
=
mons
[
k
],
day
=
days
[
k
],
hour
=
hours
[
k
],
minute
=
mins
[
k
],
second
=
secs
[
k
]
,
tzinfo
=
pac_tz
)
dto
=
dto
.
replace
(
tzinfo
=
timezone
.
utc
)
ts
=
dto
.
timestamp
()
...
...
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