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
8d29b7e6
Commit
8d29b7e6
authored
4 years ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
e4721bbf
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/pirep_goes.py
+14
-69
14 additions, 69 deletions
modules/icing/pirep_goes.py
with
14 additions
and
69 deletions
modules/icing/pirep_goes.py
+
14
−
69
View file @
8d29b7e6
...
@@ -16,6 +16,10 @@ no_ice_dict = None
...
@@ -16,6 +16,10 @@ no_ice_dict = None
time_keys
=
None
time_keys
=
None
pirep_file
=
'
/home/rink/data/pireps/pireps_2019010000_2019063023.csv
'
pirep_file
=
'
/home/rink/data/pireps/pireps_2019010000_2019063023.csv
'
ds_list
=
[
'
temp_8_5um_nom
'
,
'
temp_10_4um_nom
'
,
'
temp_11_0um_nom
'
,
'
temp_13_3um_nom
'
,
'
cld_height_acha
'
,
'
supercooled_cloud_fraction
'
,
'
cld_temp_acha
'
,
'
cld_opd_acha
'
,
'
cloud_phase
'
,
'
solar_zenith_angle
'
]
ds_grd_dct
=
{
name
:
[]
for
name
in
ds_list
}
def
setup
():
def
setup
():
ice_dict
,
no_ice_dict
=
pirep_icing
(
pirep_file
)
ice_dict
,
no_ice_dict
=
pirep_icing
(
pirep_file
)
...
@@ -65,7 +69,7 @@ def get_grid_values(h5f, grid_name, j_c, i_c, half_width, scale_factor_name='sca
...
@@ -65,7 +69,7 @@ def get_grid_values(h5f, grid_name, j_c, i_c, half_width, scale_factor_name='sca
return
grd_vals
return
grd_vals
def
run
(
time_keys
,
dct
):
def
run
(
time_keys
,
pirep_
dct
):
nav
=
GEOSNavigation
(
sub_lon
=-
75.0
,
CFAC
=
5.6E-05
,
COFF
=-
0.101332
,
LFAC
=-
5.6E-05
,
LOFF
=
0.128212
,
num_elems
=
2500
,
num_lines
=
1500
)
nav
=
GEOSNavigation
(
sub_lon
=-
75.0
,
CFAC
=
5.6E-05
,
COFF
=-
0.101332
,
LFAC
=-
5.6E-05
,
LOFF
=
0.128212
,
num_elems
=
2500
,
num_lines
=
1500
)
...
@@ -74,23 +78,9 @@ def run(time_keys, dct):
...
@@ -74,23 +78,9 @@ def run(time_keys, dct):
last_clvr_file
=
None
last_clvr_file
=
None
last_h5f
=
None
last_h5f
=
None
obs_times
=
[]
obs_lons
=
[]
obs_lats
=
[]
temp_8_5um_nom
=
[]
temp_10_4um_nom
=
[]
temp_11_0um_nom
=
[]
temp_13_3um_nom
=
[]
cld_height_acha
=
[]
sc_cld_frac
=
[]
cld_tmp_acha
=
[]
cld_opd_acha
=
[]
cld_phase
=
[]
solar_zenith_angle
=
[]
cnt
=
0
cnt
=
0
for
idx
,
time
in
enumerate
(
time_keys
):
for
idx
,
time
in
enumerate
(
time_keys
):
reports
=
dct
[
time
]
reports
=
pirep_
dct
[
time
]
for
tup
in
reports
:
for
tup
in
reports
:
lat
,
lon
,
fl
,
rpt_str
=
tup
lat
,
lon
,
fl
,
rpt_str
=
tup
lat_s
[
0
]
=
lat
lat_s
[
0
]
=
lat
...
@@ -122,60 +112,15 @@ def run(time_keys, dct):
...
@@ -122,60 +112,15 @@ def run(time_keys, dct):
cc
,
ll
=
nav
.
earth_to_lc_s
(
lon_s
,
lat_s
)
cc
,
ll
=
nav
.
earth_to_lc_s
(
lon_s
,
lat_s
)
gvals_a
=
get_grid_values
(
h5f
,
'
temp_10_4um_nom
'
,
ll
[
0
],
cc
[
0
],
20
)
for
didx
,
ds_name
in
enumerate
(
ds_list
):
if
gvals_a
is
None
:
gvals
=
get_grid_values
(
h5f
,
ds_name
,
ll
[
0
],
cc
[
0
],
20
)
continue
if
gvals
is
not
None
:
ds_grd_dct
[
ds_name
].
append
(
gvals
)
gvals_b
=
get_grid_values
(
h5f
,
'
cld_height_acha
'
,
ll
[
0
],
cc
[
0
],
20
)
if
gvals_b
is
None
:
continue
gvals_c
=
get_grid_values
(
h5f
,
'
supercooled_cloud_fraction
'
,
ll
[
0
],
cc
[
0
],
20
)
if
gvals_c
is
None
:
continue
gvals_d
=
get_grid_values
(
h5f
,
'
cld_temp_acha
'
,
ll
[
0
],
cc
[
0
],
20
)
if
gvals_c
is
None
:
continue
gvals_e
=
get_grid_values
(
h5f
,
'
cld_opd_acha
'
,
ll
[
0
],
cc
[
0
],
20
)
if
gvals_c
is
None
:
continue
gvals_f
=
get_grid_values
(
h5f
,
'
cloud_phase
'
,
ll
[
0
],
cc
[
0
],
20
)
if
gvals_f
is
None
:
continue
gvals_g
=
get_grid_values
(
h5f
,
'
solar_zenith_angle
'
,
ll
[
0
],
cc
[
0
],
20
)
if
gvals_g
is
None
:
continue
gvals_h
=
get_grid_values
(
h5f
,
'
temp_8_5um_nom
'
,
ll
[
0
],
cc
[
0
],
20
)
if
gvals_h
is
None
:
continue
gvals_i
=
get_grid_values
(
h5f
,
'
temp_11_0um_nom
'
,
ll
[
0
],
cc
[
0
],
20
)
cnt
+=
1
if
gvals_i
is
None
:
continue
gvals_j
=
get_grid_values
(
h5f
,
'
temp_13_3um_nom
'
,
ll
[
0
],
cc
[
0
],
20
)
if
gvals_j
is
None
:
continue
obs_times
.
append
(
time
)
print
(
'
num images:
'
,
cnt
)
obs_lons
.
append
(
lon
)
obs_lats
.
append
(
lat
)
temp_10_4um_nom
.
append
(
gvals_a
)
cld_height_acha
.
append
(
gvals_b
)
sc_cld_frac
.
append
(
gvals_c
)
cld_tmp_acha
.
append
(
gvals_d
)
cld_opd_acha
.
append
(
gvals_e
)
cld_phase
.
append
(
gvals_f
)
solar_zenith_angle
.
append
(
gvals_g
)
temp_8_5um_nom
.
append
(
gvals_h
)
temp_11_0um_nom
.
append
(
gvals_i
)
temp_13_3um_nom
.
append
(
gvals_j
)
cnt
+=
1
print
(
'
num images:
'
,
cnt
)
def
create_file
(
filename
,
ds_list
,
ds_types
):
\ No newline at end of file
pass
\ No newline at end of file
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