Jump to content

Different 2d_bc_code layers defined in .tgc and .tbc files

Recommended Posts


I've been tweaking a model over the last few months and I've just realised I have a discrepancy regarding the 2d_bc_code layer.

I updated this layer to widen the model domain in a specific section of the model to improve our understanding of overland flow paths, however I have recently realised that the 2d_bc_code layer is referenced in both the .tgc and .tbc model files. I am now in the scenario of having the updated 2d_bc_code layer referenced in the .tgc file and the older superseded file referenced in the .tbc file.

From the model output, Tuflow seems to be using the updated 2d_bc_code layer (so the command in the .tgc file), which I guess is why I never picked up on this oversight until now. But that raises a few questions:

  • Is the above assumption (that the model seems to prioritise the command in the .tgc file) correct?
  • Why are no errors raised when two different 2d_bc_code layers are referenced in the same model?
  • Does the 'Read MI BC ==' command need to be stated in both .tgc and .tbc files and if so, why?

The only variation I can find is in the .tgc file, the command is 'Read MI Code BC ==', however in the .tbc file the command is as above in the last bullet point. Is this a relic from a previous version?

As above, the model output seems sensible in conjunction with the updated 2d_bc_code layer, so I am unsure of the purpose/authority of the command in the .tbc file. Any clarification would be greatly appreciated.


Share this post

Link to post
Share on other sites


The configuration you described would be used where you have a 2d_bc layer which has elements defined for the boundary conditions, as well as for defining the active code. If you look in the layer that both commands are referencing, is there a polygon with a "CD" type attribute and a value in the f attribute? This indicates the polygon is for defining the active code.

The "Read MI BC==" command in the TBC only reads the boundary condition elements. The "Read MI Code BC ==" command in the TGC only reads the code element (specifically from a 2d_bc layer).

So if you have updated elements of both boundary conditions and code in the one file, but only updated the reference in your TGC, then the new code will be applied, but not any changes to boundary conditions that may be included in the same file. 

If your 2d_bc_code layer only contained code information, then the command in the TBC will essentially not be doing anything, because there wouldn't be any boundary condition information to read.

An alternative configuration is to separate the two element types so that you have a 2d_bc layer that contains only boundary condition information, and then make a 2d_code layer (different to 2d_bc) that contains only the code information. Note that the 2d_code layer must then be used in conjunction with the alternative "Read MI Code =="  command.

Please review Section 6.7,  page C-7 & C-8, and the "CD" Type under Table 7.4 of the 2016-03-AE TUFLOW Manual.

Let us know if you need further clarification.








Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...