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/test218.py

    r23130 r23793  
    2222from verbose import *
    2323
    24 md = squaremesh(model(),1000000,1000000,5,5)
    25 md = setmask(md,'all','')
    26 md = parameterize(md,'../Par/SquareShelf2.py')
    27 md = setflowequation(md,'SSA','all')
    28 md.cluster = generic('name',gethostname(),'np',3)
     24md = squaremesh(model(), 1000000, 1000000, 5, 5)
     25md = setmask(md, 'all', '')
     26md = parameterize(md, '../Par/SquareShelf2.py')
     27md = setflowequation(md, 'SSA', 'all')
     28md.cluster = generic('name', gethostname(), 'np', 3)
    2929
    30 #redo the parameter file for this special shelf. 
    31 #constant thickness, constrained (vy=0) flow into an icefront,
     30#redo the parameter file for this special shelf.
     31#constant thickness, constrained (vy = 0) flow into an icefront,
    3232#from 0 m/yr at the grounding line.
    3333
     
    6767
    6868#constrain grounding line to 0 velocity
    69 pos = np.where(md.mesh.y ==ymin)
     69pos = np.where(md.mesh.y == ymin)
    7070md.stressbalance.spcvx[pos] = 0.
    7171md.stressbalance.spcvy[pos] = 0.
     
    7373#partitioning
    7474md.qmu.numberofpartitions = md.mesh.numberofvertices
    75 md = partitioner(md,'package','linear','npart',md.qmu.numberofpartitions)
    76 md.qmu.partition = (md.qmu.partition - 1.).reshape(-1,1).T
     75md = partitioner(md, 'package', 'linear', 'npart', md.qmu.numberofpartitions)
     76md.qmu.partition = (md.qmu.partition - 1.).reshape(-1, 1).T
    7777
    7878#Dakota options
     
    8181version = IssmConfig('_DAKOTA_VERSION_')
    8282# returns tuple "(u'6.2',)" -> unicode string '6.2', convert to float
    83 version=float(version[0])
     83version = float(version[0])
    8484
    8585#variables
    86 md.qmu.variables.rheology_B = normal_uncertain.normal_uncertain('scaled_MaterialsRheologyB',1,.05)
     86md.qmu.variables.rheology_B = normal_uncertain.normal_uncertain('scaled_MaterialsRheologyB', 1, .05)
    8787
    8888#responses
    89 md.qmu.responses.MaxVel = response_function.response_function('MaxVel',[],[0.0001,0.001,0.01,0.25,0.5,0.75,0.99,0.999,0.9999])
     89md.qmu.responses.MaxVel = response_function.response_function('MaxVel', [], [0.0001, 0.001, 0.01, 0.25, 0.5, 0.75, 0.99, 0.999, 0.9999])
    9090
    9191#method
     
    9797
    9898if version >= 6:
    99         md.qmu.params.analysis_driver = 'matlab'
    100         md.qmu.params.evaluation_scheduling = 'master'
    101         md.qmu.params.processors_per_evaluation = 2
     99    md.qmu.params.analysis_driver = 'matlab'
     100    md.qmu.params.evaluation_scheduling = 'master'
     101    md.qmu.params.processors_per_evaluation = 2
    102102else:
    103         md.qmu.params.analysis_driver = 'stressbalance'
    104         md.qmu.params.evaluation_concurrency = 1
     103    md.qmu.params.analysis_driver = 'stressbalance'
     104    md.qmu.params.evaluation_concurrency = 1
    105105
    106106
    107 #imperative! 
    108 md.stressbalance.reltol = 10**-10 #tighten for qmu analysis
     107#imperative!
     108md.stressbalance.reltol = 10**-10  #tighten for qmu analysis
    109109md.qmu.isdakota = 1
    110110
    111111#solve
    112 md.verbose = verbose('000000000')       # this line is recommended
    113 md = solve(md,'Stressbalance','overwrite','y')
     112md.verbose = verbose('000000000')       # this line is recommended
     113md = solve(md, 'Stressbalance', 'overwrite', 'y')
    114114
    115115#Fields and tolerances to track changes
    116116md.qmu.results = md.results.dakota
    117 md.results.dakota.importancefactors = importancefactors(md,'scaled_MaterialsRheologyB','MaxVel').reshape(-1,1)
     117md.results.dakota.importancefactors = importancefactors(md, 'scaled_MaterialsRheologyB', 'MaxVel').reshape(-1, 1)
    118118field_names = ['importancefactors']
    119119field_tolerances = [1e-10]
    120 field_values=[md.results.dakota.importancefactors]
     120field_values = [md.results.dakota.importancefactors]
Note: See TracChangeset for help on using the changeset viewer.