You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
% STEP 1: set mesh extents and set parameters for mesh.
bbox = [110 134; % lon_min lon_max
20 32]; % lat_min lat_max
min_el = 1e3; % minimum resolution in meters.
max_el = 100e3; % maximum resolution in meters.
max_el_ns = 5e3; % maximum resolution nearshore in meters.
grade = 0.35; % mesh grade in decimal percent.
R = 3; % number of elements to resolve feature width.
%-------------------------------------------------------------------------
% STEP 2: specify geographical datasets and process the geographical data
% to be used later with other OceanMesh classes...
% STEP 3: create an edge function class
fh = edgefx('geodata',gdat,...
'fs',R,'max_el_ns',max_el_ns,...
'max_el',max_el,'g',grade);
% STEP 4: Pass your edgefx class object along with some meshing options and
% build the mesh...
mshopts = meshgen('ef',fh,'bou',gdat,'plot_on',1,'nscreen',5,'proj','trans');
mshopts = mshopts.build;
m = mshopts.grd; % unpack the mesh object
m = make_bc(m,'auto',gdat,'distance'); % make the boundary conditions
m = Calc_f13(m,'Ev');
The text was updated successfully, but these errors were encountered:
@jalal-90 The calling format is in the docstring for the function. Please read the help documentation we put together and try to figure it out from there. Thanks.
Dear all,
I am facing problem to create a fort.13 file for ADCIRC model in OceanMesh2D. Here, I added my problems followed by main code.
Problem
Index exceeds array bounds.
Error in Calc_f13 (line 66)
if strcmpi(varargin{1},'inpoly')
Main code
clearvars; clc;clear;close all
addpath('..')
addpath(genpath('./utilities/'))
addpath(genpath('./datasets/'))
addpath(genpath('./OceanMesh2D_Datasets/'))
addpath(genpath('./m_map/'))
% STEP 1: set mesh extents and set parameters for mesh.
bbox = [110 134; % lon_min lon_max
20 32]; % lat_min lat_max
min_el = 1e3; % minimum resolution in meters.
max_el = 100e3; % maximum resolution in meters.
max_el_ns = 5e3; % maximum resolution nearshore in meters.
grade = 0.35; % mesh grade in decimal percent.
R = 3; % number of elements to resolve feature width.
%-------------------------------------------------------------------------
% STEP 2: specify geographical datasets and process the geographical data
% to be used later with other OceanMesh classes...
coastline = 'GSHHS_f_L1';
gdat = geodata('shp',coastline,'bbox',bbox,'h0',min_el);
% STEP 3: create an edge function class
fh = edgefx('geodata',gdat,...
'fs',R,'max_el_ns',max_el_ns,...
'max_el',max_el,'g',grade);
% STEP 4: Pass your edgefx class object along with some meshing options and
% build the mesh...
mshopts = meshgen('ef',fh,'bou',gdat,'plot_on',1,'nscreen',5,'proj','trans');
mshopts = mshopts.build;
m = mshopts.grd; % unpack the mesh object
m = make_bc(m,'auto',gdat,'distance'); % make the boundary conditions
m = Calc_f13(m,'Ev');
The text was updated successfully, but these errors were encountered: