-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow different AMR flagging on each level and flagregion changes #454
Comments
I added another suggestion to clawpack/amrclaw#262 that would be useful in particular for GeoClaw, namely introducing That reminded me of another GeoClaw parameter that often causes confusion and/or unexpected behavior, the parameters The original idea was to try to make sure that fine grids only needed near the coast should not be introduced in deeper water when it can be avoided, because the wave speed sqrt(g*h) is larger in deeper water and so small fine grids extending farther than needed into deep water potentially require much smaller time steps than if the fine grid is only very close to shore, due to the CFL restriction. So the idea is that if the water depth is greater than It is probably better to try to keep refinement away from deep water by specifying flagregions that hug the coast, which is now much easier to do with Ruled Rectangles, e.g. this region that follows the continental shelf, or by specifying a flagregion that covers a set of fgmax points. |
Agreed. |
As somebody who recently stumbled onto the dtopo/region issue, I can attest to the confusion it initially caused. One source of confusion for me was that if a region was created for a dtopo or topo file, it never showed up in the regions.data file, and so it was unclear how the logic was applied to these hidden regions. I have since taken @rjleveque 's advice, and created a region that explicitly does what adding a dtopo/topo file was doing implicitly. This still seems like a useful in some cases, and so I am wondering if it makes sense to have an option to explicitly create a region from a topo/dtopo file. Something like :
or
where in the dtopo case, the time interval is taken from the dtopo info. These regions would then show up as usual regions in the regions. data file, and so it would then be clear to the user what was going on. This would also save the user the need to parse the topo/dtopo files for extent and time intervals. |
My thought was mostly along the lines of what @donnaaboise is suggesting, namely processing through the topo/dtopo such that
|
@donnaaboise - That is exactly what I was suggesting in proposing we allow the user to specify a flagregion with something like:
which would set up an ordinary flagregion but taking the extent from the specified topo file. In the case of a dtopo file it could also take Note that in v5.7.0 there is a new |
This was to accommodate the adjoint flagging as well as the ruled rectangles? |
@mandli: You mean the new Also I think The old Regarding plotting all regions, this is already supported in GeoClaw as kml files, both for rectangles and ruled rectangles. Just add this to the bottom of
which in particular calls One reason I added a Note that |
@rjleveque Thanks for the clarification. I was thinking we would also have something apart from KML to visualize these but I had forgotten about that capability. |
Yes, it would be nice to have other plotting tools too, particularly for amrclaw simulations that have nothing to do with geosciences! |
The changes I proposed in clawpack/amrclaw#262 would naturally be carried over to GeoClaw, allowing different flagging methods and/or tolerances at each AMR level.
In addition, I propose the following:
Currently in setrun.py one can specify flagregions (either as traditional rectangular "regions" or as Ruled Rectangles). But regions are also automatically created to go along with every topo or dtopo file, since the way a topofile is specified, for example includes parameters
minlevel, maxlevel, t1, t2
. These are used to define a rectangular region whose spatial extent is exactly that of the topofile. For each dtopo file a region is created with spatial extent and time interval determined by the dtopo data and onlyminlevel, maxlevel
are specified along with the path to the dtopo file. This was originally intended to make it convenient in cases where the user wants to define a certain level of refinement around the earthquake source region, for example, over the duration of the earthquake.However, this capability seems to be little used in practice and much more frequently is the cause of confusion for new users. And even experienced users often get messed up with refinement not happening where desired because of the parameters set for a topo or dtopo file were over-riding the regions that were explicitly set.
I propose we eliminate this option, so that specifying a topo or dtopo file only specifies this input data and does not implicitly generate a region. If the user wants a region with exactly the same spatial extent as the topo file, then they should explicitly set a flagregion with this spatial extent.
Another possibility for providing this convenience: the new way of specifying flagregions allows setting either:
for a rectangle, or e.g.
for a Ruled rectangle.
We could also allow something like:
in which case it would read the spatial extent
[x1,x2,y1,y2]
from the topofile header and set up a rectangular region. This would allow the convenience originally intended but in a much clearer manner than the current system.The text was updated successfully, but these errors were encountered: