Closed jalal-90 closed 1 year ago
Did you read the docstring for calc_f13? You're calling the function incorrectly.
Did you read the docstring for calc_f13? You're calling the function incorrectly.
I am sorry for the inconvenience caused. Could I have an example script for Calc_f13_inpoly () function?
@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');