Dear ROMS developers and users,
I have successfully run a 3-layer nested case using the newly published version of the ROMS, and the child grids are both refinement grids (layer2 totally in layer1, and layer3 totally in layer2). The locations of the three grids are shown in Figure1, while the running log of the "contact.m" just as Figure2 presents.
However, the MATLAB function "contact.m" won't work when I changed the refined location of the layer3 (no change in layer1 and layer2). The MATLAB reports that "index exceeds matrix dimensions" in the child function "refinement" of the "contact.m". In this case, locations of the three grids are shown in Figure3, and the running log of the "contact.m" in Figure4.
In the successful case, there are 4 contact regions, but would be 6 in the failed case. The number of contact regions were calculated in function "grid_connections.m", in which there is a comment indicating that the child grid won't contact to its grand parent grid if the child grid is inside of more that one nested grid. Therefore, in both of my cases, there should be only 4 contact regions.
Just as Figure3 reveals, layer3 is still totally inside layer2, and 6 contact regions should be wrong. And I am trying to figuring out how the function "grid_connections.m" works.
Any ideas?
Appreciations for any reply!
-Peng
Unstable performance of the function:grid_connections.m
-
- Posts: 19
- Joined: Mon Jul 22, 2013 4:54 am
- Location: Ocean University of China
Unstable performance of the function:grid_connections.m
- Attachments
-
- Figure1:layer1(black),layer2(green),layer3(red)
- Figure1.jpg (23.41 KiB) Viewed 1932 times
-
- Figure2
- Figure2.png (46.42 KiB) Viewed 1932 times
-
- Figure3:layer1(black),layer2(green),layer31(red)
- Figure3.jpg (23.32 KiB) Viewed 1932 times
-
- Figure4
- Figure4.png (71.17 KiB) Viewed 1932 times
-
- Posts: 19
- Joined: Mon Jul 22, 2013 4:54 am
- Location: Ocean University of China
Re: Unstable performance of the function:grid_connections.m
Hi all,
Maybe I have found the problem, that is the raw function "grid_connections.m" might have difficulty in handling the "2-lines" case. Just see Figure5 in this reply and you will get it if you are also working on the nested grids.
The modified "grid_connections.m" is also here. It works fine for me and you could try it, but I can not guarantee it would always work.
Thanks!
-Peng
Maybe I have found the problem, that is the raw function "grid_connections.m" might have difficulty in handling the "2-lines" case. Just see Figure5 in this reply and you will get it if you are also working on the nested grids.
The modified "grid_connections.m" is also here. It works fine for me and you could try it, but I can not guarantee it would always work.
Thanks!
-Peng
- Attachments
-
- grid_connections_5.m
- The modified function "grid_connections.m"
- (19.11 KiB) Downloaded 227 times
-
- Figure5:The yellow grids are the donor grid points which lay in the receiver grid perimeter.
- Figure5.jpg (78.12 KiB) Viewed 1924 times