Closed PatMottmac closed 3 years ago
Hey @PatMottmac Thanks for the code! Sorry you're experiencing this.
Could you try a different interpolation method (without the fillinside option) and update us what happens?
m = interp(m,demfile,'interp','linear');
Either way, you're doing everything right. It looks like a bug, would it be possible to share the DEM (if necessary privately) so I can analyze what's going on?
Thanks @krober10nd ! That seemed to fix it - guess it was just the interpolation. Thanks again for the help
Just curious, what version of OM are you using? If you're using version control, you type git status
in the folder with it.
I believe someone else encountered this with the CA interp method when interpolating from a DEM with variable resolution horizontal grid spacing (i.e., x grid and y-grid spaces were not equal).
We put in a fix in https://github.com/CHLNDDEV/OceanMesh2D/commit/8311513226f75f6c4e085eeca375324fd1fa897d on Dec 2.
I was using the v4.0 - just downloaded the latest zip file on 3/14/2020, not using version control unfortunately (will switch now -just wanted to get this up and running). My DEM does have variable resolution so maybe that triggered the issue?
Ah okay. Yes, it’s likely that we have not fully resolved the non regular DEM grid spacing case.
Would it be possible to have access to the DEM for testing purposes to figure this coding bug out? That would greatly help us figure this out. Thanks
Hey Patrick, in #204 there's more information why your DEM didn't work and a potential fix.
Hi All, First time working with this tool and am running into a slight shift in my DEM data during mesh generation. Images below show (1) the raw bathymetry generated by the matlab code and (2) actual DEM data interpolated to the mesh in SMS. Wondering if there's a projection issue in my code that I may be missing? For reference the DEM is in Hor.: NAD83 decimal degrees, Vert.: NAVD88 m.
(1) - Raw bathy output from matlab code. Thalweg input shown as red line:
(2) - DEM Interpolated to mesh during postprocessing. Note actual location of channel:
Matlab code below for reference - Adapted from Example 6
Thanks for the help and for this great tool!