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

read in existing auxiliary files into msh obj, updates to make_bc #287

Closed WPringle closed 4 months ago

WPringle commented 1 year ago

Some additions for sponge zone construction, reading auxiliary files, writing offset63, swanoutput namelist, update Make_f5354 help and min_depth option.

WPringle commented 1 year ago

Sponge example:

% input files
mesh_file = 'my_mesh.mat'
tpxoh = 'h_**_tpxo9_atlas_30_v5.nc';
tpxou = 'u_**_tpxo9_atlas_30_v5.nc';

% load the mesh
load(mesh_file)

% add the sponge layer (width 10% of M2) 
sponge_opt = 1; % for tidal boundary conditions
m = Calc_Sponge(m,[12.42*3600, 0.1],sponge_opt);

%% Make the fort.15 struct
TS = start_time; %[date-string]
TE = end_time; %[date-string]
DT = time_step; %[s]
CONST = "major8"; % tidal constituent information
m = Make_f15(m,TS,TE,DT,'const',CONST,'tidal_database',tpxoh);

% add the sponge info for this tidal
m = Make_f5354(m, tpxoh, tpxou);
% write out mesh files..
write(m,'sponge_mesh')
krober10nd commented 4 months ago

The only other comment pending is regarding preserving the previous entries in the changelog. Otherwise good to go.