Skip to content

Commit 4f03df4

Browse files
Merge pull request #2704 from pybamm-team/issue-2703-temperature
#2703 remove warning if temperature not provided
2 parents f87c2f8 + 889f929 commit 4f03df4

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

pybamm/experiments/experiment.py

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import numpy as np
66
import re
7-
import pybamm
7+
88

99
examples = """
1010
@@ -417,30 +417,12 @@ def convert_electric(self, electric):
417417
)
418418
)
419419

420-
def _detect_mistyped_temperatures(self, cond):
421-
if "oC" in cond:
422-
raise ValueError(f"Temperature not written correctly on step: '{cond}'")
423-
424420
def _read_and_drop_temperature(self, cond):
425421
matches = re.findall(r"at\s-*\d+\.*\d*\s*oC", cond)
426422

427423
if len(matches) == 0:
428-
self._detect_mistyped_temperatures(cond)
429-
430-
if self.temperature is None:
431-
pybamm.logger.warning(
432-
"Temperature not found on step: "
433-
f"'{cond}', using temperature "
434-
"from parameter values."
435-
)
436-
437-
else:
438-
pybamm.logger.warning(
439-
f"Temperature not found on step: '{cond}', "
440-
f"using global temperature "
441-
f"({self.temperature}oC) instead"
442-
)
443-
424+
if "oC" in cond:
425+
raise ValueError(f"Temperature not written correctly on step: '{cond}'")
444426
temperature = self.temperature
445427
reduced_cond = cond
446428

0 commit comments

Comments
 (0)