Hi all!
I'm trying to use pytel scripts to extract time series at points from a selafin 3d file.
I loaded selafin file with parserSELAFIN, but I do not understand what is the format of input data to use function getValueHistorySLF
getValueHistorySLF(f,tags,time,support,NVAR,NPOIN3,NPLAN,(varsIndexes,varsName) ):
""""
Extraction of time series at points.
A point could be:
(a) A point could be a node 2D associated with one or more plan number
(b) A pair (x,y) associated with one or more plan number
/!\ Vertical ingetValueHistorySLFterpolation has not been implemented yet.
Arguments:
- time: the discrete list of time frame to extract from the time history
- support: the list of points
- varsIndexes: the index in the NVAR-list to the variable to extract
"""
I think the variable "f" is the problem.
when I try...
from parsers.parserSELAFIN import SELAFIN,subsetVariablesSLF,getValueHistorySLF
slf=SELAFIN(results3d.sfl)
names=slf.VARNAMES
varsIndexes=[-1]
varsName=[names[-1]]#salinity
support=
(504655.28,8604625.51),range(slf.NPLAN)
times=slf.tags["times"]
serie=getValueHistorySLF(slf,slf.tags,times,support,slf.NVAR,slf.NPOIN3,slf.NPLAN,(varsIndexes,varsName))
It occurs this error...
f.seek(tags[time[it]]) # time[it] is the frame to be extracted
AttributeError: SELAFIN instance has no attribute 'seek'
I would be very gratefull for any help.
Regards