Changeset 16171


Ignore:
Timestamp:
09/18/13 13:49:15 (12 years ago)
Author:
cborstad
Message:

BUG: missed some numpy handles for function calls

Location:
issm/trunk-jpl/test/Par
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/Par/79North.py

    r16170 r16171  
    1212#Geometry and observation
    1313f         = netCDF4.Dataset('../Data/79North.nc','r')
    14 x         = reshape(f.variables['x'][:],(-1))
    15 y         = reshape(f.variables['y'][:],(-1))
     14x         = numpy.reshape(f.variables['x'][:],(-1))
     15y         = numpy.reshape(f.variables['y'][:],(-1))
    1616vx        = f.variables['vx'][:]
    1717vy        = f.variables['vy'][:]
     
    2828
    2929#Materials
    30 md.initialization.temperature=(273.-20.)*ones((md.mesh.numberofvertices,1))
     30md.initialization.temperature=(273.-20.)*numpy.ones((md.mesh.numberofvertices,1))
    3131md.materials.rheology_B=paterson(md.initialization.temperature)
    32 md.materials.rheology_n=3.*ones((md.mesh.numberofelements,1))
     32md.materials.rheology_n=3.*numpy.ones((md.mesh.numberofelements,1))
    3333md.initialization.temperature=md.initialization.temperature
    3434
     
    3737
    3838#Friction
    39 md.friction.coefficient=50.*ones((md.mesh.numberofvertices,1))
     39md.friction.coefficient=50.*numpy.ones((md.mesh.numberofvertices,1))
    4040md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
    41 md.friction.p=ones((md.mesh.numberofelements,1))
    42 md.friction.q=ones((md.mesh.numberofelements,1))
     41md.friction.p=numpy.ones((md.mesh.numberofelements,1))
     42md.friction.q=numpy.ones((md.mesh.numberofelements,1))
    4343
    4444#Ice shelf melting and surface mass balance
  • issm/trunk-jpl/test/Par/Pig.py

    r16170 r16171  
    1212#Geometry and observation
    1313f = netCDF4.Dataset('../Data/Pig.nc','r')
    14 x         = reshape(f.variables['x'][:],(-1))
    15 y         = reshape(f.variables['y'][:],(-1))
     14x         = numpy.reshape(f.variables['x'][:],(-1))
     15y         = numpy.reshape(f.variables['y'][:],(-1))
    1616vx_obs    = f.variables['vx_obs'][:]
    1717vy_obs    = f.variables['vy_obs'][:]
     
    3232
    3333#Materials
    34 md.initialization.temperature=(273.-20.)*ones((md.mesh.numberofvertices,1))
     34md.initialization.temperature=(273.-20.)*numpy.ones((md.mesh.numberofvertices,1))
    3535md.materials.rheology_B=paterson(md.initialization.temperature)
    36 md.materials.rheology_n=3.*ones((md.mesh.numberofelements,1))
     36md.materials.rheology_n=3.*numpy.ones((md.mesh.numberofelements,1))
    3737md.initialization.temperature=md.initialization.temperature
    3838
     
    4141
    4242#Friction
    43 md.friction.coefficient=50.*ones((md.mesh.numberofvertices,1))
     43md.friction.coefficient=50.*numpy.ones((md.mesh.numberofvertices,1))
    4444md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
    45 md.friction.p=ones((md.mesh.numberofelements,1))
    46 md.friction.q=ones((md.mesh.numberofelements,1))
     45md.friction.p=numpy.ones((md.mesh.numberofelements,1))
     46md.friction.q=numpy.ones((md.mesh.numberofelements,1))
    4747
    4848#Numerical parameters
  • issm/trunk-jpl/test/Par/SquareSheetShelf.py

    r16170 r16171  
    2626#Initial velocity
    2727f = netCDF4.Dataset('../Data/SquareSheetShelf.nc','r')
    28 x         = reshape(f.variables['x'][:],(-1))
    29 y         = reshape(f.variables['y'][:],(-1))
     28x         = numpy.reshape(f.variables['x'][:],(-1))
     29y         = numpy.reshape(f.variables['y'][:],(-1))
    3030vx        = f.variables['vx'][:]
    3131vy        = f.variables['vy'][:]
     
    3939
    4040#Materials
    41 md.initialization.temperature=(273.-20.)*ones((md.mesh.numberofvertices,1))
     41md.initialization.temperature=(273.-20.)*numpy.ones((md.mesh.numberofvertices,1))
    4242md.materials.rheology_B=paterson(md.initialization.temperature)
    43 md.materials.rheology_n=3.*ones((md.mesh.numberofelements,1))
     43md.materials.rheology_n=3.*numpy.ones((md.mesh.numberofelements,1))
    4444
    4545#Damage
     
    5151
    5252#Friction
    53 md.friction.coefficient=20.*ones((md.mesh.numberofvertices,1))
     53md.friction.coefficient=20.*numpy.ones((md.mesh.numberofvertices,1))
    5454md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
    55 md.friction.p=ones((md.mesh.numberofelements,1))
    56 md.friction.q=ones((md.mesh.numberofelements,1))
     55md.friction.p=numpy.ones((md.mesh.numberofelements,1))
     56md.friction.q=numpy.ones((md.mesh.numberofelements,1))
    5757
    5858#Numerical parameters
  • issm/trunk-jpl/test/Par/SquareShelf.py

    r16170 r16171  
    2323iVelF = netCDF4.Dataset('../Data/SquareShelf.nc','r')
    2424
    25 x=reshape(iVelF.variables['x'][:],(-1))
    26 y=reshape(iVelF.variables['y'][:],(-1))
     25x=numpy.reshape(iVelF.variables['x'][:],(-1))
     26y=numpy.reshape(iVelF.variables['y'][:],(-1))
    2727vx=iVelF.variables['vx'][:]
    2828vy=iVelF.variables['vy'][:]
     
    5555
    5656#Materials
    57 md.initialization.temperature = (273.-20.)*ones((md.mesh.numberofvertices,1))
     57md.initialization.temperature = (273.-20.)*numpy.ones((md.mesh.numberofvertices,1))
    5858md.materials.rheology_B = paterson(md.initialization.temperature)
    59 md.materials.rheology_n = 3.*ones((md.mesh.numberofelements,1))
     59md.materials.rheology_n = 3.*numpy.ones((md.mesh.numberofelements,1))
    6060
    6161#Damage
     
    6363
    6464#Friction
    65 md.friction.coefficient = 20.*ones((md.mesh.numberofvertices,1))
     65md.friction.coefficient = 20.*numpy.ones((md.mesh.numberofvertices,1))
    6666md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
    67 md.friction.p = ones((md.mesh.numberofelements,1))
    68 md.friction.q = ones((md.mesh.numberofelements,1))
     67md.friction.p = numpy.ones((md.mesh.numberofelements,1))
     68md.friction.q = numpy.ones((md.mesh.numberofelements,1))
    6969
    7070#Numerical parameters
     
    7777md.steadystate.reltol = 0.02
    7878md.stressbalance.reltol = 0.02
    79 md.stressbalance.abstol = nan
     79md.stressbalance.abstol = float('nan')
    8080md.timestepping.time_step = 1.
    8181md.timestepping.final_time = 3.
  • issm/trunk-jpl/test/Par/SquareShelf2.py

    r16170 r16171  
    2323iVelF = netCDF4.Dataset('../Data/SquareShelf.nc','r')
    2424
    25 x=reshape(iVelF.variables['x'][:],(-1))
    26 y=reshape(iVelF.variables['y'][:],(-1))
     25x=numpy.reshape(iVelF.variables['x'][:],(-1))
     26y=numpy.reshape(iVelF.variables['y'][:],(-1))
    2727vx=iVelF.variables['vx'][:]
    2828vy=iVelF.variables['vy'][:]
     
    5555
    5656#Materials
    57 md.initialization.temperature = (273.-20.)*ones((md.mesh.numberofvertices,1))
     57md.initialization.temperature = (273.-20.)*numpy.ones((md.mesh.numberofvertices,1))
    5858md.materials.rheology_B = paterson(md.initialization.temperature)
    59 md.materials.rheology_n = 3.*ones((md.mesh.numberofelements,1))
     59md.materials.rheology_n = 3.*numpy.ones((md.mesh.numberofelements,1))
    6060
    6161#Damage
     
    6363
    6464#Friction
    65 md.friction.coefficient = 20.*ones((md.mesh.numberofvertices,1))
     65md.friction.coefficient = 20.*numpy.ones((md.mesh.numberofvertices,1))
    6666md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
    67 md.friction.p = ones((md.mesh.numberofelements,1))
    68 md.friction.q = ones((md.mesh.numberofelements,1))
     67md.friction.p = numpy.ones((md.mesh.numberofelements,1))
     68md.friction.q = numpy.ones((md.mesh.numberofelements,1))
    6969
    7070#Numerical parameters
     
    7777md.steadystate.reltol = 0.02
    7878md.stressbalance.reltol = 0.02
    79 md.stressbalance.abstol = nan
     79md.stressbalance.abstol = float('nan')
    8080md.timestepping.time_step = 1.
    8181md.timestepping.final_time = 3.
Note: See TracChangeset for help on using the changeset viewer.