null

Message Boards

Format of time series file for import

Martin Schueder, modified 4 Years ago.

Format of time series file for import

Padawan Posts: 52 Join Date: 10/8/13 Recent Posts
Hello,

I apologize for the recent barrage of questions, but I am having issues with time series files in WAQ. Even using the information in pages 357-358 of the D-Water Quality manual and following the sample script template provided by Mathieu Chatelain here I am unable to import my .tim file into Delft3D-WAQ. Instead I repeatedly get the error:

"Error importing the data file: syntax error near or at line 0 [t]"

here is the content of my .tim file:

table-name 'discharge 1'
contents 'waste load data'
location 'discharge1'
grid indices 63 113
layer -4
time-unit 'days'
reference-time 20141609 0
time-function 'non-equidistant'
interpolation 'linear'
parameter 'time' unit 'days'
parameter 'Flow' unit '[-]'
parameter 'Continuity' unit '[-]'
parameter 'ModTemp' unit '[-]'
parameter 'OXY' unit '[-]'
parameter 'CBOD5' unit '[-]'
parameter 'NH4' unit '[-]'
parameter 'NO3' unit '[-]'
parameter 'PO4' unit '[-]'
parameter 'TIC' unit '[-]'
parameter 'Alka' unit '[-]'
parameter 'Diat' unit '[-]'
parameter 'Green' unit '[-]'
3.75E-01 3.30E-02 1.00E+00 1.86E+01 5.82E+00 5.00E+00 5.90E-02 3.00E+01 1.37E+00 1.35E+02 1.16E+02 0.00E+00 0.00E+00
1.38E+00 3.26E-02 1.00E+00 1.83E+01 5.27E+00 5.00E+00 4.90E-02 3.35E+01 1.59E+00 1.53E+02 1.35E+02 0.00E+00 0.00E+00
2.38E+00 3.29E-02 1.00E+00 1.82E+01 4.11E+00 5.00E+00 1.05E-01 3.63E+01 2.24E+00 1.44E+02 1.26E+02 0.00E+00 0.00E+00
.....
....
....
2.84E+01 3.09E-02 1.00E+00 1.77E+01 3.04E+00 5.00E+00 9.60E-02 3.63E+01 1.41E+00 1.34E+02 1.18E+02 0.00E+00 0.00E+00

Is there a clear indication of where I am going wrong? I have also tried to edit the input file at the sixth block in order to incorporate this discharge but it does not appear to register in the GUI.

My thanks again,

Martin
Mathieu Chatelain, modified 4 Years ago.

RE: Format of time series file for import (Answer)

Padawan Posts: 28 Join Date: 12/13/12 Recent Posts
Hi Martin,
could it be the 'grid indices' token that is not recognized? I've never seen it, and couldn't find any mention of it in the user manual. Rest of the TIM-file looks good!
Idea behind TIM-file is that they are not grid-specific. D-WAQ does the conversion to the grid indices for you, meaning that you can use the same TIM-file for different grid schematizations. Hence, I would define the waste load position by using its 'metric coordinate', which is a pre-defined token.

Also, you can directly edit the INP-file. As you mentioned correctly, edits are not registered in the GUI. However, they are taken into account when running your model. Nonetheless, be careful, since any subsequent modification via the GUI will erase the changes you made in the INP-file (solution is to make a copy of the INP-file, e.g. "mywaqrun_edit.inp")

To check that INP-file edits of the loadings are correctly read by D-WAQ, two steps:
- after delwaq1.exe, look at block 6 in the LST-file. It should explicitly list your loading data with all its details.
- after/during your run, look at the MON-file. Loadings should lead to mass changes at the discharge location (btw, it may be wise to define a monitoring point there to allow that rapid check).

Hope that helps,
Cheers
AM
Arjen Markus, modified 4 Years ago.

RE: Format of time series file for import (Answer)

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
Well, even after replacing "grid indices" by "metric coordinates" it does not work. Something is going wrong in the GUI. This will have to be looked into, because even if the syntax is wrong, the GUI should not get stuck. I have created a new issue for this: DELFT3D-33719: Delft3D-WAQ-GUI: Importing a particular tim-file causes the GUI to get stuck
Martin Schueder, modified 4 Years ago.

RE: Format of time series file for import

Padawan Posts: 52 Join Date: 10/8/13 Recent Posts
Hello,

Thank you both for your replies. Until I am able to import .tim files in WAQ, I will edit the .inp file in order to produce time-series discharge inputs and time-series process parameters. So far I think this approach has been effective for discharges and I will also try editing process parameters in this way soon.

My thanks,

Martin
AM
Arjen Markus, modified 4 Years ago.

RE: Format of time series file for import (Answer)

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
Well, I found the error: the reference date was given as "20141609" - so year-day-month, instead of year-month-day. This led to an invalid Julian date and then to an overwriting of a local variable in the routine that builds the list of times.

So, the solution for now is to use a correct reference date and time - 20140916 in the above case.

And I need to catch this error in the reading routines.

Regards,

Arjen