Changeset 12124
- Timestamp:
- 04/25/12 09:17:55 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/Par/SquareShelfConstrained.py
r12122 r12124 1 1 from numpy import * 2 from verbose import * 2 3 import scipy.io as matio 3 4 import InterpFromMeshToMesh2d as im 5 from paterson import * 4 6 5 7 #Start defining model parameters here … … 14 16 md.geometry.surface = md.geometry.bed+md.geometry.thickness 15 17 16 # %Initial velocity18 #Initial velocity 17 19 mat=matio.loadmat('../Data/SquareShelfConstrained.data') 18 20 #deal with 'F' oriented matlab matrices! … … 24 26 md.initialization.vz = zeros(md.mesh.numberofvertices) 25 27 md.initialization.pressure = zeros(md.mesh.numberofvertices) 26 # %Materials28 #Materials 27 29 md.initialization.temperature = (273.-20)*ones(md.mesh.numberofvertices) 28 30 md.materials.rheology_B = paterson(md.initialization.temperature) 29 31 md.materials.rheology_n = 3.*ones(md.mesh.numberofelements) 30 # %Surface mass balance and basal melting32 #Surface mass balance and basal melting 31 33 md.surfaceforcings.mass_balance = 10.*ones(md.mesh.numberofvertices) 32 34 md.basalforcings.melting_rate = 5.*ones(md.mesh.numberofvertices) 33 # %Friction35 #Friction 34 36 pos = nonzero(md.mask.elementonfloatingice) 35 37 md.friction.coefficient = 20.*ones(md.mesh.numberofvertices) 36 md.friction.coefficient[ (md.mesh.elements[int(pos)-1,:])] =0.38 md.friction.coefficient[md.mesh.elements[pos,:].astype(int)-1] =0. 37 39 md.friction.p = ones(md.mesh.numberofelements) 38 40 md.friction.q = ones(md.mesh.numberofelements) 39 # %Numerical parameters41 #Numerical parameters 40 42 md.diagnostic.viscosity_overshoot = 0.0 41 43 md.prognostic.stabilization = 1. 42 44 md.thermal.stabilization = 1. 43 md.verbose = verbose [-1]45 md.verbose = verbose() 44 46 md.settings.waitonlock = 30. 45 47 md.diagnostic.restol = 0.05 … … 49 51 md.timestepping.time_step = 1. 50 52 md.timestepping.final_time = 3. 51 # %Deal with boundary conditions:53 #Deal with boundary conditions: 52 54 md = SetIceShelfBC(md) 53 # %Change name so that no test have the same name55 #Change name so that no test have the same name 54 56 A = dbstack 55 57 if length(A) > 2.:
Note:
See TracChangeset
for help on using the changeset viewer.