﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
780	IMPORTANT: Updated nesting Matlab script grid_connections.m	arango		"The Matlab script used to compute nested grid connectivity ('''grid_connections.m''') was updated, so it is more robust in telescoping nesting applications.

Currently, in ROMS a telescoping grid is a refined grid ('''refine_factor > 0''') containing a finer grid inside. Notice that under this definition the coarser grid ('''ng=1''', '''refine_factor=0''') is not considered a telescoping grid. The last
cascading grid is not considered a telescoping grid since it does not contains a finer grid inside.  The telescoping definition is a technical one, and it facilitates the algorithm design.

A tricky algorithm is added at the top of these function to reject indirect connectivity in telescoping refinement.  Previously, only one coincident connection between grids was allowed, as shown below: 

[[Image(https://www.myroms.org/trac/grids_1-and-2.png, center, 600)]]
[[Image(https://www.myroms.org/trac/grids_2-and-3.png, center, 600)]]
[[Image(https://www.myroms.org/trac/grids_1-and-3.png, center, 600)]]

Here, we have a three nested grid application. '''Grid-2''' is a 1:3 refinement from '''Grid-1''' and '''Grid-3''' is a 1:3 refinement from '''Grid-2'''.  The '''Grid-2''' is the only telescoping grid in this application according to the above definition.  Notice that '''Grid-3''' is inside both '''Grid-2''' (directly) and '''Grid-1''' (indirectly).

The panels show the location of the donor grid ('''blue plus''') and receiver grid ('''red circle''') at PSI-points. Notice that in the top panel, the '''Grid-2''' perimeter lies in the same lines as the donor '''Grid-1''', and some of the points are coincident, as it should be.  The same occurs in the middle panel between '''Grid-2''' and '''Grid-3'''.

However, we did not allow before to have coincident grid points between the indirect connections of '''Grid-1''' and '''Grid-3'''.  We were using that property to reject indirect connections between nested grids. 

I was aware of this restriction but I forgot to go back and code a robust logic in '''grid_connections.m''' to allow coincident grids points in indirect connections for telescoping applications. The restriction is removed with this update/

I know, it is a complicated subject to discuss with words.  It needs to be shown geometrically.

Many thanks to Marc Mestres and John Wilkin for [https://www.myroms.org/forum/viewtopic.php?f=17&t=4826 bringing] this problem to my attention.
"	upgrade	closed	major	Release ROMS/TOMS 3.7	Matlab	3.7	Done		
