Hello all:
In my study region,there are some coastal structures .For example ,breakwaters,jetties ,and so on.
Usually,the size of structures is too small for grid size to generate in grid.Whether can i add coastal structures into model in other method?
Thanks!
How to add coastal structures into model

 Posts: 61
 Joined: Mon Jul 20, 2009 2:41 pm
 Location: Port And Costal Engineering Laboratory
Re: How to add coastal structures into model
Right now there is no way to include anything that's too small to mask out. Maybe there could be a way to specify the flow through a wall between adjacent grid cells and then set it to zero, but you'd have to have the grid aligned with them just so and you wouldn't really be resolving them anyway.

 Posts: 62
 Joined: Fri Sep 11, 2009 1:48 pm
 Location: nmefc
Re: How to add coastal structures into model
when i creat the grid file by EASYGRID, it report a error!
In the easygrid.m files, I set
% Geographical and Grid parameters 
lat = 0.86; % Latitude (degrees) of the bottomleft corner of the grid.
lon = 99; % Longitude (degrees) of the bottomleft corner of the grid.
X = 3120000; % Width of domain (meters) 26.33
Y = 2800000; % Length of domain (meters)
rotangle = 0; % Angle (degrees) to rotate the grid conterclockwise
resol = 11000; % Cell width and height (i.e. Resolution)in meters. Grid cells are forced to be (almost) square.
N = 10; % Number of vertical levels
And the *_bathy.mat file is created by myself, and the area is 0.8~26.5N 98.5~131 E,resolution is 2 minutes.
??? Error using ==> qhullmx
qhull precision warning:
The initial hull is narrow (cosine of min. angle is 1.0000000000000002).
A coplanar point may lead to a wide facet. Options 'QbB' (scale to unit box)
or 'Qbb' (scale last coordinate) may remove this warning. Use 'Pp' to skip
this warning. See 'Limitations' in http://www.qhull.org/html/qhimpre.htm
qhull precision error: initial simplex is not convex. Distance=1.2e014
While executing:  qhull d Qt Qbb Qc
Options selected for Qhull 2003.1 2003/12/30:
delaunay Qtriangulate Qbboundlast Qcoplanarkeep _premerge
_zerocentrum Pgood Qinteriorkeep _maxwidth 35 Errorroundoff 1.6e013
_onemerge 1.2e012 Visibledistance 3.3e013 Ucoplanardistance 3.3e013
Widthoutside 6.6e013 _widefacet 2e012 _narrowhull 2.2e016
precision problems (corrected unless 'Q0' or an error)
1
flipped facets
The input to qhull appears to be less than 3 dimensional, or a
computation has overflowed.
Qhull could not construct a clearly convex simplex from points:
The center point is coplanar with a facet, or a vertex is coplanar
with a neighboring facet. The maximum round off error for
computing distances is 1.6e013. The center point, facets and distances
to the center point are as follows:
facet
p160696
p378
p0
distance= 8.9e015
facet
p161074
p378
p0
distance= 1.8e015
facet
p161074
p160696
p0
distance= 1.8e015
facet
p161074
p160696
p378
distance= 3.6e015
These points either have a maximum or minimum xcoordinate, or
they maximize the determinant for k coordinates. Trial points
are first selected from points that maximize a coordinate.
The min and max coordinates for each dimension are:
0: 99 130.5 difference= 31.5
1: 0.8333 36.17 difference= 35.33
2: 0 35.33 difference= 35.33
If the input should be full dimensional, you have several options that
may determine an initial simplex:
 use 'QJ' to joggle the input and make it full dimensional
 use 'QbB' to scale the points to the unit cube
 use 'QR0' to randomly rotate the input for different maximum points
 use 'Qs' to search all points for the initial simplex
 use 'En' to specify a maximum roundoff error less than 1.6e013.
 trace execution with 'T3' to see the determinant for each point.
If the input is lower dimensional:
 use 'QJ' to joggle the input and make it full dimensional
 use 'Qbk:0Bk:0' to delete coordinate k from the input. You should
pick the coordinate with the least range. The hull will have the
correct topology.
 determine the flat containing the points, rotate the points
into a coordinate plane, and delete the other coordinates.
 add one or more points to make the input full dimensional.
This is a Delaunay triangulation and the input is cocircular or cospherical:
 use 'Qz' to add a point "at infinity" (i.e., above the paraboloid)
 or use 'QJ' to joggle the input and avoid cocircular data
