Changeset 21409 for issm/trunk-jpl/test/Par/RoundSheetShelf.py
- Timestamp:
- 11/22/16 02:33:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/Par/RoundSheetShelf.py
r20992 r21409 14 14 hmin=300. 15 15 hmax=1000. 16 radius=numpy.sqrt(md.mesh.x .reshape(-1,1)*md.mesh.x.reshape(-1,1)+md.mesh.y.reshape(-1,1)*md.mesh.y.reshape(-1,1))16 radius=numpy.sqrt(md.mesh.x*md.mesh.x+md.mesh.y*md.mesh.y.reshape(-1)) 17 17 ymin=numpy.min(radius) 18 18 ymax=numpy.max(radius) … … 58 58 59 59 #Initial velocity 60 md.initialization.vx=numpy.zeros((md.mesh.numberofvertices ,1))61 md.initialization.vy=numpy.zeros((md.mesh.numberofvertices ,1))62 md.initialization.vz=numpy.zeros((md.mesh.numberofvertices ,1))63 md.initialization.pressure=numpy.zeros((md.mesh.numberofvertices ,1))60 md.initialization.vx=numpy.zeros((md.mesh.numberofvertices)) 61 md.initialization.vy=numpy.zeros((md.mesh.numberofvertices)) 62 md.initialization.vz=numpy.zeros((md.mesh.numberofvertices)) 63 md.initialization.pressure=numpy.zeros((md.mesh.numberofvertices)) 64 64 65 65 #Materials 66 md.initialization.temperature=(273.-20.)*numpy.ones((md.mesh.numberofvertices ,1))66 md.initialization.temperature=(273.-20.)*numpy.ones((md.mesh.numberofvertices)) 67 67 md.materials.rheology_B=paterson(md.initialization.temperature) 68 md.materials.rheology_n=3.*numpy.ones((md.mesh.numberofelements ,1))68 md.materials.rheology_n=3.*numpy.ones((md.mesh.numberofelements)) 69 69 70 70 #Surface mass balance and basal melting 71 md.smb.mass_balance=-10.*numpy.ones((md.mesh.numberofvertices ,1))72 md.basalforcings.groundedice_melting_rate=numpy.zeros((md.mesh.numberofvertices ,1))71 md.smb.mass_balance=-10.*numpy.ones((md.mesh.numberofvertices)) 72 md.basalforcings.groundedice_melting_rate=numpy.zeros((md.mesh.numberofvertices)) 73 73 pos=numpy.nonzero(md.mask.groundedice_levelset>0.)[0] 74 74 md.basalforcings.groundedice_melting_rate[pos]=10. 75 md.basalforcings.floatingice_melting_rate=numpy.zeros((md.mesh.numberofvertices ,1))76 md.basalforcings.geothermalflux=numpy.ones((md.mesh.numberofvertices ,1))75 md.basalforcings.floatingice_melting_rate=numpy.zeros((md.mesh.numberofvertices)) 76 md.basalforcings.geothermalflux=numpy.ones((md.mesh.numberofvertices)) 77 77 78 78 #Friction 79 79 radius=1.e6 80 80 shelfextent=2.e5 81 md.friction.coefficient=20.*numpy.ones((md.mesh.numberofvertices ,1))81 md.friction.coefficient=20.*numpy.ones((md.mesh.numberofvertices)) 82 82 xelem=numpy.mean(md.mesh.x[md.mesh.elements.astype(int)-1],axis=1) 83 83 yelem=numpy.mean(md.mesh.y[md.mesh.elements.astype(int)-1],axis=1) … … 86 86 pos=numpy.nonzero(rad>=(radius-shelfextent)) 87 87 md.friction.coefficient[md.mesh.elements[pos,:]-1]=0. 88 md.friction.p=numpy.ones((md.mesh.numberofelements ,1))89 md.friction.q=numpy.ones((md.mesh.numberofelements ,1))88 md.friction.p=numpy.ones((md.mesh.numberofelements)) 89 md.friction.q=numpy.ones((md.mesh.numberofelements)) 90 90 91 91 #Numerical parameters … … 109 109 110 110 #Deal with boundary conditions: 111 md.stressbalance.spcvx=float('nan')*numpy.ones((md.mesh.numberofvertices ,1))112 md.stressbalance.spcvy=float('nan')*numpy.ones((md.mesh.numberofvertices ,1))113 md.stressbalance.spcvz=float('nan')*numpy.ones((md.mesh.numberofvertices ,1))111 md.stressbalance.spcvx=float('nan')*numpy.ones((md.mesh.numberofvertices)) 112 md.stressbalance.spcvy=float('nan')*numpy.ones((md.mesh.numberofvertices)) 113 md.stressbalance.spcvz=float('nan')*numpy.ones((md.mesh.numberofvertices)) 114 114 115 115 pos=numpy.nonzero(numpy.logical_and(md.mesh.x==0,md.mesh.y==0)) … … 119 119 pos=numpy.nonzero(md.mesh.vertexonboundary) 120 120 md.mask.ice_levelset[pos]=0 121 md.balancethickness.spcthickness=float('nan')*numpy.ones((md.mesh.numberofvertices ,1))122 md.masstransport.spcthickness=float('nan')*numpy.ones((md.mesh.numberofvertices ,1))121 md.balancethickness.spcthickness=float('nan')*numpy.ones((md.mesh.numberofvertices)) 122 md.masstransport.spcthickness=float('nan')*numpy.ones((md.mesh.numberofvertices)) 123 123 md.stressbalance.referential=float('nan')*numpy.ones((md.mesh.numberofvertices,6)) 124 124 md.stressbalance.loadingforce=0*numpy.ones((md.mesh.numberofvertices,3)) 125 md.thermal.spctemperature=737.*numpy.ones((md.mesh.numberofvertices ,1))125 md.thermal.spctemperature=737.*numpy.ones((md.mesh.numberofvertices)) 126 126 127 127 #Change name so that no test have the same name
Note:
See TracChangeset
for help on using the changeset viewer.