Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
naiades
naiades-platform-poc
Commits
94fca51a
Commit
94fca51a
authored
Aug 19, 2021
by
Cédric Crettaz
🖥
Browse files
Update app.py with the new formula.
parent
6d81d654
Changes
1
Hide whitespace changes
Inline
Side-by-side
dca-carouge-fountain/app.py
View file @
94fca51a
...
...
@@ -171,6 +171,7 @@ def get_model_water_quality_observed(
totalChlorine
=
None
,
chlorateEstimation
=
None
,
meta_datetime
=
None
,
cl
=
None
,
):
"""
If meta_datetime is provided then all the attrs are assigned meta_datetime as dateModified meta date
...
...
@@ -184,6 +185,7 @@ def get_model_water_quality_observed(
:param totalChlorine:
:param chlorateEstimation:
:param meta_datetime:
:param cl:
:return:
comments by IBATECH:
...
...
@@ -221,13 +223,18 @@ def get_model_water_quality_observed(
'totalChlorine'
,
'chlorateEstimation'
,
'dateObserved'
,
'location'
'location'
,
'cl'
]
# Handle the timestamp
meta_datetime
=
meta_datetime
.
replace
(
"T"
,
" "
)
meta_datetime
=
meta_datetime
.
replace
(
"Z"
,
""
)
if
pH
is
not
None
:
# Calculate CL-
cl
=
2.41840247818555
-
0.0438725641757871
*
pH
+
0.670467600246094
*
freeChlorine
-
0.669365973598627
*
totalChlorine
-
0.00302592842093426
*
redox
for
v
in
values
:
key
=
v
val
=
locals
()[
v
]
# gets var value from var name
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment