Changeset 22133


Ignore:
Timestamp:
10/02/17 17:53:22 (8 years ago)
Author:
kruegern
Message:

BUG: fixed a few bugs present in these files in preparation for 2xxx series tests

Location:
issm/trunk-jpl/src/m
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/boundaryconditions/SetIceSheetBC.py

    r21303 r22133  
    1515        #node on Dirichlet
    1616        pos=np.nonzero(md.mesh.vertexonboundary)
    17         md.stressbalance.spcvx=float('nan')*np.ones(md.mesh.numberofvertices)
    18         md.stressbalance.spcvy=float('nan')*np.ones(md.mesh.numberofvertices)
    19         md.stressbalance.spcvz=float('nan')*np.ones(md.mesh.numberofvertices)
     17        md.stressbalance.spcvx=float('nan')*np.ones((md.mesh.numberofvertices))
     18        md.stressbalance.spcvy=float('nan')*np.ones((md.mesh.numberofvertices))
     19        md.stressbalance.spcvz=float('nan')*np.ones((md.mesh.numberofvertices))
    2020        md.stressbalance.spcvx[pos]=0
    2121        md.stressbalance.spcvy[pos]=0
  • issm/trunk-jpl/src/m/coordsystems/gmtmask.py

    r21410 r22133  
    2121
    2222        if recursive:
    23                 string='             recursing: num vertices #i'+str(lenlat)
     23                print '             recursing: num vertices #'+str(lenlat)
    2424        else:
    25                 string='gmtmask: num vertices #i'+str(lenlat)
     25                print 'gmtmask: num vertices #'+str(lenlat)
    2626       
    2727        #Check lat and long size is not more than 50,000 If so, recursively call gmtmask:
    2828
    2929        if lenlat>50000:
    30                 for i in range(ceil(lenlat/50000)):
     30                for i in range(int(ceil(lenlat/50000))):
    3131                        j=(i+1)*50000-1
    3232                        if j>lenlat:
     
    7272        fid.close()
    7373
    74         mask=np.zeros([nv,1])
     74        mask=np.zeros(nv)
    7575        mask[oce_vertices]=1
    7676       
    7777        subprocess.call('rm -rf ./all_vertices.txt ./oce_vertices.txt ./gmt.history',shell=True)
    7878        if not recursive:
    79                 string='gmtmask: done'
     79                print 'gmtmask: done'
    8080        return mask
  • issm/trunk-jpl/src/m/parameterization/setmask.py

    r21303 r22133  
    2323        """
    2424        #some checks on list of arguments
    25         print type(md)
    2625        if not isinstance(md,model):
    2726                raise TypeError("setmask error message")
  • issm/trunk-jpl/src/m/solve/WriteData.py

    r21708 r22133  
    4242        #Scale data if necesarry
    4343        if options.exist('scale'):
     44                data=np.array(data)
    4445                scale = options.getfieldvalue('scale')
    4546                if np.size(data) > 1 :
    4647                        if np.size(data,0)==timeserieslength:
    47                                 data=np.array(data)
    4848                                data[0:-1,:] = scale*data[0:-1,:]
    4949                        else:
  • issm/trunk-jpl/src/m/solve/solve.py

    r22004 r22133  
    2929                 - 'DamageEvolution'  or 'da'
    3030                 - 'Gia'              or 'gia'
     31                 - 'Esa'              or 'esa'
    3132                 - 'Sealevelrise'     or 'slr'
    3233                 - 'Love'             or 'lv'
     
    6970        elif solutionstring.lower() == 'lv' or solutionstring.lower() == 'love':
    7071                solutionstring = 'LoveSolution';
     72        elif solutionstring.lower() == 'esa':
     73                solutionstring = 'EsaSolution';
    7174        elif solutionstring.lower() == 'slr' or solutionstring.lower() == 'sealevelrise':
    7275                solutionstring = 'SealevelriseSolution';
Note: See TracChangeset for help on using the changeset viewer.