Hello all,
I made some tests and corrections this morning. Here are the corrections for the concSELAFIN class :
class concSELAFIN(SELAFIN):
def __init__(self,f):
SELAFIN.__init__(self,f)
def putContent(self,self1,fileName):
np3o = self.NPOIN3
# ~~> Filing
self.fole.update({ 'name': fileName })
self.fole.update({ 'hook': open(fileName,'wb') })
self1.fole = self.fole
self.appendHeaderSLF()
varx = np.zeros((self.NVAR,self.NPOIN3),np.float32)
for t in range(len(self.tags['times'])+len(self1.tags['times'])):
if t < len(self.tags['times']):
self.appendCoreTimeSLF(t)
vars = self.getVALUES(t)
for iv in range(self.NVAR):
varx[iv][0:np3o] = vars[iv][0:np3o]
self.appendCoreVarsSLF(varx)
elif t >= len(self.tags['times']):
self1.appendCoreTimeSLF(t-len(self.tags['times']))
vars = self1.getVALUES(t-len(self.tags['times']))
for iv in range(self1.NVAR):
varx[iv][0:np3o] = vars[iv][0:np3o]
self1.appendCoreVarsSLF(varx)
self.fole['hook'].close()
I provide one example with two slf (see attachment). If I do a scan of telemac_Resultats_120.slf, here is what I get :
Interpreting command line options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scanning telemac_Resultats_120.slf within /fake/path/scripts/python27
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file appears to be coded in "big endian"
and the floats are assumed to be SINGLE PRECISION
TITLE : <Garonne - permanent \xc3\xa0 3800 m3/s SERAFIN >
DATE / TIME : 1 - 1 - 1900 0 : 0 : 0
VARIABLES :
- VITESSE U M/S
- VITESSE V M/S
- HAUTEUR D'EAU M
- SURFACE LIBRE M
NUMBERs :
- NPLAN* = 0
- NPTFR* = 0
- IFACE* = 0
- NELEM3 = 34659
- NPOIN3 = 17989
- NDP3 = 3
- NPLAN = 1
MESH : / min: [ 0.0 ; -10.0 ] / max: [ 3000.0 ; 1000.0 ]
ARRAYs :
- IKLE : / min: [ 1 ] / max: [ 17989 ] [[ 1 103 102]
[ 1 102 2]
[ 2 102 105]
...,
[17984 17988 17989]
[17984 17989 13782]
[17984 13782 13781]]
- IPOBO : / min: [ 0 ] / max: [ 17989 ] [ 1 2 3 ..., 17987 17988 17989]
NUMBER OF TIMES : 2
FIRST TIME STEP : 0.0
LAST TIME STEP : 120.0
TIME STEP : 120.0
My work is done
And now if I do a scan of telemac_Resultats_240.slf, here is what I get:
Interpreting command line options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scanning telemac_Resultats_240.slf within /fake/path/scripts/python27
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file appears to be coded in "big endian"
and the floats are assumed to be SINGLE PRECISION
TITLE : <Garonne - permanent \xc3\xa0 3800 m3/s SERAFIN >
DATE / TIME : 1 - 1 - 1900 0 : 0 : 0
VARIABLES :
- VITESSE U M/S
- VITESSE V M/S
- HAUTEUR D'EAU M
- SURFACE LIBRE M
NUMBERs :
- NPLAN* = 0
- NPTFR* = 0
- IFACE* = 0
- NELEM3 = 34659
- NPOIN3 = 17989
- NDP3 = 3
- NPLAN = 1
MESH : / min: [ 0.0 ; -10.0 ] / max: [ 3000.0 ; 1000.0 ]
ARRAYs :
- IKLE : / min: [ 1 ] / max: [ 17989 ] [[ 1 103 102]
[ 1 102 2]
[ 2 102 105]
...,
[17984 17988 17989]
[17984 17989 13782]
[17984 13782 13781]]
- IPOBO : / min: [ 0 ] / max: [ 17989 ] [ 1 2 3 ..., 17987 17988 17989]
NUMBER OF TIMES : 1
FIRST TIME STEP : 240.0
LAST TIME STEP : 240.0
ONLY ONE TIME FRAME
My work is done
Now if I concatenate telemac_Resultats_120.slf and telemac_Resultats_240.slf in telemac_Resultats_240_conc.slf and I do a scan of telemac_Resultats_240_conc.slf, here is what I get :
Interpreting command line options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scanning telemac_Resultats_240_conc.slf within /fake/path/scripts/python27
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file appears to be coded in "big endian"
and the floats are assumed to be SINGLE PRECISION
TITLE : <Garonne - permanent \xc3\xa0 3800 m3/s SERAFIN >
DATE / TIME : 1 - 1 - 1900 0 : 0 : 0
VARIABLES :
- VITESSE U M/S
- VITESSE V M/S
- HAUTEUR D'EAU M
- SURFACE LIBRE M
NUMBERs :
- NPLAN* = 0
- NPTFR* = 0
- IFACE* = 0
- NELEM3 = 34659
- NPOIN3 = 17989
- NDP3 = 3
- NPLAN = 1
MESH : / min: [ 0.0 ; -10.0 ] / max: [ 3000.0 ; 1000.0 ]
ARRAYs :
- IKLE : / min: [ 1 ] / max: [ 17989 ] [[ 1 103 102]
[ 1 102 2]
[ 2 102 105]
...,
[17984 17988 17989]
[17984 17989 13782]
[17984 13782 13781]]
- IPOBO : / min: [ 0 ] / max: [ 17989 ] [ 1 2 3 ..., 17987 17988 17989]
NUMBER OF TIMES : 3
FIRST TIME STEP : 0.0
LAST TIME STEP : 240.0
TIME STEP : 120.0
My work is done
Be aware that when you use the --replace option with concatenate it concatenates telemac_Resultats_120.slf and telemac_Resultats_240.slf in telemac_Resultats_120.slf
Regards.