Problem using grids with angle in nested models?

Dear OF community,

I have a situation with model nesting, which I would like to put under your analysis. When I run two nested domains with grids with an angle of rotation, the model just blows up. Under the same configuration but with nested grids without angle, the model usually runs fine.
Would it be possible for you to take a look at my model and give me feedback?  
How do I attach the folder of my model? I understand it is select Insert > Insert Image/Video File in the editor toolbar, but I don't see the way to attach.
Best regards,
César.

Parents
  • Hello Cesar, 

    Sure, please upload your workspace. Here you can read about Sharing Hydraulic Model Files on the OpenFlows Forum.

    You can export an OpenFlows FLOOD workspace as explained here

    Kind regards,
    Luis

  • Hello Luis,

    Thanks for your kind reply. I was finally able to upload the files (option 2). The file name is "Coastal_lagoon-Nested.ows".
    In the Tide module, the tidal harmonic components for the parent domain with rotation are set to off. The other harmonic components are for the domain without rotation.
    I leave the file names of the grids:


    Name of grids without rotation:

    Bati-Dad_400
    Bati-Son_400

    Name of meshes with rotation :

    Bati-Dad_400_Ang
    Bati-Son_400_Ang

    Thank you for your support!

    Regards,

    Cesar.

  • Hello Cesar,

    I've reviewed your model setup with and without rotated nested grids. 

    You have set time step that is largely beyond the recommended. Please follow the guidelines on how to setup the model time step with the MOHID Water engine

    Regarding the model becoming unstable with rotated grids, have you completed a full simulation of the father model before nesting the submodel? I'd like to call for your attention to: 

    1) the submodel temperature and salinity initial condition is different from the father model initial condition. 

    2) You are using 10 sigma vertical layers in a model with depths up to 1500 meters. No realistic initial and boundary condition was specified. Temperature and salinity have constant values which is not realistic. 

    3) Along the nested boundary domain, there are grid cells that can't access information from the "father" domain, because the "father" domain cells are land and the nested domain are water, due to the increase in resolution. I would recommend that you first run the model in 2D (1 vertical layer sigma) with the father and nested models. If the results are stable then, we can look at how to improve on to the 3D model. 

    I will wait for your reply. Thanks and regards,

    Luis

  • Dear Luis,

    Thank for your reply.

    I agree with everything you say. The truth is, a high DT and low horizontal resolution was configured to make the tests faster.
    Yes, I first run the parent model before doing the nesting. I am aware of what you point out in points 1 and 2.

    The reason for my insistence, is that under the same configuration the model with grids without rotation runs and finishes the simulation, instead, as soon as I assume even one degree of rotation the model does not start, it just blows up at once. I will check again that all open boundaries of my child model are within the water domain of the parent. 

    Finally, to avoid the irregularities and complexities of the coastlines, I have done the offshore test, where the grid of the child is completely inside the parent, but the simulation still does not start. 

    I will run the test you suggest and then let you know the results.

    Thanks for your kind attention.

    Cesar.

  • Hello Cesar,

    Could you please share the offshore model? Then I can track down what's happening. 

    Thank you very much and kind regards,
    Luis

  • Hello,
    Luis, I have barely been able to do the tests. I copy the workspace of my offshore model. In which there are two sets of simulations, the ones with grids without and with rotation.


    My nested model with grids without rotation has the child domain (Sim #1-offshore_N1) over the coast. This model runs well, I tested it for a month and it did not fail. The model with grids with rotation has the same configuration and even, the child domain (Sim #2-offshore_N1_R) is completely inside the parent domain (Sim #2-offshore_N0_R) and still blows up at startup.


    I have tried to keep it as simple as possible. The model with meshes without rotation has more vertical layers (Cartesian+sigmas). To avoid the adjustment process that the model does at the beginning with the cartesian geometries (removing insolated cells), the test of the domains with rotation I did them only with sigma layers (I have tested the parent model and it runs well).

    Some key data:

    Bathymetry parent model with rotation: Bathy_N0_R.dat.
    Bathymetry parent model with rotation: Bathy_N0_NR.dat

    Bathymetry child model with rotation: Bathy_N1_R_R.dat
    Bathymetry child model without rotation: Bathy_N1_NR.dat

    Below I copy only the end of the error returned by the model:


    Point [i,j,k] not covered 32 132 10
    Point [i,j,k] not covered 33 132 10
    Point [i,j,k] not covered 34 132 10
    Point [i,j,k] not covered 35 132 10
    Point [i,j,k] not covered 36 132 10
    Point [i,j,k] not covered 37 132 10
    Point [i,j,k] not covered 38 132 10
    Point [i,j,k] not covered 39 132 10
    Point [i,j,k] not covered 40 132 10
    Point [i,j,k] not covered 41 132 10
    Point [i,j,k] not covered 42 132 10
    Point [i,j,k] not covered 43 132 10
    Point [i,j,k] not covered 44 132 10
    Point [i,j,k] not covered 45 132 10
    Point [i,j,k] not covered 46 132 10
    Point [i,j,k] not covered 47 132 10
    Point [i,j,k] not covered 48 132 10
    Point [i,j,k] not covered 49 132 10
    Point [i,j,k] not covered 50 132 10
    Point [i,j,k] not covered 51 132 10
    Point [i,j,k] not covered 52 132 10
    Point [i,j,k] not covered 53 132 10
    Point [i,j,k] not covered 54 132 10
    Point [i,j,k] not covered 55 132 10
    Point [i,j,k] not covered 56 132 10
    Point [i,j,k] not covered 57 132 10
    -------------------------- MOHID -------------------------

    Running MOHID, please wait...

    i,j,k
    26 109 1
    density,temperature,salinity
    ModelName =Domain_N1
    -235.432968662287 28.0000000000000 35.0000000000000
    ModifyDensity - ModuleWaterProperties - ERR80
    forrtl: warning (528): IEEE_UNDERFLOW is signaling

    Thank you very much for your support and I remain attentive to any comment.

    Best regards,

    Cesar.

  • Hello Cesar,

    I've took an initial look that your model and the vertical geometry differs from the rotated and non-rotated grids. 

    The rotated grids have sigma coordinates only which is not recommended in simulations with such big depths and slopes.

    Also the rotated grid does not have discharges but the non-rotated has it. 

    Could you try to set the vertical geometry to be the same and then let me know if it there is still a problem? Maybe even simpler is to set both domains (parent/son) to have only one vertical layer and see if the problem persists. 

    Additionally, both models seem to have the tide forcing with a strange configuration. See images below with the triangulation network of the tidal gauges for both grids:

    For tide you can try to use FES2014 to avoid these type of problem. See more in this article.

    Kind regards,
    Luis

Reply
  • Hello Cesar,

    I've took an initial look that your model and the vertical geometry differs from the rotated and non-rotated grids. 

    The rotated grids have sigma coordinates only which is not recommended in simulations with such big depths and slopes.

    Also the rotated grid does not have discharges but the non-rotated has it. 

    Could you try to set the vertical geometry to be the same and then let me know if it there is still a problem? Maybe even simpler is to set both domains (parent/son) to have only one vertical layer and see if the problem persists. 

    Additionally, both models seem to have the tide forcing with a strange configuration. See images below with the triangulation network of the tidal gauges for both grids:

    For tide you can try to use FES2014 to avoid these type of problem. See more in this article.

    Kind regards,
    Luis

Children
  • Dear Luis, thank you for your reply.

    About the tide, it is because I am still working with an old version of FES (for some reason it does not download the FES2014 from the page you shared). Indeed, as I get closer to the coast, the generation of the tidal components starts to fail.

    Luis, the model with the grids without rotation is set up like this, to show that even when I am close to the coastline and the cells starts to become more irregular between domains (parent/child), my nested models run.
    Now, you have told me to test with a single sigma layer (2D). Well, the models with the grid without rotation run fine. The models with rotation don't even start. The latter, do not have river discharges because I want to avoid the argument that there are cells of the child that are above land in the parent. So, all child domain is inside the parent domain.

    Even with this basic configuration, can you please do the runs and confirm that the models without rotation run well, and that the models with rotation, even though the configuration is basically identical to the model without rotation, do not run?

    thank you very much,

    Cesar

  • Hello Cesar,

    I've used your rotated grids and FES2004 tide files and created a new project. I've started with only one layer and tide forcing and the model runs fine. Then I've added 10 sigma layers (thickness = 0.1) and everything is OK. I'll try adding the atmospheric forcing and temperature/salinity and will get back to you as soon as I've got an indication of what the problem is. 

    Thanks and regards,
    Luis

  • Dear Luis,

    thank for your usual kindness and support.
    I will be attentive to any findings and indications from you.

    Best regards,
    Cesar.

  • Hello Cesar,

    Apologies for taking long to find a solution.

    Indeed there is an issue when using rotated grids. The problem is related with the way FLOOD writes the nested grid file. When you create the nested grid, the format is written as if it was a curvilinear grid (even know it's not). However, when your parent model is rotated, your nested grid must have the same orientation. The MOHID Water engine gets "confused" when the nested grid "suddendly" is assumed curvilinear, thus the error. 

    There is a solution for that. You must open your nested bathymetry file and erase the <CornersXY>/<\CornersXY> block and then write the following keywords:


    CONSTANT_SPACING_X : 1
    CONSTANT_SPACING_Y : 1
    DX                                      : 0.004
    DY                                      : 0.004

    Make sure you change the grid angle in the nested grid from zero to 12

    GRID_ANGLE                    : 12

    Keep in mind that these values are specific for this simulation. Another set of nested grids the values would have to be changed accordingly. You only need to do 

    Please let me know if this works. 

    Kind regards,
    Luis

  • Dear Luis,
    thank for your support. Indeed, with that modification in the nested bathymetry the model now runs.

    Best regards,

    César.