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
5726c43d
Commit
5726c43d
authored
3 years ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
initial commit for aircraft icing
parent
cb315967
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
+13
-9
13 additions, 9 deletions
modules/icing/pirep_goes.py
with
13 additions
and
9 deletions
modules/icing/pirep_goes.py
+
13
−
9
View file @
5726c43d
...
...
@@ -3,7 +3,7 @@ import numpy as np
import
pickle
import
matplotlib.pyplot
as
plt
import
os
from
util.util
import
get_time_tuple_utc
,
GenericException
,
add_time_range_to_filename
,
is_night
from
util.util
import
get_time_tuple_utc
,
GenericException
,
add_time_range_to_filename
,
is_night
,
is_day
from
aeolus.datasource
import
CLAVRx
,
GOESL1B
from
util.geos_nav
import
GEOSNavigation
import
h5py
...
...
@@ -32,12 +32,12 @@ ds_list = ['cld_height_acha', 'cld_geo_thick', 'cld_press_acha', 'sensor_zenith_
'
supercooled_cloud_fraction
'
,
'
cld_temp_acha
'
,
'
cld_opd_acha
'
,
'
solar_zenith_angle
'
,
'
cld_reff_acha
'
,
'
cld_reff_dcomp
'
,
'
cld_reff_dcomp_1
'
,
'
cld_reff_dcomp_2
'
,
'
cld_reff_dcomp_3
'
,
'
cld_opd_dcomp
'
,
'
cld_opd_dcomp_1
'
,
'
cld_opd_dcomp_2
'
,
'
cld_opd_dcomp_3
'
,
'
cld_cwp_dcomp
'
,
'
iwc_dcomp
'
,
'
lwc_dcomp
'
,
'
cloud_type
'
,
'
cloud_phase
'
,
'
cloud_mask
'
]
ds_types
=
[
'
f4
'
for
i
in
range
(
2
1
)]
+
[
'
i4
'
for
i
in
range
(
3
)]
'
lwc_dcomp
'
,
'
cld_emiss_acha
'
,
'
conv_cloud_fraction
'
,
'
cloud_type
'
,
'
cloud_phase
'
,
'
cloud_mask
'
]
ds_types
=
[
'
f4
'
for
i
in
range
(
2
3
)]
+
[
'
i4
'
for
i
in
range
(
3
)]
#
a_clvr_file = '/home/rink/data/clavrx/clavrx_OR_ABI-L1b-RadC-M3C01_G16_s20190020002186.level2.nc'
a_clvr_file
=
'
/Users/tomrink/data/clavrx/clavrx_OR_ABI-L1b-RadC-M3C01_G16_s20190020002186.level2.nc
'
a_clvr_file
=
'
/home/rink/data/clavrx/clavrx_OR_ABI-L1b-RadC-M3C01_G16_s20190020002186.level2.nc
'
#
a_clvr_file = '/Users/tomrink/data/clavrx/clavrx_OR_ABI-L1b-RadC-M3C01_G16_s20190020002186.level2.nc'
data_dir
=
'
/Users/tomrink/data/icing/
'
icing_files
=
[
'
icing_2018010600_2018033022_QC_DAY.h5
'
,
'
icing_2018040100_2018063021_QC_DAY.h5
'
,
'
icing_2018070101_2018093022_QC_DAY.h5
'
,
...
...
@@ -48,8 +48,11 @@ no_icing_files = ['no_icing_2018010600_2018033022_DAY.h5', 'no_icing_2018040100_
'
no_icing_2018100115_2018123022_DAY.h5
'
,
'
no_icing_2019010100_2019033023_DAY.h5
'
]
no_icing_l1b_files
=
[]
train_params_day
=
[
'
cld_height_acha
'
,
'
cld_geo_thick
'
,
'
supercooled_cloud_fraction
'
,
'
cld_temp_acha
'
,
'
solar_zenith_angle
'
,
'
cld_reff_dcomp
'
,
'
cld_opd_dcomp
'
,
'
iwc_dcomp
'
,
'
lwc_dcomp
'
,
'
cloud_phase
'
,
'
cloud_mask
'
]
train_params_day
=
[
'
cld_height_acha
'
,
'
cld_geo_thick
'
,
'
supercooled_cloud_fraction
'
,
'
cld_temp_acha
'
,
'
cld_press_acha
'
,
'
solar_zenith_angle
'
,
'
cld_reff_dcomp
'
,
'
cld_opd_dcomp
'
,
'
cld_cwp_dcomp
'
,
'
iwc_dcomp
'
,
'
lwc_dcomp
'
,
'
cloud_phase
'
,
'
cloud_mask
'
]
train_params_night
=
[
'
cld_height_acha
'
,
'
cld_geo_thick
'
,
'
supercooled_cloud_fraction
'
,
'
cld_temp_acha
'
,
'
cld_press_acha
'
,
'
solar_zenith_angle
'
,
'
cld_reff_acha
'
,
'
cld_opd_acha
'
,
'
cloud_phase
'
,
'
cloud_mask
'
]
def
setup
():
...
...
@@ -98,6 +101,7 @@ def get_grid_values(h5f, grid_name, j_c, i_c, half_width, scale_factor_name='sca
grd_vals
=
hfds
[
j_l
:
j_r
,
i_l
:
i_r
]
grd_vals
=
np
.
where
(
grd_vals
==
-
999
,
np
.
nan
,
grd_vals
)
grd_vals
=
np
.
where
(
grd_vals
==
-
127
,
np
.
nan
,
grd_vals
)
grd_vals
=
np
.
where
(
grd_vals
==
-
32768
,
np
.
nan
,
grd_vals
)
if
attrs
is
None
:
...
...
@@ -764,10 +768,10 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask,
idxs
=
[]
for
i
in
range
(
num_obs
):
if
day_night
==
'
NIGHT
'
:
if
not
is_night
(
solzen
[
i
,]):
if
is_day
(
solzen
[
i
,]):
continue
elif
day_night
==
'
DAY
'
:
if
is_night
(
solzen
[
i
,]):
if
not
is_day
(
solzen
[
i
,]):
continue
keep_0
=
np
.
logical_or
(
cld_mask
[
i
,]
==
2
,
cld_mask
[
i
,]
==
3
)
# cloudy
...
...
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