Changeset 13463


Ignore:
Timestamp:
09/27/12 09:48:29 (12 years ago)
Author:
jschierm
Message:

CHG: Changed all data 1-d vectors to 2-d arrays to allow multiple columns.

Location:
issm/trunk-jpl/test
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/NightlyRun/test121.py

    r13335 r13463  
    1414md=setflowequation(md,'macayeal','all')
    1515md.cluster=generic('name',oshostname(),'np',3);
    16 md.initialization.waterfraction=numpy.zeros(md.mesh.numberofvertices)
     16md.initialization.waterfraction=numpy.zeros((md.mesh.numberofvertices,1))
    1717md.transient.isdiagnostic=0
    1818md.transient.isprognostic=0
  • issm/trunk-jpl/test/NightlyRun/test122.py

    r13335 r13463  
    1313md.extrude(3,1)
    1414md=setflowequation(md,'pattyn','all')
    15 md.initialization.waterfraction=numpy.zeros(md.mesh.numberofvertices)
     15md.initialization.waterfraction=numpy.zeros((md.mesh.numberofvertices,1))
    1616md.thermal.isenthalpy=1
    1717md.thermal.stabilization=2
  • issm/trunk-jpl/test/Par/SquareShelfConstrained.py

    r13238 r13463  
    1515ymax = max(md.mesh.y)
    1616
    17 md.geometry.thickness = hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin)
     17md.geometry.thickness = hmax+(hmin-hmax)*(md.mesh.y.reshape(-1,1)-ymin)/(ymax-ymin)
    1818md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
    1919md.geometry.surface = md.geometry.bed+md.geometry.thickness
     
    2626vx=f.variables['vx'][:]
    2727vy=f.variables['vy'][:]
    28 #deal with 'F' oriented matlab matrices!
    29 index=f.variables['index'][:].astype(float)
    30 index=reshape(index.T,(len(index),3),order='F')
     28index=f.variables['index'][:]
    3129f.close()
    3230
    3331[md.initialization.vx] = InterpFromMeshToMesh2d(index, x, y, vx, md.mesh.x, md.mesh.y)
    3432[md.initialization.vy] = InterpFromMeshToMesh2d(index, x, y, vy, md.mesh.x, md.mesh.y)
    35 md.initialization.vz = zeros(md.mesh.numberofvertices)
    36 md.initialization.pressure = zeros(md.mesh.numberofvertices)
     33md.initialization.vz = zeros((md.mesh.numberofvertices,1))
     34md.initialization.pressure = zeros((md.mesh.numberofvertices,1))
    3735#Materials
    38 md.initialization.temperature = (273.-20)*ones(md.mesh.numberofvertices)
     36md.initialization.temperature = (273.-20.)*ones((md.mesh.numberofvertices,1))
    3937md.materials.rheology_B = paterson(md.initialization.temperature)
    40 md.materials.rheology_n = 3.*ones(md.mesh.numberofelements)
     38md.materials.rheology_n = 3.*ones((md.mesh.numberofelements,1))
    4139#Surface mass balance and basal melting
    42 md.surfaceforcings.mass_balance = 10.*ones(md.mesh.numberofvertices)
    43 md.basalforcings.melting_rate = 5.*ones(md.mesh.numberofvertices)
     40md.surfaceforcings.mass_balance = 10.*ones((md.mesh.numberofvertices,1))
     41md.basalforcings.melting_rate = 5.*ones((md.mesh.numberofvertices,1))
    4442#Friction
    4543pos = nonzero(md.mask.elementonfloatingice)
    46 md.friction.coefficient = 20.*ones(md.mesh.numberofvertices)
     44md.friction.coefficient = 20.*ones((md.mesh.numberofvertices,1))
    4745md.friction.coefficient[md.mesh.elements[pos,:].astype(int)-1] =0.
    48 md.friction.p = ones(md.mesh.numberofelements)
    49 md.friction.q = ones(md.mesh.numberofelements)
     46md.friction.p = ones((md.mesh.numberofelements,1))
     47md.friction.q = ones((md.mesh.numberofelements,1))
    5048#Numerical parameters
    5149md.diagnostic.viscosity_overshoot = 0.0
     
    5755md.diagnostic.reltol = 0.05
    5856md.steadystate.reltol = 0.05
    59 md.diagnostic.abstol = nan
     57md.diagnostic.abstol = float('nan')
    6058md.timestepping.time_step = 1.
    6159md.timestepping.final_time = 3.
Note: See TracChangeset for help on using the changeset viewer.