Hello,
I've noticed that when VARIABLE TIME-STEP=YES is used, that Telemac-2D does not write out the last time step to the results file. It writes out the results according to the GRAPHIC PRINTOUT PERIOD interval, but it won't write out the last time step (unless by coincidence it matches one of the periods written out because of GRAPHIC PRINTOUT PERIOD). Thus the last time step written out is usually before the DURATION called out for the model. The user manual states that "the last time step is systematically saved" but that does not seem to be the case when variable time steps are used.
I've tried a workaround, specifying the NUMBER OF TIME STEPS instead of DURATION but this option does not seem to work when variable time steps are used. (the model will only run briefly and then quit).
I end up having to set GRAPHIC PRINTOUT PERIOD not too high, so that the last written step will not be too far from end of the run. This leads to heavy disk I/O and really large results files. In many cases I'm only interested in the last time step.
Another approach to reduce disk I/O and file size, setting NUMBER OF FIRST TIME STEP FOR GRAPHIC PRINTOUTS, does not work too well either. That approach will delay a fixed number of time steps from being written to the results file, but with variable time steps, I don't know how many time steps there are going to be. There's a lower bound of DURATION / (TIME STEP) steps, but it could be much higher.
I modified one of the Malpasset example runs to show the issue. The input files are attached. The only changes I've made to the originals is that I renamed the .cas file, and in the .cas file I've commented out the following lines:
/NUMBER OF TIME STEPS = 1000
/TIME STEP = 4.
And added these 4 lines:
TIME STEP = 10.
VARIABLE TIME-STEP=YES
DESIRED COURANT NUMBER=8
DURATION=4000
Note that GRAPHIC PRINTOUT PERIOD for this run is 50. The objective of this modified run is to get large enough time steps to demonstrate the issue, thus the high Courant number target. When I run it, the last time step written is not at 4000 or later, but earlier, at 3672 seconds.
I was wondering if anyone had a workaround or knew how the Fortran code could be modified to write out the last time step. Aside from this bookkeeping issue, Telemac-2D has worked very well for me.