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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tom Rink
python
Commits
5a8ce72b
Commit
5a8ce72b
authored
Nov 10, 2021
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
minor
parent
c8cad014
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/icing/pirep_goes.py
+13
-5
13 additions, 5 deletions
modules/icing/pirep_goes.py
with
13 additions
and
5 deletions
modules/icing/pirep_goes.py
+
13
−
5
View file @
5a8ce72b
...
@@ -7,7 +7,7 @@ from util.util import get_time_tuple_utc, GenericException, add_time_range_to_fi
...
@@ -7,7 +7,7 @@ from util.util import get_time_tuple_utc, GenericException, add_time_range_to_fi
check_oblique
,
make_times
,
find_bin_index
,
get_timestamp
,
homedir
,
write_icing_file
,
make_for_full_domain_predict
check_oblique
,
make_times
,
find_bin_index
,
get_timestamp
,
homedir
,
write_icing_file
,
make_for_full_domain_predict
from
util.plot
import
make_icing_image
from
util.plot
import
make_icing_image
from
util.geos_nav
import
get_navigation
from
util.geos_nav
import
get_navigation
from
util.setup
import
model_path
from
util.setup
import
model_path
_day
,
model_path_night
from
aeolus.datasource
import
CLAVRx
,
CLAVRx_VIIRS
,
GOESL1B
,
CLAVRx_H08
from
aeolus.datasource
import
CLAVRx
,
CLAVRx_VIIRS
,
GOESL1B
,
CLAVRx_H08
import
h5py
import
h5py
import
re
import
re
...
@@ -1904,10 +1904,18 @@ def run_make_images(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ckpt_dir_s_pat
...
@@ -1904,10 +1904,18 @@ def run_make_images(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ckpt_dir_s_pat
h5f
.
close
()
h5f
.
close
()
def
run_icing_predict
(
clvrx_dir
=
'
/Users/tomrink/data/clavrx/RadC/
'
,
output_dir
=
homedir
,
ckpt_dir_s_path
=
model_path
,
prob_thresh
=
0.5
,
satellite
=
'
GOES16
'
,
domain
=
'
CONUS
'
,
day_night
=
'
DAY
'
):
def
run_icing_predict
(
clvrx_dir
=
'
/Users/tomrink/data/clavrx/RadC/
'
,
output_dir
=
homedir
,
model_path
=
None
,
prob_thresh
=
0.5
,
satellite
=
'
GOES16
'
,
domain
=
'
CONUS
'
,
day_night
=
'
DAY
'
):
if
day_night
==
'
DAY
'
:
train_params
=
[
'
cld_height_acha
'
,
'
cld_geo_thick
'
,
'
cld_temp_acha
'
,
'
cld_press_acha
'
,
'
supercooled_cloud_fraction
'
,
train_params
=
[
'
cld_height_acha
'
,
'
cld_geo_thick
'
,
'
cld_temp_acha
'
,
'
cld_press_acha
'
,
'
supercooled_cloud_fraction
'
,
'
cld_emiss_acha
'
,
'
conv_cloud_fraction
'
,
'
cld_reff_dcomp
'
,
'
cld_opd_dcomp
'
,
'
iwc_dcomp
'
,
'
lwc_dcomp
'
]
'
cld_emiss_acha
'
,
'
conv_cloud_fraction
'
,
'
cld_reff_dcomp
'
,
'
cld_opd_dcomp
'
,
'
iwc_dcomp
'
,
'
lwc_dcomp
'
]
if
model_path
is
None
:
model_path
=
model_path_day
else
:
train_params
=
[
'
cld_height_acha
'
,
'
cld_geo_thick
'
,
'
cld_temp_acha
'
,
'
cld_press_acha
'
,
'
supercooled_cloud_fraction
'
,
'
cld_emiss_acha
'
,
'
conv_cloud_fraction
'
,
'
cld_reff_acha
'
,
'
cld_opd_acha
'
]
if
model_path
is
None
:
model_path
=
model_path_night
if
satellite
==
'
H08
'
:
if
satellite
==
'
H08
'
:
clvrx_ds
=
CLAVRx_H08
(
clvrx_dir
)
clvrx_ds
=
CLAVRx_H08
(
clvrx_dir
)
...
@@ -1939,7 +1947,7 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h
...
@@ -1939,7 +1947,7 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h
lons_2d
=
lon_s
.
reshape
((
num_lines
,
num_elems
))
lons_2d
=
lon_s
.
reshape
((
num_lines
,
num_elems
))
lats_2d
=
lat_s
.
reshape
((
num_lines
,
num_elems
))
lats_2d
=
lat_s
.
reshape
((
num_lines
,
num_elems
))
preds_2d_dct
,
probs_2d_dct
=
run_evaluate_static_new
(
data_dct
,
num_lines
,
num_elems
,
ckpt_dir_s_path
=
ckpt_dir_s
_path
,
prob_thresh
=
prob_thresh
)
preds_2d_dct
,
probs_2d_dct
=
run_evaluate_static_new
(
data_dct
,
num_lines
,
num_elems
,
ckpt_dir_s_path
=
model
_path
,
prob_thresh
=
prob_thresh
)
write_icing_file
(
clvrx_str_time
,
output_dir
,
preds_2d_dct
,
probs_2d_dct
,
x_rad
,
y_rad
,
lons_2d
,
lats_2d
)
write_icing_file
(
clvrx_str_time
,
output_dir
,
preds_2d_dct
,
probs_2d_dct
,
x_rad
,
y_rad
,
lons_2d
,
lats_2d
)
print
(
'
Done:
'
,
clvrx_str_time
)
print
(
'
Done:
'
,
clvrx_str_time
)
...
...
...
...
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
sign in
to comment