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
74b7acdf
Commit
74b7acdf
authored
4 years ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
0ee8e671
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
+27
-2
27 additions, 2 deletions
modules/icing/pirep_goes.py
with
27 additions
and
2 deletions
modules/icing/pirep_goes.py
+
27
−
2
View file @
74b7acdf
...
@@ -28,6 +28,8 @@ ds_list = ['temp_8_5um_nom', 'temp_10_4um_nom', 'temp_11_0um_nom', 'temp_13_3um_
...
@@ -28,6 +28,8 @@ ds_list = ['temp_8_5um_nom', 'temp_10_4um_nom', 'temp_11_0um_nom', 'temp_13_3um_
'
cloud_mask
'
]
'
cloud_mask
'
]
ds_grd_dct
=
{
name
:
[]
for
name
in
ds_list
}
ds_grd_dct
=
{
name
:
[]
for
name
in
ds_list
}
a_clvr_file
=
'
/Users/tomrink/data/clavrx/clavrx_OR_ABI-L1b-RadC-M3C01_G16_s20190020002186.level2.nc
'
def
setup
():
def
setup
():
ice_dict
,
no_ice_dict
=
pirep_icing
(
pirep_file
)
ice_dict
,
no_ice_dict
=
pirep_icing
(
pirep_file
)
...
@@ -89,6 +91,17 @@ def get_grid_values(h5f, grid_name, j_c, i_c, half_width, scale_factor_name='sca
...
@@ -89,6 +91,17 @@ def get_grid_values(h5f, grid_name, j_c, i_c, half_width, scale_factor_name='sca
return
grd_vals
return
grd_vals
def
create_file
(
filename
,
data_dct
,
ds_list
):
#h5f_expl = h5py.File(a_clvr_file, 'r')
hf5
=
h5py
.
File
(
filename
,
'
w
'
)
for
ds_name
in
ds_list
:
data
=
data_dct
[
ds_name
]
hf5
.
create_dataset
(
ds_name
,
data
=
data
)
hf5
.
close
()
def
run
(
pirep_dct
,
outfile
=
None
):
def
run
(
pirep_dct
,
outfile
=
None
):
time_keys
=
list
(
pirep_dct
.
keys
())
time_keys
=
list
(
pirep_dct
.
keys
())
...
@@ -144,8 +157,13 @@ def run(pirep_dct, outfile=None):
...
@@ -144,8 +157,13 @@ def run(pirep_dct, outfile=None):
cnt
+=
1
cnt
+=
1
data_dct
=
{}
for
ds_name
in
ds_list
:
data_dct
[
ds_name
]
=
np
.
array
(
ds_grd_dct
[
ds_name
])
print
(
'
num images:
'
,
cnt
,
len
(
time_keys
),
miss_a
,
miss_b
)
print
(
'
num images:
'
,
cnt
,
len
(
time_keys
),
miss_a
,
miss_b
)
create_file
(
outfile
,
data_dct
,
ds_list
)
def
analyze
(
ice_dct
,
no_ice_dct
):
def
analyze
(
ice_dct
,
no_ice_dct
):
...
@@ -210,5 +228,12 @@ def analyze(ice_dct, no_ice_dct):
...
@@ -210,5 +228,12 @@ def analyze(ice_dct, no_ice_dct):
print
(
dt_str
[
2
:])
print
(
dt_str
[
2
:])
def
create_file
(
filename
,
ds_list
,
ds_types
):
def
create_file
(
filename
,
data_dct
,
ds_list
):
pass
#h5f_expl = h5py.File(a_clvr_file, 'r')
\ No newline at end of file
hf5
=
h5py
.
File
(
filename
,
'
w
'
)
for
ds_name
in
ds_list
:
data
=
data_dct
[
ds_name
]
hf5
.
create_dataset
(
ds_name
,
data
=
data
)
hf5
.
close
()
\ 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