CHLNDDEV / OceanMesh2D

A two-dimensional triangular mesh generator with pre- and post-processing utilities written in pure MATLAB (no toolboxes required) designed specifically to build models that solve shallow-water equations or wave equations in a coastal environment (ADCIRC, FVCOM, WaveWatch3, SWAN, SCHISM, Telemac, etc.).
https://github.com/sponsors/krober10nd
GNU General Public License v3.0
179 stars 65 forks source link

Making mesh with floodplain and interpolating DEM data #254

Closed Jiangchao3 closed 2 years ago

Jiangchao3 commented 2 years ago

Hi @krober10nd and @WPringle ,

I am making a mesh with a floodplain and I want to simulate flood inundation over the coastal area.

I can successfully run the Example_6b_GBAY_w_floodplain but still, several questions should inquire you further:

  1. This workflow shows that the dem file "galveston_13_mhw_2007.nc" contains the data both of floodplain and underwater. For my case, the dem of floodplain and underwater are two different datasets, Should it be necessary to merge these two dem into one firstly and then conduct the workflow as the example does? I am curious about that is it possible to make the whole floodplain and underwater mesh firstly and then do interpolation for the floodplain and the underwater domain from two dem files separately?

  2. Floodplain and underwater DEM files are collected from different sources, merging them will take some effort but is ok.

  3. The workflow in Example_6b_GBAY_w_floodplain just use the gdat class to do the interpolation using the interFP function, but I remember @krober10nd suggests that should use the dem rather than the gdat class since gdat would downsample the dem data. image

Any suggestions for this issue, many thanks to you!

Jiangchao

krober10nd commented 2 years ago

Yes, the two datasets should be merged because they will be interpolated onto the mesh after it's built. So regardless how you build things, you don't want the data to have discrepancies at the seam. There's a good tool to do this merging of DEMs here https://grass.osgeo.org/grass80/manuals/r.blend.html

That interpolation methodology (interpFP) is just designed to save time and commands on the part of the user. I recommend looking inside the code for how it calls things and what it's doing.

It first interpolates the underwater portion of the mesh with the DEMs used to build the underwater portion of the mesh and then only interpolates the overland components of the mesh with the DEMs overland. In this way, the interpolated data doesn't change underwater in the combined underwater overland mesh from the original underwater-only model.

Jiangchao3 commented 2 years ago

Thanks for your clear explanation, I will have a deep look into the source code of interpPF.