I think we should create a data structure for time series input to the NN model to separate out time-stepping from input series. We must account for two things in that:
- The input series time stamps may not coincide with the NN model's time-stamps (especially when coupling to ADCIRC). Therefore, we need to allow for (linear) interpolation from input series onto the current time stamp of the NN model.
- The rainfall input and the water surface elevation are currently stored in a single variable in the code (created through
pandas.read_csv() call). The rainfall and elevation input variables must be separated because when coupling with ADCIRC, the values as well as the time stamps of the elevation input to the NN model must be modified, whereas those of the rainfall input remain unchanged.
Therefore, I propose we have something like the following:
class InputTS():
def __init__(self, times, values):
'''InputTS class constructor.'''
self.times = times
self.values = values
self.current_index = 0
def _getTimeInterval(self, t):
'''Get the time interval of the current time stamp.'''
return index
def updateTimeInterval(self, t):
'''Update the time interval by updating current_index.'''
return None
def interpolate(self, time):
'''Interpolate input series onto NN model's current time.'''
return value
I think we should create a data structure for time series input to the NN model to separate out time-stepping from input series. We must account for two things in that:
pandas.read_csv()call). The rainfall and elevation input variables must be separated because when coupling with ADCIRC, the values as well as the time stamps of the elevation input to the NN model must be modified, whereas those of the rainfall input remain unchanged.Therefore, I propose we have something like the following: