-
Notifications
You must be signed in to change notification settings - Fork 2
/
bct.py
33 lines (30 loc) · 869 Bytes
/
bct.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import numpy as np
from pydelft.grd import grd
from pydelft.bnd import bnd
from PyQt4 import QtGui
import sys
import os
import pandas as pd
class bct():
'''Delft3d boundary conditions time-series file'''
def __init__(self,fname=None, bnd_fname=None):
if fname:
self.read_bct(fname)
if bnd_fname:
self.bnd = bnd(bnd_fname)
def read_bct(self, fname=None):
'''Read a Delft3d boundary conditions time-series file'''
if not fname:
fname = filedialog.askopenfilename()
else:
fname = fname
self.filename = fname
self.name = []
self.contents = []
self.location = []
self.time_function = []
self.reference_time = []
self.time_unit = []
self.interpolation = []
self.parameter = []
self.data = []