Posted Thu, 20 Mar 2014 08:27:20 GMT by Tatiana Fontana Studentessa
Good morning,

I'm using WEST 2014 and the IUWS models library.
Starting from the available data I have about water quality, rainfall, temperature, radiation and so on, I wanted to run the model for a two years simulation.
But, once the first year is complete without any problem, WEST gives me an error, that is something like

"At time 366.00***, MSLUCalcOffset: Index out of Bounds".

What does it mean?
I looked for errors in the input files, but everything seems ok.

Could someone give me some suggestions about how to solve this problem, please?
Thank you

Tatiana
Posted Thu, 20 Mar 2014 11:10:56 GMT by Filip Claeys
The problem is somehow related to array indexing using variable indices.

Nearly all the indexing that takes place in WEST models is done on the basis of indices that are known at compile-time. Verification of these indices against the size of the corresponding array dimensions can therefore also be done at compile-time. In case of problems, error messages will be generated by the model compiler.

In a very limited number of WEST models, array indexing is also done based on indices that are *not* known at compile-time, e.g. because the actual index is a state variable, input variable or parameter. Retrieving the array element related to the index, and verification of the validity of the index can therefore only be done at run-time. This run-time process is taken care of by a routine named "MSLUCalcOffset".

As far as I know, the only MSL files in which array indexing is done on the basis of indices that are not known at compile-time, are the following:

  IUWS\iuws.connectors.msl
  IUWS\Sewer\sewer.generators.msl

In both of these, state variables are used to index arrays with flow, evaporation, pollution, ... patterns or arrays with TSS, COD, ... norms. If you scan the model library for "[state." you should be able to find the affected locations. So, the problem you are experiencing must be with one of these.

Maybe someone with more expertise regarding the IUWS library can help you further?

You must be signed in to post in this forum.