Changeset 15842


Ignore:
Timestamp:
08/19/13 16:26:25 (12 years ago)
Author:
cborstad
Message:

CHG: reshape temperature so that resulting rigidity is in the same shape (rank-1 array) as the other rheology components

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/materials/paterson.py

    r13462 r15842  
    1515                raise RuntimeError("input temperature should be in Kelvin (positive)")
    1616       
    17         T = temperature-273.15
     17        T = temperature.reshape(-1,)-273.15
    1818
    1919        #The routine below is equivalent to:
     
    3030        # rigidity=fittedmodel(temperature);
    3131
    32         rigidity=numpy.zeros((numpy.size(T,axis=0),1))
     32        rigidity=numpy.zeros_like(T)
    3333        pos1=numpy.nonzero(T<=-45)
    3434        rigidity[pos1]=10**8*(-0.000292866376675*(T[pos1]+50)**3+ 0.011672640664130*(T[pos1]+50)**2  -0.325004442485481*(T[pos1]+50)+  6.524779401948101)
Note: See TracChangeset for help on using the changeset viewer.