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
178 stars 64 forks source link

update Gridded_to_Mesh_SeaBed_DepthAveraged.m to fix the infinite loop in using Cal_IT_Fric.m #280

Closed Jiangchao3 closed 1 year ago

Jiangchao3 commented 1 year ago

The IT calculation process sometimes gets stuck in an infinite loop when using the original N data. Here NaNs in the originally generated N data in the vertical direction are firstly filled by extrapolating all N values down the column using the nearest non-NaN value above.

Jiangchao3 commented 1 year ago

Hi @WPringle, agree with you and I add four if-end conditions to address the boundary values. Please review. Thanks.

krober10nd commented 1 year ago

Change log and link PR.