Added logging to read_swash
This commit is contained in:
parent
b982baa3c2
commit
4412084996
1 changed files with 5 additions and 0 deletions
|
@ -1,9 +1,12 @@
|
|||
import logging
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
import numpy as np
|
||||
|
||||
|
||||
log = logging.getLogger("read_swash")
|
||||
|
||||
class ReadSwash:
|
||||
def __init__(self):
|
||||
self._n_x = None
|
||||
|
@ -13,7 +16,9 @@ class ReadSwash:
|
|||
|
||||
@classmethod
|
||||
def read_nohead(cls, path):
|
||||
log.info(f"Replacing \\s with \\n in '{path}'")
|
||||
subprocess.run(("sed", "-i", r"s/\s\+/\n/g", path))
|
||||
log.info(f"Loading '{path}'")
|
||||
return np.loadtxt(path)
|
||||
|
||||
def read_time(self, path):
|
||||
|
|
Loading…
Reference in a new issue