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
b5543be6
Commit
b5543be6
authored
4 years ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
add option to, or not, copy from /arcdata to local
parent
66b95a0e
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/deeplearning/amv_raob.py
+9
-0
9 additions, 0 deletions
modules/deeplearning/amv_raob.py
with
9 additions
and
0 deletions
modules/deeplearning/amv_raob.py
+
9
−
0
View file @
b5543be6
...
@@ -740,6 +740,8 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa
...
@@ -740,6 +740,8 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa
return
None
,
None
,
None
,
None
return
None
,
None
,
None
,
None
# copy from archive to local drive
# copy from archive to local drive
t0
=
datetime
.
datetime
.
now
().
timestamp
()
local_path
=
fC
if
COPY_GOES
:
if
COPY_GOES
:
local_path
=
goes_cache_dir
+
'
/
'
+
os
.
path
.
split
(
fC
)[
1
]
local_path
=
goes_cache_dir
+
'
/
'
+
os
.
path
.
split
(
fC
)[
1
]
if
not
os
.
path
.
exists
(
local_path
):
if
not
os
.
path
.
exists
(
local_path
):
...
@@ -752,6 +754,8 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa
...
@@ -752,6 +754,8 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa
except
Exception
as
exc
:
except
Exception
as
exc
:
print
(
exc
)
print
(
exc
)
return
None
,
None
,
None
,
None
return
None
,
None
,
None
,
None
t1
=
datetime
.
datetime
.
now
().
timestamp
()
print
((
t1
-
t0
)
*
1000
)
bt_or_refl
=
None
bt_or_refl
=
None
if
pug_l1b_c
.
bt_or_refl
==
'
bt
'
:
if
pug_l1b_c
.
bt_or_refl
==
'
bt
'
:
...
@@ -761,6 +765,7 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa
...
@@ -761,6 +765,7 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa
if
TRIPLET
or
CONV3D
:
if
TRIPLET
or
CONV3D
:
# copy from archive to local drive
# copy from archive to local drive
local_path_l
=
fL
if
COPY_GOES
:
if
COPY_GOES
:
local_path_l
=
goes_cache_dir
+
'
/
'
+
os
.
path
.
split
(
fL
)[
1
]
local_path_l
=
goes_cache_dir
+
'
/
'
+
os
.
path
.
split
(
fL
)[
1
]
if
not
os
.
path
.
exists
(
local_path_l
):
if
not
os
.
path
.
exists
(
local_path_l
):
...
@@ -780,6 +785,7 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa
...
@@ -780,6 +785,7 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa
bt_or_refl_l
=
pug_l1b_l
.
refl
bt_or_refl_l
=
pug_l1b_l
.
refl
# copy from archive to local drive
# copy from archive to local drive
local_path_r
=
fR
if
COPY_GOES
:
if
COPY_GOES
:
local_path_r
=
goes_cache_dir
+
'
/
'
+
os
.
path
.
split
(
fR
)[
1
]
local_path_r
=
goes_cache_dir
+
'
/
'
+
os
.
path
.
split
(
fR
)[
1
]
if
not
os
.
path
.
exists
(
local_path_r
):
if
not
os
.
path
.
exists
(
local_path_r
):
...
@@ -798,6 +804,7 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa
...
@@ -798,6 +804,7 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa
elif
pug_l1b_r
.
bt_or_refl
==
'
refl
'
:
elif
pug_l1b_r
.
bt_or_refl
==
'
refl
'
:
bt_or_refl_r
=
pug_l1b_r
.
refl
bt_or_refl_r
=
pug_l1b_r
.
refl
t0
=
datetime
.
datetime
.
now
().
timestamp
()
if
daynight
!=
'
ANY
'
:
if
daynight
!=
'
ANY
'
:
if
step
[
ch_idx
]
==
1
:
if
step
[
ch_idx
]
==
1
:
if
geoloc_2km
is
None
:
if
geoloc_2km
is
None
:
...
@@ -881,6 +888,8 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa
...
@@ -881,6 +888,8 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa
if
TRIPLET
or
CONV3D
:
if
TRIPLET
or
CONV3D
:
subprocess
.
call
([
'
rm
'
,
local_path_l
])
subprocess
.
call
([
'
rm
'
,
local_path_l
])
subprocess
.
call
([
'
rm
'
,
local_path_r
])
subprocess
.
call
([
'
rm
'
,
local_path_r
])
t1
=
datetime
.
datetime
.
now
().
timestamp
()
print
((
t1
-
t0
)
*
1000
)
return
np
.
array
(
data
),
np
.
array
(
data_l
),
np
.
array
(
data_r
),
np
.
array
(
idxs
)
return
np
.
array
(
data
),
np
.
array
(
data_l
),
np
.
array
(
data_r
),
np
.
array
(
idxs
)
...
...
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