Changeset 24262


Ignore:
Timestamp:
10/21/19 05:13:35 (5 years ago)
Author:
bdef
Message:

BUG:fixing test1501,1502

Location:
issm/trunk-jpl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/mesh/bamg.py

    r24261 r24262  
    250250
    251251                            #rift is crossing edge [i1 i2] of the domain
    252                             #Get coordinate of intersection point (http: / /  mathworld.wolfram.com / Line-LineIntersection.html)
     252                            #Get coordinate of intersection point (http://mathworld.wolfram.com/Line-LineIntersection.html)
    253253                            x3 = domain[0]['x'][i1]
    254254                            y3 = domain[0]['y'][i1]
     
    510510            if SegIntersect(np.array([[x1, y1], [x2, y2]]), np.array([[x3, y3], [x4, y4]])):
    511511
    512                 #Get coordinate of intersection point (http: / /  mathworld.wolfram.com / Line-LineIntersection.html)
     512                #Get coordinate of intersection point (http://mathworld.wolfram.com/Line-LineIntersection.html)
    513513                x = np.linalg.det(np.array([np.linalg.det(np.array([[x1, y1], [x2, y2]])), x1 - x2], [np.linalg.det(np.array([[x3, y3], [x4, y4]])), x3 - x4]) / np.linalg.det(np.array([[x1 - x2, y1 - y2], [x3 - x4, y3 - y4]])))
    514514                y = np.linalg.det(np.array([np.linalg.det(np.array([[x1, y1], [x2, y2]])), y1 - y2], [np.linalg.det(np.array([[x3, y3], [x4, y4]])), y3 - y4]) / np.linalg.det(np.array([[x1 - x2, y1 - y2], [x3 - x4, y3 - y4]])))
  • issm/trunk-jpl/src/m/plot/plotdoc.py

    r24213 r24262  
    141141    #                'qmudata': " ",
    142142    #                'figposition': " position of figure:  'fullscreen', 'halfright', 'halfleft', 'portrait', 'landscape', ... (hardcoded in applyoptions.m)",
    143     #                'offsetaxispos': " offset of current axis position to get more space (ex:  [ - 0.02 0  0.04 0])",
     143    #                'offsetaxispos': " offset of current axis position to get more space (ex:  [ -0.02 0  0.04 0])",
    144144    #                'axispos': " axis position to get more space",
    145145    #                'hmin': " (numeric, minimum for histogram)",
  • issm/trunk-jpl/test/NightlyRun/test1501.py

    r24256 r24262  
    3232for i in range(1, 11):
    3333    md = solve(md, 'Masstransport')
    34     md.smb.mass_balance = md.smb.mass_balance - ((md.results.MasstransportSolution.Thickness) - md.geometry.thickness)
     34    md.smb.mass_balance = md.smb.mass_balance - (np.squeeze(md.results.MasstransportSolution.Thickness) - md.geometry.thickness)
    3535
    3636#Set up transient
     
    3838
    3939#tooth= [ [ones(400, 1) * (smb') - 10.]' [ones(400, 1) * (smb')]' ]
    40 tooth = np.hstack((np.tile(smb - 10., (1, 400)), np.tile(smb, (1, 400))))
     40tooth = np.vstack((np.tile(smb - 10., (400, 1)), np.tile(smb, (400, 1))))
    4141#smb = [ [ones(399, 1) * (smb')]' smb  tooth tooth]
    42 smb = np.hstack((np.tile(smb, (1, 399)), smb, tooth, tooth))
     42smb = np.vstack((np.tile(smb, (399, 1)), smb, tooth, tooth)).T
    4343
    4444#md.smb.mass_balance= smb
     
    102102if printingflag:
    103103    pass
    104 
    105104    """
    106105    starttime = 360
     
    136135
    137136        subplot(5, 9, [28:31 37:40])
    138         set(gca, 'pos', get(gca, 'pos') + [ - 0.08 - 0.08 0.07 0.08])
     137        set(gca, 'pos', get(gca, 'pos') + [ -0.08 - 0.08 0.07 0.08])
    139138        field = 'Thickness'
    140139
     
    151150
    152151        subplot(5, 9, [33:36 42:45])
    153         set(gca, 'pos', get(gca, 'pos') + [ - 0.00 - 0.08 0.07 0.08])
     152        set(gca, 'pos', get(gca, 'pos') + [ -0.00 - 0.08 0.07 0.08])
    154153        field = 'Vel'
    155154
     
    167166        subplot(5, 4, 1:4)
    168167        cla
    169         set(gca, 'pos', get(gca, 'pos') + [ - 0.07 0.03 0.12 0.015])
     168        set(gca, 'pos', get(gca, 'pos') + [ -0.07 0.03 0.12 0.015])
    170169        plot(starttime:endtime, mean(massbal), 'k', 'LineWidth', 4)
    171170        hold on
     
    178177        subplot(5, 4, 5:8)
    179178        cla
    180         set(gca, 'pos', get(gca, 'pos') + [ - 0.07 0.015 0.12 0.015])
     179        set(gca, 'pos', get(gca, 'pos') + [ -0.07 0.015 0.12 0.015])
    181180        plot(starttime:endtime, sum(volume) / 1000 / 1000 / 1000, 'LineWidth', 4)
    182181        hold on
     
    189188        subplot(5, 4, 9:12)
    190189        cla
    191         set(gca, 'pos', get(gca, 'pos') + [ - 0.07 0 0.12 0.015])
     190        set(gca, 'pos', get(gca, 'pos') + [ -0.07 0 0.12 0.015])
    192191        plot(starttime:endtime, mean(velocity) / 1000, 'LineWidth', 4)
    193192        hold on
  • issm/trunk-jpl/test/NightlyRun/test1502.py

    r24256 r24262  
    1212printingflag = False
    1313
    14 md = triangle(model(), '../Exp/Square.exp', 450000.)
     14md = triangle(model(), '../Exp/Square.exp', 350000.)
    1515md = setmask(md, 'all', '')
    1616md = parameterize(md, '../Par/SquareShelf.py')
     
    3333for i in range(1, 11):
    3434    md = solve(md, 'Masstransport')
    35     md.smb.mass_balance = md.smb.mass_balance - ((md.results.MasstransportSolution.Thickness) - md.geometry.thickness)
     35    md.smb.mass_balance = md.smb.mass_balance - (np.squeeze(md.results.MasstransportSolution.Thickness) - md.geometry.thickness)
    3636
    3737#Set up transient
     
    3939
    4040#tooth= [ [ones(400, 1) * (smb') - 10.]' [ones(400, 1) * (smb')]' ]
    41 tooth = np.hstack((np.tile(smb - 10., (1, 400)), np.tile(smb, (1, 400))))
     41tooth = np.vstack((np.tile(smb - 10., (400, 1)), np.tile(smb, (400, 1))))
    4242#smb = [ [ones(399, 1) * (smb')]' smb  tooth tooth]
    43 smb = np.hstack((np.tile(smb, (1, 399)), smb, tooth, tooth))
     43smb = np.vstack((np.tile(smb, (399, 1)), smb, tooth, tooth)).T
    4444
    4545#md.smb.mass_balance= smb
     
    143143
    144144        subplot(5, 9, [28:31 37:40])
    145         set(gca, 'pos', get(gca, 'pos') + [ - 0.08 - 0.08 0.07 0.08])
     145        set(gca, 'pos', get(gca, 'pos') + [ -0.08 - 0.08 0.07 0.08])
    146146        field = 'Thickness'
    147147
     
    158158
    159159        subplot(5, 9, [33:36 42:45])
    160         set(gca, 'pos', get(gca, 'pos') + [ - 0.01 - 0.08 0.07 0.08])
     160        set(gca, 'pos', get(gca, 'pos') + [ -0.01 - 0.08 0.07 0.08])
    161161        field = 'Vel'
    162162
     
    174174        subplot(5, 4, 1:4)
    175175        cla
    176         set(gca, 'pos', get(gca, 'pos') + [ - 0.07 0.03 0.12 0.015])
     176        set(gca, 'pos', get(gca, 'pos') + [ -0.07 0.03 0.12 0.015])
    177177        plot(starttime:endtime, mean(massbal), 'k', 'LineWidth', 4)
    178178        hold on
     
    185185        subplot(5, 4, 5:8)
    186186        cla
    187         set(gca, 'pos', get(gca, 'pos') + [ - 0.07 0.015 0.12 0.015])
     187        set(gca, 'pos', get(gca, 'pos') + [ -0.07 0.015 0.12 0.015])
    188188        plot(starttime:endtime, sum(volume) / 1000 / 1000 / 1000, 'LineWidth', 4)
    189189        hold on
     
    196196        subplot(5, 4, 9:12)
    197197        cla
    198         set(gca, 'pos', get(gca, 'pos') + [ - 0.07 0 0.12 0.015])
     198        set(gca, 'pos', get(gca, 'pos') + [ -0.07 0 0.12 0.015])
    199199        plot(starttime:endtime, mean(velocity) / 1000, 'LineWidth', 4)
    200200        hold on
Note: See TracChangeset for help on using the changeset viewer.