Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
oddvarlia committed Sep 16, 2024
1 parent d8e45fc commit 2022799
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions src/subscript/field_statistics/wf_field_param_statistics.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
#!/usr/bin/env python3
""" Purpose:
Calculate mean and stdev of continuous field parameters
Estimate volume fraction of facies (facies probabilities)
Method:
Get realization of field parameters for continuous parameters or facies
Update the estimate of mean and stdev of continuous parameters or update
the estimate of facies probabilities.
Result:
Output mean and stdev for continuous field parameter
Output estimate of facies probabilities for facies parameters
Reference for recursive formulaes for mean and stdev:
https://math.stackexchange.com/questions/374881/recursive-formula-for-variance
"""Purpose:
Calculate mean and stdev of continuous field parameters
Estimate volume fraction of facies (facies probabilities)
Method:
Get realization of field parameters for continuous parameters or facies
Update the estimate of mean and stdev of continuous parameters or update
the estimate of facies probabilities.
Result:
Output mean and stdev for continuous field parameter
Output estimate of facies probabilities for facies parameters
Reference for recursive formulaes for mean and stdev:
https://math.stackexchange.com/questions/374881/recursive-formula-for-variance
"""

# pylint: disable=missing-function-docstring, too-many-arguments
# pylint: disable=too-many-branches, too-many-statements
# pylint: disable= too-many-locals, too-many-nested-blocks
Expand Down Expand Up @@ -381,8 +382,7 @@ def calc_stats(input_dict):
)
has_written_nactive = True
else:
info_txt = \
f"No mean and stdev calculated for {param_name} "
info_txt = f"No mean and stdev calculated for {param_name} "
f"for zone {zone_name} for ensemble iteration "
f"{iter_number}"
print(info_txt)
Expand Down Expand Up @@ -452,13 +452,17 @@ def calc_stats(input_dict):
print(txt1)
logger.info(txt1)

txt2 = f"Average number of cells with facies " \
txt2 = (
f"Average number of cells with facies "
f"{facies_name} is {sum_total_code}"
)
print(txt2)
logger.info(txt2)

txt3 = "Average estimated facies probability for facies " \
txt3 = (
"Average estimated facies probability for facies "
f"{facies_name}: {fraction}"
)
print(txt3)
logger.info(txt3)

Expand Down Expand Up @@ -490,9 +494,11 @@ def calc_stats(input_dict):
print(txt4)
logger.info(txt4)
else:
txt = "No probability estimate calculated for " \
f"{param_name} for zone {zone_name}" \
txt = (
"No probability estimate calculated for "
f"{param_name} for zone {zone_name}"
f" for ensemble iteration {iter_number}"
)
print(txt)
logger.info(txt)

Expand Down

0 comments on commit 2022799

Please sign in to comment.