bug message reminder

When adressing a model crash or bug, please remember to include an entire model setup in your post that reproduces the crash or exposes the bug. Also add the XBlog.txt file. This is necessary information for people that are trying to help you. Including your model setup can be achieved by adding the zipped run directory (excluding output) as an attachment to the post.


Refine grid using xb_grid_ygrid

Thomas Dix, modified 5 Years ago.

Refine grid using xb_grid_ygrid

Capillary Posts: 6 Join Date: 6/5/15 Recent Posts

I am new to x-beach and am looking to refine a 2D grid which I have created using the matlab toolbox. I want a finer resolution in the nearshore and in the centre of the model to capture processes around a groyne system and a coarse resolution toward the boundaries of the grid.

I am using the function xb_grid_ygrid to refine the alongshore profile so that it is focused on the centre of the grid using the following settings:

ygr = xb_grid_ygrid(yy1,'dymin',2,'dymax',20,'area_type','center','area_size',0.5);

Where yy1 is my initial alongshore grid spacing, dymin is the minimum cell size, dymax is the maximum cell size, area_type 'centre' refines the mesh in the centre of the grid to an extent of 50% (0.5) of the total area size.

I am happy with the resolution output for the grid in the nearshore but this process creates a fine mesh to the seaward boundary extent (see attached picture) which is not required. I am looking for a way to create a grid which becomes coarser going offshore, even in the region defined using xb_grid_ygrid (the area highlighted in the attached image).

Is there a way to achieve this output in xbeach?


Bas Hoonhout, modified 5 Years ago.

RE: Refine grid using xb_grid_ygrid (Answer)

Swell Posts: 226 Join Date: 5/20/11 Recent Posts
Hi Tom,

I assume you ask this question in context of computational efficiency. In that case the answer to your question is: no, you can't.

XBeach works with curvilinear grids. The Matlab toolbox only supports rectilinear grids (which is a special case of a curvilinear grid). Both grid types have in common that the number of cross-shore and alongshore grid cells is constant throughout the grid. Therefore specifying X alongshore grid cells near the waterline will automatically result in X alongshore grid cells near the offshore border.

Using rectilinear grids the alongshore resolution is also constant. Using curvilinear grids the alongshore resolution may vary over the domain so the grid near the waterline may cover a small beach stretch quite detailed whereas the grid near the offshore border may cover a much larger distance. Your bathy seems to be reasonably alongshore uniform, so stretching the offshore border wouldn't help you much, I suppose. Moreover, curvilinear grids are not supported by the Matlab toolbox. You can use the RFGrid tool provided with Delft3D for this.

Did you use the xb_grid_xgrid function for the cross-shore discretization? This function will make deeper areas more coarse, so you might win some computational time in the cross-shore resolution of the offshore area.

What you really are looking for is an unstructured grid. The XBeach core is being implemented in D-FLOW FM which supports that. But this is an ongoing development and I have no idea on the expected release date.

Tom Dix, modified 5 Years ago.

RE: Refine grid using xb_grid_ygrid

Capillary Posts: 6 Join Date: 6/5/15 Recent Posts

Thanks for the advice, makes sense. Yes I was looking at this to improve processing efficiency, although I haven't tested the model yet to assess run times (fingers crossed!!!). I have used xb_grid_xgrid and it does make the offshore cells much coarser which, as you said, should help to some extent.

Thanks again,

Samuel Keogh, modified 4 Months ago.

RE: Refine grid using xb_grid_ygrid

Capillary Posts: 2 Join Date: 3/9/20 Recent Posts
<!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}-->Good to know in detail about making the 2D grid. This article is explaining well so we must try to share it with maximum people.And here is easy to browse <!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}-->https://cheapessayswritingservice.com/write-an-essay-for-me/ for good grid .Such a wonderful blog with the top of the worthy article be shared with us.
Bernard Allen, modified 3 Months ago.

RE: Refine grid using xb_grid_ygrid

Capillary Posts: 1 Join Date: 5/5/20 Recent Posts
<!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}-->This is the best way to find the best <!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}-->fibromyalgia diet
mp3rocketpro mp3rocketpro, modified 23 Days ago.

RE: Refine grid using xb_grid_ygrid

Capillary Posts: 1 Join Date: 7/17/20 Recent Posts
MP3 Rocket 7.Four.1 Pro is easy to apply because the video downloader, that provides heaps of content material/capability, varieties provider, and tens of millions of overall downloads. mp3 rocket pro It gives a manner to download any kind of documents as an instance audio files, video documents which includes movies, video games app, ringtones, and other information from any platform free of charge.