Ignore:
Timestamp:
03/13/19 03:17:46 (6 years ago)
Author:
bdef
Message:

pep8 compliance of NTs

File:
1 edited

Legend:

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

    r22267 r23793  
    1010from SMBgradientsela import *
    1111
    12 md = triangle(model(),'../Exp/Square.exp',150000.)
    13 md = setmask(md,'','')
    14 md = parameterize(md,'../Par/SquareSheetConstrained.py')
    15 md = setflowequation(md,'SSA','all')
     12md = triangle(model(), '../Exp/Square.exp', 150000.)
     13md = setmask(md, '', '')
     14md = parameterize(md, '../Par/SquareSheetConstrained.py')
     15md = setflowequation(md, 'SSA', 'all')
    1616md.smb = SMBgradientsela()
    17 md.smb.ela = 1500. * np.ones((md.mesh.numberofvertices+1,))
    18 md.smb.b_pos = 0.002 * np.ones((md.mesh.numberofvertices+1,))
    19 md.smb.b_neg = 0.005 * np.ones((md.mesh.numberofvertices+1,))
    20 md.smb.b_max = 4. * (md.materials.rho_freshwater / md.materials.rho_ice) * np.ones((md.mesh.numberofvertices+1,))
    21 md.smb.b_min = -4. * (md.materials.rho_freshwater / md.materials.rho_ice) * np.ones((md.mesh.numberofvertices+1,))
     17md.smb.ela = 1500. * np.ones((md.mesh.numberofvertices + 1,))
     18md.smb.b_pos = 0.002 * np.ones((md.mesh.numberofvertices + 1,))
     19md.smb.b_neg = 0.005 * np.ones((md.mesh.numberofvertices + 1,))
     20md.smb.b_max = 4. * (md.materials.rho_freshwater / md.materials.rho_ice) * np.ones((md.mesh.numberofvertices + 1,))
     21md.smb.b_min = -4. * (md.materials.rho_freshwater / md.materials.rho_ice) * np.ones((md.mesh.numberofvertices + 1,))
    2222
    2323#Change geometry
     
    2626
    2727#Transient options
    28 md.transient.requested_outputs = ['default','TotalSmb']
    29 md.cluster = generic('name',gethostname(),'np',3)
    30 md = solve(md,'Transient')
     28md.transient.requested_outputs = ['default', 'TotalSmb']
     29md.cluster = generic('name', gethostname(), 'np', 3)
     30md = solve(md, 'Transient')
    3131
    3232#Fields and tolerances to track changes
    33 field_names     = [
    34         'Vx1','Vy1','Vel1','Bed1','Surface1','Thickness1','SMB1','TotalSmb1',
    35         'Vx2','Vy2','Vel2','Bed2','Surface2','Thickness2','SMB2','TotalSmb2',
    36         'Vx3','Vy3','Vel3','Bed3','Surface3','Thickness3','SMB3','TotalSmb3']
    37 field_tolerances = [
    38         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    39         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
    40         1e-12,1e-12,1e-12,1e-13,1e-13,1e-13,1.5e-13,1e-13]
    41 field_values = [
    42         md.results.TransientSolution[0].Vx,
    43         md.results.TransientSolution[0].Vy,
    44         md.results.TransientSolution[0].Vel,
    45         md.results.TransientSolution[0].Base,
    46         md.results.TransientSolution[0].Surface,
    47         md.results.TransientSolution[0].Thickness,
    48         md.results.TransientSolution[0].SmbMassBalance,
    49         md.results.TransientSolution[0].TotalSmb,
    50         md.results.TransientSolution[1].Vx,
    51         md.results.TransientSolution[1].Vy,
    52         md.results.TransientSolution[1].Vel,
    53         md.results.TransientSolution[1].Base,
    54         md.results.TransientSolution[1].Surface,
    55         md.results.TransientSolution[1].Thickness,
    56         md.results.TransientSolution[1].TotalSmb,
    57         md.results.TransientSolution[1].SmbMassBalance,
    58         md.results.TransientSolution[2].Vx,
    59         md.results.TransientSolution[2].Vy,
    60         md.results.TransientSolution[2].Vel,
    61         md.results.TransientSolution[2].Base,
    62         md.results.TransientSolution[2].Surface,
    63         md.results.TransientSolution[2].Thickness,
    64         md.results.TransientSolution[2].SmbMassBalance,
    65         md.results.TransientSolution[2].TotalSmb
    66         ]
     33field_names = ['Vx1', 'Vy1', 'Vel1', 'Bed1', 'Surface1', 'Thickness1', 'SMB1', 'TotalSmb1',
     34               'Vx2', 'Vy2', 'Vel2', 'Bed2', 'Surface2', 'Thickness2', 'SMB2', 'TotalSmb2',
     35               'Vx3', 'Vy3', 'Vel3', 'Bed3', 'Surface3', 'Thickness3', 'SMB3', 'TotalSmb3']
     36field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     37                    1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13,
     38                    1e-12, 1e-12, 1e-12, 1e-13, 1e-13, 1e-13, 1.5e-13, 1e-13]
     39field_values = [md.results.TransientSolution[0].Vx,
     40                md.results.TransientSolution[0].Vy,
     41                md.results.TransientSolution[0].Vel,
     42                md.results.TransientSolution[0].Base,
     43                md.results.TransientSolution[0].Surface,
     44                md.results.TransientSolution[0].Thickness,
     45                md.results.TransientSolution[0].SmbMassBalance,
     46                md.results.TransientSolution[0].TotalSmb,
     47                md.results.TransientSolution[1].Vx,
     48                md.results.TransientSolution[1].Vy,
     49                md.results.TransientSolution[1].Vel,
     50                md.results.TransientSolution[1].Base,
     51                md.results.TransientSolution[1].Surface,
     52                md.results.TransientSolution[1].Thickness,
     53                md.results.TransientSolution[1].TotalSmb,
     54                md.results.TransientSolution[1].SmbMassBalance,
     55                md.results.TransientSolution[2].Vx,
     56                md.results.TransientSolution[2].Vy,
     57                md.results.TransientSolution[2].Vel,
     58                md.results.TransientSolution[2].Base,
     59                md.results.TransientSolution[2].Surface,
     60                md.results.TransientSolution[2].Thickness,
     61                md.results.TransientSolution[2].SmbMassBalance,
     62                md.results.TransientSolution[2].TotalSmb]
Note: See TracChangeset for help on using the changeset viewer.