Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SaQC
Manage
Activity
Members
Labels
Plan
Issues
36
Issue boards
Milestones
Wiki
Code
Merge requests
8
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rdm-software
SaQC
Commits
fdd12209
Commit
fdd12209
authored
5 years ago
by
Peter Lünenschloß
Browse files
Options
Downloads
Patches
Plain Diff
registered flagSoilMoistureByPrec function to dispatch
parent
cd5382ef
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
saqc/funcs/functions.py
+6
-6
6 additions, 6 deletions
saqc/funcs/functions.py
with
6 additions
and
6 deletions
saqc/funcs/functions.py
+
6
−
6
View file @
fdd12209
...
@@ -16,7 +16,8 @@ def flagDispatch(func_name, *args, **kwargs):
...
@@ -16,7 +16,8 @@ def flagDispatch(func_name, *args, **kwargs):
"
constant
"
:
flagConstant
,
"
constant
"
:
flagConstant
,
"
range
"
:
flagRange
,
"
range
"
:
flagRange
,
"
generic
"
:
flagGeneric
,
"
generic
"
:
flagGeneric
,
"
soilMoistureByFrost
"
:
flagSoilMoistureBySoilFrost
}
"
soilMoistureByFrost
"
:
flagSoilMoistureBySoilFrost
,
"
soilMoistureByPrecipitation
"
:
flagSoilMoistureByPrecipitationEvents
}
func
=
func_map
.
get
(
func_name
,
None
)
func
=
func_map
.
get
(
func_name
,
None
)
if
func
is
not
None
:
if
func
is
not
None
:
...
@@ -126,9 +127,8 @@ def flagSoilMoistureBySoilFrost(data, flags, field, flagger, soil_temp_reference
...
@@ -126,9 +127,8 @@ def flagSoilMoistureBySoilFrost(data, flags, field, flagger, soil_temp_reference
:param frost_level: Value level, the flagger shall check against, when evaluating soil frost level.
:param frost_level: Value level, the flagger shall check against, when evaluating soil frost level.
"""
"""
# retrieve reference series
# retrieve reference series
refseries
=
data
[
soil_temp_reference
]
.
copy
()
refseries
=
data
[
soil_temp_reference
]
ref_flags
=
flags
[
soil_temp_reference
]
ref_flags
=
flags
[
soil_temp_reference
]
ref_use
=
flagger
.
isFlagged
(
ref_flags
,
flag
=
flagger
.
flags
.
min
())
|
\
ref_use
=
flagger
.
isFlagged
(
ref_flags
,
flag
=
flagger
.
flags
.
min
())
|
\
flagger
.
isFlagged
(
ref_flags
,
flag
=
flagger
.
flags
.
unflagged
())
flagger
.
isFlagged
(
ref_flags
,
flag
=
flagger
.
flags
.
unflagged
())
...
@@ -171,10 +171,10 @@ def flagSoilMoistureByPrecipitationEvents(data, flags, field, flagger, prec_refe
...
@@ -171,10 +171,10 @@ def flagSoilMoistureByPrecipitationEvents(data, flags, field, flagger, prec_refe
to zero. In that case, any non zero precipitation count will justify any soil moisture raise.
to zero. In that case, any non zero precipitation count will justify any soil moisture raise.
NOTE1: np.nan entries in the input precipitation series will be regarded as susipicious and the test will be
NOTE1: np.nan entries in the input precipitation series will be regarded as susipicious and the test will be
om
m
ited for every 24h interval including a np.nan entrie in the original sampling rate
of the
omited for every 24h interval including a np.nan entrie in the original
precipitation
sampling rate
.
precipitation interval.
Only entry
"
0
"
will be regarded as denoting
"
No Rainfall
"
.
Only entry
"
0
"
will be regarded as denoting
"
No Rainfall
"
.
NOTE2: The function
test
values that are flagged suspicious anyway - this may change in a future version
NOTE2: The function
wont test any
values that are flagged suspicious anyway - this may change in a future version
.
:param data: The pandas dataframe holding the data-to-be flagged, as well as the reference
:param data: The pandas dataframe holding the data-to-be flagged, as well as the reference
...
...
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