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
78985819
Commit
78985819
authored
Aug 6, 2021
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
more work on qc_icing/no_icing
parent
7656d143
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
+22
-15
22 additions, 15 deletions
modules/icing/pirep_goes.py
with
22 additions
and
15 deletions
modules/icing/pirep_goes.py
+
22
−
15
View file @
78985819
...
...
@@ -832,8 +832,10 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask,
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_thin_threshold
=
0.1
if
day_night
==
'
DAY
'
:
opd_thick_threshold
=
20
opd_thin_threshold
=
1
closeness
=
100.0
# meters
num_obs
=
len
(
icing_alt
)
cld_mask
=
cld_mask
.
reshape
((
num_obs
,
-
1
))
...
...
@@ -858,27 +860,32 @@ def apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mas
keep_0
=
np
.
logical_or
(
cld_mask
[
i
,]
==
2
,
cld_mask
[
i
,]
==
3
)
# cloudy
keep_1
=
np
.
invert
(
np
.
isnan
(
cld_top_hgt
[
i
,]))
keep_2
=
np
.
invert
(
np
.
isnan
(
bt_11um
[
i
,]))
# keep_3 = np.invert(np.isnan(cld_opd[i,]))
# keep = keep_0 & keep_1 & keep_2 & keep_3
# num_keep = np.sum(keep)
keep
=
keep_0
&
keep_1
&
keep_2
keep_3
=
np
.
invert
(
np
.
isnan
(
cld_opd
[
i
,]))
keep
=
keep_0
&
keep_1
&
keep_2
&
keep_3
num_keep
=
np
.
sum
(
keep
)
if
num_keep
==
0
:
continue
# Test1
keep
=
np
.
where
(
keep
,
cld_top_hgt
[
i
,]
>
icing_alt
[
i
],
False
)
# keep = np.where(keep,
# np.invert((cld_phase[i,] == 4) &
# np.logical_and(cld_top_hgt[i,]+closeness > icing_alt[i], cld_top_hgt[i,]-closeness < icing_alt[i])),
# False)
# keep = np.where(keep, (cld_opd[i,] >= opd_thick_threshold) & (cld_phase[i,] == 4) & (cld_top_hgt[i,] > icing_alt[i]), False)
#
# keep = np.where(keep, np.invert((cld_phase[i,] == 4) & (cld_opd[i,] < 0.1) & (cld_top_hgt[i,] > icing_alt[i])), False)
#
keep
=
np
.
where
(
keep
,
bt_11um
[
i
,]
>
270.0
,
False
)
# Test2
keep
=
np
.
where
(
keep
,
((
cld_phase
[
i
,]
==
4
)
&
np
.
logical_and
(
cld_top_hgt
[
i
,]
+
closeness
>
icing_alt
[
i
],
cld_top_hgt
[
i
,]
-
closeness
<
icing_alt
[
i
])),
False
)
keep
=
np
.
where
(
keep
,
bt_11um
[
i
,]
<
228.0
,
False
)
# Test4
keep
=
np
.
where
(
keep
,
((
cld_phase
[
i
,]
==
4
)
&
(
cld_opd
[
i
,]
<
opd_thin_threshold
)
&
(
cld_top_hgt
[
i
,]
>
icing_alt
[
i
])),
False
)
# Test5
keep
=
np
.
where
(
keep
,
(
bt_11um
[
i
,]
>
270.0
),
False
)
# Test6
keep
=
np
.
where
(
keep
,
(
bt_11um
[
i
,]
<
228.0
),
False
)
# Test3
keep
=
np
.
where
(
keep
,
np
.
invert
((
cld_opd
[
i
,]
>=
opd_thick_threshold
)
&
(
cld_phase
[
i
,]
==
4
)
&
(
cld_top_hgt
[
i
,]
>
icing_alt
[
i
])),
False
)
mask
.
append
(
keep
)
idxs
.
append
(
i
)
...
...
...
...
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