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
ce0356f5
Commit
ce0356f5
authored
3 years ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
c7dd306b
No related branches found
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
+11
-5
11 additions, 5 deletions
modules/icing/pirep_goes.py
with
11 additions
and
5 deletions
modules/icing/pirep_goes.py
+
11
−
5
View file @
ce0356f5
...
@@ -3,7 +3,8 @@ import numpy as np
...
@@ -3,7 +3,8 @@ import numpy as np
import
pickle
import
pickle
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
import
os
import
os
from
util.util
import
get_time_tuple_utc
,
GenericException
,
add_time_range_to_filename
,
is_night
,
is_day
,
get_grid_values_all
from
util.util
import
get_time_tuple_utc
,
GenericException
,
add_time_range_to_filename
,
is_night
,
is_day
,
\
get_grid_values_all
,
check_oblique
from
aeolus.datasource
import
CLAVRx
,
GOESL1B
from
aeolus.datasource
import
CLAVRx
,
GOESL1B
from
util.geos_nav
import
GEOSNavigation
from
util.geos_nav
import
GEOSNavigation
import
h5py
import
h5py
...
@@ -705,6 +706,7 @@ def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing
...
@@ -705,6 +706,7 @@ def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing
cld_mask
=
f
[
'
cloud_mask
'
][:,
y_a
:
y_b
,
x_a
:
x_b
]
cld_mask
=
f
[
'
cloud_mask
'
][:,
y_a
:
y_b
,
x_a
:
x_b
]
sol_zen
=
f
[
'
solar_zenith_angle
'
][:,
y_a
:
y_b
,
x_a
:
x_b
]
sol_zen
=
f
[
'
solar_zenith_angle
'
][:,
y_a
:
y_b
,
x_a
:
x_b
]
sat_zen
=
f
[
'
sensor_zenith_angle
'
][:,
y_a
:
y_b
,
x_a
:
x_b
]
f_l1b
=
h5py
.
File
(
filename_l1b
,
'
r
'
)
f_l1b
=
h5py
.
File
(
filename_l1b
,
'
r
'
)
bt_11um
=
f_l1b
[
'
temp_11_0um_nom
'
][:,
y_a
:
y_b
,
x_a
:
x_b
]
bt_11um
=
f_l1b
[
'
temp_11_0um_nom
'
][:,
y_a
:
y_b
,
x_a
:
x_b
]
...
@@ -712,9 +714,9 @@ def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing
...
@@ -712,9 +714,9 @@ def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing
print
(
'
num pireps all:
'
,
len
(
icing_alt
))
print
(
'
num pireps all:
'
,
len
(
icing_alt
))
if
icing
:
if
icing
:
mask
,
idxs
,
num_tested
=
apply_qc_icing_pireps
(
icing_alt
,
cld_top_hgt
,
cld_phase
,
cld_opd
,
cld_mask
,
bt_11um
,
sol_zen
,
day_night
=
day_night
)
mask
,
idxs
,
num_tested
=
apply_qc_icing_pireps
(
icing_alt
,
cld_top_hgt
,
cld_phase
,
cld_opd
,
cld_mask
,
bt_11um
,
sol_zen
,
sat_zen
,
day_night
=
day_night
)
else
:
else
:
mask
,
idxs
,
num_tested
=
apply_qc_no_icing_pireps
(
icing_alt
,
cld_top_hgt
,
cld_phase
,
cld_opd
,
cld_mask
,
bt_11um
,
sol_zen
,
day_night
=
day_night
)
mask
,
idxs
,
num_tested
=
apply_qc_no_icing_pireps
(
icing_alt
,
cld_top_hgt
,
cld_phase
,
cld_opd
,
cld_mask
,
bt_11um
,
sol_zen
,
sat_zen
,
day_night
=
day_night
)
print
(
'
num pireps, day_night:
'
,
len
(
mask
),
day_night
)
print
(
'
num pireps, day_night:
'
,
len
(
mask
),
day_night
)
keep_idxs
=
[]
keep_idxs
=
[]
...
@@ -761,7 +763,7 @@ def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing
...
@@ -761,7 +763,7 @@ def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing
f_l1b
.
close
()
f_l1b
.
close
()
def
apply_qc_icing_pireps
(
icing_alt
,
cld_top_hgt
,
cld_phase
,
cld_opd
,
cld_mask
,
bt_11um
,
solzen
,
day_night
=
'
ANY
'
):
def
apply_qc_icing_pireps
(
icing_alt
,
cld_top_hgt
,
cld_phase
,
cld_opd
,
cld_mask
,
bt_11um
,
solzen
,
satzen
,
day_night
=
'
ANY
'
):
opd_thick_threshold
=
2
opd_thick_threshold
=
2
if
day_night
==
'
DAY
'
:
if
day_night
==
'
DAY
'
:
opd_thick_threshold
=
20
opd_thick_threshold
=
20
...
@@ -777,6 +779,8 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask,
...
@@ -777,6 +779,8 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask,
idxs
=
[]
idxs
=
[]
num_tested
=
[]
num_tested
=
[]
for
i
in
range
(
num_obs
):
for
i
in
range
(
num_obs
):
if
not
check_oblique
(
satzen
[
i
,]):
continue
if
day_night
==
'
NIGHT
'
:
if
day_night
==
'
NIGHT
'
:
if
is_day
(
solzen
[
i
,]):
if
is_day
(
solzen
[
i
,]):
continue
continue
...
@@ -815,7 +819,7 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask,
...
@@ -815,7 +819,7 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask,
return
mask
,
idxs
,
num_tested
return
mask
,
idxs
,
num_tested
def
apply_qc_no_icing_pireps
(
icing_alt
,
cld_top_hgt
,
cld_phase
,
cld_opd
,
cld_mask
,
bt_11um
,
solzen
,
day_night
=
'
ANY
'
):
def
apply_qc_no_icing_pireps
(
icing_alt
,
cld_top_hgt
,
cld_phase
,
cld_opd
,
cld_mask
,
bt_11um
,
solzen
,
satzen
,
day_night
=
'
ANY
'
):
opd_thick_threshold
=
2
opd_thick_threshold
=
2
if
day_night
==
'
DAY
'
:
if
day_night
==
'
DAY
'
:
opd_thick_threshold
=
20
opd_thick_threshold
=
20
...
@@ -831,6 +835,8 @@ def apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mas
...
@@ -831,6 +835,8 @@ def apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mas
idxs
=
[]
idxs
=
[]
num_tested
=
[]
num_tested
=
[]
for
i
in
range
(
num_obs
):
for
i
in
range
(
num_obs
):
if
not
check_oblique
(
satzen
[
i
,]):
continue
if
day_night
==
'
NIGHT
'
:
if
day_night
==
'
NIGHT
'
:
if
is_day
(
solzen
[
i
,]):
if
is_day
(
solzen
[
i
,]):
continue
continue
...
...
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