source:
issm/oecreview/Archive/15392-16133/ISSM-15994-15995.diff@
16134
Last change on this file since 16134 was 16134, checked in by , 12 years ago | |
---|---|
File size: 1.5 KB |
-
../trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.py
26 26 #User provided Front.exp, use it 27 27 if not os.path.exists(icefrontfile): 28 28 raise IOError("SetMarineIceSheetBC error message: ice front file '%s' not found." % icefrontfile) 29 [ nodeinsideicefront,dum]=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,icefrontfile,'node',2)30 vertexonicefront=numpy.logical_and(md.mesh.vertexonboundary, nodeinsideicefront.reshape(-1))29 [incontour,dum]=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,icefrontfile,'node',2) 30 vertexonicefront=numpy.logical_and(md.mesh.vertexonboundary,incontour.reshape(-1)) 31 31 else: 32 32 #Guess where the ice front is 33 vertexonfloatingice=numpy.logical(md.mask.groundedice_levelset<0.) 34 vertexonicefront=numpy.logical_and(md.mesh.vertexonboundary,vertexonfloatingice) 33 vertexonfloatingice=numpy.zeros((md.mesh.numberofvertices,1)) 34 pos=numpy.nonzero(numpy.sum(md.mask.groundedice_levelset[md.mesh.elements-1]<0.,axis=1) >0.)[0] 35 vertexonfloatingice[md.mesh.elements[pos].astype(int)-1]=1. 36 vertexonicefront=numpy.logical_and(numpy.reshape(md.mesh.vertexonboundary,(-1,1)),vertexonfloatingice>0.) 35 37 36 38 # pos=find(md.mesh.vertexonboundary & ~vertexonicefront); 37 39 pos=numpy.nonzero(numpy.logical_and(md.mesh.vertexonboundary,numpy.logical_not(vertexonicefront)))[0]
Note:
See TracBrowser
for help on using the repository browser.