Error in ==> delaunayn at 117
t = qhullmx(x', 'd ', opt);
Error in ==> griddata>linear at 151
tri = delaunayn([x y]);
Error in ==> griddata at 120
zi = linear(x,y,z,xi,yi,opt);
Error in ==> south_sea_easygrid at 281
h = griddata(xbathy,ybathy,zbathy,lon_rho,lat_rho,'linear');
But when I run easygrid.m and use the depth from ETOPO5 by
[xbathy,ybathy,zbathy]=read_srtm30plus(lon_range+1,lat_range,300);
%This reads in worldwide bathymetry at 60 second (1 minute) resolution,
%30seconds max
[xbathy,ybathy]=meshgrid(xbathy,ybathy);
xbathy = xbathy(:); %columnize
ybathy = ybathy(:); %columnize
zbathy = zbathy(:); %columnize, and make depth positive
% outname=strcat(name,'_bathy.mat','interpreter','none')
save([name,'_bathy.mat'],'xbathy','ybathy','zbathy')
it is OK. So I don't know the reasons when I use my depth mat file, it is created by
dat=load('55.dat');
zbathy=dat(:,3);
ybathy=dat(:,1);
xbathy=dat(:,2);
save south_sea_bathy xbathy ybathy zbathy
Who can tell me the reasons for that? Thank you very much!!
In the easygrid.m files, I set
% Geographical and Grid parameters 
lat = 0.86; % Latitude (degrees) of the bottomleft corner of the grid.
lon = 99; % Longitude (degrees) of the bottomleft corner of the grid.
X = 3120000; % Width of domain (meters) 26.33
Y = 2800000; % Length of domain (meters)
rotangle = 0; % Angle (degrees) to rotate the grid conterclockwise
resol = 11000; % Cell width and height (i.e. Resolution)in meters. Grid cells are forced to be (almost) square.
N = 10; % Number of vertical levels
And the *_bathy.mat file is created by myself, and the area is 0.8~26.5N 98.5~131 E,resolution is 2 minutes.
??? Error using ==> qhullmx
qhull precision warning:
The initial hull is narrow (cosine of min. angle is 1.0000000000000002).
A coplanar point may lead to a wide facet. Options 'QbB' (scale to unit box)
or 'Qbb' (scale last coordinate) may remove this warning. Use 'Pp' to skip
this warning. See 'Limitations' in http://www.qhull.org/html/qhimpre.htm
qhull precision error: initial simplex is not convex. Distance=1.2e014
While executing:  qhull d Qt Qbb Qc
Options selected for Qhull 2003.1 2003/12/30:
delaunay Qtriangulate Qbboundlast Qcoplanarkeep _premerge
_zerocentrum Pgood Qinteriorkeep _maxwidth 35 Errorroundoff 1.6e013
_onemerge 1.2e012 Visibledistance 3.3e013 Ucoplanardistance 3.3e013
Widthoutside 6.6e013 _widefacet 2e012 _narrowhull 2.2e016
precision problems (corrected unless 'Q0' or an error)
1
flipped facets
The input to qhull appears to be less than 3 dimensional, or a
computation has overflowed.
Qhull could not construct a clearly convex simplex from points:
The center point is coplanar with a facet, or a vertex is coplanar
with a neighboring facet. The maximum round off error for
computing distances is 1.6e013. The center point, facets and distances
to the center point are as follows:
facet
p160696
p378
p0
distance= 8.9e015
facet
p161074
p378
p0
distance= 1.8e015
facet
p161074
p160696
p0
distance= 1.8e015
facet
p161074
p160696
p378
distance= 3.6e015
These points either have a maximum or minimum xcoordinate, or
they maximize the determinant for k coordinates. Trial points
are first selected from points that maximize a coordinate.
The min and max coordinates for each dimension are:
0: 99 130.5 difference= 31.5
1: 0.8333 36.17 difference= 35.33
2: 0 35.33 difference= 35.33
If the input should be full dimensional, you have several options that
may determine an initial simplex:
 use 'QJ' to joggle the input and make it full dimensional
 use 'QbB' to scale the points to the unit cube
 use 'QR0' to randomly rotate the input for different maximum points
 use 'Qs' to search all points for the initial simplex
 use 'En' to specify a maximum roundoff error less than 1.6e013.
 trace execution with 'T3' to see the determinant for each point.
If the input is lower dimensional:
 use 'QJ' to joggle the input and make it full dimensional
 use 'Qbk:0Bk:0' to delete coordinate k from the input. You should
pick the coordinate with the least range. The hull will have the
correct topology.
 determine the flat containing the points, rotate the points
into a coordinate plane, and delete the other coordinates.
 add one or more points to make the input full dimensional.
This is a Delaunay triangulation and the input is cocircular or cospherical:
 use 'Qz' to add a point "at infinity" (i.e., above the paraboloid)
 or use 'QJ' to joggle the input and avoid cocircular data
Error in ==> delaunayn at 117
t = qhullmx(x', 'd ', opt);
Error in ==> griddata>linear at 151
tri = delaunayn([x y]);
Error in ==> griddata at 120
zi = linear(x,y,z,xi,yi,opt);
Error in ==> south_sea_easygrid at 281
h = griddata(xbathy,ybathy,zbathy,lon_rho,lat_rho,'linear');
But when I run easygrid.m and use the depth from ETOPO5 by
[xbathy,ybathy,zbathy]=read_srtm30plus(lon_range+1,lat_range,300);
%This reads in worldwide bathymetry at 60 second (1 minute) resolution,
%30seconds max
[xbathy,ybathy]=meshgrid(xbathy,ybathy);
xbathy = xbathy(:); %columnize
ybathy = ybathy(:); %columnize
zbathy = zbathy(:); %columnize, and make depth positive
% outname=strcat(name,'_bathy.mat','interpreter','none')
save([name,'_bathy.mat'],'xbathy','ybathy','zbathy')
it is OK. So I don't know the reasons when I use my depth mat file, it is created by
dat=load('55.dat');
zbathy=dat(:,3);
ybathy=dat(:,1);
xbathy=dat(:,2);
save south_sea_bathy xbathy ybathy zbathy
Who can tell me the reasons for that? Thank you very much!!