<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hi Derrick,
<div><br>
</div>
<div>you can ignore bamg's warning (WARNING: mesh present but no geometry found. Reconstructing…), it is because you used triangle to generate the first mesh, which is totally fine. I don't see any error, you can go ahead and plot the mesh to check that it
looks ok.</div>
<div><br>
</div>
<div>In the tutorial, we transpose "svin" because it comes from ncread, which is C oriented (reads the matrix line by line), whereas matlab is column-oriented, so the matrix needs to be transposed. If you use geotiffread, you don't need to transpose the matrix.
You can check whether or not you need to transpose by checking the sizes of svin, x and y: svin should have as many lines as numel(y) and as many columns as numel(x).</div>
<div><br>
</div>
<div>Let us know if you have any other question</div>
<div><br>
</div>
<div>Best</div>
<div>Mathieu</div>
<div><br>
</div>
<div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>--</div>
<div>Mathieu Morlighem</div>
<div><br>
</div>
<div>Assistant Project Scientist</div>
<div>Department of Earth System Science</div>
<div>University of California, Irvine</div>
<div>Croul Hall, Irvine, CA 92697-3100</div>
<div>(949) 824-1353 (UCI office)</div>
<div>(818) 354-4134 (JPL office)</div>
<div>(626) 429-5780 (cell)</div>
<div><a href="mailto:Mathieu.Morlighem@uci.edu">Mathieu.Morlighem@uci.edu</a></div>
</div>
</div>
<br>
<div>
<div>On Jan 2, 2013, at 9:18 AM, djl22 <<a href="mailto:djl22@psu.edu">djl22@psu.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">Hi,<br>
<br>
I ran through it again and still errors when running Interp...<br>
here is the output from md.mesh (all commands up to and not including InterpFromGridToMesh):<br>
<br>
Mesh:<br>
<br>
Elements and vertices:<br>
numberofelements : 2474 -- number of elements<br>
numberofvertices : 1312 -- number of vertices<br>
elements : (2474x3) -- index into (x,y,z), coordinates of the vertices<br>
x : (1312x1) -- vertices x coordinate<br>
y : (1312x1) -- vertices y coordinate<br>
z : (1312x1) -- vertices z coordinate<br>
edges : N/A -- edges of the 2d mesh (vertex1 vertex2 element1 element2)<br>
numberofedges : 0 -- number of edges of the 2d mesh<br>
<br>
Properties:<br>
dimension : 2 -- mesh dimension (2d or 3d)<br>
numberoflayers : 0 -- number of extrusion layers<br>
vertexonbed : (1312x1) -- lower vertices flags list<br>
elementonbed : (2474x1) -- lower elements flags list<br>
vertexonsurface : (1312x1) -- upper vertices flags list<br>
elementonsurface : (2474x1) -- upper elements flags list<br>
uppervertex : N/A -- upper vertex list (NaN for vertex on the upper surface)<br>
upperelements : N/A -- upper element list (NaN for element on the upper layer)<br>
lowervertex : N/A -- lower vertex list (NaN for vertex on the lower surface)<br>
lowerelements : N/A -- lower element list (NaN for element on the lower layer<br>
vertexonboundary : (1312x1) -- vertices on the boundary of the domain flag list<br>
segments : (148x3) -- edges on domain boundary (vertex1 vertex2 element)<br>
segmentmarkers : (148x1) -- number associated to each segment<br>
vertexconnectivity : (1312x26) -- list of vertices connected to vertex_i<br>
elementconnectivity : (2474x3) -- list of vertices connected to element_i<br>
average_vertex_conne...: 25 -- average number of vertices connected to one vertex<br>
<br>
Extracted model:<br>
extractedvertices : N/A -- vertices extracted from the model<br>
extractedelements : N/A -- elements extracted from the model<br>
<br>
Projection:<br>
lat : N/A -- vertices latitude<br>
long : N/A -- vertices longitude<br>
hemisphere : N/A -- Indicate hemisphere 'n' or 's'<br>
<br>
<br>
here is output from whos x y svin svint (svin=svelocity as I restarted the process again and just used svin instead of sveloity):<br>
whos x y svin svint<br>
Name Size Bytes Class Attributes<br>
<br>
svin 5460x3010 131476800 double<br>
svint 1312x1 10496 double<br>
x 3010x1 24080 double<br>
y 5460x1 43680 double<br>
<br>
I then ran and got the following error message:<br>
<br>
>> svint=InterpFromGridToMesh(x,y,svin',md.mesh.x,md.mesh.y,0);<br>
<br>
Error message: x and y vectors length should be 1 or 0 more than data number of rows.Error using InterpFromGridToMesh<br>
<br>
but if I ran run it as:<br>
>> svint=InterpFromGridToMesh(x,y,svin,md.mesh.x,md.mesh.y,0);<br>
<br>
<br>
it works:<br>
<br>
>> md.mesh.numberofvertices<br>
<br>
ans =<br>
<br>
1312<br>
<br>
>> size(svint,1)<br>
<br>
ans =<br>
<br>
1312<br>
<br>
I than ran bamg and that is when it bombed:<br>
<br>
>> md=bamg(md,'hmin',500,'hmax',3000,'field',svint,'err',5);<br>
Anisotropic mesh adaptation<br>
WARNING: mesh present but no geometry found. Reconstructing...<br>
new number of triangles = 1746<br>
<br>
Might there be an issue in the parameters I used in the bamg command? The intent was to re-mesh my domain with a minimum grid resolution of 500m and max of 3000m...I assumed what I executed would accomplish that....the resolution of the original imported surface
velocity data is at 500m....<br>
<br>
<br>
<br>
On 12/31/2012 5:18 PM, Larour, Eric (385J) wrote:<br>
<blockquote type="cite">Derrick,<br>
I ran your example and everything went fine. So the only thing right now<br>
I can think<br>
of is that your model is not in sync with svelint (i.e. svelint is not a<br>
vertex based vector of<br>
size (md.mesh.numberofvertices,1)). To check on that, could you send me<br>
the results of the following?<br>
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">md.mesh<br>
whos x y svelocity svelint<br>
</blockquote>
</blockquote>
<br>
Thanks!<br>
<br>
Eric L.<br>
<br>
<br>
<br>
<br>
<br>
On 12/31/12 1:53 PM, "Larour, Eric (385J)" <<a href="mailto:eric.larour@jpl.nasa.gov">eric.larour@jpl.nasa.gov</a>><br>
wrote:<br>
<br>
<blockquote type="cite">Derrick,<br>
<br>
I'm also puzzled as to why bang is giving you an error. I am right now<br>
working<br>
on reproducing the bug from your procedure document. Will keep you posted<br>
as soon<br>
as I find the bug. Should not be long.<br>
<br>
For further reference, please include <a href="mailto:issm-support@issm.ess.uci.edu">
issm-support@issm.ess.uci.edu</a> in<br>
your reply<br>
all, so other ISSM folks can also help you :)<br>
<br>
Eric L.<br>
<br>
<br>
<br>
<br>
<br>
On 12/31/12 12:17 AM, "djl22" <<a href="mailto:djl22@psu.edu">djl22@psu.edu</a>> wrote:<br>
<br>
<blockquote type="cite">Hi,<br>
<br>
I think I found a way through it. I tried working with the original<br>
data, which provides surface velocity over the entire Greenland ice<br>
sheet projected in polar stereographic. I used geotiffread to import the<br>
GEOTIFF image. I used exptool to draw my domain as a sub-region<br>
(Jakobshavn area) from the imported image and set the initial resolution<br>
of my mesh at 2km (2000m). The output mesh looks about right. I then<br>
extract the pixel center coordinates using the pixcenters command:<br>
<blockquote type="cite">
<blockquote type="cite">info=geotiffinfo(filename);From<br>
[x,y] = pixcenters(info);<br>
</blockquote>
</blockquote>
This gets my coordinates for pixel centers. I then have to flip my (y)<br>
coordinates because the InterpFromGridToMesh command complains that the<br>
values should be decreasing. After doing so I run the<br>
InterpFromGridToMesh command and here things get odd. I notice that in<br>
your examples the velx and vely variables in your Searise and jakobshavn<br>
examples are entered in the InterpFromGridToMesh command as the<br>
transpose of these variables, is this correct? (i.e.<br>
vx=InterpFromGridToMesh(x1,y1,velx',md.mesh.x,md.mesh.y,0);).<br>
If I enter my velocity grid as such then I get an error. if I enter<br>
without the transpose the command seems to work, but then I get an odd<br>
message when I use the output from the Interp command in the following<br>
bamg command. I get:<br>
<br>
Anisotropic mesh adaptation<br>
Error message: 'field' should have 930 rowsError using BamgMesher<br>
<br>
At this point I'm lost as to why its not working. When I attempted to<br>
run your Searise example as indicated, I ended up with the same exact<br>
error in running bamg (I ran the lines of code provided directly from<br>
the example). I also go tthis error when I ran the Searise example:<br>
Error message: Input parameter of class single not supported yetError<br>
using InterpFromGridToMesh<br>
<br>
when I ran<br>
vx=InterpFromGridToMesh(x1,y1,velx',md.mesh.x,md.mesh.y,0);...in this<br>
case I converted the input variables x1, y1 and velx, vely to double<br>
(x1=double(x1), etc...) was this necessary to get it to work? The<br>
command worked after doing this which means ISSM could not recognize the<br>
data type "single" as oppose to "double"<br>
<br>
at any rate, i'm now stuck at bamg where I'm attempting to use the<br>
velocity i assume were interpolated to my initial mesh within my custom<br>
domain to refine my initial mesh which would ideally create finer mesh<br>
grids near the margins of Jakobshavn than outside of the margins....<br>
<br>
Thanks so much for the assistance....<br>
<br>
<br>
On 12/29/2012 3:04 AM, Larour, Eric (385J) wrote:<br>
<blockquote type="cite">Dear Derrick,<br>
<br>
I think the issue is that when you plotted your surface velocities in<br>
matlab (before calling exptool<br>
on it), you did not specify the x and y coordinates of your image.<br>
<br>
Typically, in matlab, one does:<br>
<br>
imagesc(velocity) where velocity is a matrix. This will get you<br>
coordinates in scene coordinates.<br>
<br>
For your example, what you need to do is:<br>
imagesc(x,y,velocity),<br>
where x=0:(xmax-xmin)/m:xmax and<br>
y=0:(ymax-ymin)/n:ymax<br>
<br>
and m,n is the size of the velocity matrix.<br>
<br>
If you do this, you will recover from exptools the true vertex<br>
coordinates.<br>
<br>
Tell me how it goes!<br>
<br>
Thanks!<br>
Eric L.<br>
<br>
<br>
<br>
On 12/28/12 11:58 PM, "Derrick Lampkin" <<a href="mailto:djl22@psu.edu">djl22@psu.edu</a>> wrote:<br>
<br>
<blockquote type="cite">Greetings,<br>
<br>
I recently attended the ISSM workshop and found it useful. I'm<br>
attempting<br>
to use the system to model a system in the Jakobshavn outlet basin. I<br>
have been using your Jakobshavn example as a template. The exception<br>
is<br>
I'm using a base of surface velocity data derived from NSIDC (Joughin<br>
data set). I have imported a surface velocity grid as GEOTIFF into<br>
matlab<br>
and I use the exptool to draw the outline of my domain on top of this<br>
base map. The map is in the polar stereo graphic projection but when I<br>
create the initial mesh using triangle at the nominal resolution of<br>
the<br>
data (500 m), the grid spacing was not nearly as dense as expected. I<br>
inspected the domain file I created and the vertices coordinates are<br>
in<br>
scene coordinates (row/column) values and not the projected<br>
coordinates ,<br>
therefore the mesh spacing are not reasonable and do not correspond to<br>
the specified resolution I indicate in the triangle command. How might<br>
I<br>
fix this issue?<br>
<br>
Thanks<br>
<br>
derrick j lampkin<br>
__________________<br>
research professor<br>
<br>
institute of arctic and alpine research<br>
university of colorado-boulder<br>
<br>
__________________<br>
<br>
email: <a href="mailto:djl22@psu.edu">djl22@psu.edu</a><br>
<br>
_______________________________________________<br>
issm-support mailing list<br>
<a href="mailto:issm-support@issm.ess.uci.edu">issm-support@issm.ess.uci.edu</a><br>
http://issm.ess.uci.edu/cgi-bin/mailman/listinfo/issm-support<br>
</blockquote>
</blockquote>
<br>
-- <br>
derrick j lampkin<br>
__________________<br>
research professor<br>
<br>
institute of arctic and alpine research<br>
university of colorado-boulder<br>
adjunct<br>
department of geoscience<br>
pennsylvania state university<br>
__________________<br>
<br>
email: <a href="mailto:djl22@psu.edu">djl22@psu.edu</a><br>
web: <a href="http://www.geosc.psu.edu/academic-faculty/lampkin-derrick">http://www.geosc.psu.edu/academic-faculty/lampkin-derrick</a><br>
<br>
</blockquote>
_______________________________________________<br>
issm-support mailing list<br>
<a href="mailto:issm-support@issm.ess.uci.edu">issm-support@issm.ess.uci.edu</a><br>
http://issm.ess.uci.edu/cgi-bin/mailman/listinfo/issm-support<br>
</blockquote>
</blockquote>
<br>
<br>
-- <br>
derrick j lampkin<br>
__________________<br>
research professor<br>
<br>
institute of arctic and alpine research<br>
university of colorado-boulder<br>
adjunct<br>
department of geoscience<br>
pennsylvania state university<br>
__________________<br>
<br>
email: <a href="mailto:djl22@psu.edu">djl22@psu.edu</a><br>
web: <a href="http://www.geosc.psu.edu/academic-faculty/lampkin-derrick">http://www.geosc.psu.edu/academic-faculty/lampkin-derrick</a><br>
<br>
</blockquote>
</div>
<br>
</body>
</html>