Changeset 21408
- Timestamp:
- 11/22/16 02:31:19 (8 years ago)
- Location:
- issm/trunk-jpl/test/NightlyRun
- Files:
-
- 226 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/NightlyRun/IdToName.py
r19049 r21408 12 12 file_text = infile.readlines() 13 13 14 string='#Test Name:' ;14 string='#Test Name:' 15 15 name=file_text[0] 16 16 name=name[len(string)+1:-1] -
issm/trunk-jpl/test/NightlyRun/runme.py
r21151 r21408 1 1 #!/usr/bin/env python 2 2 import os 3 import glob4 import socket 5 import numpy 6 import sys 7 import traceback 3 import numpy as np 4 from traceback import format_exc 5 from sys import float_info 6 from glob import glob 7 from socket import gethostname 8 8 9 9 def runme(id=None,exclude=None,benchmark='nightly',procedure='check',output='none',rank=1,numprocs=1): … … 34 34 35 35 Usage: 36 runme(varargin) ;36 runme(varargin) 37 37 38 38 Examples: … … 44 44 from parallelrange import parallelrange 45 45 from IdToName import IdToName 46 from MatlabFuncs import strcmpi47 from MatlabFuncs import ismember48 46 from arch import archread 49 47 from arch import archwrite … … 55 53 #Process options 56 54 #GET benchmark {{{ 57 if not ismember(benchmark,['all','nightly','ismip','eismint','thermal','mesh','validation','tranforcing','adolc','slr']):55 if not benchmark in ['all','nightly','ismip','eismint','thermal','mesh','validation','tranforcing','adolc','slr']: 58 56 print "runme warning: benchmark '%s' not supported, defaulting to test 'nightly'." % benchmark 59 57 benchmark='nightly' 60 58 # }}} 61 59 #GET procedure {{{ 62 if not ismember(procedure,['check','update']):60 if not procedure in ['check','update']: 63 61 print "runme warning: procedure '%s' not supported, defaulting to test 'check'." % procedure 64 62 procedure='check' 65 63 # }}} 66 64 #GET output {{{ 67 if not ismember(output,['nightly','none']):65 if not output in ['nightly','none']: 68 66 print "runme warning: output '%s' not supported, defaulting to test 'none'." % output 69 67 output='none' … … 74 72 # }}} 75 73 #GET ids {{{ 76 flist=glob .glob('test*.py') #File name must start with 'test' and must end by '.py' and must be different than 'test.py'74 flist=glob('test*.py') #File name must start with 'test' and must end by '.py' and must be different than 'test.py' 77 75 list_ids=[int(file[4:-3]) for file in flist if not file == 'test.py'] #Keep test id only (skip 'test' and '.py') 78 76 #print 'list_ids =',list_ids … … 81 79 list_ids=list_ids[i1:i2+1] 82 80 #print 'list_ids after parallelrange =',list_ids 83 81 84 82 if id: 85 83 if isinstance(id,list): … … 90 88 else: 91 89 test_ids=set(list_ids) 92 #print 'test_ids after list =',test_ids 90 91 #print 'test_ids after list =',test_ids 93 92 # }}} 94 93 #GET exclude {{{ … … 102 101 # }}} 103 102 #Process Ids according to benchmarks {{{ 104 if strcmpi(benchmark,'nightly'):103 if benchmark=='nightly': 105 104 test_ids=test_ids.intersection(set(range(1,1000))) 106 elif strcmpi(benchmark,'validation'):105 elif benchmark=='validation': 107 106 test_ids=test_ids.intersection(set(range(1001,2000))) 108 elif strcmpi(benchmark,'ismip'):107 elif benchmark=='ismip': 109 108 test_ids=test_ids.intersection(set(range(1101,1200))) 110 elif strcmpi(benchmark,'eismint'):109 elif benchmark=='eismint': 111 110 test_ids=test_ids.intersection(set(range(1201,1300))) 112 elif strcmpi(benchmark,'thermal'):111 elif benchmark=='thermal': 113 112 test_ids=test_ids.intersection(set(range(1301,1400))) 114 elif strcmpi(benchmark,'mesh'):113 elif benchmark=='mesh': 115 114 test_ids=test_ids.intersection(set(range(1401,1500))) 116 elif strcmpi(benchmark,'tranforcing'):115 elif benchmark=='tranforcing': 117 116 test_ids=test_ids.intersection(set(range(1501,1503))) 118 elif strcmpi(benchmark,'referential'):117 elif benchmark=='referential': 119 118 test_ids=test_ids.intersection(set(range(1601,1603))) 120 elif strcmpi(benchmark,'slr'):119 elif benchmark=='slr': 121 120 test_ids=test_ids.intersection(set(range(2001,2500))) 122 elif strcmpi(benchmark,'adolc'):121 elif benchmark=='adolc': 123 122 test_ids=test_ids.intersection(set(range(3001,3200))) 124 123 #print 'test_ids after benchmark =',test_ids … … 141 140 #UPDATE ARCHIVE? 142 141 archive_name='Archive'+str(id) 143 if strcmpi(procedure,'update'):142 if procedure=='update': 144 143 archive_file=os.path.join('..','Archives',archive_name+'.arch') 145 144 if os.path.isfile(archive_file): 146 145 os.remove(archive_file) 147 146 for k,fieldname in enumerate(field_names): 148 field=n umpy.array(field_values[k],dtype=float)147 field=np.array(field_values[k],dtype=float) 149 148 if len(field.shape) == 1: 150 if n umpy.size(field):151 field=field.reshape(n umpy.size(field),1)149 if np.size(field): 150 field=field.reshape(np.size(field),1) 152 151 else: 153 152 field=field.reshape(0,0) … … 171 170 try: 172 171 #Get field and tolerance 173 field=n umpy.array(field_values[k])172 field=np.array(field_values[k]) 174 173 if len(field.shape) == 1: 175 if n umpy.size(field):176 field=field.reshape(n umpy.size(field),1)174 if np.size(field): 175 field=field.reshape(np.size(field),1) 177 176 else: 178 177 field=field.reshape(0,0) … … 181 180 #compare to archive 182 181 # Matlab uses base 1, so use base 1 in labels 183 archive=n umpy.array(archread(archive_file,archive_name+'_field'+str(k+1)))182 archive=np.array(archread(archive_file,archive_name+'_field'+str(k+1))) 184 183 if archive == None: 185 184 raise NameError("Field name '"+archive_name+'_field'+str(k+1)+"' does not exist in archive file.") 186 error_diff=n umpy.amax(numpy.abs(archive-field),axis=0)/ \187 (n umpy.amax(numpy.abs(archive),axis=0)+sys.float_info.epsilon)185 error_diff=np.amax(np.abs(archive-field),axis=0)/ \ 186 (np.amax(np.abs(archive),axis=0)+float_info.epsilon) 188 187 189 188 #disp test result 190 if (n umpy.any(error_diff>tolerance) or numpy.isnan(error_diff)):189 if (np.any(error_diff>tolerance) or np.isnan(error_diff)): 191 190 print 'ERROR difference: %-7.2g > %7.2g test id: %i test name: %s field: %s' % \ 192 191 (error_diff,tolerance,id,id_string,fieldname) … … 198 197 199 198 #something went wrong, print failure message: 200 print traceback.format_exc()199 print format_exc() 201 200 directory=os.getcwd().split('/') # not used? 202 if strcmpi(output,'nightly'):201 if output=='nightly': 203 202 fid=open(os.path.join(ISSM_DIR,'nightlylog','pythonerror.log'), 'a') 204 203 fid.write('%s' % message) … … 214 213 215 214 #something went wrong, print failure message: 216 print traceback.format_exc()215 print format_exc() 217 216 directory=os.getcwd().split('/') # not used? 218 if strcmpi(output,'nightly'):217 if output=='nightly': 219 218 fid=open(os.path.join(ISSM_DIR,'nightlylog','pythonerror.log'), 'a') 220 219 fid.write('%s' % message) … … 254 253 md = runme(args.id, args.exclude, args.benchmark, args.procedure, args.output, args.rank, args.numprocs) 255 254 256 from MatlabFuncs import strcmpi 257 if strcmpi(args.output,'nightly'): 255 if args.output=='nightly': 258 256 print "PYTHONEXITEDCORRECTLY" 259 257 -
issm/trunk-jpl/test/NightlyRun/test101.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedStressSSA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import *9 9 from massfluxatgate import massfluxatgate 10 10 from generic import generic … … 14 14 md=parameterize(md,'../Par/SquareShelfConstrained.py') 15 15 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 17 17 18 18 #outputs 19 19 md.stressbalance.requested_outputs=['default','DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy','MassFlux1','MassFlux2','MassFlux3','MassFlux4','MassFlux5','MassFlux6'] 20 md.outputdefinition.definitions=[ 21 massfluxatgate('name','MassFlux1','profilename','../Exp/MassFlux1.exp','definitionstring','Outputdefinition1'), 22 massfluxatgate('name','MassFlux2','profilename','../Exp/MassFlux2.exp','definitionstring','Outputdefinition2'), 23 massfluxatgate('name','MassFlux3','profilename','../Exp/MassFlux3.exp','definitionstring','Outputdefinition3'), 24 massfluxatgate('name','MassFlux4','profilename','../Exp/MassFlux4.exp','definitionstring','Outputdefinition4'), 25 massfluxatgate('name','MassFlux5','profilename','../Exp/MassFlux5.exp','definitionstring','Outputdefinition5'), 26 massfluxatgate('name','MassFlux6','profilename','../Exp/MassFlux6.exp','definitionstring','Outputdefinition6') 27 ] 20 md.outputdefinition.definitions=[massfluxatgate('name','MassFlux1','profilename','../Exp/MassFlux1.exp','definitionstring','Outputdefinition1'), 21 massfluxatgate('name','MassFlux2','profilename','../Exp/MassFlux2.exp','definitionstring','Outputdefinition2'), 22 massfluxatgate('name','MassFlux3','profilename','../Exp/MassFlux3.exp','definitionstring','Outputdefinition3'), 23 massfluxatgate('name','MassFlux4','profilename','../Exp/MassFlux4.exp','definitionstring','Outputdefinition4'), 24 massfluxatgate('name','MassFlux5','profilename','../Exp/MassFlux5.exp','definitionstring','Outputdefinition5'), 25 massfluxatgate('name','MassFlux6','profilename','../Exp/MassFlux6.exp','definitionstring','Outputdefinition6')] 28 26 29 27 md=solve(md,'Stressbalance') 30 28 31 29 #Fields and tolerances to track changes 32 field_names =['Vx','Vy','Vel','Pressure',\ 33 'DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy','MassFlux1','MassFlux2','MassFlux3','MassFlux4','MassFlux5','MassFlux6'] 34 field_tolerances=[1e-13,1e-13,1e-13,1e-13,\ 35 1e-13,1e-13,1e-13,\ 36 1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13 ] 37 field_values=[\ 38 md.results.StressbalanceSolution.Vx,\ 39 md.results.StressbalanceSolution.Vy,\ 40 md.results.StressbalanceSolution.Vel,\ 41 md.results.StressbalanceSolution.Pressure,\ 42 md.results.StressbalanceSolution.DeviatoricStressxx,\ 43 md.results.StressbalanceSolution.DeviatoricStressyy,\ 44 md.results.StressbalanceSolution.DeviatoricStressxy,\ 45 md.results.StressbalanceSolution.MassFlux1,\ 46 md.results.StressbalanceSolution.MassFlux2,\ 47 md.results.StressbalanceSolution.MassFlux3,\ 48 md.results.StressbalanceSolution.MassFlux4,\ 49 md.results.StressbalanceSolution.MassFlux5,\ 50 md.results.StressbalanceSolution.MassFlux6 ] 30 field_names =['Vx','Vy','Vel','Pressure', 31 'DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy', 32 'MassFlux1','MassFlux2','MassFlux3','MassFlux4','MassFlux5','MassFlux6'] 33 field_tolerances=[1e-13, 1e-13, 1e-13, 1e-13, 34 1e-13, 1e-13, 1e-13, 35 1e-13, 1e-13, 1e-13, 36 1e-13, 1e-13, 1e-13 ] 37 field_values=[md.results.StressbalanceSolution.Vx, 38 md.results.StressbalanceSolution.Vy, 39 md.results.StressbalanceSolution.Vel, 40 md.results.StressbalanceSolution.Pressure, 41 md.results.StressbalanceSolution.DeviatoricStressxx, 42 md.results.StressbalanceSolution.DeviatoricStressyy, 43 md.results.StressbalanceSolution.DeviatoricStressxy, 44 md.results.StressbalanceSolution.MassFlux1, 45 md.results.StressbalanceSolution.MassFlux2, 46 md.results.StressbalanceSolution.MassFlux3, 47 md.results.StressbalanceSolution.MassFlux4, 48 md.results.StressbalanceSolution.MassFlux5, 49 md.results.StressbalanceSolution.MassFlux6 ] -
issm/trunk-jpl/test/NightlyRun/test102.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedStressSSA3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000) … … 13 14 md.extrude(3,2.) 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Stressbalance') 17 18 -
issm/trunk-jpl/test/NightlyRun/test103.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedStressHO 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000) … … 13 14 md.extrude(3,2.) 14 15 md=setflowequation(md,'HO','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.stressbalance.requested_outputs=['default','StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz'] 17 18 md=solve(md,'Stressbalance') 18 19 19 20 #Fields and tolerances to track changes 20 field_names =['Vx','Vy','Vz','Vel','Pressure',\ 21 'StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz'] 22 field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-09,\ 23 1e-09,1e-09,1e-09,1e-09,1e-09,1e-08] 24 field_values=[\ 25 md.results.StressbalanceSolution.Vx,\ 26 md.results.StressbalanceSolution.Vy,\ 27 md.results.StressbalanceSolution.Vz,\ 28 md.results.StressbalanceSolution.Vel,\ 29 md.results.StressbalanceSolution.Pressure,\ 30 md.results.StressbalanceSolution.StressTensorxx,\ 31 md.results.StressbalanceSolution.StressTensoryy,\ 32 md.results.StressbalanceSolution.StressTensorzz,\ 33 md.results.StressbalanceSolution.StressTensorxy,\ 34 md.results.StressbalanceSolution.StressTensorxz,\ 35 md.results.StressbalanceSolution.StressTensoryz,\ 36 ] 21 field_names =['Vx','Vy','Vz', 22 'Vel','Pressure', 23 'StressTensorxx','StressTensoryy','StressTensorzz', 24 'StressTensorxy','StressTensorxz','StressTensoryz'] 25 field_tolerances=[1e-09,1e-09,1e-09, 26 1e-09,1e-09, 27 1e-09,1e-09,1e-09, 28 1e-09,1e-09,1e-08] 29 field_values=[md.results.StressbalanceSolution.Vx, 30 md.results.StressbalanceSolution.Vy, 31 md.results.StressbalanceSolution.Vz, 32 md.results.StressbalanceSolution.Vel, 33 md.results.StressbalanceSolution.Pressure, 34 md.results.StressbalanceSolution.StressTensorxx, 35 md.results.StressbalanceSolution.StressTensoryy, 36 md.results.StressbalanceSolution.StressTensorzz, 37 md.results.StressbalanceSolution.StressTensorxy, 38 md.results.StressbalanceSolution.StressTensorxz, 39 md.results.StressbalanceSolution.StressTensoryz,] -
issm/trunk-jpl/test/NightlyRun/test104.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedStressFS 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000) … … 13 14 md.extrude(3,2.) 14 15 md=setflowequation(md,'FS','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Stressbalance') 17 18 … … 19 20 field_names =['Vx','Vy','Vz','Vel','Pressure'] 20 21 field_tolerances=[1e-08,1e-08,1e-06,1e-08,1e-08] 21 field_values=[\ 22 md.results.StressbalanceSolution.Vx,\ 23 md.results.StressbalanceSolution.Vy,\ 24 md.results.StressbalanceSolution.Vz,\ 25 md.results.StressbalanceSolution.Vel,\ 26 md.results.StressbalanceSolution.Pressure,\ 27 ] 22 field_values=[md.results.StressbalanceSolution.Vx, 23 md.results.StressbalanceSolution.Vy, 24 md.results.StressbalanceSolution.Vz, 25 md.results.StressbalanceSolution.Vel, 26 md.results.StressbalanceSolution.Pressure] -
issm/trunk-jpl/test/NightlyRun/test105.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedMasstransp2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000) … … 12 13 md=parameterize(md,'../Par/SquareShelfConstrained.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md=solve(md,'Masstransport') 16 17 -
issm/trunk-jpl/test/NightlyRun/test106.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedMasstransp2dDG 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from meshconvert import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000) … … 14 15 md=parameterize(md,'../Par/SquareShelfConstrained.py') 15 16 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md.masstransport.stabilization=3 18 19 md.masstransport.spcthickness=md.geometry.thickness -
issm/trunk-jpl/test/NightlyRun/test107.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedMasstransp3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000) … … 13 14 md=setflowequation(md,'SSA','all') 14 15 md.extrude(5,3.) 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Masstransport') 17 18 -
issm/trunk-jpl/test/NightlyRun/test108.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedTherStea 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000) … … 14 15 md=setflowequation(md,'SSA','all') 15 16 md.timestepping.time_step=0 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md=solve(md,'Thermal') 18 19 -
issm/trunk-jpl/test/NightlyRun/test109.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedTherTran 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000) … … 13 14 md.extrude(3,1.) 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.transient.isstressbalance=False 17 18 md.transient.ismasstransport=False … … 24 25 field_names =['Temperature','BasalforcingsGroundediceMeltingRate'] 25 26 field_tolerances=[1e-13,1e-13] 26 field_values=[\ 27 md.results.TransientSolution[0].Temperature,\ 28 md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\ 29 ] 27 field_values=[md.results.TransientSolution[0].Temperature, 28 md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test110.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedTranSSA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000) … … 12 13 md=parameterize(md,'../Par/SquareShelfConstrained.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md.transient.requested_outputs=['IceVolume'] 16 17 -
issm/trunk-jpl/test/NightlyRun/test1101.py
r21060 r21408 1 1 #Test Name: ISMIPAHO 2 import numpy 2 import numpy as np 3 3 import shutil 4 4 from model import * 5 from socket import gethostname 5 6 from squaremesh import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import *11 from PythonFuncs import *12 11 13 12 """ … … 18 17 printingflag=False 19 18 20 L_list=[5000.,10000.,20000.,40000.,80000.,160000.] 19 #L_list=[80000.] 20 L_list=[80000.] 21 21 results=[] 22 22 minvx=[] … … 35 35 36 36 #Create dirichlet on the bed only 37 md.stressbalance.spcvx=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))38 md.stressbalance.spcvy=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))39 md.stressbalance.spcvz=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))37 md.stressbalance.spcvx=float('NaN')*np.ones((md.mesh.numberofvertices)) 38 md.stressbalance.spcvy=float('NaN')*np.ones((md.mesh.numberofvertices)) 39 md.stressbalance.spcvz=float('NaN')*np.ones((md.mesh.numberofvertices)) 40 40 41 pos=n umpy.nonzero(md.mesh.vertexonbase)41 pos=np.where(md.mesh.vertexonbase) 42 42 md.stressbalance.spcvx[pos]=0. 43 43 md.stressbalance.spcvy[pos]=0. 44 44 45 45 #Create MPCs to have periodic boundary conditions 46 posx=n umpy.nonzero(md.mesh.x==0.)[0]47 posx2=n umpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0]46 posx=np.where(md.mesh.x==0.)[0] 47 posx2=np.where(md.mesh.x==np.max(md.mesh.x))[0] 48 48 49 posy=n umpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]#Don't take the same nodes two times50 posy2=n umpy.nonzero(logical_and_n(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]49 posy=np.where(np.logical_and.reduce((md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0] #Don't take the same nodes two times 50 posy2=np.where(np.logical_and.reduce((md.mesh.y==np.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0] 51 51 52 md.stressbalance.vertex_pairing=n umpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))52 md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T)) 53 53 54 54 #Compute the stressbalance 55 md.cluster=generic('name', oshostname(),'np',8)55 md.cluster=generic('name',gethostname(),'np',8) 56 56 md=solve(md,'Stressbalance') 57 57 … … 61 61 vz=md.results.StressbalanceSolution.Vz 62 62 results.append(md.results.StressbalanceSolution) 63 minvx.append(n umpy.min(vx[-md.mesh.numberofvertices2d:]))64 maxvx.append(n umpy.max(vx[-md.mesh.numberofvertices2d:]))63 minvx.append(np.min(vx[-md.mesh.numberofvertices2d:])) 64 maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:])) 65 65 66 66 #Now plot vx, vy, vz and vx on a cross section … … 69 69 pass 70 70 # set(gcf,'Color','w') 71 # printmodel(['ismipaHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;71 # printmodel(['ismipaHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 72 72 # shutil.move("ismipaHOvx%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA') 73 73 # plotmodel(md,'data',vy,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km') … … 75 75 pass 76 76 # set(gcf,'Color','w') 77 # printmodel(['ismipaHOvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;77 # printmodel(['ismipaHOvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 78 78 # shutil.move("ismipaHOvy%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA') 79 79 # plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km') … … 81 81 pass 82 82 # set(gcf,'Color','w') 83 # printmodel(['ismipaHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;83 # printmodel(['ismipaHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 84 84 # shutil.move("ismipaHOvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA') 85 85 … … 111 111 pass 112 112 # set(gcf,'Color','w') 113 # printmodel(['ismipaHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;113 # printmodel(['ismipaHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 114 114 # shutil.move("ismipaHOvxsec%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA') 115 115 116 116 #Now plot the min and max values of vx for each size of the square 117 #plot([5 10 20 40 80 160],minvx) ;ylim([0 18]);xlim([0 160])117 #plot([5 10 20 40 80 160],minvx)ylim([0 18])xlim([0 160]) 118 118 if printingflag: 119 119 pass 120 120 # set(gcf,'Color','w') 121 # printmodel('ismipaHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;121 # printmodel('ismipaHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 122 122 # shutil.move('ismipaHOminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA') 123 #plot([5 10 20 40 80 160],maxvx) ;ylim([0 120]);xlim([0 160])123 #plot([5 10 20 40 80 160],maxvx)ylim([0 120])xlim([0 160]) 124 124 if printingflag: 125 125 pass 126 126 # set(gcf,'Color','w') 127 # printmodel('ismipaHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;127 # printmodel('ismipaHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 128 128 # shutil.move('ismipaHOmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA') 129 129 130 130 #Fields and tolerances to track changes 131 field_names =[\ 132 'Vx5km','Vy5km','Vz5km',\ 133 'Vx10km','Vy10km','Vz10km',\ 134 'Vx20km','Vy20km','Vz20km',\ 135 'Vx40km','Vy40km','Vz40km',\ 136 'Vx80km','Vy80km','Vz80km',\ 137 'Vx160km','Vy160km','Vz160km' 138 ] 139 field_tolerances=[\ 140 1e-09,1e-09,1e-09,\ 141 1e-10,1e-10,1e-09,\ 142 1e-09,1e-09,1e-09,\ 143 1e-09,1e-08,1e-09,\ 144 1e-08,1e-08,1e-08,\ 145 1e-08,1e-07,1e-08,\ 146 ] 131 field_names =['Vx80km','Vy80km','Vz80km'] 132 field_tolerances=[1e-08,1e-08,1e-08] 147 133 field_values=[] 148 134 for result in results: 149 field_values=field_values+[\ 150 result.Vx,\ 151 result.Vy,\ 152 result.Vz,\ 153 ] 135 field_values=field_values+[result.Vx,result.Vy,result.Vz] -
issm/trunk-jpl/test/NightlyRun/test1102.py
r21060 r21408 1 1 #Test Name: ISMIPAFS 2 import numpy 2 import numpy as np 3 3 import shutil 4 4 from model import * 5 from socket import gethostname 5 6 from squaremesh import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import *11 from PythonFuncs import *12 11 13 12 """ … … 18 17 printingflag=False 19 18 20 L_list=[ 5000.,10000.,20000.,40000.,80000.,160000.]19 L_list=[80000.] 21 20 results=[] 22 21 minvx=[] … … 31 30 32 31 # #Find elements at the corner and extract model 33 # posnodes=n umpy.nonzero(numpy.logical_and(numpy.logical_or(md.mesh.x==0.,md.mesh.x==numpy.max(md.mesh.x)),numpy.logical_or(md.mesh.y==0.,md.mesh.y==numpy.max(md.mesh.y))))34 # a=n umpy.nonzero(ismember(md.mesh.elements,posnodes))[0]35 # elements=n umpy.ones((md.mesh.numberofelements),int)32 # posnodes=np.nonzero(np.logical_and.reduce(np.logical_or.reduce(md.mesh.x==0.,md.mesh.x==np.max(md.mesh.x)),np.logical_or.reduce(md.mesh.y==0.,md.mesh.y==np.max(md.mesh.y)))) 33 # a=np.nonzero(ismember(md.mesh.elements,posnodes))[0] 34 # elements=np.ones((md.mesh.numberofelements),int) 36 35 # elements[a]=0 37 36 # md.modelextract(elements) … … 42 41 43 42 #Create dirichlet on the bed only 44 pos=n umpy.nonzero(md.mesh.vertexonbase)43 pos=np.nonzero(md.mesh.vertexonbase) 45 44 md.stressbalance.spcvx[pos]=0. 46 45 md.stressbalance.spcvy[pos]=0. 47 46 md.stressbalance.spcvz[pos]=0. 48 49 # #Create MPCs to have periodic boundary conditions50 # posx=numpy.nonzero(md.mesh.x==0.)[0]51 # posx2=numpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0]52 # posx=numpy.nonzero(logical_and_n(md.mesh.x==0.,md.mesh.y!=0.,md.mesh.y!=numpy.max(md.mesh.y),numpy.logical_not(md.mesh.vertexonbase)))[0]53 # posx2=numpy.nonzero(logical_and_n(md.mesh.x==numpy.max(md.mesh.x),md.mesh.y!=0.,md.mesh.y!=numpy.max(md.mesh.y),numpy.logical_not(md.mesh.vertexonbase)))[0]54 55 # posy=numpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x),numpy.logical_not(md.mesh.vertexonbase)))[0] #Don't take the same nodes two times56 # posy2=numpy.nonzero(logical_and_n(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x),numpy.logical_not(md.mesh.vertexonbase)))[0]57 58 # md.stressbalance.vertex_pairing=numpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))59 47 60 48 #Compute the stressbalance … … 62 50 md.stressbalance.reltol=float('NaN') 63 51 md.stressbalance.restol=1. 64 md.cluster=generic('name', oshostname(),'np',8)52 md.cluster=generic('name',gethostname(),'np',8) 65 53 md=solve(md,'Stressbalance') 66 54 … … 71 59 pressure=md.results.StressbalanceSolution.Pressure 72 60 results.append(md.results.StressbalanceSolution) 73 minvx.append(n umpy.min(vx[-md.mesh.numberofvertices2d:]))74 maxvx.append(n umpy.max(vx[-md.mesh.numberofvertices2d:]))61 minvx.append(np.min(vx[-md.mesh.numberofvertices2d:])) 62 maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:])) 75 63 76 64 #Now plot vx, vy, vz and vx on a cross section … … 79 67 pass 80 68 # set(gcf,'Color','w') 81 # printmodel(['ismipaFSvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;69 # printmodel(['ismipaFSvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 82 70 # shutil.move("ismipaFSvx%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA') 83 71 # plotmodel(md,'data',vy,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',3) … … 85 73 pass 86 74 # set(gcf,'Color','w') 87 # printmodel(['ismipaFSvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;75 # printmodel(['ismipaFSvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 88 76 # shutil.move("ismipaFSvy%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA') 89 77 # plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',4) … … 91 79 pass 92 80 # set(gcf,'Color','w') 93 # printmodel(['ismipaFSvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;81 # printmodel(['ismipaFSvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 94 82 # shutil.move("ismipaFSvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA') 95 83 … … 121 109 pass 122 110 # set(gcf,'Color','w') 123 # printmodel(['ismipaFSvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;111 # printmodel(['ismipaFSvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 124 112 # shutil.move("ismipaFSvxsec.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA') 125 113 126 114 #Now plot the min and max values of vx for each size of the square 127 #plot([5 10 20 40 80 160],minvx) ;ylim([0 18])115 #plot([5 10 20 40 80 160],minvx)ylim([0 18]) 128 116 if printingflag: 129 117 pass 130 118 # set(gcf,'Color','w') 131 # printmodel('ismipaFSminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;119 # printmodel('ismipaFSminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 132 120 # shutil.move('ismipaFSminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA') 133 #plot([5 10 20 40 80 160],maxvx) ;ylim([0 120])121 #plot([5 10 20 40 80 160],maxvx)ylim([0 120]) 134 122 if printingflag: 135 123 pass 136 124 # set(gcf,'Color','w') 137 # printmodel('ismipaFSmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;125 # printmodel('ismipaFSmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 138 126 # shutil.move('ismipaFSmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA') 139 127 140 128 #Fields and tolerances to track changes 141 field_names =[\ 142 'Vx5km','Vy5km','Vz5km',\ 143 'Vx10km','Vy10km','Vz10km',\ 144 'Vx20km','Vy20km','Vz20km',\ 145 'Vx40km','Vy40km','Vz40km',\ 146 'Vx80km','Vy80km','Vz80km',\ 147 'Vx160km','Vy160km','Vz160km' 148 ] 149 field_tolerances=[\ 150 1e-12,1e-12,1e-12,\ 151 1e-12,1e-12,1e-12,\ 152 1e-12,1e-11,1e-12,\ 153 1e-12,1e-11,1e-12,\ 154 1e-12,1e-11,1e-12,\ 155 1e-12,1e-11,1e-12,\ 156 ] 129 field_names =['Vx80km','Vy80km','Vz80km'] 130 field_tolerances=[1e-12,1e-11,1e-12,] 157 131 field_values=[] 158 132 for result in results: -
issm/trunk-jpl/test/NightlyRun/test1103.py
r21060 r21408 1 1 #Test Name: ISMIPBHO 2 import numpy 2 import numpy as np 3 3 import shutil 4 4 from model import * 5 from socket import gethostname 5 6 from squaremesh import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import *11 from PythonFuncs import *12 11 13 12 """ … … 18 17 printingflag=False 19 18 20 L_list=[ 5000.,10000.,20000.,40000.,80000.,160000.]19 L_list=[80000.] 21 20 results=[] 22 21 minvx=[] … … 35 34 36 35 #Create dirichlet on the bed only 37 md.stressbalance.spcvx=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))38 md.stressbalance.spcvy=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))39 md.stressbalance.spcvz=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))40 pos=n umpy.nonzero(md.mesh.vertexonbase)36 md.stressbalance.spcvx=float('NaN')*np.ones((md.mesh.numberofvertices)) 37 md.stressbalance.spcvy=float('NaN')*np.ones((md.mesh.numberofvertices)) 38 md.stressbalance.spcvz=float('NaN')*np.ones((md.mesh.numberofvertices)) 39 pos=np.nonzero(md.mesh.vertexonbase) 41 40 md.stressbalance.spcvx[pos]=0. 42 41 md.stressbalance.spcvy[pos]=0. 43 42 44 43 #Create MPCs to have periodic boundary conditions 45 posx=n umpy.nonzero(md.mesh.x==0.)[0]46 posx2=n umpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0]44 posx=np.where(md.mesh.x==0.)[0] 45 posx2=np.where(md.mesh.x==np.max(md.mesh.x))[0] 47 46 48 posy=n umpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0] #Don't take the same nodes two times49 posy2=n umpy.nonzero(logical_and_n(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]47 posy=np.where(np.logical_and.reduce((md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0] #Don't take the same nodes two times 48 posy2=np.where(np.logical_and.reduce((md.mesh.y==np.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0] 50 49 51 md.stressbalance.vertex_pairing=n umpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))50 md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T)) 52 51 53 52 #Compute the stressbalance 54 md.cluster=generic('name', oshostname(),'np',8)53 md.cluster=generic('name',gethostname(),'np',8) 55 54 md=solve(md,'Stressbalance') 56 55 … … 60 59 vz=md.results.StressbalanceSolution.Vz 61 60 results.append(md.results.StressbalanceSolution) 62 minvx.append(n umpy.min(vx[md.mesh.numberofvertices2d:]))63 maxvx.append(n umpy.max(vx[md.mesh.numberofvertices2d:]))61 minvx.append(np.min(vx[md.mesh.numberofvertices2d:])) 62 maxvx.append(np.max(vx[md.mesh.numberofvertices2d:])) 64 63 65 64 #Now plot vx, vy, vz and vx on a cross section … … 68 67 pass 69 68 # set(gcf,'Color','w') 70 # printmodel(['ismipbHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;69 # printmodel(['ismipbHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 71 70 # shutil.move("ismipbHOvx%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB') 72 71 # plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km') … … 74 73 pass 75 74 # set(gcf,'Color','w') 76 # printmodel(['ismipbHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;75 # printmodel(['ismipbHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 77 76 # shutil.move("ismipbHOvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB') 78 77 … … 104 103 pass 105 104 # set(gcf,'Color','w') 106 # printmodel(['ismipbHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;105 # printmodel(['ismipbHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 107 106 # shutil.move("ismipbHOvxsec%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB') 108 107 109 108 #Now plot the min and max values of vx for each size of the square 110 #plot([5 10 20 40 80 160],minvx) ;ylim([0 14]);xlim([0 160])109 #plot([5 10 20 40 80 160],minvx)ylim([0 14])xlim([0 160]) 111 110 if printingflag: 112 111 pass 113 112 # set(gcf,'Color','w') 114 # printmodel('ismipbHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;113 # printmodel('ismipbHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 115 114 # shutil.move('ismipbHOminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB') 116 #plot([5 10 20 40 80 160],maxvx) ;ylim([0 120]);xlim([0 160])115 #plot([5 10 20 40 80 160],maxvx)ylim([0 120])xlim([0 160]) 117 116 if printingflag: 118 117 pass 119 118 # set(gcf,'Color','w') 120 # printmodel('ismipbHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;119 # printmodel('ismipbHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 121 120 # shutil.move('ismipbHOmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB') 122 121 123 122 #Fields and tolerances to track changes 124 field_names =[\ 125 'Vx5km','Vy5km','Vz5km',\ 126 'Vx10km','Vy10km','Vz10km',\ 127 'Vx20km','Vy20km','Vz20km',\ 128 'Vx40km','Vy40km','Vz40km',\ 129 'Vx80km','Vy80km','Vz80km',\ 130 'Vx160km','Vy160km','Vz160km' 131 ] 132 field_tolerances=[\ 133 1e-09,1e-09,1e-09,\ 134 1e-09,1e-09,1e-09,\ 135 1e-09,1e-09,1e-09,\ 136 1e-08,1e-08,1e-08,\ 137 1e-08,1e-07,1e-07,\ 138 1e-07,1e-06,1e-07,\ 139 ] 123 field_names =['Vx80km','Vy80km','Vz80km'] 124 field_tolerances=[1e-08,1e-07,1e-07] 140 125 field_values=[] 141 126 for result in results: 142 field_values=field_values+[\ 143 result.Vx,\ 144 result.Vy,\ 145 result.Vz,\ 146 ] 127 field_values=field_values+[result.Vx,result.Vy,result.Vz] -
issm/trunk-jpl/test/NightlyRun/test1104.py
r21060 r21408 1 1 #Test Name: ISMIPBFS 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from squaremesh import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import *10 from PythonFuncs import *11 10 12 11 """ … … 15 14 """ 16 15 17 L_list=[ 5000.,10000.,20000.,40000.,80000.,160000.]16 L_list=[80000.] 18 17 results=[] 19 18 … … 29 28 30 29 #Create dirichlet on the bed only 31 md.stressbalance.spcvx=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))32 md.stressbalance.spcvy=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))33 md.stressbalance.spcvz=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))30 md.stressbalance.spcvx=float('NaN')*np.ones((md.mesh.numberofvertices)) 31 md.stressbalance.spcvy=float('NaN')*np.ones((md.mesh.numberofvertices)) 32 md.stressbalance.spcvz=float('NaN')*np.ones((md.mesh.numberofvertices)) 34 33 35 pos=n umpy.nonzero(md.mesh.vertexonbase)34 pos=np.where(md.mesh.vertexonbase) 36 35 md.stressbalance.spcvx[pos]=0. 37 36 md.stressbalance.spcvy[pos]=0. 38 37 39 38 #Create MPCs to have periodic boundary conditions 40 posx=n umpy.nonzero(md.mesh.x==0.)[0]41 posx2=n umpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0]39 posx=np.where(md.mesh.x==0.)[0] 40 posx2=np.where(md.mesh.x==np.max(md.mesh.x))[0] 42 41 43 posy=n umpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0] #Don't take the same nodes two times44 posy2=n umpy.nonzero(logical_and_n(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]42 posy=np.where(np.logical_and.reduce((md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0] #Don't take the same nodes two times 43 posy2=np.where(np.logical_and.reduce((md.mesh.y==np.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0] 45 44 46 md.stressbalance.vertex_pairing=n umpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))47 45 md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T)) 46 print np.shape(md.stressbalance.vertex_pairing) 48 47 #Compute the stressbalance 49 48 md.stressbalance.abstol=float('NaN') 50 md.cluster=generic('name', oshostname(),'np',8)49 md.cluster=generic('name',gethostname(),'np',8) 51 50 md=solve(md,'Stressbalance') 52 pos=n umpy.nonzero(logical_or_n(md.mesh.x==0.,md.mesh.y==0.,md.mesh.x==numpy.max(md.mesh.x),md.mesh.y==numpy.max(md.mesh.y)))51 pos=np.where(np.logical_or.reduce((md.mesh.x==0.,md.mesh.y==0.,md.mesh.x==np.max(md.mesh.x),md.mesh.y==np.max(md.mesh.y)))) 53 52 md.stressbalance.spcvx[pos]=md.results.StressbalanceSolution.Vx[pos] 54 53 md.stressbalance.spcvy[pos]=md.results.StressbalanceSolution.Vy[pos] 55 md.stressbalance.vertex_pairing=n umpy.empty((0,2),int)54 md.stressbalance.vertex_pairing=np.empty((0,2),int) 56 55 md=setflowequation(md,'FS','all') 57 56 md=solve(md,'Stressbalance') … … 66 65 67 66 #Fields and tolerances to track changes 68 field_names =[\ 69 'Vx5km','Vy5km','Vz5km',\ 70 'Vx10km','Vy10km','Vz10km',\ 71 'Vx20km','Vy20km','Vz20km',\ 72 'Vx40km','Vy40km','Vz40km',\ 73 'Vx80km','Vy80km','Vz80km',\ 74 'Vx160km','Vy160km','Vz160km' 75 ] 76 field_tolerances=[\ 77 1e-08,1e-08,1e-08,\ 78 1e-08,1e-08,1e-08,\ 79 1e-08,1e-08,1e-08,\ 80 1e-08,1e-08,1e-08,\ 81 1e-08,1e-07,1e-08,\ 82 1e-07,1e-07,1e-07,\ 83 ] 67 field_names =['Vx80km','Vy80km','Vz80km'] 68 field_tolerances=[1e-08,1e-07,1e-08] 84 69 field_values=[] 85 70 for result in results: 86 field_values=field_values+[\ 87 result.Vx,\ 88 result.Vy,\ 89 result.Vz,\ 90 ] 71 field_values=field_values+[result.Vx,result.Vy,result.Vz] -
issm/trunk-jpl/test/NightlyRun/test1105.py
r21060 r21408 1 1 #Test Name: ISMIPCHO 2 import numpy 2 import numpy as np 3 3 import shutil 4 4 from model import * 5 from socket import gethostname 5 6 from squaremesh import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import *11 from PythonFuncs import *12 11 13 12 """ … … 18 17 printingflag=False 19 18 20 L_list=[ 5000.,10000.,20000.,40000.,80000.,160000.]19 L_list=[80000.] 21 20 results=[] 22 21 minvx=[] … … 35 34 36 35 #Create MPCs to have periodic boundary conditions 37 md.stressbalance.spcvx=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))38 md.stressbalance.spcvy=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))39 md.stressbalance.spcvz=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))36 md.stressbalance.spcvx=float('NaN')*np.ones((md.mesh.numberofvertices)) 37 md.stressbalance.spcvy=float('NaN')*np.ones((md.mesh.numberofvertices)) 38 md.stressbalance.spcvz=float('NaN')*np.ones((md.mesh.numberofvertices)) 40 39 41 posx=n umpy.nonzero(logical_and_n(md.mesh.x==0.,md.mesh.y!=0.,md.mesh.y!=L))[0]42 posx2=n umpy.nonzero(logical_and_n(md.mesh.x==L,md.mesh.y!=0.,md.mesh.y!=L))[0]40 posx=np.where(np.logical_and.reduce((md.mesh.x==0.,md.mesh.y!=0.,md.mesh.y!=L)))[0] 41 posx2=np.where(np.logical_and.reduce((md.mesh.x==L,md.mesh.y!=0.,md.mesh.y!=L)))[0] 43 42 44 posy=n umpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=L))[0] #Don't take the same nodes two times45 posy2=n umpy.nonzero(logical_and_n(md.mesh.y==L,md.mesh.x!=0.,md.mesh.x!=L))[0]43 posy=np.where(np.logical_and.reduce((md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=L)))[0] #Don't take the same nodes two times 44 posy2=np.where(np.logical_and.reduce((md.mesh.y==L,md.mesh.x!=0.,md.mesh.x!=L)))[0] 46 45 47 md.stressbalance.vertex_pairing=n umpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))46 md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T)) 48 47 49 48 #Add spc on the corners 50 pos=n umpy.nonzero(logical_and_n(numpy.logical_or(md.mesh.x==0.,md.mesh.x==L),numpy.logical_or(md.mesh.y==0.,md.mesh.y==L),md.mesh.vertexonbase))49 pos=np.where(np.logical_and.reduce((np.logical_or(md.mesh.x==0.,md.mesh.x==L),np.logical_or(md.mesh.y==0.,md.mesh.y==L),md.mesh.vertexonbase))) 51 50 md.stressbalance.spcvx[pos]=0. 52 51 md.stressbalance.spcvy[pos]=0. … … 71 70 72 71 #Spc the bed at zero for vz 73 pos=n umpy.nonzero(md.mesh.vertexonbase)72 pos=np.where(md.mesh.vertexonbase) 74 73 md.stressbalance.spcvz[pos]=0. 75 74 76 75 #Compute the stressbalance 77 md.cluster=generic('name', oshostname(),'np',8)76 md.cluster=generic('name',gethostname(),'np',8) 78 77 md=solve(md,'Stressbalance') 79 78 … … 83 82 vz=md.results.StressbalanceSolution.Vz 84 83 results.append(md.results.StressbalanceSolution) 85 minvx.append(n umpy.min(vx[-md.mesh.numberofvertices2d:]))86 maxvx.append(n umpy.max(vx[-md.mesh.numberofvertices2d:]))84 minvx.append(np.min(vx[-md.mesh.numberofvertices2d:])) 85 maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:])) 87 86 88 87 #Now plot vx, vy, vz and vx on a cross section … … 91 90 pass 92 91 # set(gcf,'Color','w') 93 # printmodel(['ismipcHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;92 # printmodel(['ismipcHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 94 93 # shutil.move("ismipcHOvx%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC') 95 94 # plotmodel(md,'data',vy,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',3) … … 97 96 pass 98 97 # set(gcf,'Color','w') 99 # printmodel(['ismipcHOvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;98 # printmodel(['ismipcHOvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 100 99 # shutil.move("ismipcHOvy%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC') 101 100 # plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',4) … … 103 102 pass 104 103 # set(gcf,'Color','w') 105 # printmodel(['ismipcHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;104 # printmodel(['ismipcHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 106 105 # shutil.move("ismipcHOvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC') 107 106 … … 133 132 pass 134 133 # set(gcf,'Color','w') 135 # printmodel(['ismipcHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;134 # printmodel(['ismipcHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 136 135 # shutil.move("ismipcHOvxsec%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC') 137 136 138 137 #Now plot the min and max values of vx for each size of the square 139 #plot([5 10 20 40 80 160],minvx) ;ylim([4 18]);xlim([0 160])138 #plot([5 10 20 40 80 160],minvx)ylim([4 18])xlim([0 160]) 140 139 if printingflag: 141 140 pass 142 141 # set(gcf,'Color','w') 143 # printmodel('ismipcHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;142 # printmodel('ismipcHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 144 143 # shutil.move('ismipcHOminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC') 145 #plot([5 10 20 40 80 160],maxvx) ;ylim([0 200]);xlim([0 160])144 #plot([5 10 20 40 80 160],maxvx)ylim([0 200]) xlim([0 160]) 146 145 if printingflag: 147 146 pass 148 147 # set(gcf,'Color','w') 149 # printmodel('ismipcHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;148 # printmodel('ismipcHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 150 149 # shutil.move('ismipcHOmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC') 151 150 152 151 #Fields and tolerances to track changes 153 field_names =[\ 154 'Vx5km','Vy5km','Vz5km',\ 155 'Vx10km','Vy10km','Vz10km',\ 156 'Vx20km','Vy20km','Vz20km',\ 157 'Vx40km','Vy40km','Vz40km',\ 158 'Vx80km','Vy80km','Vz80km',\ 159 'Vx160km','Vy160km','Vz160km' 160 ] 161 field_tolerances=[\ 162 1e-08,1e-07,1e-07,\ 163 1e-09,1e-07,1e-07,\ 164 1e-09,1e-09,1e-07,\ 165 1e-09,1e-09,1e-08,\ 166 1e-09,1e-08,1e-08,\ 167 1e-09,1e-08,1e-08,\ 168 ] 152 field_names =['Vx80km','Vy80km','Vz80km'] 153 field_tolerances=[1e-09,1e-08,1e-08] 169 154 field_values=[] 170 155 for result in results: 171 field_values=field_values+[\ 172 result.Vx,\ 173 result.Vy,\ 174 result.Vz,\ 175 ] 156 field_values=field_values+[result.Vx,result.Vy,result.Vz] -
issm/trunk-jpl/test/NightlyRun/test1106.py
r21060 r21408 1 1 #Test Name: ISMIPCFS 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import *10 from PythonFuncs import *11 10 12 11 """ … … 15 14 """ 16 15 17 L_list=[ 5000.,10000.,20000.,40000.,80000.,160000.]16 L_list=[80000.] 18 17 results=[] 19 18 … … 22 21 md=setmask(md,'','') #ice sheet test 23 22 md=parameterize(md,'../Par/ISMIPC.py') 24 md.friction.coefficient=n umpy.sqrt(md.constants.yts*(1000.+1000.*numpy.sin(md.mesh.x.reshape(-1,1)*2.*numpy.pi/L)*numpy.sin(md.mesh.y.reshape(-1,1)*2.*numpy.pi/L)))23 md.friction.coefficient=np.sqrt(md.constants.yts*(1000.+1000.*np.sin(md.mesh.x*2.*np.pi/L)*np.sin(md.mesh.y*2.*np.pi/L))) 25 24 md.extrude(10,1.) 26 25 27 26 #Add spc on the borders 28 pos=n umpy.nonzero(logical_or_n(md.mesh.x==0.,md.mesh.x==numpy.max(md.mesh.x),md.mesh.y==0.,md.mesh.y==numpy.max(md.mesh.y)))27 pos=np.where(np.logical_or.reduce((md.mesh.x==0.,md.mesh.x==np.max(md.mesh.x),md.mesh.y==0.,md.mesh.y==np.max(md.mesh.y)))) 29 28 md.stressbalance.spcvx[pos]=0. 30 29 md.stressbalance.spcvy[pos]=0. … … 51 50 52 51 #Compute the stressbalance 53 md.cluster=generic('name', oshostname(),'np',8)52 md.cluster=generic('name',gethostname(),'np',8) 54 53 md=solve(md,'Stressbalance') 55 54 … … 63 62 64 63 #Fields and tolerances to track changes 65 field_names =[\ 66 'Vx5km','Vy5km','Vz5km',\ 67 'Vx10km','Vy10km','Vz10km',\ 68 'Vx20km','Vy20km','Vz20km',\ 69 'Vx40km','Vy40km','Vz40km',\ 70 'Vx80km','Vy80km','Vz80km',\ 71 'Vx160km','Vy160km','Vz160km' 72 ] 73 field_tolerances=[\ 74 1e-12,1e-12,1e-11,\ 75 1e-12,1e-12,1e-12,\ 76 1e-12,1e-12,1e-12,\ 77 1e-12,1e-12,1e-12,\ 78 1e-12,1e-12,1e-12,\ 79 1e-12,1e-11,1e-12,\ 80 ] 64 field_names =['Vx80km','Vy80km','Vz80km'] 65 field_tolerances=[1e-12,1e-12,1e-12] 81 66 field_values=[] 82 67 for result in results: 83 field_values=field_values+[\ 84 result.Vx,\ 85 result.Vy,\ 86 result.Vz,\ 87 ] 68 field_values=field_values+[result.Vx,result.Vy,result.Vz] -
issm/trunk-jpl/test/NightlyRun/test1107.py
r21060 r21408 1 1 #Test Name: ISMIPDHO 2 import numpy 2 import numpy as np 3 3 import shutil 4 4 from model import * 5 from socket import gethostname 5 6 from squaremesh import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import *11 from PythonFuncs import *12 11 13 12 """ … … 18 17 printingflag=False 19 18 20 L_list=[ 5000.,10000.,20000.,40000.,80000.,160000.]19 L_list=[80000.] 21 20 results=[] 22 21 minvx=[] … … 35 34 36 35 #We need one grd on dirichlet: the 4 corners are set to zero 37 md.stressbalance.spcvx=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))38 md.stressbalance.spcvy=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))39 md.stressbalance.spcvz=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))36 md.stressbalance.spcvx=float('NaN')*np.ones((md.mesh.numberofvertices)) 37 md.stressbalance.spcvy=float('NaN')*np.ones((md.mesh.numberofvertices)) 38 md.stressbalance.spcvz=float('NaN')*np.ones((md.mesh.numberofvertices)) 40 39 41 40 #Create MPCs to have periodic boundary conditions 42 # posx=find(md.mesh.x==0. & ~(md.mesh.y==0. & md.mesh.vertexonbase) & ~(md.mesh.y==L & md.mesh.vertexonbase)) ;43 posx=n umpy.nonzero(logical_and_n(md.mesh.x==0.,numpy.logical_not(numpy.logical_and(md.mesh.y==0.,md.mesh.vertexonbase)),numpy.logical_not(numpy.logical_and(md.mesh.y==L,md.mesh.vertexonbase))))[0]44 # posx2=find(md.mesh.x==max(md.mesh.x) & ~(md.mesh.y==0. & md.mesh.vertexonbase) & ~(md.mesh.y==L & md.mesh.vertexonbase)) ;45 posx2=n umpy.nonzero(logical_and_n(md.mesh.x==numpy.max(md.mesh.x),numpy.logical_not(numpy.logical_and(md.mesh.y==0.,md.mesh.vertexonbase)),numpy.logical_not(numpy.logical_and(md.mesh.y==L,md.mesh.vertexonbase))))[0]41 # posx=find(md.mesh.x==0. & ~(md.mesh.y==0. & md.mesh.vertexonbase) & ~(md.mesh.y==L & md.mesh.vertexonbase)) 42 posx=np.where(np.logical_and.reduce((md.mesh.x==0.,np.logical_not(np.logical_and(md.mesh.y==0.,md.mesh.vertexonbase)),np.logical_not(np.logical_and(md.mesh.y==L,md.mesh.vertexonbase)))))[0] 43 # posx2=find(md.mesh.x==max(md.mesh.x) & ~(md.mesh.y==0. & md.mesh.vertexonbase) & ~(md.mesh.y==L & md.mesh.vertexonbase)) 44 posx2=np.where(np.logical_and.reduce((md.mesh.x==np.max(md.mesh.x),np.logical_not(np.logical_and(md.mesh.y==0.,md.mesh.vertexonbase)),np.logical_not(np.logical_and(md.mesh.y==L,md.mesh.vertexonbase)))))[0] 46 45 47 posy=n umpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0] #Don't take the same nodes two times48 posy2=n umpy.nonzero(logical_and_n(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]46 posy=np.where(np.logical_and.reduce((md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0] #Don't take the same nodes two times 47 posy2=np.where(np.logical_and.reduce((md.mesh.y==np.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x))))[0] 49 48 50 md.stressbalance.vertex_pairing=n umpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))49 md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T)) 51 50 52 51 #Add spc on the corners 53 pos=n umpy.nonzero(logical_and_n(numpy.logical_or(md.mesh.x==0.,md.mesh.x==L),numpy.logical_or(md.mesh.y==0.,md.mesh.y==L),md.mesh.vertexonbase))52 pos=np.where(np.logical_and.reduce((np.logical_or(md.mesh.x==0.,md.mesh.x==L),np.logical_or(md.mesh.y==0.,md.mesh.y==L),md.mesh.vertexonbase))) 54 53 md.stressbalance.spcvy[:]=0. 55 54 md.stressbalance.spcvx[pos]=0. … … 68 67 69 68 #Spc the bed at zero for vz 70 pos=n umpy.nonzero(md.mesh.vertexonbase)69 pos=np.where(md.mesh.vertexonbase) 71 70 md.stressbalance.spcvz[pos]=0. 72 71 73 72 #Compute the stressbalance 74 md.cluster=generic('name', oshostname(),'np',8)73 md.cluster=generic('name',gethostname(),'np',8) 75 74 md=solve(md,'Stressbalance') 76 75 … … 80 79 vz=md.results.StressbalanceSolution.Vz 81 80 results.append(md.results.StressbalanceSolution) 82 minvx.append(n umpy.min(vx[-md.mesh.numberofvertices2d:]))83 maxvx.append(n umpy.max(vx[-md.mesh.numberofvertices2d:]))81 minvx.append(np.min(vx[-md.mesh.numberofvertices2d:])) 82 maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:])) 84 83 85 84 #Now plot vx, vy, vz and vx on a cross section … … 88 87 pass 89 88 # set(gcf,'Color','w') 90 # printmodel(['ismipdHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;89 # printmodel(['ismipdHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 91 90 # shutil.move("ismipdHOvx%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD') 92 91 # plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',3) … … 94 93 pass 95 94 # set(gcf,'Color','w') 96 # printmodel(['ismipdHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;95 # printmodel(['ismipdHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 97 96 # shutil.move("ismipdHOvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD') 98 97 … … 124 123 pass 125 124 # set(gcf,'Color','w') 126 # printmodel(['ismipdHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;125 # printmodel(['ismipdHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 127 126 # shutil.move("ismipdHOvxsec%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD') 128 127 129 128 #Now plot the min and max values of vx for each size of the square 130 #plot([5 10 20 40 80 160],minvx) ;ylim([2 18]);xlim([0 160])129 #plot([5 10 20 40 80 160],minvx)ylim([2 18])xlim([0 160]) 131 130 if printingflag: 132 131 pass 133 132 # set(gcf,'Color','w') 134 # printmodel('ismipdHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;133 # printmodel('ismipdHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 135 134 # shutil.move('ismipdHOminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD') 136 #plot([5 10 20 40 80 160],maxvx) ;ylim([0 300]);xlim([0 160])135 #plot([5 10 20 40 80 160],maxvx)ylim([0 300])xlim([0 160]) 137 136 if printingflag: 138 137 pass 139 138 # set(gcf,'Color','w') 140 # printmodel('ismipdHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') ;139 # printmodel('ismipdHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off') 141 140 # shutil.move('ismipdHOmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD') 142 141 143 142 #Fields and tolerances to track changes 144 field_names =[\ 145 'Vx5km','Vy5km','Vz5km',\ 146 'Vx10km','Vy10km','Vz10km',\ 147 'Vx20km','Vy20km','Vz20km',\ 148 'Vx40km','Vy40km','Vz40km',\ 149 'Vx80km','Vy80km','Vz80km',\ 150 'Vx160km','Vy160km','Vz160km' 151 ] 152 field_tolerances=[\ 153 1e-07,1e-08,1e-06,\ 154 1e-08,1e-08,1e-06,\ 155 1e-08,1e-08,1e-07,\ 156 1e-08,1e-08,1e-07,\ 157 1e-08,1e-08,1e-07,\ 158 1e-07,1e-08,1e-06,\ 159 ] 143 field_names =['Vx80km','Vy80km','Vz80km'] 144 field_tolerances=[1e-08,1e-08,1e-07] 160 145 field_values=[] 161 146 for result in results: 162 field_values=field_values+[\ 163 result.Vx,\ 164 result.Vy,\ 165 result.Vz,\ 166 ] 147 field_values=field_values+[result.Vx,result.Vy,result.Vz] -
issm/trunk-jpl/test/NightlyRun/test1108.py
r21060 r21408 1 1 #Test Name: ISMIPDFS 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from bamg import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 from PythonFuncs import * 11 12 … … 15 16 """ 16 17 17 L_list=[ 5000.,10000.,20000.,40000.,80000.,160000.]18 L_list=[80000.] 18 19 results=[] 19 20 … … 30 31 31 32 #We need one grd on dirichlet: the 4 corners are set to zero 32 md.stressbalance.spcvx=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))33 md.stressbalance.spcvy=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))34 md.stressbalance.spcvz=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))33 md.stressbalance.spcvx=float('NaN')*np.ones((md.mesh.numberofvertices)) 34 md.stressbalance.spcvy=float('NaN')*np.ones((md.mesh.numberofvertices)) 35 md.stressbalance.spcvz=float('NaN')*np.ones((md.mesh.numberofvertices)) 35 36 36 pos=n umpy.nonzero(logical_and_n(md.mesh.vertexonbase,numpy.logical_or(md.mesh.x==0.,md.mesh.x==numpy.max(md.mesh.x)),numpy.logical_or(md.mesh.y==0.,md.mesh.y==numpy.max(md.mesh.y))))37 pos=np.nonzero(logical_and.reduce_n(md.mesh.vertexonbase,np.logical_or.reduce(md.mesh.x==0.,md.mesh.x==np.max(md.mesh.x)),np.logical_or.reduce(md.mesh.y==0.,md.mesh.y==np.max(md.mesh.y)))) 37 38 md.stressbalance.spcvx[pos]=0. 38 39 md.stressbalance.spcvy[pos]=0. … … 40 41 41 42 #Create MPCs to have periodic boundary conditions 42 posx=n umpy.nonzero(md.mesh.x==0.)[0]43 posx2=n umpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0]43 posx=np.nonzero(md.mesh.x==0.)[0] 44 posx2=np.nonzero(md.mesh.x==np.max(md.mesh.x))[0] 44 45 45 posy=n umpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0] #Don't take the same nodes two times46 posy2=n umpy.nonzero(logical_and_n(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]46 posy=np.nonzero(logical_and.reduce_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x)))[0] #Don't take the same nodes two times 47 posy2=np.nonzero(logical_and.reduce_n(md.mesh.y==np.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x)))[0] 47 48 48 md.stressbalance.vertex_pairing=n umpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))49 md.stressbalance.vertex_pairing=np.vstack((np.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),np.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1)))) 49 50 50 51 #Compute the stressbalance 51 md.cluster=generic('name', oshostname(),'np',8)52 md.cluster=generic('name',gethostname(),'np',8) 52 53 md.verbose=verbose('convergence',True) 53 54 md=solve(md,'Stressbalance') 54 55 md.stressbalance.reltol=float('NaN') 55 56 md.stressbalance.abstol=float('NaN') 56 md.stressbalance.vertex_pairing=n umpy.empty((0,2))57 md.stressbalance.vertex_pairing=np.empty((0,2)) 57 58 #We need one grid on dirichlet: the 4 corners are set to zero 58 md.stressbalance.spcvx=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))59 md.stressbalance.spcvy=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))60 md.stressbalance.spcvz=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))61 pos=n umpy.nonzero(logical_or_n(md.mesh.y==0.,md.mesh.x==0.,md.mesh.x==numpy.max(md.mesh.x),md.mesh.y==numpy.max(md.mesh.y))) #Don't take the same nodes two times59 md.stressbalance.spcvx=float('NaN')*np.ones((md.mesh.numberofvertices)) 60 md.stressbalance.spcvy=float('NaN')*np.ones((md.mesh.numberofvertices)) 61 md.stressbalance.spcvz=float('NaN')*np.ones((md.mesh.numberofvertices)) 62 pos=np.nonzero(logical_or.reduce_n(md.mesh.y==0.,md.mesh.x==0.,md.mesh.x==np.max(md.mesh.x),md.mesh.y==np.max(md.mesh.y))) #Don't take the same nodes two times 62 63 md.stressbalance.spcvx[pos]=md.results.StressbalanceSolution.Vx[pos] 63 64 md.stressbalance.spcvy[pos]=md.results.StressbalanceSolution.Vy[pos] … … 74 75 75 76 #Fields and tolerances to track changes 76 field_names =[\ 77 'Vx5km','Vy5km','Vz5km',\ 78 'Vx10km','Vy10km','Vz10km',\ 79 'Vx20km','Vy20km','Vz20km',\ 80 'Vx40km','Vy40km','Vz40km',\ 81 'Vx80km','Vy80km','Vz80km',\ 82 'Vx160km','Vy160km','Vz160km' 83 ] 84 field_tolerances=[\ 85 1e-07,1e-07,1e-07,\ 86 1e-08,1e-08,1e-08,\ 87 1e-08,1e-07,1e-07,\ 88 1e-08,1e-08,1e-08,\ 89 1e-08,1e-07,1e-07,\ 90 1e-07,1e-06,1e-07,\ 91 ] 77 field_names =['Vx80km','Vy80km','Vz80km'] 78 field_tolerances=[1e-08,1e-07,1e-07] 92 79 field_values=[] 93 80 for result in results: -
issm/trunk-jpl/test/NightlyRun/test111.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedTranHO 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',200000) … … 13 14 md.extrude(3,1.) 14 15 md=setflowequation(md,'HO','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.transient.requested_outputs=['IceVolume'] 17 18 md=solve(md,'Transient') -
issm/trunk-jpl/test/NightlyRun/test112.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedSurfSlop2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000) … … 12 13 md=parameterize(md,'../Par/SquareShelfConstrained.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md=solve(md,'SurfaceSlope') 16 17 -
issm/trunk-jpl/test/NightlyRun/test113.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedSurfSlope3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000) … … 13 14 md.extrude(5,1.) 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'SurfaceSlope') 17 18 -
issm/trunk-jpl/test/NightlyRun/test114.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedBedSlop2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000) … … 12 13 md=parameterize(md,'../Par/SquareShelfConstrained.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md=solve(md,'BedSlope') 16 17 -
issm/trunk-jpl/test/NightlyRun/test115.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedBedSlop3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000) … … 13 14 md.extrude(5,1.) 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'BedSlope') 17 18 -
issm/trunk-jpl/test/NightlyRun/test116.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedBalThic2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000) … … 13 14 md=parameterize(md,'../Par/SquareShelfConstrained.py') 14 15 #Add boundary conditions on thickness on the border 15 pos=n umpy.nonzero(md.mesh.vertexonboundary)16 pos=np.nonzero(md.mesh.vertexonboundary) 16 17 md.balancethickness.spcthickness[pos]=md.geometry.thickness[pos] 17 18 md=setflowequation(md,'SSA','all') 18 md.cluster=generic('name', oshostname(),'np',3)19 md.cluster=generic('name',gethostname(),'np',3) 19 20 md=solve(md,'Balancethickness') 20 21 -
issm/trunk-jpl/test/NightlyRun/test119.py
r19049 r21408 1 1 #Test Name: SquareBamgMesh 2 import numpy 2 import numpy as np 3 3 import time 4 4 from model import * 5 from socket import gethostname 5 6 from bamg import * 6 from MatlabFuncs import * 7 7 8 8 9 #Simple mesh … … 12 13 13 14 #hVertices 14 md=bamg(model(),'domain','../Exp/Square.exp','hmax',300000.,'hVertices',n umpy.array([10000.,100000.,400000.,100000.]).reshape(-1,1),'rand',False)15 md=bamg(model(),'domain','../Exp/Square.exp','hmax',300000.,'hVertices',np.array([10000.,100000.,400000.,100000.]).reshape(-1,1),'rand',False) 15 16 x2=md.mesh.x 16 17 y2=md.mesh.y -
issm/trunk-jpl/test/NightlyRun/test120.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedEnthalpyStea 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',180000) … … 15 16 md=setflowequation(md,'SSA','all') 16 17 md.timestepping.time_step=0 17 md.initialization.waterfraction=n umpy.zeros(md.mesh.numberofvertices)18 md.initialization.watercolumn=n umpy.zeros(md.mesh.numberofvertices)19 md.thermal.isenthalpy = 1 ;20 md.thermal.isdynamicbasalspc = 1 ;18 md.initialization.waterfraction=np.zeros(md.mesh.numberofvertices) 19 md.initialization.watercolumn=np.zeros(md.mesh.numberofvertices) 20 md.thermal.isenthalpy = 1 21 md.thermal.isdynamicbasalspc = 1 21 22 22 md.cluster=generic('name', oshostname(),'np',3)23 md.cluster=generic('name',gethostname(),'np',3) 23 24 md=solve(md,'Thermal') 24 25 … … 26 27 field_names =['Enthalpy','Waterfraction','Temperature'] 27 28 field_tolerances=[1e-13,2e-10,1e-13] 28 field_values=[\ 29 md.results.ThermalSolution.Enthalpy,\ 30 md.results.ThermalSolution.Waterfraction,\ 31 md.results.ThermalSolution.Temperature,\ 32 ] 29 field_values=[md.results.ThermalSolution.Enthalpy, 30 md.results.ThermalSolution.Waterfraction, 31 md.results.ThermalSolution.Temperature] -
issm/trunk-jpl/test/NightlyRun/test1201.py
r21060 r21408 1 1 #Test Name: EISMINTMassConservation 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from bamg import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 """ … … 14 15 15 16 printingflag=False 16 17 17 results=[] 18 18 … … 24 24 md.smb.mass_balance[:]=0. 25 25 md=setflowequation(md,'SSA','all') 26 md.cluster=generic('name', oshostname(),'np',8)26 md.cluster=generic('name',gethostname(),'np',8) 27 27 28 28 print " initial velocity" 29 md.initialization.vx=n umpy.zeros((md.mesh.numberofvertices,1))30 md.initialization.vy=-400.*n umpy.ones((md.mesh.numberofvertices,1))29 md.initialization.vx=np.zeros((md.mesh.numberofvertices)) 30 md.initialization.vy=-400.*np.ones((md.mesh.numberofvertices)) 31 31 32 32 #Stabilization … … 37 37 38 38 #spc thickness 39 pos=n umpy.nonzero(md.mesh.y>199999.9)[0]40 times=n umpy.arange(0,501)41 md.masstransport.spcthickness=float('NaN')*n umpy.ones((md.mesh.numberofvertices+1,numpy.size(times)))39 pos=np.where(md.mesh.y>199999.9)[0] 40 times=np.arange(0,501) 41 md.masstransport.spcthickness=float('NaN')*np.ones((md.mesh.numberofvertices+1,np.size(times))) 42 42 md.masstransport.spcthickness[-1,:]=times 43 md.masstransport.spcthickness[pos,:]= numpy.tile(500.+100.*numpy.sin(2.*numpy.pi*times/200.),(numpy.size(pos),1))43 md.masstransport.spcthickness[pos,:]=500.+100.*np.sin(2.*np.pi*times/200.) 44 44 if stabilization==3: 45 pos=n umpy.nonzero(numpy.isnan(md.masstransport.spcthickness))45 pos=np.nonzero(np.isnan(md.masstransport.spcthickness)) 46 46 md.masstransport.spcthickness[pos]=500. #No NaN for DG 47 47 … … 54 54 55 55 #plot results 56 #[elements,x,y,z,s,h1]=SectionValues(md,results[0],'../Exp/CrossLineEISMINT.exp',100.) ;57 #[elements,x,y,z,s,h2]=SectionValues(md,results[1],'../Exp/CrossLineEISMINT.exp',100.) ;58 #[elements,x,y,z,s,h3]=SectionValues(md,results[2],'../Exp/CrossLineEISMINT.exp',100.) ;59 #[elements,x,y,z,s,hth]=SectionValues(md, 500+100*sin(2*pi/200*(500-md.mesh.y/400)),'../Exp/CrossLineEISMINT.exp',100.) ;56 #[elements,x,y,z,s,h1]=SectionValues(md,results[0],'../Exp/CrossLineEISMINT.exp',100.) 57 #[elements,x,y,z,s,h2]=SectionValues(md,results[1],'../Exp/CrossLineEISMINT.exp',100.) 58 #[elements,x,y,z,s,h3]=SectionValues(md,results[2],'../Exp/CrossLineEISMINT.exp',100.) 59 #[elements,x,y,z,s,hth]=SectionValues(md, 500+100*sin(2*pi/200*(500-md.mesh.y/400)),'../Exp/CrossLineEISMINT.exp',100.) 60 60 #plot(s,h1,'r',s,h2,'b',s,h3,'g',s,hth,'k') 61 61 #legend('Art. diff.','No Art. diff.','D.G.','Theoretical') … … 63 63 pass 64 64 # set(gcf,'Color','w') 65 # export_fig([issmdir() '/website/doc_pdf/validation/Images/EISMINT/IceShelf/eismintmasscthickness.pdf']) ;65 # export_fig([issmdir() '/website/doc_pdf/validation/Images/EISMINT/IceShelf/eismintmasscthickness.pdf']) 66 66 67 67 #Fields and tolerances to track changes 68 field_names =[ \ 69 'ThicknessArtDiff','ThicknessNoArtDiff','ThicknessDG' \ 70 ] 71 field_tolerances=[\ 72 1e-13, 1e-13, 1e-13\ 73 ] 74 field_values=[ 75 results[0], \ 76 results[1], \ 77 results[2], \ 78 ] 68 field_names =['ThicknessArtDiff','ThicknessNoArtDiff','ThicknessDG'] 69 field_tolerances=[1e-13, 1e-13, 1e-13] 70 field_values=[results[0],results[1],results[2]] -
issm/trunk-jpl/test/NightlyRun/test1202.py
r21060 r21408 1 1 #Test Name: EISMINTStress1 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 """ … … 23 24 24 25 #Compute solution for SSA's model 25 md.cluster=generic('name', oshostname(),'np',8)26 md.cluster=generic('name',gethostname(),'np',8) 26 27 md=solve(md,'Stressbalance') 27 28 … … 35 36 pass 36 37 # set(gcf,'Color','w') 37 # printmodel('eismintdiag1vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off') ;38 # system(['mv eismintdiag1vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']) ;38 # printmodel('eismintdiag1vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off') 39 # system(['mv eismintdiag1vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']) 39 40 40 41 #plotmodel(md,'data',vy,'contourlevels',{-100,-200,-300,-400,-500,-600,-700,-800,-900,-1000},... … … 43 44 pass 44 45 # set(gcf,'Color','w') 45 # printmodel('eismintdiag1vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off') ;46 # system(['mv eismintdiag1vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']) ;46 # printmodel('eismintdiag1vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off') 47 # system(['mv eismintdiag1vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']) 47 48 48 49 #Fields and tolerances to track changes 49 50 field_names =['Vx','Vy'] 50 51 field_tolerances=[1e-13,1e-13] 51 field_values=[\ 52 vx, \ 53 vy, \ 54 ] 52 field_values=[vx,vy] -
issm/trunk-jpl/test/NightlyRun/test1203.py
r21060 r21408 1 1 #Test Name: EISMINTStress2 2 import numpy 2 import numpy as np 3 3 import sys 4 4 from model import * 5 from socket import gethostname 5 6 from triangle import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 """ … … 24 25 25 26 #Impose a non zero velocity on the upper boundary condition (y=max(y)) 26 pos=numpy.nonzero(md.mesh.y==numpy.max(md.mesh.y)) 27 md.stressbalance.spcvy[pos]=400.*(((md.mesh.x[pos].reshape(-1,1)-100000.)/25000.)**2-numpy.ones((numpy.size(pos),1)))*heaviside((1.+sys.float_info.epsilon)*numpy.ones((numpy.size(pos),1))-((md.mesh.x[pos].reshape(-1,1)-100000.)/25000.)**2) 27 pos=np.where(md.mesh.y==np.max(md.mesh.y)) 28 heavyside=np.where(np.logical_and(md.mesh.y==np.max(md.mesh.y),((1.+sys.float_info.epsilon)*np.ones((np.size(md.mesh.y)))-((md.mesh.x-100000.)/25000.)**2)>0)) 29 md.stressbalance.spcvy[pos]=np.zeros((np.size(pos))) 30 md.stressbalance.spcvy[heavyside]=400.*(((md.mesh.x[heavyside]-100000.)/25000.)**2-np.ones((np.size(heavyside)))) 28 31 29 32 #Compute solution for SSA's model 30 md.cluster=generic('name', oshostname(),'np',8)33 md.cluster=generic('name',gethostname(),'np',8) 31 34 md=solve(md,'Stressbalance') 32 35 … … 40 43 pass 41 44 # set(gcf,'Color','w') 42 # printmodel('eismintdiag2vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off') ;43 # system(['mv eismintdiag2vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']) ;45 # printmodel('eismintdiag2vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off') 46 # system(['mv eismintdiag2vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']) 44 47 #plotmodel(md,'data',vy,'contourlevels',{-100,-200,-300,-400,-500,-600,-700,-800,-900,-1000},... 45 48 # 'contourcolor','k') … … 47 50 pass 48 51 # set(gcf,'Color','w') 49 # printmodel('eismintdiag2vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off') ;50 # system(['mv eismintdiag2vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']) ;52 # printmodel('eismintdiag2vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off') 53 # system(['mv eismintdiag2vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']) 51 54 52 55 #Fields and tolerances to track changes 53 56 field_names =['Vx','Vy'] 54 57 field_tolerances=[1e-13,1e-13] 55 field_values=[\ 56 vx, \ 57 vy, \ 58 ] 58 field_values=[vx,vy] -
issm/trunk-jpl/test/NightlyRun/test1204.py
r21060 r21408 1 1 #Test Name: EISMINTTran2 2 import numpy 2 import numpy as np 3 3 import sys 4 4 from model import * 5 from socket import gethostname 5 6 from triangle import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 """ … … 24 25 25 26 #Impose a non zero velocity on the upper boundary condition (y=max(y)) 26 pos=numpy.nonzero(md.mesh.y==max(md.mesh.y)) 27 md.stressbalance.spcvy[pos]=400.*(((md.mesh.x[pos].reshape(-1,1)-100000.)/25000.)**2-numpy.ones((numpy.size(pos),1)))*heaviside((1.+sys.float_info.epsilon)*numpy.ones((numpy.size(pos),1))-((md.mesh.x[pos].reshape(-1,1)-100000.)/25000.)**2) 27 pos=np.where(md.mesh.y==np.max(md.mesh.y)) 28 heavyside=np.where(np.logical_and(md.mesh.y==np.max(md.mesh.y),((1.+sys.float_info.epsilon)*np.ones((np.size(md.mesh.y)))-((md.mesh.x-100000.)/25000.)**2)>0)) 29 md.stressbalance.spcvy[pos]=np.zeros((np.size(pos))) 30 md.stressbalance.spcvy[heavyside]=400.*(((md.mesh.x[heavyside]-100000.)/25000.)**2-np.ones((np.size(heavyside)))) 28 31 29 32 #Compute solution for SSA's model 30 md.cluster=generic('name', oshostname(),'np',8)33 md.cluster=generic('name',gethostname(),'np',8) 31 34 md=solve(md,'Stressbalance') 32 35 … … 44 47 pass 45 48 # set(gcf,'Color','w') 46 # printmodel('eisminttrans2vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off') ;47 # system(['mv eisminttrans2vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']) ;49 # printmodel('eisminttrans2vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off') 50 # system(['mv eisminttrans2vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']) 48 51 49 52 #plotmodel(md,'data',(md.results.TransientSolution(end).Vy)) … … 51 54 pass 52 55 # set(gcf,'Color','w') 53 # printmodel('eisminttrans2vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off') ;54 # system(['mv eisminttrans2vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']) ;56 # printmodel('eisminttrans2vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off') 57 # system(['mv eisminttrans2vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']) 55 58 56 59 #plotmodel(md,'data',(md.results.TransientSolution(end).Thickness)) … … 58 61 pass 59 62 # set(gcf,'Color','w') 60 # printmodel('eisminttrans2thickness','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off') ;61 # system(['mv eisminttrans2thickness.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']) ;63 # printmodel('eisminttrans2thickness','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off') 64 # system(['mv eisminttrans2thickness.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']) 62 65 63 66 #Fields and tolerances to track changes 64 67 field_names =['Vx','Vy','Thickness'] 65 68 field_tolerances=[1e-13,1e-13,1e-13] 66 field_values=[\ 67 md.results.TransientSolution[-1].Vx, \ 68 md.results.TransientSolution[-1].Vy, \ 69 md.results.TransientSolution[-1].Thickness, \ 70 ] 69 field_values=[md.results.TransientSolution[-1].Vx, 70 md.results.TransientSolution[-1].Vy, 71 md.results.TransientSolution[-1].Thickness] -
issm/trunk-jpl/test/NightlyRun/test1205.py
r21060 r21408 1 1 #Test Name: EISMINTRoundIceSheetStaticSIA 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from roundmesh import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 """ … … 28 29 vx_obs=constant/2.*md.mesh.x*(md.geometry.thickness)**-1 29 30 vy_obs=constant/2.*md.mesh.y*(md.geometry.thickness)**-1 30 vel_obs=n umpy.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)31 vel_obs=np.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2) 31 32 32 33 #We extrude the model to have a 3d model 33 md.extrude(numlayers,1.) ;34 md.extrude(numlayers,1.) 34 35 md=setflowequation(md,'SIA','all') 35 36 36 37 #Spc the nodes on the bed 37 pos=n umpy.nonzero(md.mesh.vertexonbase)38 pos=np.where(md.mesh.vertexonbase) 38 39 md.stressbalance.spcvx[pos]=0. 39 40 md.stressbalance.spcvy[pos]=0. … … 41 42 42 43 #Now we can solve the problem 43 md.cluster=generic('name', oshostname(),'np',8)44 md.cluster=generic('name',gethostname(),'np',8) 44 45 md=solve(md,'Stressbalance') 45 46 … … 47 48 vx=md.results.StressbalanceSolution.Vx 48 49 vy=md.results.StressbalanceSolution.Vy 49 vel=n umpy.zeros((md.mesh.numberofvertices2d,1))50 vel=np.zeros((md.mesh.numberofvertices2d)) 50 51 51 52 for i in xrange(0,md.mesh.numberofvertices2d): 52 53 node_vel=0. 53 54 for j in xrange(0,md.mesh.numberoflayers-1): 54 node_vel=node_vel+1./(2.*(md.mesh.numberoflayers-1))*\ 55 (numpy.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+\ 56 numpy.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2)) 57 vel[i,0]=node_vel 55 node_vel=node_vel+1./(2.*(md.mesh.numberoflayers-1))*(np.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+np.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2)) 56 vel[i]=node_vel 58 57 59 58 #Plot of the velocity from the exact and calculated solutions … … 62 61 #subplot(2,2,1) 63 62 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',... 64 #vel,'FaceColor','interp','EdgeColor','none') ;63 #vel,'FaceColor','interp','EdgeColor','none') 65 64 #title('Modelled velocity','FontSize',14,'FontWeight','bold') 66 #colorbar ;67 #caxis([0 200]) ;65 #colorbar 66 #caxis([0 200]) 68 67 69 68 #subplot(2,2,2) 70 69 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',... 71 #vel_obs,'FaceColor','interp','EdgeColor','none') ;70 #vel_obs,'FaceColor','interp','EdgeColor','none') 72 71 #title('Analytical velocity','FontSize',14,'FontWeight','bold') 73 #colorbar ;74 #caxis([0 200]) ;72 #colorbar 73 #caxis([0 200]) 75 74 76 75 #subplot(2,2,3) 77 #hold on ;78 #plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.') ;79 #plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.') ;80 #title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold') ;81 #xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold') ;82 #ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold') ;83 #legend('calculated velocity','exact velocity') ;84 #axis([0 750000 0 200]) ;85 #hold off ;76 #hold on 77 #plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.') 78 #plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.') 79 #title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold') 80 #xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold') 81 #ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold') 82 #legend('calculated velocity','exact velocity') 83 #axis([0 750000 0 200]) 84 #hold off 86 85 87 86 #subplot(2,2,4) 88 87 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',... 89 #abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none') ;88 #abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none') 90 89 #title('Relative misfit [%]','FontSize',14,'FontWeight','bold') 91 #colorbar ;92 #caxis([0 100]) ;90 #colorbar 91 #caxis([0 100]) 93 92 94 93 if printingflag: 95 94 pass 96 95 # set(gcf,'Color','w') 97 # printmodel('SIAstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off') ;98 # system(['mv SIAstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet']) ;96 # printmodel('SIAstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off') 97 # system(['mv SIAstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet']) 99 98 100 99 #Fields and tolerances to track changes 101 field_names =[ \ 102 'Vx','Vy','Vel', \ 103 ] 104 field_tolerances=[ \ 105 1e-13,1e-13,1e-13, \ 106 ] 107 field_values=[ \ 108 vx,vy,vel, \ 109 ] 100 field_names =['Vx','Vy','Vel'] 101 field_tolerances=[1e-13,1e-13,1e-13] 102 field_values=[vx,vy,vel] -
issm/trunk-jpl/test/NightlyRun/test1206.py
r21060 r21408 1 1 #Test Name: EISMINTRoundIceSheetStaticHO 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from roundmesh import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 """ … … 26 27 #Calculation of the analytical 2d velocity field 27 28 constant=0.3 28 vx_obs=constant/2.*md.mesh.x .reshape(-1,1)*(md.geometry.thickness)**-129 vy_obs=constant/2.*md.mesh.y .reshape(-1,1)*(md.geometry.thickness)**-130 vel_obs=n umpy.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)29 vx_obs=constant/2.*md.mesh.x*(md.geometry.thickness)**-1 30 vy_obs=constant/2.*md.mesh.y*(md.geometry.thickness)**-1 31 vel_obs=np.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2) 31 32 32 33 #We extrude the model to have a 3d model … … 35 36 36 37 #Spc the nodes on the bed 37 pos=n umpy.nonzero(md.mesh.vertexonbase)38 pos=np.where(md.mesh.vertexonbase) 38 39 md.stressbalance.spcvx[pos]=0. 39 40 md.stressbalance.spcvy[pos]=0. … … 41 42 42 43 #Now we can solve the problem 43 md.cluster=generic('name', oshostname(),'np',8)44 md.cluster=generic('name',gethostname(),'np',8) 44 45 md=solve(md,'Stressbalance') 45 46 … … 47 48 vx=md.results.StressbalanceSolution.Vx 48 49 vy=md.results.StressbalanceSolution.Vy 49 vel=n umpy.zeros((md.mesh.numberofvertices2d,1))50 vel=np.zeros((md.mesh.numberofvertices2d)) 50 51 51 52 for i in xrange(0,md.mesh.numberofvertices2d): … … 53 54 for j in xrange(0,md.mesh.numberoflayers-1): 54 55 node_vel=node_vel+1./(2.*(md.mesh.numberoflayers-1))*\ 55 (n umpy.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+\56 n umpy.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2))57 vel[i ,0]=node_vel56 (np.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+\ 57 np.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2)) 58 vel[i]=node_vel 58 59 59 60 #Plot of the velocity from the exact and calculated solutions … … 61 62 #subplot(2,2,1) 62 63 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',... 63 #vel,'FaceColor','interp','EdgeColor','none') ;64 #vel,'FaceColor','interp','EdgeColor','none') 64 65 #title('Modelled velocity','FontSize',14,'FontWeight','bold') 65 #colorbar ;66 #caxis([0 200]) ;66 #colorbar 67 #caxis([0 200]) 67 68 68 69 #subplot(2,2,2) 69 70 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',... 70 #vel_obs,'FaceColor','interp','EdgeColor','none') ;71 #vel_obs,'FaceColor','interp','EdgeColor','none') 71 72 #title('Analytical velocity','FontSize',14,'FontWeight','bold') 72 #colorbar ;73 #caxis([0 200]) ;73 #colorbar 74 #caxis([0 200]) 74 75 75 76 #subplot(2,2,3) 76 #hold on ;77 #plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.') ;78 #plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.') ;79 #title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold') ;80 #xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold') ;81 #ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold') ;82 #legend('calculated velocity','exact velocity') ;83 #axis([0 750000 0 200]) ;84 #hold off ;77 #hold on 78 #plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.') 79 #plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.') 80 #title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold') 81 #xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold') 82 #ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold') 83 #legend('calculated velocity','exact velocity') 84 #axis([0 750000 0 200]) 85 #hold off 85 86 86 87 #subplot(2,2,4) 87 88 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',... 88 #abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none') ;89 #abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none') 89 90 #title('Relative misfit [%]','FontSize',14,'FontWeight','bold') 90 #colorbar ;91 #caxis([0 100]) ;91 #colorbar 92 #caxis([0 100]) 92 93 93 94 if printingflag: 94 95 pass 95 96 # set(gcf,'Color','w') 96 # printmodel('HOstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off') ;97 # system(['mv HOstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet']) ;97 # printmodel('HOstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off') 98 # system(['mv HOstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet']) 98 99 99 100 #Fields and tolerances to track changes 100 field_names =[ \ 101 'Vx','Vy','Vel', \ 102 ] 103 field_tolerances=[ \ 104 1e-12,1e-12,1e-12, \ 105 ] 106 field_values=[ \ 107 vx,vy,vel, \ 108 ] 101 field_names =['Vx','Vy','Vel'] 102 field_tolerances=[1e-12,1e-12,1e-12] 103 field_values=[vx,vy,vel] -
issm/trunk-jpl/test/NightlyRun/test1207.py
r21060 r21408 1 1 #Test Name: EISMINTRoundIceSheetStaticFS 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from roundmesh import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 """ … … 26 27 #Calculation of the analytical 2d velocity field 27 28 constant=0.3 28 vx_obs=constant/2.*md.mesh.x .reshape(-1,1)*(md.geometry.thickness)**-129 vy_obs=constant/2.*md.mesh.y .reshape(-1,1)*(md.geometry.thickness)**-130 vel_obs=n umpy.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)29 vx_obs=constant/2.*md.mesh.x*(md.geometry.thickness)**-1 30 vy_obs=constant/2.*md.mesh.y*(md.geometry.thickness)**-1 31 vel_obs=np.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2) 31 32 32 33 #We extrude the model to have a 3d model … … 35 36 36 37 #Spc the nodes on the bed 37 pos=n umpy.nonzero(md.mesh.vertexonbase)38 pos=np.where(md.mesh.vertexonbase) 38 39 md.stressbalance.spcvx[pos]=0. 39 40 md.stressbalance.spcvy[pos]=0. … … 41 42 42 43 #Now we can solve the problem 43 md.cluster=generic('name', oshostname(),'np',8)44 md.cluster=generic('name',gethostname(),'np',8) 44 45 md=solve(md,'Stressbalance') 45 46 … … 47 48 vx=md.results.StressbalanceSolution.Vx 48 49 vy=md.results.StressbalanceSolution.Vy 49 vel=n umpy.zeros((md.mesh.numberofvertices2d,1))50 vel=np.zeros((md.mesh.numberofvertices2d)) 50 51 51 52 for i in xrange(0,md.mesh.numberofvertices2d): … … 53 54 for j in xrange(0,md.mesh.numberoflayers-1): 54 55 node_vel=node_vel+1./(2.*(md.mesh.numberoflayers-1))*\ 55 (n umpy.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+\56 n umpy.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2))57 vel[i ,0]=node_vel56 (np.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+\ 57 np.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2)) 58 vel[i]=node_vel 58 59 59 60 #Plot of the velocity from the exact and calculated solutions … … 61 62 #subplot(2,2,1) 62 63 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',... 63 #vel,'FaceColor','interp','EdgeColor','none') ;64 #vel,'FaceColor','interp','EdgeColor','none') 64 65 #title('Modelled velocity','FontSize',14,'FontWeight','bold') 65 #colorbar ;66 #caxis([0 200]) ;66 #colorbar 67 #caxis([0 200]) 67 68 68 69 #subplot(2,2,2) 69 70 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',... 70 #vel_obs,'FaceColor','interp','EdgeColor','none') ;71 #vel_obs,'FaceColor','interp','EdgeColor','none') 71 72 #title('Analytical velocity','FontSize',14,'FontWeight','bold') 72 #colorbar ;73 #caxis([0 200]) ;73 #colorbar 74 #caxis([0 200]) 74 75 75 76 #subplot(2,2,3) 76 #hold on ;77 #plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.') ;78 #plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.') ;79 #title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold') ;80 #xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold') ;81 #ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold') ;82 #legend('calculated velocity','exact velocity') ;83 #axis([0 750000 0 200]) ;84 #hold off ;77 #hold on 78 #plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.') 79 #plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.') 80 #title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold') 81 #xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold') 82 #ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold') 83 #legend('calculated velocity','exact velocity') 84 #axis([0 750000 0 200]) 85 #hold off 85 86 86 87 #subplot(2,2,4) 87 88 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',... 88 #abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none') ;89 #abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none') 89 90 #title('Relative misfit [%]','FontSize',14,'FontWeight','bold') 90 #colorbar ;91 #caxis([0 100]) ;91 #colorbar 92 #caxis([0 100]) 92 93 93 94 if printingflag: 94 95 pass 95 96 # set(gcf,'Color','w') 96 # printmodel('FSstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off') ;97 # system(['mv FSstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet']) ;97 # printmodel('FSstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off') 98 # system(['mv FSstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet']) 98 99 99 100 #Fields and tolerances to track changes 100 field_names =[ \ 101 'Vx','Vy','Vel', \ 102 ] 103 field_tolerances=[ \ 104 1e-12,1e-12,1e-12, \ 105 ] 106 field_values=[ \ 107 vx,vy,vel, \ 108 ] 101 field_names =['Vx','Vy','Vel'] 102 field_tolerances=[1e-12,1e-12,1e-12] 103 field_values=[vx,vy,vel] -
issm/trunk-jpl/test/NightlyRun/test1208.py
r21060 r21408 1 1 #Test Name: EISMINTA 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 """ … … 26 27 27 28 #Spc the nodes on the bed 28 pos=n umpy.nonzero(md.mesh.vertexonbase)29 pos=np.where(md.mesh.vertexonbase) 29 30 md.stressbalance.spcvx[pos]=0. 30 31 md.stressbalance.spcvy[pos]=0. … … 39 40 40 41 #Now we can solve the problem 41 md.cluster=generic('name', oshostname(),'np',8)42 md.cluster=generic('name',gethostname(),'np',8) 42 43 md=solve(md,'Transient') 43 44 … … 45 46 field_names =['Vx','Vy','Vz','Vel','Pressure','Thickness','Base','Surface','Temperature','BasalforcingsGroundediceMeltingRate'] 46 47 field_tolerances=[1e-08,1e-08,1e-07,1e-08,1e-08,1e-08,1e-08,1e-08,1e-07,1e-07] 47 field_values=[\ 48 md.results.TransientSolution[-1].Vx,\ 49 md.results.TransientSolution[-1].Vy,\ 50 md.results.TransientSolution[-1].Vz,\ 51 md.results.TransientSolution[-1].Vel,\ 52 md.results.TransientSolution[-1].Pressure,\ 53 md.results.TransientSolution[-1].Thickness,\ 54 md.results.TransientSolution[-1].Base,\ 55 md.results.TransientSolution[-1].Surface,\ 56 md.results.TransientSolution[-1].Temperature,\ 57 md.results.TransientSolution[-1].BasalforcingsGroundediceMeltingRate,\ 58 ] 48 field_values=[md.results.TransientSolution[-1].Vx, 49 md.results.TransientSolution[-1].Vy, 50 md.results.TransientSolution[-1].Vz, 51 md.results.TransientSolution[-1].Vel, 52 md.results.TransientSolution[-1].Pressure, 53 md.results.TransientSolution[-1].Thickness, 54 md.results.TransientSolution[-1].Base, 55 md.results.TransientSolution[-1].Surface, 56 md.results.TransientSolution[-1].Temperature, 57 md.results.TransientSolution[-1].BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test121.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedEnthalpyTran 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000) … … 13 14 md.extrude(3,1.) 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3);16 md.initialization.waterfraction=n umpy.zeros((md.mesh.numberofvertices,1))17 md.initialization.watercolumn=n umpy.zeros((md.mesh.numberofvertices,1))16 md.cluster=generic('name',gethostname(),'np',3) 17 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices)) 18 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices)) 18 19 md.transient.isstressbalance=False 19 20 md.transient.ismasstransport=False -
issm/trunk-jpl/test/NightlyRun/test122.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedTransHOEnth 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',200000) … … 13 14 md.extrude(3,1.) 14 15 md=setflowequation(md,'HO','all') 15 md.initialization.waterfraction=n umpy.zeros((md.mesh.numberofvertices,1))16 md.initialization.watercolumn=n umpy.zeros((md.mesh.numberofvertices,1))16 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices)) 17 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices)) 17 18 md.thermal.isenthalpy=1 18 19 md.thermal.isdynamicbasalspc=1 19 20 md.thermal.stabilization=2 20 md.cluster=generic('name', oshostname(),'np',3)21 md.cluster=generic('name',gethostname(),'np',3) 21 22 md=solve(md,'Transient') 22 23 -
issm/trunk-jpl/test/NightlyRun/test125.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedRestartTranSSA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 from massfluxatgate import massfluxatgate 10 11 from generic import generic … … 15 16 md=parameterize(md,'../Par/SquareShelfConstrained.py') 16 17 md=setflowequation(md,'SSA','all') 17 md.cluster=generic('name', oshostname(),'np',1)18 md.cluster=generic('name',gethostname(),'np',1) 18 19 md.transient.requested_outputs=['IceVolume','TotalSmb'] 19 20 20 md.verbose=verbose('solution',1) ;21 md.verbose=verbose('solution',1) 21 22 md.settings.recording_frequency=5 22 23 … … 29 30 30 31 #Fields and tolerances to track changes 31 field_names =['Vx1','Vy1','Vel1','TotalSmb1','Bed1','Surface1','Thickness1','Volume1','Vx2','Vy2','Vel2','TotalSmb2','Bed2','Surface2','Thickness2','Volume2','Vx3','Vy3','Vel3','TotalSmb3','Bed3','Surface3','Thickness3','Volume3'] ;32 field_names =['Vx1','Vy1','Vel1','TotalSmb1','Bed1','Surface1','Thickness1','Volume1','Vx2','Vy2','Vel2','TotalSmb2','Bed2','Surface2','Thickness2','Volume2','Vx3','Vy3','Vel3','TotalSmb3','Bed3','Surface3','Thickness3','Volume3'] 32 33 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ 33 34 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ -
issm/trunk-jpl/test/NightlyRun/test126.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedRestartTranHO3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 from massfluxatgate import massfluxatgate 10 11 from generic import generic … … 14 15 md=setmask(md,'all','') 15 16 md=parameterize(md,'../Par/SquareShelfConstrained.py') 16 md.cluster=generic('name', oshostname(),'np',1)17 md.cluster=generic('name',gethostname(),'np',1) 17 18 md.transient.requested_outputs=['IceVolume','TotalSmb'] 18 19 md.extrude(3,1.) 19 20 md=setflowequation(md,'HO','all') 20 21 21 md.verbose=verbose('solution',1) ;22 md.verbose=verbose('solution',1) 22 23 md.settings.recording_frequency=5 23 24 … … 30 31 31 32 #Fields and tolerances to track changes 32 field_names =['Vx1','Vy1','Vel1','TotalSmb1','Bed1','Surface1','Thickness1','Volume1','Temperature1','Pressure1','Vx2','Vy2','Vel2','TotalSmb2','Bed2','Surface2','Thickness2','Volume2','Temperature2','Pressure2','Vx3','Vy3','Vel3','TotalSmb3','Bed3','Surface3','Thickness3','Volume3','Temperature3','Pressure3'] ;33 field_names =['Vx1','Vy1','Vel1','TotalSmb1','Bed1','Surface1','Thickness1','Volume1','Temperature1','Pressure1','Vx2','Vy2','Vel2','TotalSmb2','Bed2','Surface2','Thickness2','Volume2','Temperature2','Pressure2','Vx3','Vy3','Vel3','TotalSmb3','Bed3','Surface3','Thickness3','Volume3','Temperature3','Pressure3'] 33 34 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ 34 35 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ -
issm/trunk-jpl/test/NightlyRun/test1301.py
r21060 r21408 1 1 #Test Name: ThermalMelting 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 8 9 from paterson import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 """ … … 27 28 28 29 #Some conditions specific to melting test 29 md.initialization.pressure=n umpy.zeros((md.mesh.numberofvertices,1),int)30 md.initialization.temperature=273.15*n umpy.ones((md.mesh.numberofvertices,1))31 pos=n umpy.nonzero(md.mesh.vertexonsurface)[0]30 md.initialization.pressure=np.zeros((md.mesh.numberofvertices,1),int) 31 md.initialization.temperature=273.15*np.ones((md.mesh.numberofvertices)) 32 pos=np.nonzero(md.mesh.vertexonsurface)[0] 32 33 md.thermal.spctemperature[pos]=md.initialization.temperature[pos] 33 34 md.materials.rheology_B=paterson(md.initialization.temperature) … … 39 40 40 41 #modeled results 41 md.cluster=generic('name', oshostname(),'np',2)42 md.cluster=generic('name',gethostname(),'np',2) 42 43 md=solve(md,'Thermal') 43 44 44 45 #plot results 45 46 comp_melting=md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate 46 relative=n umpy.abs((comp_melting-melting)/melting)*100.47 relative[n umpy.nonzero(comp_melting==melting)[0]]=0.47 relative=np.abs((comp_melting-melting)/melting)*100. 48 relative[np.nonzero(comp_melting==melting)[0]]=0. 48 49 #plotmodel(md,'data',comp_melting,'title','Modeled melting','data',melting,'title','Analytical melting',... 49 50 # 'data',comp_melting-melting,'title','Absolute error','data',relative,'title','Relative error [%]',... … … 52 53 pass 53 54 # set(gcf,'Color','w') 54 # printmodel('thermalmelting','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off') ;55 # system(['mv thermalmelting.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal ']) ;55 # printmodel('thermalmelting','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off') 56 # system(['mv thermalmelting.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal ']) 56 57 57 58 #Fields and tolerances to track changes -
issm/trunk-jpl/test/NightlyRun/test1302.py
r21060 r21408 1 1 #Test Name: ThermalAdvection 2 import numpy 2 import numpy as np 3 3 import sys 4 4 from model import * 5 from socket import gethostname 5 6 from triangle import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 """ … … 26 27 27 28 #Thermal boundary conditions 28 pos1=n umpy.nonzero(md.mesh.elementonbase)[0]29 pos1=np.where(np.isnan(md.mesh.lowerelements))[0] 29 30 md.thermal.spctemperature[md.mesh.elements[pos1,0:3]-1]=10. 30 pos2=n umpy.nonzero(md.mesh.elementonsurface)[0]31 pos2=np.where(np.isnan(md.mesh.upperelements))[0] 31 32 md.thermal.spctemperature[md.mesh.elements[pos2,3:6]-1]=0. 32 md.initialization.vz=0.1*n umpy.ones((md.mesh.numberofvertices,1))33 md.initialization.vel=n umpy.sqrt(md.initialization.vx**2+ md.initialization.vy**2+ md.initialization.vz**2)34 md.initialization.pressure=n umpy.zeros((md.mesh.numberofvertices,1),int)33 md.initialization.vz=0.1*np.ones((md.mesh.numberofvertices)) 34 md.initialization.vel=np.sqrt(md.initialization.vx**2+ md.initialization.vy**2+ md.initialization.vz**2) 35 md.initialization.pressure=np.zeros((md.mesh.numberofvertices),int) 35 36 36 37 md.thermal.stabilization=2 … … 38 39 #d2T/dz2-w*rho_ice*c/k*dT/dz=0 T(surface)=0 T(bed)=10 => T=A exp(alpha z)+B 39 40 alpha=0.1/md.constants.yts*md.materials.rho_ice*md.materials.heatcapacity/md.materials.thermalconductivity #alpha=w rho_ice c /k and w=0.1m/an 40 A=10./(n umpy.exp(alpha*(-1000.))-1.) #A=T(bed)/(exp(alpha*bed)-1) with bed=-1000 T(bed)=1041 A=10./(np.exp(alpha*(-1000.))-1.) #A=T(bed)/(exp(alpha*bed)-1) with bed=-1000 T(bed)=10 41 42 B=-A 42 md.initialization.temperature=A*n umpy.exp(alpha*md.mesh.z)+B43 md.initialization.temperature=A*np.exp(alpha*md.mesh.z)+B 43 44 44 45 #modeled results 45 md.cluster=generic('name', oshostname(),'np',2)46 md.cluster=generic('name',gethostname(),'np',2) 46 47 md=solve(md,'Thermal') 47 48 48 49 #plot results 49 50 comp_temp=md.results.ThermalSolution.Temperature 50 relative=n umpy.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100.51 relative[n umpy.nonzero(comp_temp==md.initialization.temperature)[0]]=0.51 relative=np.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100. 52 relative[np.nonzero(comp_temp==md.initialization.temperature)[0]]=0. 52 53 #plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,... 53 54 # 'title','Analytical temperature [K]','view',3,'data',comp_temp-md.initialization.temperature,... … … 57 58 pass 58 59 # set(gcf,'Color','w') 59 # printmodel('thermaladvection','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off') ;60 # system(['mv thermaladvection.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT ']) ;60 # printmodel('thermaladvection','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off') 61 # system(['mv thermaladvection.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT ']) 61 62 62 63 #Fields and tolerances to track changes -
issm/trunk-jpl/test/NightlyRun/test1303.py
r21060 r21408 1 1 #Test Name: ThermalConduction 2 import numpy 2 import numpy as np 3 3 import sys 4 4 from model import * 5 from socket import gethostname 5 6 from triangle import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 """ … … 26 27 md=setflowequation(md,'HO','all') 27 28 28 pos1=numpy.nonzero(md.mesh.elementonbase)[0] 29 30 pos1=np.where(np.isnan(md.mesh.lowerelements))[0] 29 31 md.thermal.spctemperature[md.mesh.elements[pos1,0:3]-1]=10. 30 pos2=n umpy.nonzero(md.mesh.elementonsurface)[0]32 pos2=np.where(np.isnan(md.mesh.upperelements))[0] 31 33 md.thermal.spctemperature[md.mesh.elements[pos2,3:6]-1]=0. 32 md.initialization.pressure=n umpy.zeros((md.mesh.numberofvertices,1),int)34 md.initialization.pressure=np.zeros((md.mesh.numberofvertices),int) 33 35 34 36 #analytical results … … 38 40 39 41 #modeled results 40 md.cluster=generic('name', oshostname(),'np',2)42 md.cluster=generic('name',gethostname(),'np',2) 41 43 md=solve(md,'Thermal') 42 44 43 45 #plot results 44 46 comp_temp=md.results.ThermalSolution.Temperature 45 relative=n umpy.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100.46 relative[n umpy.nonzero(comp_temp==md.initialization.temperature)[0]]=0.47 relative=np.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100. 48 relative[np.nonzero(comp_temp==md.initialization.temperature)[0]]=0. 47 49 #plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,... 48 50 # 'title','Analytical temperature [K]','view',3,'data',comp_temp-md.initialization.temperature,... … … 52 54 pass 53 55 # set(gcf,'Color','w') 54 # printmodel('thermalconduction','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off') ;55 # system(['mv thermalconduction.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal ']) ;56 # printmodel('thermalconduction','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off') 57 # system(['mv thermalconduction.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal ']) 56 58 57 59 #Fields and tolerances to track changes -
issm/trunk-jpl/test/NightlyRun/test1304.py
r21060 r21408 1 1 #Test Name: ThermalGeothermalFlux 2 import numpy 2 import numpy as np 3 3 import sys 4 4 from model import * 5 from socket import gethostname 5 6 from triangle import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 """ … … 26 27 md=setflowequation(md,'HO','all') 27 28 28 pos2=n umpy.nonzero(md.mesh.elementonsurface)[0]29 pos2=np.where(np.isnan(md.mesh.upperelements))[0] 29 30 md.thermal.spctemperature[md.mesh.elements[pos2,3:6]-1]=0. 30 md.initialization.pressure=n umpy.zeros((md.mesh.numberofvertices,1),int)31 md.initialization.pressure=np.zeros((md.mesh.numberofvertices),int) 31 32 md.basalforcings.geothermalflux[:]=0.1 #100mW/m^2 32 33 … … 37 38 38 39 #modeled results 39 md.cluster=generic('name', oshostname(),'np',2)40 md.cluster=generic('name',gethostname(),'np',2) 40 41 md=solve(md,'Thermal') 41 42 42 43 #plot results 43 44 comp_temp=md.results.ThermalSolution.Temperature 44 relative=n umpy.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100.45 relative[n umpy.nonzero(comp_temp==md.initialization.temperature)[0]]=0.45 relative=np.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100. 46 relative[np.where(comp_temp==md.initialization.temperature)[0]]=0. 46 47 #plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,... 47 48 # 'title','Analytical temperature','view',3,'data',comp_temp-md.initialization.temperature,... … … 51 52 pass 52 53 # set(gcf,'Color','w') 53 # printmodel('thermalgeothermalflux','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off') ;54 # system(['mv thermalgeothermalflux.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal ']) ;54 # printmodel('thermalgeothermalflux','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off') 55 # system(['mv thermalgeothermalflux.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal ']) 55 56 56 57 #Fields and tolerances to track changes -
issm/trunk-jpl/test/NightlyRun/test1501.py
r21060 r21408 1 1 #Test Name: SquareShelfTranSawTooth2d 2 import numpy 2 import numpy as np 3 3 import sys 4 4 from model import * 5 from socket import gethostname 5 6 from triangle import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 printingflag = False … … 16 17 md=parameterize(md,'../Par/SquareShelf.py') 17 18 md=setflowequation(md,'SSA','all') 18 md.cluster=generic('name', oshostname(),'np',3)19 md.cluster=generic('name',gethostname(),'np',3) 19 20 md.transient.isthermal=False 20 21 … … 24 25 25 26 #Solve for thinning rate -> -1 * surface mass balance 26 smb= 2.*n umpy.ones((md.mesh.numberofvertices,1))27 smb= 2.*np.ones((md.mesh.numberofvertices)) 27 28 md.smb.mass_balance= smb 28 29 md.basalforcings.groundedice_melting_rate= smb … … 37 38 smb = md.smb.mass_balance 38 39 39 #tooth= [ [ones(400,1)*(smb') - 10.]' [ones(400,1)*(smb')]' ] ;40 tooth=n umpy.hstack((numpy.tile(smb-10.,(1,400)),numpy.tile(smb,(1,400))))41 #smb=[ [ones(399,1)*(smb')]' smb tooth tooth] ;42 smb=n umpy.hstack((numpy.tile(smb,(1,399)),smb,tooth,tooth))43 44 #md.smb.mass_balance= smb ;45 #md.smb.mass_balance(end+1,:)=[1.:2000.] ;46 md.smb.mass_balance=n umpy.vstack((smb,numpy.arange(1,2001)))40 #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)))) 42 #smb=[ [ones(399,1)*(smb')]' smb tooth tooth] 43 smb=np.hstack((np.tile(smb,(1,399)),smb,tooth,tooth)) 44 45 #md.smb.mass_balance= smb 46 #md.smb.mass_balance(end+1,:)=[1.:2000.] 47 md.smb.mass_balance=np.vstack((smb,np.arange(1,2001))) 47 48 48 49 md=solve(md,'Transient') … … 106 107 107 108 """ 108 starttime = 360 ;109 endtime = 2000 ;110 res = 40 ;111 ts = [starttime:res:endtime] ;112 113 index = md.mesh.elements ;114 x1=md.mesh.x(index(: ,1)); x2=md.mesh.x(index(:,2)); x3=md.mesh.x(index(:,3));115 y1=md.mesh.y(index(: ,1)); y2=md.mesh.y(index(:,2)); y3=md.mesh.y(index(:,3));116 areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1))) ;117 118 thickness = [] ;119 volume = [] ;120 massbal = [] ;121 velocity = [] ;109 starttime = 360 110 endtime = 2000 111 res = 40 112 ts = [starttime:res:endtime] 113 114 index = md.mesh.elements 115 x1=md.mesh.x(index(:)) x2=md.mesh.x(index(:,2)) x3=md.mesh.x(index(:,3)) 116 y1=md.mesh.y(index(:)) y2=md.mesh.y(index(:,2)) y3=md.mesh.y(index(:,3)) 117 areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1))) 118 119 thickness = [] 120 volume = [] 121 massbal = [] 122 velocity = [] 122 123 for t=starttime:endtime 123 thickness = [thickness (md.results.TransientSolution(t).Thickness)] ;124 volume = [volume mean(md.results.TransientSolution(t).Thickness.value,2).*areas] ;125 massbal = [massbal (md.results.TransientSolution(t).SmbMassBalance)] ;126 velocity = [velocity (md.results.TransientSolution(t).Vel)] ;124 thickness = [thickness (md.results.TransientSolution(t).Thickness)] 125 volume = [volume mean(md.results.TransientSolution(t).Thickness.value,2).*areas] 126 massbal = [massbal (md.results.TransientSolution(t).SmbMassBalance)] 127 velocity = [velocity (md.results.TransientSolution(t).Vel)] 127 128 end 128 129 129 130 figure('Position', [0 0 860 932]) 130 131 131 options = plotoptions('data','transient_movie','unit','km') ;132 options = options.list{1} ;133 options = checkplotoptions(md,options) ;132 options = plotoptions('data','transient_movie','unit','km') 133 options = options.list{1} 134 options = checkplotoptions(md,options) 134 135 135 136 %loop over the time steps 136 results=md.results.TransientSolution ;137 count = 1 ;137 results=md.results.TransientSolution 138 count = 1 138 139 for i=ts 139 140 140 141 subplot(5,9,[28:31 37:40]) 141 142 set(gca,'pos',get(gca,'pos')+[-0.08 -0.08 0.07 0.08]) 142 field = 'Thickness' ;143 field = 'Thickness' 143 144 144 145 %process data 145 [x y z elements is2d isplanet]=processmesh(md,results(i).(field),options) ;146 [data datatype]=processdata(md,results(i).(field),options) ;147 148 titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year'] ;146 [x y z elements is2d isplanet]=processmesh(md,results(i).(field),options) 147 [data datatype]=processdata(md,results(i).(field),options) 148 149 titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year'] 149 150 plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options) 150 options=changefieldvalue(options,'title',titlestring) ;151 options=addfielddefault(options,'colorbar',1) ;152 options=changefieldvalue(options,'caxis',[0 max(max(thickness))]) ;153 applyoptions(md,[],options) ;151 options=changefieldvalue(options,'title',titlestring) 152 options=addfielddefault(options,'colorbar',1) 153 options=changefieldvalue(options,'caxis',[0 max(max(thickness))]) 154 applyoptions(md,[],options) 154 155 155 156 subplot(5,9,[33:36 42:45]) 156 157 set(gca,'pos',get(gca,'pos')+[-0.00 -0.08 0.07 0.08]) 157 field = 'Vel' ;158 field = 'Vel' 158 159 159 160 %process data 160 [x y z elements is2d isplanet]=processmesh(md,results(i).(field),options) ;161 [data datatype]=processdata(md,results(i).(field),options) ;162 163 titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year'] ;161 [x y z elements is2d isplanet]=processmesh(md,results(i).(field),options) 162 [data datatype]=processdata(md,results(i).(field),options) 163 164 titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year'] 164 165 plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options) 165 options=changefieldvalue(options,'title',titlestring) ;166 options=addfielddefault(options,'colorbar',1) ;167 options=changefieldvalue(options,'caxis',[0 max(max(velocity))]) ;168 applyoptions(md,[],options) ;166 options=changefieldvalue(options,'title',titlestring) 167 options=addfielddefault(options,'colorbar',1) 168 options=changefieldvalue(options,'caxis',[0 max(max(velocity))]) 169 applyoptions(md,[],options) 169 170 170 171 subplot(5,4,1:4) … … 173 174 plot(starttime:endtime,mean(massbal),'k','LineWidth', 4) 174 175 hold on 175 ya = ylim ;176 ya = ylim 176 177 plot([i i], ya, 'r', 'LineWidth',6) 177 ylim(ya) ; xlim([starttime endtime]);178 ylim(ya) xlim([starttime endtime]) 178 179 title('Surface Mass Balance','FontSize',14) 179 180 ylabel('m/year','FontSize',14) … … 184 185 plot(starttime:endtime,sum(volume)/1000/1000/1000,'LineWidth',4) 185 186 hold on 186 ya = ylim ;187 ya = ylim 187 188 plot([i i], ya, 'r', 'LineWidth',6) 188 ylim(ya) ; xlim([starttime endtime]);189 ylim(ya) xlim([starttime endtime]) 189 190 title('Ice Volume','FontSize',14) 190 191 ylabel('km^3','FontSize',14) … … 195 196 plot(starttime:endtime,mean(velocity)/1000, 'LineWidth', 4) 196 197 hold on 197 ya = ylim ;198 ya = ylim 198 199 plot([i i], ya, 'r', 'LineWidth',6) 199 ylim(ya) ; xlim([starttime endtime]);200 ylim(ya) xlim([starttime endtime]) 200 201 title('Mean Velocity','FontSize', 14) 201 202 ylabel('km/year','FontSize', 14) 202 203 xlabel('year','FontSize', 14) 203 204 204 set(gcf,'Renderer','zbuffer','color','white') ;%fixes a bug on Mac OS X (not needed in future Matlab version)205 set(gcf,'Renderer','zbuffer','color','white') %fixes a bug on Mac OS X (not needed in future Matlab version) 205 206 if i==starttime, 206 207 %initialize images and frame 207 frame=getframe(gcf) ;208 [images,map]=rgb2ind(frame.cdata,256,'nodither') ;209 images(1,1,1,length(ts))=0 ;208 frame=getframe(gcf) 209 [images,map]=rgb2ind(frame.cdata,256,'nodither') 210 images(1,1,1,length(ts))=0 210 211 else 211 frame=getframe(gcf) ;212 images(:,:,1,count) = rgb2ind(frame.cdata,map,'nodither') ;212 frame=getframe(gcf) 213 images(:,:,1,count) = rgb2ind(frame.cdata,map,'nodither') 213 214 end 214 215 215 count = count+1 ;216 count = count+1 216 217 217 218 end 218 219 219 filename='transawtooth2d.gif' ;220 filename='transawtooth2d.gif' 220 221 imwrite(images,map,filename,'DelayTime',1.0,'LoopCount',inf) 221 222 """ -
issm/trunk-jpl/test/NightlyRun/test1502.py
r21060 r21408 1 1 #Test Name: SquareShelfTranSawTooth3d 2 import numpy 2 import numpy as np 3 3 import sys 4 4 from model import * 5 from socket import gethostname 5 6 from triangle import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 printingflag = False … … 17 18 md=setflowequation(md,'SSA','all') 18 19 md.extrude(3,1.) 19 md.cluster=generic('name', oshostname(),'np',2)20 md.cluster=generic('name',gethostname(),'np',2) 20 21 md.transient.isthermal=False 21 22 … … 25 26 26 27 #Solve for thinning rate -> -1 * surface mass balance 27 smb= 2.*n umpy.ones((md.mesh.numberofvertices,1))28 smb= 2.*np.ones((md.mesh.numberofvertices)) 28 29 md.smb.mass_balance= smb 29 30 md.basalforcings.groundedice_melting_rate= smb … … 38 39 smb = md.smb.mass_balance 39 40 40 #tooth= [ [ones(400,1)*(smb') - 10.]' [ones(400,1)*(smb')]' ] ;41 tooth=n umpy.hstack((numpy.tile(smb-10.,(1,400)),numpy.tile(smb,(1,400))))42 #smb=[ [ones(399,1)*(smb')]' smb tooth tooth] ;43 smb=n umpy.hstack((numpy.tile(smb,(1,399)),smb,tooth,tooth))44 45 #md.smb.mass_balance= smb ;46 #md.smb.mass_balance(end+1,:)=[1.:2000.] ;47 md.smb.mass_balance=n umpy.vstack((smb,numpy.arange(1,2001)))41 #tooth= [ [ones(400,1)*(smb') - 10.]' [ones(400,1)*(smb')]' ] 42 tooth=np.hstack((np.tile(smb-10.,(1,400)),np.tile(smb,(1,400)))) 43 #smb=[ [ones(399,1)*(smb')]' smb tooth tooth] 44 smb=np.hstack((np.tile(smb,(1,399)),smb,tooth,tooth)) 45 46 #md.smb.mass_balance= smb 47 #md.smb.mass_balance(end+1,:)=[1.:2000.] 48 md.smb.mass_balance=np.vstack((smb,np.arange(1,2001))) 48 49 49 50 md=solve(md,'Transient') … … 112 113 """ 113 114 114 starttime = 360 ;115 endtime = 2000 ;116 res = 40 ;117 ts = [starttime:res:endtime] ;118 119 index = md.mesh.elements ;120 x1=md.mesh.x(index(: ,1)); x2=md.mesh.x(index(:,2)); x3=md.mesh.x(index(:,3));121 y1=md.mesh.y(index(: ,1)); y2=md.mesh.y(index(:,2)); y3=md.mesh.y(index(:,3));122 areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1))) ;123 124 thickness = [] ;125 volume = [] ;126 massbal = [] ;127 velocity = [] ;115 starttime = 360 116 endtime = 2000 117 res = 40 118 ts = [starttime:res:endtime] 119 120 index = md.mesh.elements 121 x1=md.mesh.x(index(:)) x2=md.mesh.x(index(:,2)) x3=md.mesh.x(index(:,3)) 122 y1=md.mesh.y(index(:)) y2=md.mesh.y(index(:,2)) y3=md.mesh.y(index(:,3)) 123 areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1))) 124 125 thickness = [] 126 volume = [] 127 massbal = [] 128 velocity = [] 128 129 for t=starttime:endtime 129 thickness = [thickness (md.results.TransientSolution(t).Thickness)] ;130 volume = [volume mean(md.results.TransientSolution(t).Thickness.value,2).*areas] ;131 massbal = [massbal (md.results.TransientSolution(t).SmbMassBalance)] ;132 velocity = [velocity (md.results.TransientSolution(t).Vel)] ;130 thickness = [thickness (md.results.TransientSolution(t).Thickness)] 131 volume = [volume mean(md.results.TransientSolution(t).Thickness.value,2).*areas] 132 massbal = [massbal (md.results.TransientSolution(t).SmbMassBalance)] 133 velocity = [velocity (md.results.TransientSolution(t).Vel)] 133 134 end 134 135 135 136 figure('Position', [0 0 1060 1060]) 136 137 137 options = plotoptions('data','transient_movie','unit','km') ;138 options = options.list{1} ;139 options = checkplotoptions(md,options) ;138 options = plotoptions('data','transient_movie','unit','km') 139 options = options.list{1} 140 options = checkplotoptions(md,options) 140 141 141 142 %loop over the time steps 142 results=md.results.TransientSolution ;143 count = 1 ;143 results=md.results.TransientSolution 144 count = 1 144 145 for i=ts 145 146 146 147 subplot(5,9,[28:31 37:40]) 147 148 set(gca,'pos',get(gca,'pos')+[-0.08 -0.08 0.07 0.08]) 148 field = 'Thickness' ;149 field = 'Thickness' 149 150 150 151 %process data 151 [x y z elements is2d isplanet]=processmesh(md,results(i).(field),options) ;152 [data datatype]=processdata(md,results(i).(field),options) ;153 154 titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year'] ;152 [x y z elements is2d isplanet]=processmesh(md,results(i).(field),options) 153 [data datatype]=processdata(md,results(i).(field),options) 154 155 titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year'] 155 156 plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options) 156 options=changefieldvalue(options,'title',titlestring) ;157 options=addfielddefault(options,'colorbar',1) ;158 options=changefieldvalue(options,'caxis',[0 max(max(thickness))]) ;159 applyoptions(md,[],options) ;157 options=changefieldvalue(options,'title',titlestring) 158 options=addfielddefault(options,'colorbar',1) 159 options=changefieldvalue(options,'caxis',[0 max(max(thickness))]) 160 applyoptions(md,[],options) 160 161 161 162 subplot(5,9,[33:36 42:45]) 162 163 set(gca,'pos',get(gca,'pos')+[-0.01 -0.08 0.07 0.08]) 163 field = 'Vel' ;164 field = 'Vel' 164 165 165 166 %process data 166 [x y z elements is2d isplanet]=processmesh(md,results(i).(field),options) ;167 [data datatype]=processdata(md,results(i).(field),options) ;168 169 titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year'] ;167 [x y z elements is2d isplanet]=processmesh(md,results(i).(field),options) 168 [data datatype]=processdata(md,results(i).(field),options) 169 170 titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year'] 170 171 plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options) 171 options=changefieldvalue(options,'title',titlestring) ;172 options=addfielddefault(options,'colorbar',1) ;173 options=changefieldvalue(options,'caxis',[0 max(max(velocity))]) ;174 applyoptions(md,[],options) ;172 options=changefieldvalue(options,'title',titlestring) 173 options=addfielddefault(options,'colorbar',1) 174 options=changefieldvalue(options,'caxis',[0 max(max(velocity))]) 175 applyoptions(md,[],options) 175 176 176 177 subplot(5,4,1:4) … … 179 180 plot(starttime:endtime,mean(massbal),'k','LineWidth', 4) 180 181 hold on 181 ya = ylim ;182 ya = ylim 182 183 plot([i i], ya, 'r', 'LineWidth',6) 183 ylim(ya) ; xlim([starttime endtime]);184 ylim(ya) xlim([starttime endtime]) 184 185 title('Surface Mass Balance','FontSize',14) 185 186 ylabel('m/year','FontSize',14) … … 190 191 plot(starttime:endtime,sum(volume)/1000/1000/1000,'LineWidth',4) 191 192 hold on 192 ya = ylim ;193 ya = ylim 193 194 plot([i i], ya, 'r', 'LineWidth',6) 194 ylim(ya) ; xlim([starttime endtime]);195 ylim(ya) xlim([starttime endtime]) 195 196 title('Ice Volume','FontSize',14) 196 197 ylabel('km^3','FontSize',14) … … 201 202 plot(starttime:endtime,mean(velocity)/1000, 'LineWidth', 4) 202 203 hold on 203 ya = ylim ;204 ya = ylim 204 205 plot([i i], ya, 'r', 'LineWidth',6) 205 ylim(ya) ; xlim([starttime endtime]);206 ylim(ya) xlim([starttime endtime]) 206 207 title('Mean Velocity','FontSize', 14) 207 208 ylabel('km/year','FontSize', 14) 208 209 xlabel('year','FontSize', 14) 209 210 210 set(gcf,'Renderer','zbuffer','color','white') ;%fixes a bug on Mac OS X (not needed in future Matlab version)211 set(gcf,'Renderer','zbuffer','color','white') %fixes a bug on Mac OS X (not needed in future Matlab version) 211 212 if i==starttime, 212 213 %initialize images and frame 213 frame=getframe(gcf) ;214 [images,map]=rgb2ind(frame.cdata,256,'nodither') ;215 images(1,1,1,length(ts))=0 ;214 frame=getframe(gcf) 215 [images,map]=rgb2ind(frame.cdata,256,'nodither') 216 images(1,1,1,length(ts))=0 216 217 else 217 frame=getframe(gcf) ;218 images(:,:,1,count) = rgb2ind(frame.cdata,map,'nodither') ;218 frame=getframe(gcf) 219 images(:,:,1,count) = rgb2ind(frame.cdata,map,'nodither') 219 220 end 220 221 221 count = count+1 ;222 count = count+1 222 223 223 224 end 224 225 225 filename='transawtooth3d.gif' ;226 filename='transawtooth3d.gif' 226 227 imwrite(images,map,filename,'DelayTime',1.0,'LoopCount',inf) 227 228 """ -
issm/trunk-jpl/test/NightlyRun/test1601.py
r21060 r21408 1 1 #Test Name: SquareShelfSSA2dRotation 2 import numpy 2 import numpy as np 3 3 import sys 4 4 from model import * 5 from socket import gethostname 5 6 from triangle import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 md=triangle(model(),'../Exp/Square.exp',150000.) … … 14 15 md=parameterize(md,'../Par/SquareShelf.py') 15 16 md=setflowequation(md,'SSA','all') 16 md.stressbalance.spcvx[n umpy.nonzero(md.mesh.y>0.)]=float('NaN')17 md.stressbalance.spcvx[np.nonzero(md.mesh.y>0.)]=float('NaN') 17 18 md.initialization.vx[:]=0. 18 19 md.initialization.vy[:]=0. 19 md.initialization.vel=n umpy.zeros_like(md.initialization.vx)20 md.initialization.vel=np.zeros_like(md.initialization.vx) 20 21 21 md.cluster=generic('name', oshostname(),'np',2)22 md.cluster=generic('name',gethostname(),'np',2) 22 23 md=solve(md,'Stressbalance') 23 24 vel0=md.results.StressbalanceSolution.Vel 24 25 25 theta=30.*n umpy.pi/180.26 theta=30.*np.pi/180. 26 27 x=md.mesh.x 27 28 y=md.mesh.y 28 md.mesh.x=n umpy.cos(theta)*x-numpy.sin(theta)*y29 md.mesh.y=n umpy.sin(theta)*x+numpy.cos(theta)*y29 md.mesh.x=np.cos(theta)*x-np.sin(theta)*y 30 md.mesh.y=np.sin(theta)*x+np.cos(theta)*y 30 31 31 md.stressbalance.referential[:,0:3]=n umpy.tile([numpy.cos(theta),numpy.sin(theta),0],(md.mesh.numberofvertices,1))32 md.stressbalance.referential[:,3: ]=n umpy.tile([0,0,1],(md.mesh.numberofvertices,1))32 md.stressbalance.referential[:,0:3]=np.tile([np.cos(theta),np.sin(theta),0],(md.mesh.numberofvertices)) 33 md.stressbalance.referential[:,3: ]=np.tile([0,0,1],(md.mesh.numberofvertices)) 33 34 md=solve(md,'Stressbalance') 34 35 vel1=md.results.StressbalanceSolution.Vel 35 36 36 37 #plotmodel(md,'data',vel0,'data',vel1,'data',vel1-vel0,'title','Cartesian CS','title','Rotated CS','title','difference') 37 print "Error between Cartesian and rotated CS: %g" % (n umpy.max(numpy.abs(vel0-vel1))/(numpy.max(numpy.abs(vel0))+sys.float_info.epsilon))38 print "Error between Cartesian and rotated CS: %g" % (np.max(np.abs(vel0-vel1))/(np.max(np.abs(vel0))+sys.float_info.epsilon)) 38 39 39 40 #Now, put CS back to normal except on the side where the spc are applied 40 pos=n umpy.nonzero(numpy.logical_or(x==0.,x==1000000.))[0]41 pos=np.nonzero(np.logical_or.reduce(x==0.,x==1000000.))[0] 41 42 md.stressbalance.referential[:]=float('NaN') 42 md.stressbalance.referential[pos,0:3]=n umpy.tile([numpy.cos(theta),numpy.sin(theta),0],(len(pos),1))43 md.stressbalance.referential[pos,3: ]=n umpy.tile([0,0,1],(len(pos),1))43 md.stressbalance.referential[pos,0:3]=np.tile([np.cos(theta),np.sin(theta),0],(len(pos))) 44 md.stressbalance.referential[pos,3: ]=np.tile([0,0,1],(len(pos))) 44 45 md=solve(md,'Stressbalance') 45 46 vel2=md.results.StressbalanceSolution.Vel 46 47 47 48 #plotmodel(md,'data',vel0,'data',vel2,'data',vel2-vel0,'title','Cartesian CS','title','Rotated CS','title','difference') 48 print "Error between Cartesian and rotated CS: %g" % (n umpy.max(numpy.abs(vel0-vel2))/(numpy.max(numpy.abs(vel0))+sys.float_info.epsilon))49 print "Error between Cartesian and rotated CS: %g" % (np.max(np.abs(vel0-vel2))/(np.max(np.abs(vel0))+sys.float_info.epsilon)) 49 50 50 51 #Fields and tolerances to track changes -
issm/trunk-jpl/test/NightlyRun/test1602.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfHORotation 2 import numpy 2 import numpy as np 3 3 import sys 4 4 from model import * 5 from socket import gethostname 5 6 from triangle import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 md=triangle(model(),'../Exp/Square.exp',150000.) … … 15 16 md.extrude(5,1.) 16 17 md=setflowequation(md,'HO','all') 17 md.stressbalance.spcvx[n umpy.nonzero(md.mesh.y>0.)]=float('NaN')18 md.stressbalance.spcvx[np.nonzero(md.mesh.y>0.)]=float('NaN') 18 19 md.initialization.vx[:]=0. 19 20 md.initialization.vy[:]=0. 20 md.initialization.vel=n umpy.zeros_like(md.initialization.vx)21 md.initialization.vel=np.zeros_like(md.initialization.vx) 21 22 22 md.cluster=generic('name', oshostname(),'np',3)23 md.cluster=generic('name',gethostname(),'np',3) 23 24 md=solve(md,'Stressbalance') 24 25 vel0=md.results.StressbalanceSolution.Vel 25 26 26 theta=30.*n umpy.pi/180.27 theta=30.*np.pi/180. 27 28 x=md.mesh.x 28 29 y=md.mesh.y 29 md.mesh.x=n umpy.cos(theta)*x-numpy.sin(theta)*y30 md.mesh.y=n umpy.sin(theta)*x+numpy.cos(theta)*y30 md.mesh.x=np.cos(theta)*x-np.sin(theta)*y 31 md.mesh.y=np.sin(theta)*x+np.cos(theta)*y 31 32 32 md.stressbalance.referential[:,0:3]=n umpy.tile([numpy.cos(theta),numpy.sin(theta),0],(md.mesh.numberofvertices,1))33 md.stressbalance.referential[:,3: ]=n umpy.tile([0,0,1],(md.mesh.numberofvertices,1))33 md.stressbalance.referential[:,0:3]=np.tile([np.cos(theta),np.sin(theta),0],(md.mesh.numberofvertices)) 34 md.stressbalance.referential[:,3: ]=np.tile([0,0,1],(md.mesh.numberofvertices)) 34 35 md=solve(md,'Stressbalance') 35 36 vel1=md.results.StressbalanceSolution.Vel 36 37 37 38 #plotmodel(md,'data',vel0,'data',vel1,'data',vel1-vel0,'title','Cartesian CS','title','Rotated CS','title','difference','view#all',2) 38 print "Error between Cartesian and rotated CS: %g" % (n umpy.max(numpy.abs(vel0-vel1))/(numpy.max(numpy.abs(vel0))+sys.float_info.epsilon))39 print "Error between Cartesian and rotated CS: %g" % (np.max(np.abs(vel0-vel1))/(np.max(np.abs(vel0))+sys.float_info.epsilon)) 39 40 40 41 #Fields and tolerances to track changes … … 43 44 field_values=[\ 44 45 vel1, \ 45 ] ;46 ] -
issm/trunk-jpl/test/NightlyRun/test2001.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedGia2d 2 import numpy 2 import numpy as np 3 3 import copy 4 4 from model import * 5 from socket import gethostname 5 6 from triangle import * 6 7 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 #Define a model … … 22 23 md.timestepping.start_time=2400000 # 2,400 kyr 23 24 md.timestepping.final_time=2500000 # 2,500 kyr 24 md.geometry.thickness=numpy.hstack((\ 25 numpy.vstack((md.geometry.thickness*0.0, 0.0)),\ 26 numpy.vstack((md.geometry.thickness/2.0, 0.1)),\ 27 numpy.vstack((md.geometry.thickness, 0.2)),\ 28 numpy.vstack((md.geometry.thickness, 1.0)),\ 29 numpy.vstack((md.geometry.thickness, md.timestepping.start_time)),\ 30 )) 25 md.geometry.thickness=np.vstack((np.hstack((md.geometry.thickness*0.0, 0.0)), 26 np.hstack((md.geometry.thickness/2.0, 0.1)), 27 np.hstack((md.geometry.thickness, 0.2)), 28 np.hstack((md.geometry.thickness, 1.0)), 29 np.hstack((md.geometry.thickness, md.timestepping.start_time)))).T 31 30 32 31 #Solve for GIA deflection 33 md.cluster=generic('name', oshostname(),'np',3)32 md.cluster=generic('name',gethostname(),'np',3) 34 33 md=solve(md,'Gia') 35 34 … … 37 36 field_names =['GiaW','GiadWdt'] 38 37 field_tolerances=[1e-13,1e-13] 39 field_values =[\ 40 md.results.GiaSolution.GiaW,\ 41 md.results.GiaSolution.GiadWdt,\ 42 ] 38 field_values =[md.results.GiaSolution.GiaW, 39 md.results.GiaSolution.GiadWdt] 43 40 -
issm/trunk-jpl/test/NightlyRun/test2002.py
r21085 r21408 1 1 #Test Name: EarthSlr 2 from MatlabFuncs import *3 from PythonFuncs import *4 2 from model import * 5 from numpy import * 3 from socket import gethostname 4 import numpy as np 6 5 from parameterize import * 7 6 from solve import * … … 12 11 from love_numbers import * 13 12 14 #mesh earth: 15 md=model() 13 #mesh earth: 14 md=model() 16 15 md.mesh=gmshplanet('radius',6.371012*10**3,'resolution',700.) #500 km resolution mesh 17 16 18 17 #parameterize slr solution: 19 #slr loading: {{{20 md.slr.deltathickness= zeros((md.mesh.numberofelements,1))21 md.slr.sealevel= zeros((md.mesh.numberofvertices,1))18 #slr loading: 19 md.slr.deltathickness=np.zeros((md.mesh.numberofelements)) 20 md.slr.sealevel=np.zeros((md.mesh.numberofvertices)) 22 21 #antarctica 23 late=n umpy.sum(md.mesh.lat[md.mesh.elements-1],axis=1)/324 longe=n umpy.sum(md.mesh.long[md.mesh.elements-1],axis=1)/325 pos=n umpy.nonzero(late <-80)22 late=np.sum(md.mesh.lat[md.mesh.elements-1],axis=1)/3 23 longe=np.sum(md.mesh.long[md.mesh.elements-1],axis=1)/3 24 pos=np.where(late <-80) 26 25 md.slr.deltathickness[pos]=-100 27 26 #greenland 28 pos=n umpy.nonzero(logical_and_n(late > 70,late < 80,longe>-60,longe<-30))27 pos=np.where(np.logical_and.reduce((late > 70,late < 80,longe>-60,longe<-30))) 29 28 md.slr.deltathickness[pos]=-100 30 29 31 #elastic loading from love numbers: 30 #elastic loading from love numbers: 32 31 nlov=101 33 md.slr.love_h = love_numbers('h')[:nlov] ;34 md.slr.love_k = love_numbers('k')[:nlov] ;35 md.slr.love_l = love_numbers('l')[:nlov] ;32 md.slr.love_h = love_numbers('h')[:nlov] 33 md.slr.love_k = love_numbers('k')[:nlov] 34 md.slr.love_l = love_numbers('l')[:nlov] 36 35 37 #}}} 38 #mask: {{{ 39 md.mask=maskpsl() # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset 40 mask=gmtmask(md.mesh.lat,md.mesh.long) 36 #mask: 37 md.mask=maskpsl() # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset 38 mask=gmtmask(md.mesh.lat,md.mesh.long) 41 39 42 icemask=ones((md.mesh.numberofvertices,1)) 43 pos=nonzero(mask==0)[0]; icemask[pos]=-1 44 pos=nonzero(sum(mask[md.mesh.elements.astype(int)-1],axis=1)<3)[0] 40 icemask=np.ones((md.mesh.numberofvertices)) 41 pos=np.where(mask==0)[0] 42 icemask[pos]=-1 43 pos=np.where(np.sum(mask[md.mesh.elements.astype(int)-1],axis=1)<3)[0] 45 44 icemask[md.mesh.elements[pos,:].astype(int)-1]=-1 46 45 md.mask.ice_levelset=icemask 47 46 48 md.mask.ocean_levelset= zeros((md.mesh.numberofvertices,1))49 pos=n umpy.nonzero(md.mask.ice_levelset==1)47 md.mask.ocean_levelset=np.zeros((md.mesh.numberofvertices)) 48 pos=np.where(md.mask.ice_levelset==1) 50 49 md.mask.ocean_levelset[pos]=1 51 50 52 51 #make sure that the ice level set is all inclusive: 53 md.mask.land_levelset= zeros((md.mesh.numberofvertices,1))54 md.mask.groundedice_levelset=- ones((md.mesh.numberofvertices,1))52 md.mask.land_levelset=np.zeros((md.mesh.numberofvertices)) 53 md.mask.groundedice_levelset=-np.ones((md.mesh.numberofvertices)) 55 54 56 #make sure wherever there is an ice load, that the mask is set to ice: 57 pos=n onzero(md.slr.deltathickness)[0];55 #make sure wherever there is an ice load, that the mask is set to ice: 56 pos=np.nonzero(md.slr.deltathickness)[0] 58 57 icemask[md.mesh.elements[pos,:]-1]=-1 59 # }}} 58 60 59 61 60 #geometry 62 61 di=md.materials.rho_ice/md.materials.rho_water 63 md.geometry.thickness= ones((md.mesh.numberofvertices,1))64 md.geometry.surface=(1-di)* zeros((md.mesh.numberofvertices,1))62 md.geometry.thickness=np.ones((md.mesh.numberofvertices)) 63 md.geometry.surface=(1-di)*np.zeros((md.mesh.numberofvertices)) 65 64 md.geometry.base=md.geometry.surface-md.geometry.thickness 66 65 md.geometry.bed=md.geometry.base 67 66 68 67 #materials 69 md.initialization.temperature=273.25* ones((md.mesh.numberofvertices,1))68 md.initialization.temperature=273.25*np.ones((md.mesh.numberofvertices)) 70 69 md.materials.rheology_B=paterson(md.initialization.temperature) 71 md.materials.rheology_n=3* ones((md.mesh.numberofelements,1))70 md.materials.rheology_n=3*np.ones((md.mesh.numberofelements)) 72 71 73 72 #Miscellaneous … … 75 74 76 75 #Solution parameters 77 md.slr.reltol= NaN76 md.slr.reltol=np.nan 78 77 md.slr.abstol=1e-3 79 78 … … 82 81 md.slr.elastic=0 83 82 md=solve(md,'Sealevelrise') 84 Seustatic=md.results.SealevelriseSolution.Sealevel ;83 Seustatic=md.results.SealevelriseSolution.Sealevel 85 84 86 85 #eustatic + rigid run: … … 88 87 md.slr.elastic=0 89 88 md=solve(md,'Sealevelrise') 90 Srigid=md.results.SealevelriseSolution.Sealevel ;89 Srigid=md.results.SealevelriseSolution.Sealevel 91 90 92 91 #eustatic + rigid + elastic run: … … 94 93 md.slr.elastic=1 95 94 md=solve(md,'Sealevelrise') 96 Selastic=md.results.SealevelriseSolution.Sealevel ;95 Selastic=md.results.SealevelriseSolution.Sealevel 97 96 98 97 #eustatic + rigid + elastic + rotation run: 99 98 md.slr.rigid=1 100 99 md.slr.elastic=1 101 md.slr.rotation=1 ;102 md=solve(md,'Sealevelrise') ;103 Srotation=md.results.SealevelriseSolution.Sealevel ;100 md.slr.rotation=1 101 md=solve(md,'Sealevelrise') 102 Srotation=md.results.SealevelriseSolution.Sealevel 104 103 105 104 #Fields and tolerances to track changes -
issm/trunk-jpl/test/NightlyRun/test201.py
r21060 r21408 1 1 #Test Name: SquareShelfStressSSA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 from ContourToMesh import * 10 11 … … 13 14 md=parameterize(md,'../Par/SquareShelf.py') 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Stressbalance') 17 18 -
issm/trunk-jpl/test/NightlyRun/test202.py
r21060 r21408 1 1 #Test Name: SquareShelfStressSSA3d 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md.extrude(3,2.) 16 17 md=setflowequation(md,'SSA','all') 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 md=solve(md,'Stressbalance') 19 20 -
issm/trunk-jpl/test/NightlyRun/test203.py
r21060 r21408 1 1 #Test Name: SquareShelfStressHO 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md.extrude(3,2.) 16 17 md=setflowequation(md,'HO','all') 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 md=solve(md,'Stressbalance') 19 20 -
issm/trunk-jpl/test/NightlyRun/test204.py
r21060 r21408 1 1 #Test Name: SquareShelfStressFS 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md.extrude(3,2.) 16 17 md=setflowequation(md,'FS','all') 17 md.cluster=generic('name', oshostname(),'np',3)18 md.stressbalance.shelf_dampening=1 ;19 md.timestepping.time_step=0 ;18 md.cluster=generic('name',gethostname(),'np',3) 19 md.stressbalance.shelf_dampening=1 20 md.timestepping.time_step=0 20 21 md1=solve(md,'Stressbalance') 21 md.stressbalance.shelf_dampening=0 ;22 md.stressbalance.shelf_dampening=0 22 23 md=solve(md,'Stressbalance') 23 24 -
issm/trunk-jpl/test/NightlyRun/test205.py
r21060 r21408 1 1 #Test Name: SquareShelfStressMHOPenalties 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md.extrude(3,2.) 16 17 md=setflowequation(md,'HO','../Exp/SquareHalfRight.exp','fill','SSA','coupling','penalties') 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 md=solve(md,'Stressbalance') 19 20 -
issm/trunk-jpl/test/NightlyRun/test206.py
r21060 r21408 1 1 #Test Name: SquareShelfTherStea 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 16 17 md=setflowequation(md,'SSA','all') 17 18 md.timestepping.time_step=0 18 md.cluster=generic('name', oshostname(),'np',3)19 md.cluster=generic('name',gethostname(),'np',3) 19 20 md=solve(md,'Thermal') 20 21 … … 24 25 field_names =['Temperature','BasalforcingsGroundediceMeltingRate'] 25 26 field_tolerances=[1e-13,5e-6] 26 field_values=[\ 27 md.results.ThermalSolution.Temperature,\ 28 md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate,\ 29 ] 27 field_values=[md.results.ThermalSolution.Temperature, 28 md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate] -
issm/trunk-jpl/test/NightlyRun/test207.py
r21060 r21408 1 1 #Test Name: SquareShelfTherTran 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md.extrude(3,1.) 16 17 md=setflowequation(md,'SSA','all') 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 md.transient.isstressbalance=False 19 20 md.transient.ismasstransport=False -
issm/trunk-jpl/test/NightlyRun/test208.py
r21060 r21408 1 1 #Test Name: SquareShelfTranSSA2d 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md.basalforcings.floatingice_melting_rate[:]=1. 16 17 md=setflowequation(md,'SSA','all') 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 md.transient.requested_outputs=['default','FloatingArea','GroundedArea','TotalFloatingBmb','TotalGroundedBmb'] 19 20 md=solve(md,'Transient') -
issm/trunk-jpl/test/NightlyRun/test209.py
r21060 r21408 1 1 #Test Name: SquareShelfTranSSA3d 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md.extrude(3,1.) 16 17 md=setflowequation(md,'SSA','all') 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 md=solve(md,'Transient') 19 20 -
issm/trunk-jpl/test/NightlyRun/test210.py
r21060 r21408 1 1 #Test Name: SquareShelfTranHO 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md.extrude(3,1.) 16 17 md=setflowequation(md,'HO','all') 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 md=solve(md,'Transient') 19 20 -
issm/trunk-jpl/test/NightlyRun/test211.py
r21060 r21408 1 1 #Test Name: SquareShelfTranFS 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 16 17 md=setflowequation(md,'FS','all') 17 18 md.stressbalance.reltol=NaN 18 md.cluster=generic('name', oshostname(),'np',3)19 md.cluster=generic('name',gethostname(),'np',3) 19 20 md=solve(md,'Transient') 20 21 -
issm/trunk-jpl/test/NightlyRun/test212.py
r21060 r21408 1 1 #Test Name: SquareShelfCMBSSA2d 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 20 21 md.inversion.iscontrol=1 21 22 md.inversion.control_parameters=['MaterialsRheologyBbar'] 22 md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices ,1))23 md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices ,1))23 md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices)) 24 md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices)) 24 25 md.inversion.nsteps=2 25 26 md.inversion.cost_functions=[101] 26 md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices ,1))27 md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps ,1))28 md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps ,1))29 md.inversion.step_threshold=0.3*ones((md.inversion.nsteps ,1))27 md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices)) 28 md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps)) 29 md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps)) 30 md.inversion.step_threshold=0.3*ones((md.inversion.nsteps)) 30 31 md.inversion.vx_obs=md.initialization.vx 31 32 md.inversion.vy_obs=md.initialization.vy 32 33 33 34 34 md.cluster=generic('name', oshostname(),'np',3)35 md.cluster=generic('name',gethostname(),'np',3) 35 36 md=solve(md,'Stressbalance') 36 37 -
issm/trunk-jpl/test/NightlyRun/test213.py
r21060 r21408 1 1 #Test Name: SquareShelfCMBSSA3d 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 21 22 md.inversion.iscontrol=1 22 23 md.inversion.control_parameters=['MaterialsRheologyBbar'] 23 md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices ,1))24 md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices ,1))24 md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices)) 25 md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices)) 25 26 md.inversion.nsteps=2 26 27 md.inversion.cost_functions=[101] 27 md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices ,1))28 md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps ,1))29 md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps ,1))30 md.inversion.step_threshold=0.3*ones((md.inversion.nsteps ,1))28 md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices)) 29 md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps)) 30 md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps)) 31 md.inversion.step_threshold=0.3*ones((md.inversion.nsteps)) 31 32 md.inversion.vx_obs=md.initialization.vx 32 33 md.inversion.vy_obs=md.initialization.vy 33 34 34 35 35 md.cluster=generic('name', oshostname(),'np',3)36 md.cluster=generic('name',gethostname(),'np',3) 36 37 md=solve(md,'Stressbalance') 37 38 -
issm/trunk-jpl/test/NightlyRun/test214.py
r21060 r21408 1 1 #Test Name: SquareShelfCMBHO 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 21 22 md.inversion.iscontrol=1 22 23 md.inversion.control_parameters=['MaterialsRheologyBbar'] 23 md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices ,1))24 md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices ,1))24 md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices)) 25 md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices)) 25 26 md.inversion.nsteps=2 26 27 md.inversion.cost_functions=[101] 27 md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices ,1))28 md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps ,1))29 md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps ,1))30 md.inversion.step_threshold=0.3*ones((md.inversion.nsteps ,1))28 md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices)) 29 md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps)) 30 md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps)) 31 md.inversion.step_threshold=0.3*ones((md.inversion.nsteps)) 31 32 md.inversion.vx_obs=md.initialization.vx 32 33 md.inversion.vy_obs=md.initialization.vy 33 34 34 35 35 md.cluster=generic('name', oshostname(),'np',3)36 md.cluster=generic('name',gethostname(),'np',3) 36 37 md=solve(md,'Stressbalance') 37 38 -
issm/trunk-jpl/test/NightlyRun/test215.py
r21060 r21408 1 1 #Test Name: SquareShelfCMBFS 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 21 22 md.inversion.iscontrol=1 22 23 md.inversion.control_parameters=['MaterialsRheologyBbar'] 23 md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices ,1))24 md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices ,1))24 md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices)) 25 md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices)) 25 26 md.inversion.nsteps=2 26 27 md.inversion.cost_functions=[101] 27 md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices ,1))28 md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps ,1))29 md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps ,1))30 md.inversion.step_threshold=0.3*ones((md.inversion.nsteps ,1))28 md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices)) 29 md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps)) 30 md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps)) 31 md.inversion.step_threshold=0.3*ones((md.inversion.nsteps)) 31 32 md.inversion.vx_obs=md.initialization.vx 32 33 md.inversion.vy_obs=md.initialization.vy 33 34 34 35 35 md.cluster=generic('name', oshostname(),'np',3)36 md.cluster=generic('name',gethostname(),'np',3) 36 37 md=solve(md,'Stressbalance') 37 38 -
issm/trunk-jpl/test/NightlyRun/test216.py
r21060 r21408 1 1 #Test Name: SquareShelfStressSSA2dRift 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from meshprocessrifts import * … … 16 17 md=parameterize(md,'../Par/SquareShelf2.py') 17 18 md=setflowequation(md,'SSA','all') 18 md.cluster=generic('name', oshostname(),'np',3)19 md.cluster=generic('name',gethostname(),'np',3) 19 20 20 21 # rift settings -
issm/trunk-jpl/test/NightlyRun/test217.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrained 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md=parameterize(md,'../Par/SquareShelf.py') 16 17 md=setflowequation(md,'SSA','all') 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 19 20 # redo the parameter file for this special shelf. … … 33 34 34 35 h=1000. 35 md.geometry.thickness=h*ones((md.mesh.numberofvertices ,1))36 md.geometry.thickness=h*ones((md.mesh.numberofvertices)) 36 37 md.geometry.base=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness 37 38 md.geometry.surface=md.geometry.base+md.geometry.thickness 38 39 39 40 # Initial velocity and pressure 40 md.initialization.vx=zeros((md.mesh.numberofvertices ,1))41 md.initialization.vy=zeros((md.mesh.numberofvertices ,1))42 md.initialization.vz=zeros((md.mesh.numberofvertices ,1))43 md.initialization.pressure=zeros((md.mesh.numberofvertices ,1))41 md.initialization.vx=zeros((md.mesh.numberofvertices)) 42 md.initialization.vy=zeros((md.mesh.numberofvertices)) 43 md.initialization.vz=zeros((md.mesh.numberofvertices)) 44 md.initialization.pressure=zeros((md.mesh.numberofvertices)) 44 45 45 46 # Materials 46 md.initialization.temperature=(273.-20.)*ones((md.mesh.numberofvertices ,1))47 md.initialization.temperature=(273.-20.)*ones((md.mesh.numberofvertices)) 47 48 md.materials.rheology_B=paterson(md.initialization.temperature) 48 md.materials.rheology_n=3.*ones((md.mesh.numberofelements ,1))49 md.materials.rheology_n=3.*ones((md.mesh.numberofelements)) 49 50 50 51 # Boundary conditions: 51 md.stressbalance.spcvx=float(nan)*ones((md.mesh.numberofvertices ,1))52 md.stressbalance.spcvy=float(nan)*ones((md.mesh.numberofvertices ,1))53 md.stressbalance.spcvz=float(nan)*ones((md.mesh.numberofvertices ,1))52 md.stressbalance.spcvx=float(nan)*ones((md.mesh.numberofvertices)) 53 md.stressbalance.spcvy=float(nan)*ones((md.mesh.numberofvertices)) 54 md.stressbalance.spcvz=float(nan)*ones((md.mesh.numberofvertices)) 54 55 55 56 # constrain flanks to 0 normal velocity 56 pos=n umpy.nonzero(numpy.logical_or(md.mesh.x==xmin,md.mesh.x==xmax))57 pos=np.nonzero(np.logical_or.reduce(md.mesh.x==xmin,md.mesh.x==xmax)) 57 58 md.stressbalance.spcvx[pos]=0 58 59 md.stressbalance.spcvz[pos]=float(nan) 59 60 60 61 # constrain grounding line to 0 velocity 61 pos=n umpy.nonzero(md.mesh.y==ymin)62 pos=np.nonzero(md.mesh.y==ymin) 62 63 md.stressbalance.spcvx[pos]=0 63 64 md.stressbalance.spcvy[pos]=0 … … 65 66 # icefront 66 67 nodeonicefront=zeros(md.mesh.numberofvertices) 67 pos=n umpy.nonzero(md.mesh.y==ymax)68 pos=np.nonzero(md.mesh.y==ymax) 68 69 nodeonicefront[pos]=1 69 70 md.mask.ice_levelset=-1+nodeonicefront … … 72 73 73 74 # create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292. 74 # ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.geometry.thickness./(4*md.materials.rheology_B)).^3 ;75 # vy_c=ey_c.*md.mesh.y*md.constants.yts ;75 # ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.geometry.thickness./(4*md.materials.rheology_B)).^3 76 # vy_c=ey_c.*md.mesh.y*md.constants.yts 76 77 77 78 # Fields and tolerances to track changes -
issm/trunk-jpl/test/NightlyRun/test219.py
r21060 r21408 1 1 #Test Name: SquareShelfStressSSAHOTiling 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md.extrude(3,2.) 16 17 md=setflowequation(md,'HO','../Exp/SquareHalfRight.exp','fill','SSA') 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 md=solve(md,'Stressbalance') 19 20 -
issm/trunk-jpl/test/NightlyRun/test220.py
r21060 r21408 1 1 #Test Name: SquareShelfStressHOFS3dTiling 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md.extrude(2,1.) 16 17 md=setflowequation(md,'FS','../Exp/SquareHalfRight.exp','fill','HO') 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 md=solve(md,'Stressbalance') 19 20 -
issm/trunk-jpl/test/NightlyRun/test221.py
r21060 r21408 1 1 #Test Name: SquareShelfStressSSAFS3dTiling 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',120000.) … … 13 14 md.extrude(2,1.) 14 15 md=setflowequation(md,'FS','../Exp/SquareHalfRight.exp','fill','SSA') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.stressbalance.viscosity_overshoot=0 17 18 md=solve(md,'Stressbalance') -
issm/trunk-jpl/test/NightlyRun/test222.py
r21060 r21408 1 1 #Test Name: SquareShelfStressSSA2dTransientIncrHydro 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 12 13 md=parameterize(md,'../Par/SquareShelf.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md.masstransport.hydrostatic_adjustment='Incremental' 16 17 md=solve(md,'Transient') -
issm/trunk-jpl/test/NightlyRun/test223.py
r21060 r21408 1 1 #Test Name: SquareShelfStressSSA2dTransientIncrNonHydro 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 14 15 md.geometry.base=md.geometry.base+50. 15 16 md.geometry.surface=md.geometry.surface+50. 16 md.cluster=generic('name', oshostname(),'np',1)17 md.cluster=generic('name',gethostname(),'np',1) 17 18 md.masstransport.hydrostatic_adjustment='Incremental' 18 19 md=solve(md,'Transient') -
issm/trunk-jpl/test/NightlyRun/test224.py
r21060 r21408 1 1 #Test Name: SquareShelfStressHOTransientIncrHydro 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',200000.) … … 13 14 md.extrude(3,1.) 14 15 md=setflowequation(md,'HO','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.masstransport.hydrostatic_adjustment='Incremental' 17 18 md=solve(md,'Transient') -
issm/trunk-jpl/test/NightlyRun/test225.py
r21060 r21408 1 1 #Test Name: SquareShelfStressHOTransientIncrNonHydro 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',200000.) … … 15 16 md.extrude(3,1.) 16 17 md=setflowequation(md,'HO','all') 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 md.masstransport.hydrostatic_adjustment='Incremental' 19 20 md=solve(md,'Transient') -
issm/trunk-jpl/test/NightlyRun/test226.py
r21060 r21408 1 1 #Test Name: SquareShelfTranCflSSA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 12 13 md=parameterize(md,'../Par/SquareShelf.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md.timestepping.time_adapt=1. 16 17 md.timestepping.final_time=15. -
issm/trunk-jpl/test/NightlyRun/test227.py
r21060 r21408 1 1 #Test Name: SquareShelfTranCflHO 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',200000.) … … 13 14 md.extrude(3,1.) 14 15 md=setflowequation(md,'HO','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.timestepping.time_adapt=1. 17 18 md.timestepping.final_time=20. -
issm/trunk-jpl/test/NightlyRun/test228.py
r21060 r21408 1 1 #Test Name: SquareShelfTranForceNeg2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 13 14 md=parameterize(md,'../Par/SquareShelf.py') 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 17 18 md.timestepping.time_step=1. … … 20 21 21 22 #Set up transient 22 smb=n umpy.ones((md.mesh.numberofvertices,1))*3.623 smb=n umpy.hstack((smb,smb*-1.))23 smb=np.ones((md.mesh.numberofvertices))*3.6 24 smb=np.vstack((smb,smb*-1.)).T 24 25 25 md.smb.mass_balance=n umpy.vstack((smb,[1.5,3.]))26 md.smb.mass_balance=np.vstack((smb,[1.5,3.])) 26 27 md.transient.isthermal=False 27 28 … … 29 30 30 31 #Fields and tolerances to track changes 31 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \ 32 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \ 33 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \ 34 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4'] 35 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 36 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 37 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 38 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 39 field_values=[\ 40 md.results.TransientSolution[0].Vx,\ 41 md.results.TransientSolution[0].Vy,\ 42 md.results.TransientSolution[0].Vel,\ 43 md.results.TransientSolution[0].Pressure,\ 44 md.results.TransientSolution[0].Base,\ 45 md.results.TransientSolution[0].Surface,\ 46 md.results.TransientSolution[0].Thickness,\ 47 md.results.TransientSolution[0].SmbMassBalance,\ 48 md.results.TransientSolution[1].Vx,\ 49 md.results.TransientSolution[1].Vy,\ 50 md.results.TransientSolution[1].Vel,\ 51 md.results.TransientSolution[1].Pressure,\ 52 md.results.TransientSolution[1].Base,\ 53 md.results.TransientSolution[1].Surface,\ 54 md.results.TransientSolution[1].Thickness,\ 55 md.results.TransientSolution[1].SmbMassBalance,\ 56 md.results.TransientSolution[2].Vx,\ 57 md.results.TransientSolution[2].Vy,\ 58 md.results.TransientSolution[2].Vel,\ 59 md.results.TransientSolution[2].Pressure,\ 60 md.results.TransientSolution[2].Base,\ 61 md.results.TransientSolution[2].Surface,\ 62 md.results.TransientSolution[2].Thickness,\ 63 md.results.TransientSolution[2].SmbMassBalance,\ 64 md.results.TransientSolution[3].Vx,\ 65 md.results.TransientSolution[3].Vy,\ 66 md.results.TransientSolution[3].Vel,\ 67 md.results.TransientSolution[3].Pressure,\ 68 md.results.TransientSolution[3].Base,\ 69 md.results.TransientSolution[3].Surface,\ 70 md.results.TransientSolution[3].Thickness,\ 71 md.results.TransientSolution[3].SmbMassBalance,\ 72 ] 32 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', 33 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', 34 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', 35 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4'] 36 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 37 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 38 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 39 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 40 field_values=[md.results.TransientSolution[0].Vx, 41 md.results.TransientSolution[0].Vy, 42 md.results.TransientSolution[0].Vel, 43 md.results.TransientSolution[0].Pressure, 44 md.results.TransientSolution[0].Base, 45 md.results.TransientSolution[0].Surface, 46 md.results.TransientSolution[0].Thickness, 47 md.results.TransientSolution[0].SmbMassBalance, 48 md.results.TransientSolution[1].Vx, 49 md.results.TransientSolution[1].Vy, 50 md.results.TransientSolution[1].Vel, 51 md.results.TransientSolution[1].Pressure, 52 md.results.TransientSolution[1].Base, 53 md.results.TransientSolution[1].Surface, 54 md.results.TransientSolution[1].Thickness, 55 md.results.TransientSolution[1].SmbMassBalance, 56 md.results.TransientSolution[2].Vx, 57 md.results.TransientSolution[2].Vy, 58 md.results.TransientSolution[2].Vel, 59 md.results.TransientSolution[2].Pressure, 60 md.results.TransientSolution[2].Base, 61 md.results.TransientSolution[2].Surface, 62 md.results.TransientSolution[2].Thickness, 63 md.results.TransientSolution[2].SmbMassBalance, 64 md.results.TransientSolution[3].Vx, 65 md.results.TransientSolution[3].Vy, 66 md.results.TransientSolution[3].Vel, 67 md.results.TransientSolution[3].Pressure, 68 md.results.TransientSolution[3].Base, 69 md.results.TransientSolution[3].Surface, 70 md.results.TransientSolution[3].Thickness, 71 md.results.TransientSolution[3].SmbMassBalance] -
issm/trunk-jpl/test/NightlyRun/test229.py
r21060 r21408 1 1 #Test Name: SquareShelfTranForcePos2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 13 14 md=parameterize(md,'../Par/SquareShelf.py') 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 17 18 md.timestepping.time_step=1. … … 20 21 21 22 #Set up transient 22 smb=n umpy.ones((md.mesh.numberofvertices,1))*3.623 smb=n umpy.hstack((smb,smb*2.))23 smb=np.ones((md.mesh.numberofvertices))*3.6 24 smb=np.vstack((smb,smb*2.)).T 24 25 25 md.smb.mass_balance=n umpy.vstack((smb,[1.5,3.]))26 md.smb.mass_balance=np.vstack((smb,[1.5,3.])) 26 27 md.transient.isthermal=False 27 28 … … 29 30 30 31 #Fields and tolerances to track changes 31 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \ 32 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \ 33 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \ 34 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4'] 35 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 36 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 37 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 38 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 39 field_values=[\ 40 md.results.TransientSolution[0].Vx,\ 41 md.results.TransientSolution[0].Vy,\ 42 md.results.TransientSolution[0].Vel,\ 43 md.results.TransientSolution[0].Pressure,\ 44 md.results.TransientSolution[0].Base,\ 45 md.results.TransientSolution[0].Surface,\ 46 md.results.TransientSolution[0].Thickness,\ 47 md.results.TransientSolution[0].SmbMassBalance,\ 48 md.results.TransientSolution[1].Vx,\ 49 md.results.TransientSolution[1].Vy,\ 50 md.results.TransientSolution[1].Vel,\ 51 md.results.TransientSolution[1].Pressure,\ 52 md.results.TransientSolution[1].Base,\ 53 md.results.TransientSolution[1].Surface,\ 54 md.results.TransientSolution[1].Thickness,\ 55 md.results.TransientSolution[1].SmbMassBalance,\ 56 md.results.TransientSolution[2].Vx,\ 57 md.results.TransientSolution[2].Vy,\ 58 md.results.TransientSolution[2].Vel,\ 59 md.results.TransientSolution[2].Pressure,\ 60 md.results.TransientSolution[2].Base,\ 61 md.results.TransientSolution[2].Surface,\ 62 md.results.TransientSolution[2].Thickness,\ 63 md.results.TransientSolution[2].SmbMassBalance,\ 64 md.results.TransientSolution[3].Vx,\ 65 md.results.TransientSolution[3].Vy,\ 66 md.results.TransientSolution[3].Vel,\ 67 md.results.TransientSolution[3].Pressure,\ 68 md.results.TransientSolution[3].Base,\ 69 md.results.TransientSolution[3].Surface,\ 70 md.results.TransientSolution[3].Thickness,\ 71 md.results.TransientSolution[3].SmbMassBalance,\ 72 ] 32 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', 33 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', 34 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', 35 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4'] 36 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 37 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 38 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 39 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 40 field_values=[md.results.TransientSolution[0].Vx, 41 md.results.TransientSolution[0].Vy, 42 md.results.TransientSolution[0].Vel, 43 md.results.TransientSolution[0].Pressure, 44 md.results.TransientSolution[0].Base, 45 md.results.TransientSolution[0].Surface, 46 md.results.TransientSolution[0].Thickness, 47 md.results.TransientSolution[0].SmbMassBalance, 48 md.results.TransientSolution[1].Vx, 49 md.results.TransientSolution[1].Vy, 50 md.results.TransientSolution[1].Vel, 51 md.results.TransientSolution[1].Pressure, 52 md.results.TransientSolution[1].Base, 53 md.results.TransientSolution[1].Surface, 54 md.results.TransientSolution[1].Thickness, 55 md.results.TransientSolution[1].SmbMassBalance, 56 md.results.TransientSolution[2].Vx, 57 md.results.TransientSolution[2].Vy, 58 md.results.TransientSolution[2].Vel, 59 md.results.TransientSolution[2].Pressure, 60 md.results.TransientSolution[2].Base, 61 md.results.TransientSolution[2].Surface, 62 md.results.TransientSolution[2].Thickness, 63 md.results.TransientSolution[2].SmbMassBalance, 64 md.results.TransientSolution[3].Vx, 65 md.results.TransientSolution[3].Vy, 66 md.results.TransientSolution[3].Vel, 67 md.results.TransientSolution[3].Pressure, 68 md.results.TransientSolution[3].Base, 69 md.results.TransientSolution[3].Surface, 70 md.results.TransientSolution[3].Thickness, 71 md.results.TransientSolution[3].SmbMassBalance] -
issm/trunk-jpl/test/NightlyRun/test230.py
r21060 r21408 1 1 #Test Name: SquareShelfTranForceNeg3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',350000.) … … 14 15 md.extrude(3,1.) 15 16 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 18 19 md.timestepping.time_step=1. … … 21 22 22 23 #Set up transient 23 smb=n umpy.ones((md.mesh.numberofvertices,1))*3.624 smb=n umpy.hstack((smb,smb*-1.))24 smb=np.ones((md.mesh.numberofvertices))*3.6 25 smb=np.vstack((smb,smb*-1.)).T 25 26 26 md.smb.mass_balance=n umpy.vstack((smb,[1.5,3.]))27 md.smb.mass_balance=np.vstack((smb,[1.5,3.])) 27 28 md.transient.isthermal=False 28 29 … … 30 31 31 32 #Fields and tolerances to track changes 32 field_names =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \ 33 'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \ 34 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \ 35 'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4'] 36 field_tolerances=[1e-13,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,1e-13,\ 38 1e-13,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,1e-13] 40 field_values=[\ 41 md.results.TransientSolution[0].Vx,\ 42 md.results.TransientSolution[0].Vy,\ 43 md.results.TransientSolution[0].Vz,\ 44 md.results.TransientSolution[0].Vel,\ 45 md.results.TransientSolution[0].Pressure,\ 46 md.results.TransientSolution[0].Base,\ 47 md.results.TransientSolution[0].Surface,\ 48 md.results.TransientSolution[0].Thickness,\ 49 md.results.TransientSolution[0].SmbMassBalance,\ 50 md.results.TransientSolution[1].Vx,\ 51 md.results.TransientSolution[1].Vy,\ 52 md.results.TransientSolution[1].Vz,\ 53 md.results.TransientSolution[1].Vel,\ 54 md.results.TransientSolution[1].Pressure,\ 55 md.results.TransientSolution[1].Base,\ 56 md.results.TransientSolution[1].Surface,\ 57 md.results.TransientSolution[1].Thickness,\ 58 md.results.TransientSolution[1].SmbMassBalance,\ 59 md.results.TransientSolution[2].Vx,\ 60 md.results.TransientSolution[2].Vy,\ 61 md.results.TransientSolution[2].Vz,\ 62 md.results.TransientSolution[2].Vel,\ 63 md.results.TransientSolution[2].Pressure,\ 64 md.results.TransientSolution[2].Base,\ 65 md.results.TransientSolution[2].Surface,\ 66 md.results.TransientSolution[2].Thickness,\ 67 md.results.TransientSolution[2].SmbMassBalance,\ 68 md.results.TransientSolution[3].Vx,\ 69 md.results.TransientSolution[3].Vy,\ 70 md.results.TransientSolution[3].Vz,\ 71 md.results.TransientSolution[3].Vel,\ 72 md.results.TransientSolution[3].Pressure,\ 73 md.results.TransientSolution[3].Base,\ 74 md.results.TransientSolution[3].Surface,\ 75 md.results.TransientSolution[3].Thickness,\ 76 md.results.TransientSolution[3].SmbMassBalance,\ 77 ] 33 field_names =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', 34 'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', 35 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', 36 'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4'] 37 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13, 38 1e-13,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,1e-13, 40 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13] 41 field_values=[md.results.TransientSolution[0].Vx, 42 md.results.TransientSolution[0].Vy, 43 md.results.TransientSolution[0].Vz, 44 md.results.TransientSolution[0].Vel, 45 md.results.TransientSolution[0].Pressure, 46 md.results.TransientSolution[0].Base, 47 md.results.TransientSolution[0].Surface, 48 md.results.TransientSolution[0].Thickness, 49 md.results.TransientSolution[0].SmbMassBalance, 50 md.results.TransientSolution[1].Vx, 51 md.results.TransientSolution[1].Vy, 52 md.results.TransientSolution[1].Vz, 53 md.results.TransientSolution[1].Vel, 54 md.results.TransientSolution[1].Pressure, 55 md.results.TransientSolution[1].Base, 56 md.results.TransientSolution[1].Surface, 57 md.results.TransientSolution[1].Thickness, 58 md.results.TransientSolution[1].SmbMassBalance, 59 md.results.TransientSolution[2].Vx, 60 md.results.TransientSolution[2].Vy, 61 md.results.TransientSolution[2].Vz, 62 md.results.TransientSolution[2].Vel, 63 md.results.TransientSolution[2].Pressure, 64 md.results.TransientSolution[2].Base, 65 md.results.TransientSolution[2].Surface, 66 md.results.TransientSolution[2].Thickness, 67 md.results.TransientSolution[2].SmbMassBalance, 68 md.results.TransientSolution[3].Vx, 69 md.results.TransientSolution[3].Vy, 70 md.results.TransientSolution[3].Vz, 71 md.results.TransientSolution[3].Vel, 72 md.results.TransientSolution[3].Pressure, 73 md.results.TransientSolution[3].Base, 74 md.results.TransientSolution[3].Surface, 75 md.results.TransientSolution[3].Thickness, 76 md.results.TransientSolution[3].SmbMassBalance] -
issm/trunk-jpl/test/NightlyRun/test231.py
r21060 r21408 1 1 #Test Name: SquareShelfTranForcePos3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',350000.) … … 14 15 md.extrude(3,1.) 15 16 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 18 19 md.timestepping.time_step=1. … … 21 22 22 23 #Set up transient 23 smb=n umpy.ones((md.mesh.numberofvertices,1))*3.624 smb=n umpy.hstack((smb,smb*2.))24 smb=np.ones((md.mesh.numberofvertices))*3.6 25 smb=np.vstack((smb,smb*2.)).T 25 26 26 md.smb.mass_balance=n umpy.vstack((smb,[1.5,3.]))27 md.smb.mass_balance=np.vstack((smb,[1.5,3.])) 27 28 md.transient.isthermal=False 28 29 … … 30 31 31 32 #Fields and tolerances to track changes 32 field_names =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \ 33 'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \ 34 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \ 35 'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4'] 36 field_tolerances=[1e-13,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,1e-13,\ 38 1e-13,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,1e-13] 40 field_values=[\ 41 md.results.TransientSolution[0].Vx,\ 42 md.results.TransientSolution[0].Vy,\ 43 md.results.TransientSolution[0].Vz,\ 44 md.results.TransientSolution[0].Vel,\ 45 md.results.TransientSolution[0].Pressure,\ 46 md.results.TransientSolution[0].Base,\ 47 md.results.TransientSolution[0].Surface,\ 48 md.results.TransientSolution[0].Thickness,\ 49 md.results.TransientSolution[0].SmbMassBalance,\ 50 md.results.TransientSolution[1].Vx,\ 51 md.results.TransientSolution[1].Vy,\ 52 md.results.TransientSolution[1].Vz,\ 53 md.results.TransientSolution[1].Vel,\ 54 md.results.TransientSolution[1].Pressure,\ 55 md.results.TransientSolution[1].Base,\ 56 md.results.TransientSolution[1].Surface,\ 57 md.results.TransientSolution[1].Thickness,\ 58 md.results.TransientSolution[1].SmbMassBalance,\ 59 md.results.TransientSolution[2].Vx,\ 60 md.results.TransientSolution[2].Vy,\ 61 md.results.TransientSolution[2].Vz,\ 62 md.results.TransientSolution[2].Vel,\ 63 md.results.TransientSolution[2].Pressure,\ 64 md.results.TransientSolution[2].Base,\ 65 md.results.TransientSolution[2].Surface,\ 66 md.results.TransientSolution[2].Thickness,\ 67 md.results.TransientSolution[2].SmbMassBalance,\ 68 md.results.TransientSolution[3].Vx,\ 69 md.results.TransientSolution[3].Vy,\ 70 md.results.TransientSolution[3].Vz,\ 71 md.results.TransientSolution[3].Vel,\ 72 md.results.TransientSolution[3].Pressure,\ 73 md.results.TransientSolution[3].Base,\ 74 md.results.TransientSolution[3].Surface,\ 75 md.results.TransientSolution[3].Thickness,\ 76 md.results.TransientSolution[3].SmbMassBalance,\ 77 ] 33 field_names =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', 34 'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', 35 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', 36 'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4'] 37 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13, 38 1e-13,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,1e-13, 40 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13] 41 field_values=[md.results.TransientSolution[0].Vx, 42 md.results.TransientSolution[0].Vy, 43 md.results.TransientSolution[0].Vz, 44 md.results.TransientSolution[0].Vel, 45 md.results.TransientSolution[0].Pressure, 46 md.results.TransientSolution[0].Base, 47 md.results.TransientSolution[0].Surface, 48 md.results.TransientSolution[0].Thickness, 49 md.results.TransientSolution[0].SmbMassBalance, 50 md.results.TransientSolution[1].Vx, 51 md.results.TransientSolution[1].Vy, 52 md.results.TransientSolution[1].Vz, 53 md.results.TransientSolution[1].Vel, 54 md.results.TransientSolution[1].Pressure, 55 md.results.TransientSolution[1].Base, 56 md.results.TransientSolution[1].Surface, 57 md.results.TransientSolution[1].Thickness, 58 md.results.TransientSolution[1].SmbMassBalance, 59 md.results.TransientSolution[2].Vx, 60 md.results.TransientSolution[2].Vy, 61 md.results.TransientSolution[2].Vz, 62 md.results.TransientSolution[2].Vel, 63 md.results.TransientSolution[2].Pressure, 64 md.results.TransientSolution[2].Base, 65 md.results.TransientSolution[2].Surface, 66 md.results.TransientSolution[2].Thickness, 67 md.results.TransientSolution[2].SmbMassBalance, 68 md.results.TransientSolution[3].Vx, 69 md.results.TransientSolution[3].Vy, 70 md.results.TransientSolution[3].Vz, 71 md.results.TransientSolution[3].Vel, 72 md.results.TransientSolution[3].Pressure, 73 md.results.TransientSolution[3].Base, 74 md.results.TransientSolution[3].Surface, 75 md.results.TransientSolution[3].Thickness, 76 md.results.TransientSolution[3].SmbMassBalance] -
issm/trunk-jpl/test/NightlyRun/test232.py
r21304 r21408 1 1 #Test Name: SquareShelfTherTranForcTemp 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',180000.) … … 14 15 md.extrude(3,1.) 15 16 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.thermal.spctemperature=n umpy.vstack((numpy.vstack((md.thermal.spctemperature, md.thermal.spctemperature+5., md.thermal.spctemperature+10., md.thermal.spctemperature+15.)).T, [1.5,2.5,3.5,4.]))17 md.cluster=generic('name',gethostname(),'np',3) 18 md.thermal.spctemperature=np.vstack((np.vstack((md.thermal.spctemperature, md.thermal.spctemperature+5., md.thermal.spctemperature+10., md.thermal.spctemperature+15.)).T, [1.5,2.5,3.5,4.])) 18 19 md.timestepping.time_step=1. 19 20 md.timestepping.final_time=4. -
issm/trunk-jpl/test/NightlyRun/test233.py
r21304 r21408 1 1 #Test Name: SquareShelfTranHOForcTemp 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',200000.) … … 14 15 md.extrude(3,1.) 15 16 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.thermal.spctemperature=n umpy.vstack((numpy.vstack((md.thermal.spctemperature, md.thermal.spctemperature+5.)).T, [1.,2.]))17 md.cluster=generic('name',gethostname(),'np',3) 18 md.thermal.spctemperature=np.vstack((np.vstack((md.thermal.spctemperature, md.thermal.spctemperature+5.)).T, [1.,2.])) 18 19 md.timestepping.time_step=0.5 19 20 md.timestepping.final_time=2. -
issm/trunk-jpl/test/NightlyRun/test236.py
r21060 r21408 1 1 #Test Name: SquareShelfTranIspddIsdeltaSSA2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 14 15 15 16 # Use of ispdd and isdelta18o methods 16 md.smb = SMBpdd() ;17 md.smb = SMBpdd() 17 18 md.smb.isdelta18o=1 18 19 md.smb.ismungsm=0 … … 20 21 # Add temperature, precipitation and delta18o needed to measure the surface mass balance 21 22 # creating delta18o 22 delta18o=n umpy.loadtxt('../Data/delta18o.data')23 delta18o=np.loadtxt('../Data/delta18o.data') 23 24 md.smb.delta18o=delta18o 24 25 # creating delta18oSurface 25 md.smb.delta18o_surface = n umpy.zeros((2,numpy.size(delta18o,axis=1)))26 md.smb.delta18o_surface = np.zeros((2,np.size(delta18o,axis=1))) 26 27 md.smb.delta18o_surface[1,:] = delta18o[1,:] 27 28 28 29 # creating Present day and lgm temperatures 29 30 # Same temperature over the all region: 30 tmonth=n umpy.ones(12)*(238.15+20.)31 md.smb.temperatures_presentday=n umpy.zeros((md.mesh.numberofvertices+1,12))32 md.smb.temperatures_lgm=n umpy.zeros((md.mesh.numberofvertices+1,12))31 tmonth=np.ones(12)*(238.15+20.) 32 md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12)) 33 md.smb.temperatures_lgm=np.zeros((md.mesh.numberofvertices+1,12)) 33 34 for imonth in xrange(0,12): 34 35 md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth] … … 39 40 40 41 # creating initialization and spc temperatures initialization and spc 41 md.thermal.spctemperature=n umpy.mean(md.smb.temperatures_lgm[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1) #-10*ones(md.mesh.numberofvertices,1)42 md.thermal.spctemperature=n umpy.tile(md.thermal.spctemperature,(1,md.timestepping.final_time/md.timestepping.time_step))43 itemp=n umpy.arange(0,md.timestepping.final_time,md.timestepping.time_step)44 md.thermal.spctemperature=n umpy.vstack((md.thermal.spctemperature,itemp.reshape(1,-1)))42 md.thermal.spctemperature=np.mean(md.smb.temperatures_lgm[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1) #-10*ones(md.mesh.numberofvertices,1) 43 md.thermal.spctemperature=np.tile(md.thermal.spctemperature,(1,md.timestepping.final_time/md.timestepping.time_step)) 44 itemp=np.arange(0,md.timestepping.final_time,md.timestepping.time_step) 45 md.thermal.spctemperature=np.vstack((md.thermal.spctemperature,itemp.reshape(1,-1))) 45 46 46 47 md.initialization.temperature=md.smb.temperatures_lgm[0:md.mesh.numberofvertices,0] #*ones(md.mesh.numberofvertices,1) … … 48 49 49 50 # creating precipitation 50 md.smb.precipitations_presentday=n umpy.zeros((md.mesh.numberofvertices+1,12))51 md.smb.precipitations_lgm=n umpy.zeros((md.mesh.numberofvertices+1,12))51 md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12)) 52 md.smb.precipitations_lgm=np.zeros((md.mesh.numberofvertices+1,12)) 52 53 for imonth in xrange(0,12): 53 54 md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5 … … 57 58 58 59 # Interpolation factors 59 md.smb.Tdiff=0.5*n umpy.ones((2,md.timestepping.final_time))60 md.smb.sealev=0.5*n umpy.ones((2,md.timestepping.final_time))60 md.smb.Tdiff=0.5*np.ones((2,md.timestepping.final_time)) 61 md.smb.sealev=0.5*np.ones((2,md.timestepping.final_time)) 61 62 # Year of each data point 62 md.smb.Tdiff[1,1:md.timestepping.final_time]=n umpy.arange(1.,md.timestepping.final_time)63 md.smb.sealev[1,1:md.timestepping.final_time]=n umpy.arange(1.,md.timestepping.final_time)63 md.smb.Tdiff[1,1:md.timestepping.final_time]=np.arange(1.,md.timestepping.final_time) 64 md.smb.sealev[1,1:md.timestepping.final_time]=np.arange(1.,md.timestepping.final_time) 64 65 65 66 # time steps and resolution … … 71 72 md.transient.requested_outputs=['default','SmbMonthlytemperatures'] 72 73 md=setflowequation(md,'SSA','all') 73 md.cluster=generic('name', oshostname(),'np',3)74 md.cluster=generic('name',gethostname(),'np',3) 74 75 md=solve(md,'Transient') 75 76 … … 77 78 field_names =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMonthlytemperatures1','SmbMassBalance1',\ 78 79 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMonthlytemperatures2','SmbMassBalance2',\ 79 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3'] ;80 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3'] 80 81 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ 81 82 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ 82 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13] ;83 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13] 83 84 field_values=[\ 84 85 md.results.TransientSolution[0].Vx,\ -
issm/trunk-jpl/test/NightlyRun/test237.py
r21060 r21408 1 1 #Test Name: SquareShelfTranIspddIsdeltaSSA3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 from generic import generic 11 12 … … 15 16 16 17 # Use of ispdd and isdelta18o methods 17 md.smb = SMBpdd() ;18 md.smb = SMBpdd() 18 19 md.smb.isdelta18o=0 19 20 md.smb.ismungsm=1 … … 26 27 # creating Present day and lgm temperatures 27 28 # Same temperature over the all region: 28 tmonth=n umpy.ones(12)*(238.15+20.)29 md.smb.temperatures_presentday=n umpy.zeros((md.mesh.numberofvertices+1,12))30 md.smb.temperatures_lgm=n umpy.zeros((md.mesh.numberofvertices+1,12))29 tmonth=np.ones(12)*(238.15+20.) 30 md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12)) 31 md.smb.temperatures_lgm=np.zeros((md.mesh.numberofvertices+1,12)) 31 32 for imonth in xrange(0,12): 32 33 md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth] … … 37 38 38 39 # creating initialization and spc temperatures initialization and spc 39 md.thermal.spctemperature=n umpy.mean(md.smb.temperatures_lgm[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1) #-10*ones(md.mesh.numberofvertices,1)40 md.thermal.spctemperature=n umpy.tile(md.thermal.spctemperature,(1,md.timestepping.final_time/md.timestepping.time_step))41 itemp=n umpy.arange(0,md.timestepping.final_time,md.timestepping.time_step)42 md.thermal.spctemperature=n umpy.vstack((md.thermal.spctemperature,itemp.reshape(1,-1)))40 md.thermal.spctemperature=np.mean(md.smb.temperatures_lgm[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1) #-10*ones(md.mesh.numberofvertices,1) 41 md.thermal.spctemperature=np.tile(md.thermal.spctemperature,(1,md.timestepping.final_time/md.timestepping.time_step)) 42 itemp=np.arange(0,md.timestepping.final_time,md.timestepping.time_step) 43 md.thermal.spctemperature=np.vstack((md.thermal.spctemperature,itemp.reshape(1,-1))) 43 44 44 45 md.initialization.temperature=md.smb.temperatures_lgm[0:md.mesh.numberofvertices,0].reshape(-1,1) #*ones(md.mesh.numberofvertices,1) … … 46 47 47 48 # creating precipitation 48 md.smb.precipitations_presentday=n umpy.zeros((md.mesh.numberofvertices+1,12))49 md.smb.precipitations_lgm=n umpy.zeros((md.mesh.numberofvertices+1,12))49 md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12)) 50 md.smb.precipitations_lgm=np.zeros((md.mesh.numberofvertices+1,12)) 50 51 for imonth in xrange(0,12): 51 52 md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5 … … 55 56 56 57 fsize=int(md.timestepping.final_time/md.timestepping.time_step)+2 57 md.smb.Pfac=n umpy.zeros((2,fsize))58 md.smb.Tdiff=n umpy.zeros((2,fsize))59 md.smb.sealev=n umpy.zeros((2,fsize))58 md.smb.Pfac=np.zeros((2,fsize)) 59 md.smb.Tdiff=np.zeros((2,fsize)) 60 md.smb.sealev=np.zeros((2,fsize)) 60 61 for iint in xrange(0,fsize): 61 62 # Interpolation factors … … 72 73 md.extrude(3,1.) 73 74 md=setflowequation(md,'SSA','all') 74 md.cluster=generic('name', oshostname(),'np',1)75 md.cluster=generic('name',gethostname(),'np',1) 75 76 md=solve(md,'Transient') 76 77 … … 78 79 field_names =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1','SmbMonthlytemperatures1','SmbMassBalance1',\ 79 80 'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2','SmbMonthlytemperatures2','SmbMassBalance2',\ 80 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3','SmbMonthlytemperatures3','SmbMassBalance3'] ;81 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3','SmbMonthlytemperatures3','SmbMassBalance3'] 81 82 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-8,1e-8,1e-8,1e-13,1e-8,1e-13,1e-13,\ 82 83 1e-13,1e-13,1e-13,1e-13,1e-13,1e-8,1e-8,1e-8,7e-13,1e-7,1e-13,1e-13,\ 83 1e-13,1e-13,1e-08,1e-13,1e-13,1e-8,1e-8,1e-8,7e-13,5e-7,1e-13,1e-13] ;84 1e-13,1e-13,1e-08,1e-13,1e-13,1e-8,1e-8,1e-8,7e-13,5e-7,1e-13,1e-13] 84 85 field_values=[\ 85 86 md.results.TransientSolution[0].Vx,\ -
issm/trunk-jpl/test/NightlyRun/test238.py
r21060 r21408 1 1 #Test Name: SquareShelfTranIspddIsdeltaO18pdSSA2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 14 15 15 16 # Use of ispdd and isdelta18o methods 16 md.smb = SMBd18opdd() ;17 md.smb.isd18opd=1 ;17 md.smb = SMBd18opdd() 18 md.smb.isd18opd=1 18 19 19 20 # Add temperature, precipitation and delta18o needed to measure the surface mass balance 20 21 # creating delta18o 21 delta18o=n umpy.loadtxt('../Data/delta18o.data')22 delta18o=np.loadtxt('../Data/delta18o.data') 22 23 md.smb.delta18o=delta18o 23 24 24 25 # creating Present day temperatures 25 26 # Same temperature over the all region: 26 tmonth=n umpy.ones(12)*(238.15+20.)27 md.smb.temperatures_presentday=n umpy.zeros((md.mesh.numberofvertices+1,12))27 tmonth=np.ones(12)*(238.15+20.) 28 md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12)) 28 29 for imonth in xrange(0,12): 29 30 md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth] … … 32 33 33 34 # creating initialization and spc temperatures initialization and spc 34 md.thermal.spctemperature=n umpy.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)35 md.thermal.spctemperature=np.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1) 35 36 md.thermal.spctemperature=md.thermal.spctemperature-10 36 37 md.initialization.temperature=md.thermal.spctemperature … … 38 39 39 40 # creating precipitation 40 md.smb.precipitations_presentday=n umpy.zeros((md.mesh.numberofvertices+1,12))41 md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12)) 41 42 for imonth in xrange(0,12): 42 43 md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5 … … 44 45 45 46 # time steps and resolution 46 md.timestepping.time_step=20 ;47 md.settings.output_frequency=1 ;48 md.timestepping.final_time=60 ;47 md.timestepping.time_step=20 48 md.settings.output_frequency=1 49 md.timestepping.final_time=60 49 50 50 51 # 51 52 md.transient.requested_outputs=['default','SmbMonthlytemperatures'] 52 53 md=setflowequation(md,'SSA','all') 53 md.cluster=generic('name', oshostname(),'np',3)54 md.cluster=generic('name',gethostname(),'np',3) 54 55 md=solve(md,'Transient') 55 56 … … 57 58 field_names =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMonthlytemperatures1','SmbMassBalance1',\ 58 59 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMonthlytemperatures2','SmbMassBalance2',\ 59 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3'] ;60 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3'] 60 61 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ 61 62 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ 62 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13] ;63 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13] 63 64 field_values=[\ 64 65 md.results.TransientSolution[0].Vx,\ -
issm/trunk-jpl/test/NightlyRun/test239.py
r21060 r21408 1 1 #Test Name: SquareShelfTranIspddIsdeltaO18pdInterpSSA2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 14 15 15 16 # Use of ispdd and isdelta18o methods 16 md.smb = SMBd18opdd() ;17 md.smb.isd18opd=1 ;17 md.smb = SMBd18opdd() 18 md.smb.isd18opd=1 18 19 19 20 # Add temperature, precipitation and delta18o needed to measure the surface mass balance 20 21 # creating delta18o 21 delta18o=n umpy.loadtxt('../Data/delta18o.data')22 delta18o=np.loadtxt('../Data/delta18o.data') 22 23 md.smb.delta18o=delta18o 23 24 24 25 # creating Present day temperatures 25 26 # Same temperature over the all region: 26 tmonth=n umpy.ones(12)*(238.15+20.)27 md.smb.temperatures_presentday=n umpy.zeros((md.mesh.numberofvertices+1,12))27 tmonth=np.ones(12)*(238.15+20.) 28 md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12)) 28 29 for imonth in xrange(0,12): 29 30 md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth] … … 32 33 33 34 # creating initialization and spc temperatures initialization and spc 34 md.thermal.spctemperature=n umpy.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)35 md.thermal.spctemperature=np.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1) 35 36 md.thermal.spctemperature=md.thermal.spctemperature-10 36 37 md.initialization.temperature=md.thermal.spctemperature … … 38 39 39 40 # creating precipitation 40 md.smb.precipitations_presentday=n umpy.zeros((md.mesh.numberofvertices+1,12))41 md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12)) 41 42 for imonth in xrange(0,12): 42 43 md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5 … … 44 45 45 46 # time steps and resolution 46 md.timestepping.time_step=0.5 ;47 md.settings.output_frequency=1 ;48 md.timestepping.final_time=2 ;47 md.timestepping.time_step=0.5 48 md.settings.output_frequency=1 49 md.timestepping.final_time=2 49 50 50 51 # 51 52 md.transient.requested_outputs=['default','SmbMonthlytemperatures'] 52 53 md=setflowequation(md,'SSA','all') 53 md.cluster=generic('name', oshostname(),'np',3)54 md.cluster=generic('name',gethostname(),'np',3) 54 55 md=solve(md,'Transient') 55 56 … … 57 58 field_names =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMonthlytemperatures1','SmbMassBalance1',\ 58 59 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMonthlytemperatures2','SmbMassBalance2',\ 59 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3'] ;60 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3'] 60 61 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ 61 62 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ 62 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13] ;63 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13] 63 64 field_values=[\ 64 65 md.results.TransientSolution[0].Vx,\ -
issm/trunk-jpl/test/NightlyRun/test240.py
r21060 r21408 1 1 #Test Name: SquareShelfTranIspddIsdeltaO18pdNoInterpSSA2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 14 15 15 16 # Use of ispdd and isdelta18o methods 16 md.smb = SMBd18opdd() ;17 md.smb.isd18opd=1 ;17 md.smb = SMBd18opdd() 18 md.smb.isd18opd=1 18 19 19 20 # Add temperature, precipitation and delta18o needed to measure the surface mass balance 20 21 # creating delta18o 21 delta18o=n umpy.loadtxt('../Data/delta18o.data')22 delta18o=np.loadtxt('../Data/delta18o.data') 22 23 md.smb.delta18o=delta18o 23 24 24 25 # creating Present day temperatures 25 26 # Same temperature over the all region: 26 tmonth=n umpy.ones(12)*(238.15+20.)27 md.smb.temperatures_presentday=n umpy.zeros((md.mesh.numberofvertices+1,12))27 tmonth=np.ones(12)*(238.15+20.) 28 md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12)) 28 29 for imonth in xrange(0,12): 29 30 md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth] … … 32 33 33 34 # creating initialization and spc temperatures initialization and spc 34 md.thermal.spctemperature=n umpy.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)35 md.thermal.spctemperature=np.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1) 35 36 md.thermal.spctemperature=md.thermal.spctemperature-10 36 37 md.initialization.temperature=md.thermal.spctemperature … … 38 39 39 40 # creating precipitation 40 md.smb.precipitations_presentday=n umpy.zeros((md.mesh.numberofvertices+1,12))41 md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12)) 41 42 for imonth in xrange(0,12): 42 43 md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5 … … 44 45 45 46 # time steps and resolution 46 md.timestepping.time_step=0.5 ;47 md.settings.output_frequency=1 ;48 md.timestepping.final_time=2 ;49 md.timestepping.interp_forcings=0 ;47 md.timestepping.time_step=0.5 48 md.settings.output_frequency=1 49 md.timestepping.final_time=2 50 md.timestepping.interp_forcings=0 50 51 51 52 # 52 53 md.transient.requested_outputs=['default','SmbMonthlytemperatures'] 53 54 md=setflowequation(md,'SSA','all') 54 md.cluster=generic('name', oshostname(),'np',3)55 md.cluster=generic('name',gethostname(),'np',3) 55 56 md=solve(md,'Transient') 56 57 … … 58 59 field_names =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMonthlytemperatures1','SmbMassBalance1',\ 59 60 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMonthlytemperatures2','SmbMassBalance2',\ 60 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3'] ;61 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3'] 61 62 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ 62 63 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ 63 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13] ;64 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13] 64 65 field_values=[\ 65 66 md.results.TransientSolution[0].Vx,\ -
issm/trunk-jpl/test/NightlyRun/test241.py
r21060 r21408 1 1 #Test Name: SquareShelfTranForceNoInterp2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 13 14 md=parameterize(md,'../Par/SquareShelf.py') 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 17 18 md.timestepping.time_step=1. … … 21 22 22 23 #Set up transient 23 smb=n umpy.ones((md.mesh.numberofvertices,1))*3.624 smb=n umpy.hstack((smb,smb*-1.))24 smb=np.ones((md.mesh.numberofvertices))*3.6 25 smb=np.vstack((smb,smb*-1.)).T 25 26 26 md.smb.mass_balance=n umpy.vstack((smb,[1.5,3.]))27 md.smb.mass_balance=np.vstack((smb,[1.5,3.])) 27 28 md.transient.isthermal=False 28 29 … … 30 31 31 32 #Fields and tolerances to track changes 32 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \ 33 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \ 34 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \ 35 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4'] 36 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 37 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 38 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 39 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 40 field_values=[\ 41 md.results.TransientSolution[0].Vx,\ 42 md.results.TransientSolution[0].Vy,\ 43 md.results.TransientSolution[0].Vel,\ 44 md.results.TransientSolution[0].Pressure,\ 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[1].Vx,\ 50 md.results.TransientSolution[1].Vy,\ 51 md.results.TransientSolution[1].Vel,\ 52 md.results.TransientSolution[1].Pressure,\ 53 md.results.TransientSolution[1].Base,\ 54 md.results.TransientSolution[1].Surface,\ 55 md.results.TransientSolution[1].Thickness,\ 56 md.results.TransientSolution[1].SmbMassBalance,\ 57 md.results.TransientSolution[2].Vx,\ 58 md.results.TransientSolution[2].Vy,\ 59 md.results.TransientSolution[2].Vel,\ 60 md.results.TransientSolution[2].Pressure,\ 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[3].Vx,\ 66 md.results.TransientSolution[3].Vy,\ 67 md.results.TransientSolution[3].Vel,\ 68 md.results.TransientSolution[3].Pressure,\ 69 md.results.TransientSolution[3].Base,\ 70 md.results.TransientSolution[3].Surface,\ 71 md.results.TransientSolution[3].Thickness,\ 72 md.results.TransientSolution[3].SmbMassBalance,\ 73 ] 33 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', 34 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', 35 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', 36 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4'] 37 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 38 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 39 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 40 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 41 field_values=[md.results.TransientSolution[0].Vx, 42 md.results.TransientSolution[0].Vy, 43 md.results.TransientSolution[0].Vel, 44 md.results.TransientSolution[0].Pressure, 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[1].Vx, 50 md.results.TransientSolution[1].Vy, 51 md.results.TransientSolution[1].Vel, 52 md.results.TransientSolution[1].Pressure, 53 md.results.TransientSolution[1].Base, 54 md.results.TransientSolution[1].Surface, 55 md.results.TransientSolution[1].Thickness, 56 md.results.TransientSolution[1].SmbMassBalance, 57 md.results.TransientSolution[2].Vx, 58 md.results.TransientSolution[2].Vy, 59 md.results.TransientSolution[2].Vel, 60 md.results.TransientSolution[2].Pressure, 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[3].Vx, 66 md.results.TransientSolution[3].Vy, 67 md.results.TransientSolution[3].Vel, 68 md.results.TransientSolution[3].Pressure, 69 md.results.TransientSolution[3].Base, 70 md.results.TransientSolution[3].Surface, 71 md.results.TransientSolution[3].Thickness, 72 md.results.TransientSolution[3].SmbMassBalance] -
issm/trunk-jpl/test/NightlyRun/test242.py
r21060 r21408 1 1 #Test Name: SquareShelfTranForceNoInterp3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',350000.) … … 14 15 md.extrude(3,1.) 15 16 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 18 19 md.timestepping.time_step=1. … … 22 23 23 24 #Set up transient 24 smb=n umpy.ones((md.mesh.numberofvertices,1))*3.625 smb=n umpy.hstack((smb,smb*-1.))25 smb=np.ones((md.mesh.numberofvertices))*3.6 26 smb=np.vstack((smb,smb*-1.)).T 26 27 27 md.smb.mass_balance=n umpy.vstack((smb,[1.5,3.]))28 md.smb.mass_balance=np.vstack((smb,[1.5,3.])) 28 29 md.transient.isthermal=False 29 30 … … 31 32 32 33 #Fields and tolerances to track changes 33 field_names =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \ 34 'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \ 35 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \ 36 'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4'] 37 field_tolerances=[\ 38 1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13,\ 39 1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13,\ 40 1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13,\ 41 1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13] 42 field_values=[\ 43 md.results.TransientSolution[0].Vx,\ 44 md.results.TransientSolution[0].Vy,\ 45 md.results.TransientSolution[0].Vz,\ 46 md.results.TransientSolution[0].Vel,\ 47 md.results.TransientSolution[0].Pressure,\ 48 md.results.TransientSolution[0].Base,\ 49 md.results.TransientSolution[0].Surface,\ 50 md.results.TransientSolution[0].Thickness,\ 51 md.results.TransientSolution[0].SmbMassBalance,\ 52 md.results.TransientSolution[1].Vx,\ 53 md.results.TransientSolution[1].Vy,\ 54 md.results.TransientSolution[1].Vz,\ 55 md.results.TransientSolution[1].Vel,\ 56 md.results.TransientSolution[1].Pressure,\ 57 md.results.TransientSolution[1].Base,\ 58 md.results.TransientSolution[1].Surface,\ 59 md.results.TransientSolution[1].Thickness,\ 60 md.results.TransientSolution[1].SmbMassBalance,\ 61 md.results.TransientSolution[2].Vx,\ 62 md.results.TransientSolution[2].Vy,\ 63 md.results.TransientSolution[2].Vz,\ 64 md.results.TransientSolution[2].Vel,\ 65 md.results.TransientSolution[2].Pressure,\ 66 md.results.TransientSolution[2].Base,\ 67 md.results.TransientSolution[2].Surface,\ 68 md.results.TransientSolution[2].Thickness,\ 69 md.results.TransientSolution[2].SmbMassBalance,\ 70 md.results.TransientSolution[3].Vx,\ 71 md.results.TransientSolution[3].Vy,\ 72 md.results.TransientSolution[3].Vz,\ 73 md.results.TransientSolution[3].Vel,\ 74 md.results.TransientSolution[3].Pressure,\ 75 md.results.TransientSolution[3].Base,\ 76 md.results.TransientSolution[3].Surface,\ 77 md.results.TransientSolution[3].Thickness,\ 78 md.results.TransientSolution[3].SmbMassBalance,\ 79 ] 34 field_names =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', 35 'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', 36 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', 37 'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4'] 38 field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13, 39 1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13, 40 1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13, 41 1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13] 42 field_values=[md.results.TransientSolution[0].Vx, 43 md.results.TransientSolution[0].Vy, 44 md.results.TransientSolution[0].Vz, 45 md.results.TransientSolution[0].Vel, 46 md.results.TransientSolution[0].Pressure, 47 md.results.TransientSolution[0].Base, 48 md.results.TransientSolution[0].Surface, 49 md.results.TransientSolution[0].Thickness, 50 md.results.TransientSolution[0].SmbMassBalance, 51 md.results.TransientSolution[1].Vx, 52 md.results.TransientSolution[1].Vy, 53 md.results.TransientSolution[1].Vz, 54 md.results.TransientSolution[1].Vel, 55 md.results.TransientSolution[1].Pressure, 56 md.results.TransientSolution[1].Base, 57 md.results.TransientSolution[1].Surface, 58 md.results.TransientSolution[1].Thickness, 59 md.results.TransientSolution[1].SmbMassBalance, 60 md.results.TransientSolution[2].Vx, 61 md.results.TransientSolution[2].Vy, 62 md.results.TransientSolution[2].Vz, 63 md.results.TransientSolution[2].Vel, 64 md.results.TransientSolution[2].Pressure, 65 md.results.TransientSolution[2].Base, 66 md.results.TransientSolution[2].Surface, 67 md.results.TransientSolution[2].Thickness, 68 md.results.TransientSolution[2].SmbMassBalance, 69 md.results.TransientSolution[3].Vx, 70 md.results.TransientSolution[3].Vy, 71 md.results.TransientSolution[3].Vz, 72 md.results.TransientSolution[3].Vel, 73 md.results.TransientSolution[3].Pressure, 74 md.results.TransientSolution[3].Base, 75 md.results.TransientSolution[3].Surface, 76 md.results.TransientSolution[3].Thickness, 77 md.results.TransientSolution[3].SmbMassBalance] -
issm/trunk-jpl/test/NightlyRun/test270.py
r21056 r21408 1 1 #Test Name: SquareShelfStressSSA2dDamage 2 import numpy 3 from model import model 2 import numpy as np 3 from model import * 4 from socket import gethostnamemodel 4 5 from triangle import triangle 5 6 from setmask import setmask … … 9 10 from matdamageice import matdamageice 10 11 from generic import generic 11 from socket import gethostname as oshostname12 from socket import gethostname 12 13 13 14 md=triangle(model(),'../Exp/Square.exp',150000.) … … 16 17 md=parameterize(md,'../Par/SquareShelf.py') 17 18 md.damage.isdamage=1 18 md.damage.D=0.5*n umpy.ones(md.mesh.numberofvertices)19 md.damage.spcdamage=n umpy.nan*numpy.ones(md.mesh.numberofvertices)19 md.damage.D=0.5*np.ones(md.mesh.numberofvertices) 20 md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices) 20 21 md=setflowequation(md,'SSA','all') 21 md.cluster=generic('name', oshostname(),'np',3)22 md.cluster=generic('name',gethostname(),'np',3) 22 23 md=solve(md,'Stressbalance') 23 24 -
issm/trunk-jpl/test/NightlyRun/test272.py
r21056 r21408 1 1 #Test Name: SquareShelfCMDSSA2dDamage 2 import numpy 3 from model import model 2 import numpy as np 3 from model import * 4 from socket import gethostnamemodel 4 5 from triangle import triangle 5 6 from setmask import setmask … … 7 8 from setflowequation import setflowequation 8 9 from solve import solve 9 from socket import gethostname as oshostname10 from socket import gethostname 10 11 from matdamageice import matdamageice 11 12 from generic import generic … … 16 17 md=parameterize(md,'../Par/SquareShelf.py') 17 18 md.damage.isdamage=1 18 md.damage.D=0.5*n umpy.ones(md.mesh.numberofvertices)19 md.damage.spcdamage=n umpy.nan*numpy.ones(md.mesh.numberofvertices)19 md.damage.D=0.5*np.ones(md.mesh.numberofvertices) 20 md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices) 20 21 md=setflowequation(md,'SSA','all') 21 22 … … 23 24 md.inversion.iscontrol=1 24 25 md.inversion.control_parameters=['DamageDbar'] 25 md.inversion.min_parameters=10**-13*n umpy.ones((md.mesh.numberofvertices,1))26 md.inversion.max_parameters=n umpy.ones((md.mesh.numberofvertices,1))26 md.inversion.min_parameters=10**-13*np.ones((md.mesh.numberofvertices)) 27 md.inversion.max_parameters=np.ones((md.mesh.numberofvertices)) 27 28 md.inversion.nsteps=2 28 29 md.inversion.cost_functions=[101] 29 md.inversion.cost_functions_coefficients=n umpy.ones((md.mesh.numberofvertices,1))30 md.inversion.gradient_scaling=0.9*n umpy.ones((md.inversion.nsteps,1))31 md.inversion.maxiter_per_step=2.*n umpy.ones((md.inversion.nsteps,1))32 md.inversion.step_threshold=0.99*n umpy.ones((md.inversion.nsteps,1))30 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices)) 31 md.inversion.gradient_scaling=0.9*np.ones((md.inversion.nsteps)) 32 md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps)) 33 md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps)) 33 34 md.inversion.vx_obs=md.initialization.vx 34 35 md.inversion.vy_obs=md.initialization.vy 35 36 36 md.cluster=generic('name', oshostname(),'np',3)37 md.cluster=generic('name',gethostname(),'np',3) 37 38 md=solve(md,'Stressbalance') 38 39 -
issm/trunk-jpl/test/NightlyRun/test273.py
r21056 r21408 1 1 #Test Name: SquareShelfStressSSA2dDamageUpdate 2 import numpy 3 from model import model 2 import numpy as np 3 from model import * 4 from socket import gethostnamemodel 4 5 from triangle import triangle 5 6 from setmask import setmask … … 9 10 from matdamageice import matdamageice 10 11 from generic import generic 11 from socket import gethostname as oshostname12 from socket import gethostname 12 13 13 14 md=triangle(model(),'../Exp/Square.exp',150000.) … … 16 17 md=parameterize(md,'../Par/SquareShelf.py') 17 18 md.damage.isdamage=1 18 md.damage.D=0.*n umpy.ones(md.mesh.numberofvertices)19 md.damage.spcdamage=n umpy.nan*numpy.ones(md.mesh.numberofvertices)19 md.damage.D=0.*np.ones(md.mesh.numberofvertices) 20 md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices) 20 21 md=setflowequation(md,'SSA','all') 21 md.cluster=generic('name', oshostname(),'np',3)22 md.cluster=generic('name',gethostname(),'np',3) 22 23 23 24 md.stressbalance.requested_outputs=['default','NewDamage'] -
issm/trunk-jpl/test/NightlyRun/test274.py
r21056 r21408 1 1 #Test Name: SquareShelfStressSSA2dDamageRift 2 import numpy 3 from model import model 2 import numpy as np 3 from model import * 4 from socket import gethostnamemodel 4 5 from triangle import triangle 5 6 from setmask import setmask … … 7 8 from setflowequation import setflowequation 8 9 from solve import solve 9 from socket import gethostname as oshostname10 from socket import gethostname 10 11 from matdamageice import matdamageice 11 12 from meshprocessrifts import meshprocessrifts … … 18 19 md=parameterize(md,'../Par/SquareShelf2.py') 19 20 md.damage.isdamage=1 20 md.damage.D=0.5*n umpy.ones(md.mesh.numberofvertices)21 md.damage.spcdamage=n umpy.nan*numpy.ones(md.mesh.numberofvertices)21 md.damage.D=0.5*np.ones(md.mesh.numberofvertices) 22 md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices) 22 23 md=setflowequation(md,'SSA','all') 23 24 24 md.cluster=generic('name', oshostname(),'np',3)25 md.cluster=generic('name',gethostname(),'np',3) 25 26 print md.rifts.riftstruct[0]['fill'] 26 27 md=solve(md,'Stressbalance') -
issm/trunk-jpl/test/NightlyRun/test275.py
r21060 r21408 1 1 #Test Name: SquareShelfDamageEvolutionSSA2dPralong 2 import numpy 2 import numpy as np 3 3 from triangle import triangle 4 from model import model 4 from model import * 5 from socket import gethostnamemodel 5 6 from setmask import setmask 6 7 from parameterize import parameterize … … 8 9 from setflowequation import setflowequation 9 10 from generic import generic 10 from socket import gethostname as oshostname11 from socket import gethostname 11 12 from solve import solve 12 13 from matdamageice import matdamageice … … 17 18 md=parameterize(md,'../Par/SquareShelf.py') 18 19 md.damage.isdamage=1 19 md.damage.D=0.1*n umpy.ones(md.mesh.numberofvertices)20 md.damage.spcdamage=n umpy.nan*numpy.ones(md.mesh.numberofvertices)20 md.damage.D=0.1*np.ones(md.mesh.numberofvertices) 21 md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices) 21 22 md.damage.law=1 22 23 … … 31 32 32 33 md=setflowequation(md,'SSA','all') 33 md.cluster=generic('name', oshostname(),'np',3)34 md.cluster=generic('name',gethostname(),'np',3) 34 35 md=solve(md,'DamageEvolution') 35 36 -
issm/trunk-jpl/test/NightlyRun/test280.py
r21060 r21408 1 1 #Test Name: SquareShelfStressSSA2dHigherOrder 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 from ContourToMesh import * 10 11 … … 13 14 md=parameterize(md,'../Par/SquareShelf.py') 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 17 18 field_names=[] -
issm/trunk-jpl/test/NightlyRun/test285.py
r21060 r21408 1 1 #Test Name: SquareShelfStressHOHigherOrder 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 from ContourToMesh import * 10 11 11 md=triangle(model(),'../Exp/Square.exp',150000.) ;12 md=setmask(md,'all','') ;13 md=parameterize(md,'../Par/SquareShelf.py') ;12 md=triangle(model(),'../Exp/Square.exp',150000.) 13 md=setmask(md,'all','') 14 md=parameterize(md,'../Par/SquareShelf.py') 14 15 md.extrude(3,2.) 15 md=setflowequation(md,'HO','all') ;16 md.cluster=generic('name', oshostname(),'np',3);16 md=setflowequation(md,'HO','all') 17 md.cluster=generic('name',gethostname(),'np',3) 17 18 18 19 field_names=[] -
issm/trunk-jpl/test/NightlyRun/test290.py
r21060 r21408 1 1 #Test Name: SquareShelfStressFSP2P1 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 from ContourToMesh import * 10 11 11 md=triangle(model(),'../Exp/Square.exp',150000.) ;12 md=setmask(md,'all','') ;13 md=parameterize(md,'../Par/SquareShelf.py') ;12 md=triangle(model(),'../Exp/Square.exp',150000.) 13 md=setmask(md,'all','') 14 md=parameterize(md,'../Par/SquareShelf.py') 14 15 md.extrude(3,2.) 15 md=setflowequation(md,'FS','all') ;16 md.flowequation.fe_FS='TaylorHood' ;17 md.cluster=generic('name', oshostname(),'np',3);18 md=solve(md,'Stressbalance') ;16 md=setflowequation(md,'FS','all') 17 md.flowequation.fe_FS='TaylorHood' 18 md.cluster=generic('name',gethostname(),'np',3) 19 md=solve(md,'Stressbalance') 19 20 20 21 #Fields and tolerances to track changes 21 field_names =['Vx', 'Vy', 'Vz', 'Vel','Pressure'] ;22 field_names =['Vx', 'Vy', 'Vz', 'Vel','Pressure'] 22 23 field_tolerances=[5e-5,5e-5,8e-5,5e-5,1e-7] 23 24 field_values=[\ … … 27 28 md.results.StressbalanceSolution.Vel,\ 28 29 md.results.StressbalanceSolution.Pressure,\ 29 ] ;30 ] -
issm/trunk-jpl/test/NightlyRun/test291.py
r21060 r21408 1 1 #Test Name: SquareShelfStressFSP4z 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 from ContourToMesh import * 10 11 … … 15 16 md=setflowequation(md,'FS','all') 16 17 md.flowequation.fe_FS='OneLayerP4z' 17 md.cluster=generic('name', oshostname(),'np',1)18 md.cluster=generic('name',gethostname(),'np',1) 18 19 md=solve(md,'Stressbalance') 19 20 20 21 #Fields and tolerances to track changes 21 field_names =['Vx', 'Vy', 'Vz', 'Vel','Pressure'] ;22 field_names =['Vx', 'Vy', 'Vz', 'Vel','Pressure'] 22 23 field_tolerances=[5e-5,5e-5,8e-5,5e-5,1e-7] 23 24 field_values=[\ … … 27 28 md.results.StressbalanceSolution.Vel,\ 28 29 md.results.StressbalanceSolution.Pressure,\ 29 ] ;30 ] -
issm/trunk-jpl/test/NightlyRun/test292.py
r21060 r21408 1 1 #Test Name: SquareShelfTranSSA2dFloatingMeltParam 2 from MatlabFuncs import * 2 3 3 from model import * 4 from numpy import * 4 from socket import gethostname 5 import numpy as np 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md=parameterize(md,'../Par/SquareShelf.py') 16 17 md=setflowequation(md,'SSA','all') 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 md.basalforcings=linearbasalforcings(md.basalforcings) 19 20 md=solve(md,'Transient') -
issm/trunk-jpl/test/NightlyRun/test3001.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedStressSSA2dAdolc 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',50000.) … … 12 13 md=parameterize(md,'../Par/SquareShelfConstrained.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',1)15 md.cluster=generic('name',gethostname(),'np',1) 15 16 md.stressbalance.requested_outputs=['default','DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy'] 16 17 md.autodiff.isautodiff=True -
issm/trunk-jpl/test/NightlyRun/test3002.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedStressSSA3dAdolc 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(3,2.) 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',1)16 md.cluster=generic('name',gethostname(),'np',1) 16 17 md.autodiff.isautodiff=True 17 18 md=solve(md,'Stressbalance') -
issm/trunk-jpl/test/NightlyRun/test3003.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedStressHOAdolc 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(3,2.) 14 15 md=setflowequation(md,'HO','all') 15 md.cluster=generic('name', oshostname(),'np',1)16 md.cluster=generic('name',gethostname(),'np',1) 16 17 md.stressbalance.requested_outputs=['default','StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz'] 17 18 md.autodiff.isautodiff=True -
issm/trunk-jpl/test/NightlyRun/test3004.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedStressFSAdolc 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(3,2.) 14 15 md=setflowequation(md,'FS','all') 15 md.cluster=generic('name', oshostname(),'np',1)16 md.cluster=generic('name',gethostname(),'np',1) 16 17 md.autodiff.isautodiff=True 17 18 md=solve(md,'Stressbalance') -
issm/trunk-jpl/test/NightlyRun/test3005.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedMasstransp2dAdolc 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 12 13 md=parameterize(md,'../Par/SquareShelfConstrained.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',1)15 md.cluster=generic('name',gethostname(),'np',1) 15 16 md.autodiff.isautodiff=True 16 17 md=solve(md,'Masstransport') -
issm/trunk-jpl/test/NightlyRun/test3006.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedMasstransp2dDGAdolc 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from meshconvert import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 14 15 md=parameterize(md,'../Par/SquareShelfConstrained.py') 15 16 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',1)17 md.cluster=generic('name',gethostname(),'np',1) 17 18 md.masstransport.stabilization=3 18 19 md.masstransport.spcthickness=md.geometry.thickness -
issm/trunk-jpl/test/NightlyRun/test3007.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedMasstransp3dAdolc 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 13 14 md=setflowequation(md,'SSA','all') 14 15 md.extrude(5,3.) 15 md.cluster=generic('name', oshostname(),'np',1)16 md.cluster=generic('name',gethostname(),'np',1) 16 17 md.autodiff.isautodiff=True 17 18 md=solve(md,'Masstransport') -
issm/trunk-jpl/test/NightlyRun/test3008.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedTherSteaAdolc 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 14 15 md=setflowequation(md,'SSA','all') 15 16 md.timestepping.time_step=0 16 md.cluster=generic('name', oshostname(),'np',1)17 md.cluster=generic('name',gethostname(),'np',1) 17 18 md.autodiff.isautodiff=True 18 19 md=solve(md,'Thermal') -
issm/trunk-jpl/test/NightlyRun/test3009.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedTherTranAdolc 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(3,1.) 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',1)16 md.cluster=generic('name',gethostname(),'np',1) 16 17 md.transient.isstressbalance=False 17 18 md.transient.ismasstransport=False -
issm/trunk-jpl/test/NightlyRun/test301.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedStressSSA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 12 13 md=parameterize(md,'../Par/SquareSheetConstrained.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md=solve(md,'Stressbalance') 16 17 -
issm/trunk-jpl/test/NightlyRun/test3010.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedTranSSA2dAdolc 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 12 13 md=parameterize(md,'../Par/SquareShelfConstrained.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',1)15 md.cluster=generic('name',gethostname(),'np',1) 15 16 md.transient.requested_outputs=['IceVolume'] 16 17 -
issm/trunk-jpl/test/NightlyRun/test3015.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedMasstransp2dAdolcForwardDifference 2 import numpy 2 import numpy as np 3 3 import copy 4 4 from model import * 5 from socket import gethostname 5 6 from triangle import * 6 7 from setmask import * … … 11 12 from SetIceShelfBC import * 12 13 from solve import * 13 from MatlabFuncs import * 14 14 15 15 16 #This test runs test3005 with autodiff on, and checks that … … 21 22 md=parameterize(md,'../Par/SquareShelfConstrained.py') 22 23 md=setflowequation(md,'SSA','all') 23 md.cluster=generic('name', oshostname(),'np',1)24 md.cluster=generic('name',gethostname(),'np',1) 24 25 md.masstransport.requested_outputs=['IceVolume'] 25 26 md.verbose=verbose('autodiff',True) -
issm/trunk-jpl/test/NightlyRun/test3019.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedTherTranAdolcReverseVsForward 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 9 10 from dependent import * 10 11 from solve import * 11 from MatlabFuncs import * 12 12 13 13 14 #test reverse scalar vs forward vectorial drivers in ADOLC, using the test3009 setup, equivalent to test109 setup. … … 16 17 md=parameterize(md,'../Par/SquareShelfConstrained.py') 17 18 md=setflowequation(md,'SSA','all') 18 md.cluster=generic('name', oshostname(),'np',1)19 md.cluster=generic('name',gethostname(),'np',1) 19 20 #md.toolkits.DefaultAnalysis=issmgslsolver() 20 21 … … 33 34 34 35 #now run vectorial forward mode 35 md.autodiff.independents=[independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fov_forward_indices',n umpy.arange(1,md.mesh.numberofvertices+1))]36 md.autodiff.independents=[independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fov_forward_indices',np.arange(1,md.mesh.numberofvertices+1))] 36 37 md.autodiff.dependents=[dependent('name','MaxVel','type','scalar')] 37 38 md.autodiff.driver='fov_forward' -
issm/trunk-jpl/test/NightlyRun/test302.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedStressSIA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 12 13 md=parameterize(md,'../Par/SquareSheetConstrained.py') 13 14 md=setflowequation(md,'SIA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md=solve(md,'Stressbalance') 16 17 -
issm/trunk-jpl/test/NightlyRun/test3020.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedTranAdolcReverseVsForward 2 import numpy 2 import numpy as np 3 3 import copy 4 4 from model import * 5 from socket import gethostname 5 6 from triangle import * 6 7 from setmask import * … … 11 12 from SetIceShelfBC import * 12 13 from solve import * 13 from MatlabFuncs import * 14 14 15 15 16 #This test runs test3020 with autodiff on, and checks that … … 21 22 md=parameterize(md,'../Par/SquareShelfConstrained.py') 22 23 md=setflowequation(md,'SSA','all') 23 md.cluster=generic('name', oshostname(),'np',1)24 md.cluster=generic('name',gethostname(),'np',1) 24 25 md.transient.requested_outputs=['IceVolume','MaxVel'] 25 26 md.verbose=verbose('autodiff',True) -
issm/trunk-jpl/test/NightlyRun/test303.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedStressSIASSA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 12 13 md=parameterize(md,'../Par/SquareSheetConstrained.py') 13 14 md=setflowequation(md,'SIA','../Exp/SquareHalfRight.exp','fill','SSA') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md=solve(md,'Stressbalance') 16 17 -
issm/trunk-jpl/test/NightlyRun/test304.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedStressSSA3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(3,2.) 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Stressbalance') 17 18 -
issm/trunk-jpl/test/NightlyRun/test305.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedStressSIA3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(5,2.) 14 15 md=setflowequation(md,'SIA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Stressbalance') 17 18 -
issm/trunk-jpl/test/NightlyRun/test306.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedStressSIASSA3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(4,2.) 14 15 md=setflowequation(md,'SIA','../Exp/SquareHalfRight.exp','fill','SSA') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Stressbalance') 17 18 -
issm/trunk-jpl/test/NightlyRun/test307.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedStressHO 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(3,1.) 14 15 md=setflowequation(md,'HO','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Stressbalance') 17 18 -
issm/trunk-jpl/test/NightlyRun/test308.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedStressFS 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(3,1.) 14 15 md=setflowequation(md,'FS','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Stressbalance') 17 18 -
issm/trunk-jpl/test/NightlyRun/test309.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedMasstransp2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 12 13 md=parameterize(md,'../Par/SquareSheetConstrained.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md=solve(md,'Masstransport') 16 17 -
issm/trunk-jpl/test/NightlyRun/test310.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedMasstransp2dDG 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from meshconvert import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 16 17 md.masstransport.stabilization=3 17 18 md.masstransport.spcthickness=md.geometry.thickness 18 md.cluster=generic('name', oshostname(),'np',3)19 md.cluster=generic('name',gethostname(),'np',3) 19 20 md=solve(md,'Masstransport') 20 21 -
issm/trunk-jpl/test/NightlyRun/test3101.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedStressSSA2dAdolcMumps 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',50000.) … … 12 13 md=parameterize(md,'../Par/SquareShelfConstrained.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md.stressbalance.requested_outputs=['default','DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy'] 16 17 -
issm/trunk-jpl/test/NightlyRun/test3102.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedStressSSA3dAdolcMumps 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(3,2.) 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.autodiff.isautodiff=True 17 18 -
issm/trunk-jpl/test/NightlyRun/test3103.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedStressHOAdolcMumps 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(3,2.) 14 15 md=setflowequation(md,'HO','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.stressbalance.requested_outputs=['default','StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz'] 17 18 -
issm/trunk-jpl/test/NightlyRun/test3104.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedStressFSAdolcMumps 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(3,2.) 14 15 md=setflowequation(md,'FS','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 17 18 md.autodiff.isautodiff=True -
issm/trunk-jpl/test/NightlyRun/test3105.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedMasstransp2dAdolcMumps 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 12 13 md=parameterize(md,'../Par/SquareShelfConstrained.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 16 17 md.autodiff.isautodiff=True -
issm/trunk-jpl/test/NightlyRun/test3106.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedMasstransp2dDGAdolcMumps 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from meshconvert import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 14 15 md=parameterize(md,'../Par/SquareShelfConstrained.py') 15 16 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md.masstransport.stabilization=3 18 19 md.masstransport.spcthickness=md.geometry.thickness -
issm/trunk-jpl/test/NightlyRun/test3107.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedMasstransp3dAdolcMumps 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 13 14 md=setflowequation(md,'SSA','all') 14 15 md.extrude(5,3.) 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 17 18 md.autodiff.isautodiff=True -
issm/trunk-jpl/test/NightlyRun/test3108.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedTherSteaAdolcMumps 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 14 15 md=setflowequation(md,'SSA','all') 15 16 md.timestepping.time_step=0 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 18 19 md.autodiff.isautodiff=True -
issm/trunk-jpl/test/NightlyRun/test3109.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedTherTranAdolcMumps 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(3,1.) 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.transient.isstressbalance=False 17 18 md.transient.ismasstransport=False -
issm/trunk-jpl/test/NightlyRun/test311.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedMasstransp3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 13 14 md=setflowequation(md,'SSA','all') 14 15 md.extrude(5,0.5) 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Masstransport') 17 18 -
issm/trunk-jpl/test/NightlyRun/test3110.py
r21060 r21408 1 1 #Test Name: SquareShelfConstrainedTranSSA2dAdolcMumps 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 12 13 md=parameterize(md,'../Par/SquareShelfConstrained.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 16 17 md.transient.requested_outputs=['IceVolume'] -
issm/trunk-jpl/test/NightlyRun/test3119.py
r21060 r21408 1 import numpy 1 import numpy as np 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 8 9 from dependent import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 #test reverse scalar vs forward vectorial drivers in ADOLC, using the test3009 setup, equivalent to test109 setup. … … 15 16 md=parameterize(md,'../Par/SquareShelfConstrained.py') 16 17 md=setflowequation(md,'SSA','all') 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 19 20 md.autodiff.isautodiff=True -
issm/trunk-jpl/test/NightlyRun/test312.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedTherStea 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 14 15 md=setflowequation(md,'SSA','all') 15 16 md.timestepping.time_step=0. 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md=solve(md,'Thermal') 18 19 -
issm/trunk-jpl/test/NightlyRun/test313.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedTherTran 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(3,1.) 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.verbose=verbose('convergence',True,'solution',True) 17 18 md.transient.isstressbalance=False -
issm/trunk-jpl/test/NightlyRun/test314.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedTranSIA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 12 13 md=parameterize(md,'../Par/SquareSheetConstrained.py') 13 14 md=setflowequation(md,'SIA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md.transient.requested_outputs=['default','GroundedArea','FloatingArea','IceVolume'] 16 17 md=solve(md,'Transient') -
issm/trunk-jpl/test/NightlyRun/test315.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedTranSIA3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 13 14 md.extrude(5,1.2) 14 15 md=setflowequation(md,'SIA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Transient') 17 18 -
issm/trunk-jpl/test/NightlyRun/test316.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedTranSSA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 12 13 md=parameterize(md,'../Par/SquareSheetConstrained.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md=solve(md,'Transient') 16 17 -
issm/trunk-jpl/test/NightlyRun/test317.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedTranHO 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',200000.) … … 14 15 md.extrude(3,1.) 15 16 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md.transient.requested_outputs=['default','GroundedArea','FloatingArea','TotalFloatingBmb','TotalGroundedBmb'] 18 19 md=solve(md,'Transient') -
issm/trunk-jpl/test/NightlyRun/test318.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedSteaSIA3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Square.exp',180000.) … … 13 14 md.extrude(4,1.) 14 15 md=setflowequation(md,'SIA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.timestepping.time_step=0 17 18 md=solve(md,'Steadystate') -
issm/trunk-jpl/test/NightlyRun/test319.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedCMDragSSA2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',200000.) … … 17 18 md.inversion.iscontrol=1 18 19 md.inversion.control_parameters=['FrictionCoefficient'] 19 md.inversion.min_parameters=1.*n umpy.ones((md.mesh.numberofvertices,1))20 md.inversion.max_parameters=200.*n umpy.ones((md.mesh.numberofvertices,1))20 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices)) 21 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices)) 21 22 md.inversion.nsteps=2 22 23 md.inversion.cost_functions=[103,501] 23 md.inversion.cost_functions_coefficients=n umpy.ones((md.mesh.numberofvertices,2))24 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2)) 24 25 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7 25 md.inversion.gradient_scaling=3.*n umpy.ones((md.inversion.nsteps,1))26 md.inversion.maxiter_per_step=2*n umpy.ones(md.inversion.nsteps)27 md.inversion.step_threshold=0.3*n umpy.ones(md.inversion.nsteps)26 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps)) 27 md.inversion.maxiter_per_step=2*np.ones(md.inversion.nsteps) 28 md.inversion.step_threshold=0.3*np.ones(md.inversion.nsteps) 28 29 md.inversion.vx_obs=md.initialization.vx 29 30 md.inversion.vy_obs=md.initialization.vy 30 31 31 md.cluster=generic('name', oshostname(),'np',3)32 md.cluster=generic('name',gethostname(),'np',3) 32 33 md=solve(md,'Stressbalance') 33 34 -
issm/trunk-jpl/test/NightlyRun/test320.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedCMDragSSA3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',200000.) … … 18 19 md.inversion.iscontrol=1 19 20 md.inversion.control_parameters=['FrictionCoefficient'] 20 md.inversion.min_parameters=1.*n umpy.ones((md.mesh.numberofvertices,1))21 md.inversion.max_parameters=200.*n umpy.ones((md.mesh.numberofvertices,1))21 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices)) 22 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices)) 22 23 md.inversion.nsteps=2 23 24 md.inversion.cost_functions=[103,501] 24 md.inversion.cost_functions_coefficients=n umpy.ones((md.mesh.numberofvertices,2))25 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2)) 25 26 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7 26 md.inversion.gradient_scaling=3.*n umpy.ones((md.inversion.nsteps,1))27 md.inversion.maxiter_per_step=2*n umpy.ones(md.inversion.nsteps)28 md.inversion.step_threshold=0.3*n umpy.ones(md.inversion.nsteps)27 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps)) 28 md.inversion.maxiter_per_step=2*np.ones(md.inversion.nsteps) 29 md.inversion.step_threshold=0.3*np.ones(md.inversion.nsteps) 29 30 md.inversion.vx_obs=md.initialization.vx 30 31 md.inversion.vy_obs=md.initialization.vy 31 32 32 md.cluster=generic('name', oshostname(),'np',3)33 md.cluster=generic('name',gethostname(),'np',3) 33 34 md=solve(md,'Stressbalance') 34 35 -
issm/trunk-jpl/test/NightlyRun/test321.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedCMDragHO 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',200000.) … … 18 19 md.inversion.iscontrol=1 19 20 md.inversion.control_parameters=['FrictionCoefficient'] 20 md.inversion.min_parameters=1.*n umpy.ones((md.mesh.numberofvertices,1))21 md.inversion.max_parameters=200.*n umpy.ones((md.mesh.numberofvertices,1))21 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices)) 22 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices)) 22 23 md.inversion.nsteps=2 23 24 md.inversion.cost_functions=[102,501] 24 md.inversion.cost_functions_coefficients=n umpy.ones((md.mesh.numberofvertices,2))25 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2)) 25 26 md.inversion.cost_functions_coefficients[:,1]=2*10**-7 26 md.inversion.gradient_scaling=3.*n umpy.ones((md.inversion.nsteps,1))27 md.inversion.maxiter_per_step=2*n umpy.ones(md.inversion.nsteps)28 md.inversion.step_threshold=0.3*n umpy.ones(md.inversion.nsteps)27 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps)) 28 md.inversion.maxiter_per_step=2*np.ones(md.inversion.nsteps) 29 md.inversion.step_threshold=0.3*np.ones(md.inversion.nsteps) 29 30 md.inversion.vx_obs=md.initialization.vx 30 31 md.inversion.vy_obs=md.initialization.vy 31 32 32 md.cluster=generic('name', oshostname(),'np',3)33 md.cluster=generic('name',gethostname(),'np',3) 33 34 md=solve(md,'Stressbalance') 34 35 -
issm/trunk-jpl/test/NightlyRun/test322.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedCMDragFS 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',200000.) … … 18 19 md.inversion.iscontrol=1 19 20 md.inversion.control_parameters=['FrictionCoefficient'] 20 md.inversion.min_parameters=1.*n umpy.ones((md.mesh.numberofvertices,1))21 md.inversion.max_parameters=200.*n umpy.ones((md.mesh.numberofvertices,1))21 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices)) 22 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices)) 22 23 md.inversion.nsteps=2 23 24 md.inversion.cost_functions=[104,501] 24 md.inversion.cost_functions_coefficients=n umpy.ones((md.mesh.numberofvertices,2))25 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2)) 25 26 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7 26 md.inversion.gradient_scaling=3.*n umpy.ones((md.inversion.nsteps,1))27 md.inversion.maxiter_per_step=2*n umpy.ones(md.inversion.nsteps)28 md.inversion.step_threshold=0.3*n umpy.ones(md.inversion.nsteps)27 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps)) 28 md.inversion.maxiter_per_step=2*np.ones(md.inversion.nsteps) 29 md.inversion.step_threshold=0.3*np.ones(md.inversion.nsteps) 29 30 md.inversion.vx_obs=md.initialization.vx 30 31 md.inversion.vy_obs=md.initialization.vy 31 32 32 md.cluster=generic('name', oshostname(),'np',3)33 md.cluster=generic('name',gethostname(),'np',3) 33 34 md=solve(md,'Stressbalance') 34 35 -
issm/trunk-jpl/test/NightlyRun/test323.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedTranCflSSA2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 13 14 md=parameterize(md,'../Par/SquareSheetConstrained.py') 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.timestepping.time_adapt=1 17 18 md.timestepping.final_time=1120. -
issm/trunk-jpl/test/NightlyRun/test324.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedTranCflSIA3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 14 15 md.extrude(5,1.2) 15 16 md=setflowequation(md,'SIA','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md.timestepping.time_adapt=1 18 19 md.timestepping.final_time=16000. -
issm/trunk-jpl/test/NightlyRun/test325.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedEnthalpyStea 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',180000.) … … 15 16 md=setflowequation(md,'SSA','all') 16 17 md.timestepping.time_step=0. 17 md.initialization.waterfraction=n umpy.zeros((md.mesh.numberofvertices,1))18 md.initialization.watercolumn=n umpy.zeros((md.mesh.numberofvertices,1))18 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices)) 19 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices)) 19 20 md.thermal.isenthalpy = 1 20 21 md.thermal.isdynamicbasalspc = 1 21 22 22 md.cluster=generic('name', oshostname(),'np',3)23 md.cluster=generic('name',gethostname(),'np',3) 23 24 md=solve(md,'Thermal') 24 25 -
issm/trunk-jpl/test/NightlyRun/test326.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedEnthalpyTran 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',180000.) … … 14 15 md.extrude(3,1.) 15 16 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.initialization.waterfraction=n umpy.zeros((md.mesh.numberofvertices,1))18 md.initialization.watercolumn=n umpy.zeros((md.mesh.numberofvertices,1))17 md.cluster=generic('name',gethostname(),'np',3) 18 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices)) 19 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices)) 19 20 md.transient.isstressbalance=False 20 21 md.transient.ismasstransport=False -
issm/trunk-jpl/test/NightlyRun/test327.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedTransHOEnth 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',200000.) … … 14 15 md.extrude(3,1.) 15 16 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.initialization.waterfraction=n umpy.zeros((md.mesh.numberofvertices,1))18 md.initialization.watercolumn=n umpy.zeros((md.mesh.numberofvertices,1))17 md.cluster=generic('name',gethostname(),'np',3) 18 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices)) 19 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices)) 19 20 md.initialization.temperature[:]=272. 20 md.thermal.spctemperature[n umpy.nonzero(md.mesh.vertexonsurface)[0]]=272.21 md.thermal.spctemperature[np.nonzero(md.mesh.vertexonsurface)[0]]=272. 21 22 md.thermal.isenthalpy=1 22 23 md.thermal.isdynamicbasalspc=1 -
issm/trunk-jpl/test/NightlyRun/test328.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedSmbGradients2d 2 import numpy3 2 import copy 4 3 from model import * 4 from socket import gethostname 5 5 from triangle import * 6 6 from setmask import * … … 8 8 from setflowequation import * 9 9 from solve import * 10 from MatlabFuncs import *11 10 12 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 14 13 md=parameterize(md,'../Par/SquareSheetConstrained.py') 15 14 md=setflowequation(md,'SSA','all') 16 md.smb = SMBgradients() ;15 md.smb = SMBgradients() 17 16 md.smb.b_pos=-100. + 0.00005*md.mesh.x - 0.0001*md.mesh.y 18 17 md.smb.b_neg=250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y 19 18 md.transient.requested_outputs=['default','TotalSmb'] 20 md.smb.href=copy.deepcopy(md.geometry.surface) .reshape(-1)21 md.smb.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y ;22 md.cluster=generic('name', oshostname(),'np',3)19 md.smb.href=copy.deepcopy(md.geometry.surface) 20 md.smb.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y 21 md.cluster=generic('name',gethostname(),'np',3) 23 22 md=solve(md,'Transient') 24 23 25 24 #Fields and tolerances to track changes 26 field_names =['Vx1','Vy1','Vel1','Bed1','Surface1','Thickness1','SMB1','TotalSmb1','Vx2','Vy2','Vel2','Bed2','Surface2','Thickness2','SMB2','TotalSmb2','Vx3','Vy3','Vel3','Bed3','Surface3','Thickness3','SMB3','TotalSmb3'] 27 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13] 28 field_values=[\ 29 md.results.TransientSolution[0].Vx,\ 30 md.results.TransientSolution[0].Vy,\ 31 md.results.TransientSolution[0].Vel,\ 32 md.results.TransientSolution[0].Base,\ 33 md.results.TransientSolution[0].Surface,\ 34 md.results.TransientSolution[0].Thickness,\ 35 md.results.TransientSolution[0].SmbMassBalance,\ 36 md.results.TransientSolution[0].TotalSmb,\ 37 md.results.TransientSolution[1].Vx,\ 38 md.results.TransientSolution[1].Vy,\ 39 md.results.TransientSolution[1].Vel,\ 40 md.results.TransientSolution[1].Base,\ 41 md.results.TransientSolution[1].Surface,\ 42 md.results.TransientSolution[1].Thickness,\ 43 md.results.TransientSolution[1].TotalSmb,\ 44 md.results.TransientSolution[1].SmbMassBalance,\ 45 md.results.TransientSolution[2].Vx,\ 46 md.results.TransientSolution[2].Vy,\ 47 md.results.TransientSolution[2].Vel,\ 48 md.results.TransientSolution[2].Base,\ 49 md.results.TransientSolution[2].Surface,\ 50 md.results.TransientSolution[2].Thickness,\ 51 md.results.TransientSolution[2].SmbMassBalance,\ 52 md.results.TransientSolution[2].TotalSmb,\ 53 ] 25 field_names =['Vx1','Vy1','Vel1', 26 'Bed1','Surface1','Thickness1', 27 'SMB1','TotalSmb1', 28 'Vx2','Vy2','Vel2','Bed2', 29 'Surface2','Thickness2', 30 'SMB2','TotalSmb2','Vx3','Vy3', 31 'Vel3','Bed3','Surface3', 32 'Thickness3','SMB3','TotalSmb3'] 33 field_tolerances=[1e-13,1e-13,1e-13, 34 1e-13,1e-13,1e-13, 35 1e-13,1e-13,1e-13, 36 1e-13,1e-13,1e-13, 37 1e-13,1e-13,1e-13, 38 1e-13,1e-13,1e-13, 39 1e-13,1e-13,1e-13, 40 1e-13,1e-13,1e-13] 41 field_values=[md.results.TransientSolution[0].Vx, 42 md.results.TransientSolution[0].Vy, 43 md.results.TransientSolution[0].Vel, 44 md.results.TransientSolution[0].Base, 45 md.results.TransientSolution[0].Surface, 46 md.results.TransientSolution[0].Thickness, 47 md.results.TransientSolution[0].SmbMassBalance, 48 md.results.TransientSolution[0].TotalSmb, 49 md.results.TransientSolution[1].Vx, 50 md.results.TransientSolution[1].Vy, 51 md.results.TransientSolution[1].Vel, 52 md.results.TransientSolution[1].Base, 53 md.results.TransientSolution[1].Surface, 54 md.results.TransientSolution[1].Thickness, 55 md.results.TransientSolution[1].TotalSmb, 56 md.results.TransientSolution[1].SmbMassBalance, 57 md.results.TransientSolution[2].Vx, 58 md.results.TransientSolution[2].Vy, 59 md.results.TransientSolution[2].Vel, 60 md.results.TransientSolution[2].Base, 61 md.results.TransientSolution[2].Surface, 62 md.results.TransientSolution[2].Thickness, 63 md.results.TransientSolution[2].SmbMassBalance, 64 md.results.TransientSolution[2].TotalSmb] -
issm/trunk-jpl/test/NightlyRun/test329.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedSmbGradients3d 2 import numpy3 2 import copy 4 3 from model import * 4 from socket import gethostname 5 5 from triangle import * 6 6 from setmask import * … … 8 8 from setflowequation import * 9 9 from solve import * 10 from MatlabFuncs import *11 10 12 11 md=triangle(model(),'../Exp/Square.exp',150000.) … … 15 14 md.extrude(3,1) 16 15 md=setflowequation(md,'HO','all') 17 md.smb = SMBgradients() ;16 md.smb = SMBgradients() 18 17 md.smb.b_pos=-100. + 0.00005*md.mesh.x - 0.0001*md.mesh.y 19 18 md.smb.b_neg=250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y 20 md.smb.href=copy.deepcopy(md.geometry.surface) .reshape(-1)21 md.smb.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y ;19 md.smb.href=copy.deepcopy(md.geometry.surface) 20 md.smb.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y 22 21 md.transient.requested_outputs=['default','TotalSmb'] 23 md.cluster=generic('name', oshostname(),'np',3)22 md.cluster=generic('name',gethostname(),'np',3) 24 23 md=solve(md,'Transient') 25 24 26 25 #Fields and tolerances to track changes 27 field_names =['Vx1','Vy1','Vz1','Vel1','Bed1','Surface1','Thickness1','Temperature1','SMB1','TotalSmb1','Vx2','Vy2','Vz2','Vel2','Bed2','Surface2','Thickness2','Temperature2','SMB2','TotalSmb2','Vx3','Vy3','Vz3','Vel3','Bed3','Surface3','Thickness3','Temperature3','SMB3','TotalSmb3'] 28 field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 29 1e-09,1e-09,1e-10,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 30 1e-09,5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 31 field_values=[\ 32 md.results.TransientSolution[0].Vx,\ 33 md.results.TransientSolution[0].Vy,\ 34 md.results.TransientSolution[0].Vz,\ 35 md.results.TransientSolution[0].Vel,\ 36 md.results.TransientSolution[0].Base,\ 37 md.results.TransientSolution[0].Surface,\ 38 md.results.TransientSolution[0].Thickness,\ 39 md.results.TransientSolution[0].Temperature,\ 40 md.results.TransientSolution[0].SmbMassBalance,\ 41 md.results.TransientSolution[0].TotalSmb,\ 42 md.results.TransientSolution[1].Vx,\ 43 md.results.TransientSolution[1].Vy,\ 44 md.results.TransientSolution[1].Vz,\ 45 md.results.TransientSolution[1].Vel,\ 46 md.results.TransientSolution[1].Base,\ 47 md.results.TransientSolution[1].Surface,\ 48 md.results.TransientSolution[1].Thickness,\ 49 md.results.TransientSolution[1].Temperature,\ 50 md.results.TransientSolution[1].SmbMassBalance,\ 51 md.results.TransientSolution[1].TotalSmb,\ 52 md.results.TransientSolution[2].Vx,\ 53 md.results.TransientSolution[2].Vy,\ 54 md.results.TransientSolution[2].Vz,\ 55 md.results.TransientSolution[2].Vel,\ 56 md.results.TransientSolution[2].Base,\ 57 md.results.TransientSolution[2].Surface,\ 58 md.results.TransientSolution[2].Thickness,\ 59 md.results.TransientSolution[2].Temperature,\ 60 md.results.TransientSolution[2].SmbMassBalance,\ 61 md.results.TransientSolution[2].TotalSmb,\ 62 ] 26 field_names =['Vx1','Vy1','Vz1','Vel1', 27 'Bed1','Surface1','Thickness1', 28 'Temperature1','SMB1','TotalSmb1', 29 'Vx2','Vy2','Vz2','Vel2', 30 'Bed2','Surface2','Thickness2', 31 'Temperature2','SMB2','TotalSmb2', 32 'Vx3','Vy3','Vz3','Vel3', 33 'Bed3','Surface3','Thickness3', 34 'Temperature3','SMB3','TotalSmb3'] 35 field_tolerances=[1e-09,1e-09,1e-09,1e-09, 36 1e-10,1e-10,1e-10, 37 1e-10,1e-10,1e-10, 38 1e-09,1e-09,1e-10,1e-09, 39 1e-10,1e-10,1e-10, 40 1e-10,1e-10,1e-10, 41 1e-09,5e-09,1e-09,1e-09, 42 1e-10,1e-10,1e-10, 43 1e-10,1e-10,1e-10] 44 field_values=[md.results.TransientSolution[0].Vx, 45 md.results.TransientSolution[0].Vy, 46 md.results.TransientSolution[0].Vz, 47 md.results.TransientSolution[0].Vel, 48 md.results.TransientSolution[0].Base, 49 md.results.TransientSolution[0].Surface, 50 md.results.TransientSolution[0].Thickness, 51 md.results.TransientSolution[0].Temperature, 52 md.results.TransientSolution[0].SmbMassBalance, 53 md.results.TransientSolution[0].TotalSmb, 54 md.results.TransientSolution[1].Vx, 55 md.results.TransientSolution[1].Vy, 56 md.results.TransientSolution[1].Vz, 57 md.results.TransientSolution[1].Vel, 58 md.results.TransientSolution[1].Base, 59 md.results.TransientSolution[1].Surface, 60 md.results.TransientSolution[1].Thickness, 61 md.results.TransientSolution[1].Temperature, 62 md.results.TransientSolution[1].SmbMassBalance, 63 md.results.TransientSolution[1].TotalSmb, 64 md.results.TransientSolution[2].Vx, 65 md.results.TransientSolution[2].Vy, 66 md.results.TransientSolution[2].Vz, 67 md.results.TransientSolution[2].Vel, 68 md.results.TransientSolution[2].Base, 69 md.results.TransientSolution[2].Surface, 70 md.results.TransientSolution[2].Thickness, 71 md.results.TransientSolution[2].Temperature, 72 md.results.TransientSolution[2].SmbMassBalance, 73 md.results.TransientSolution[2].TotalSmb] -
issm/trunk-jpl/test/NightlyRun/test3300.py
r21281 r21408 1 1 import numpy as np 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 from generic import generic … … 18 19 md.transient.issmb=True 19 20 md=setflowequation(md,'SSA','all') 20 md.cluster=generic('name', oshostname(),'np',1)21 md.cluster=generic('name',gethostname(),'np',1) 21 22 md.hydrology=hydrologydc() 22 23 md.hydrology=md.hydrology.initialize(md) … … 26 27 md.hydrology.sedimentlimit=400.0 27 28 md.hydrology.sediment_thickness=20.0 28 md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices ,1))29 md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices ,1))30 md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices ,1))31 md.hydrology.sediment_transmitivity=1.5e-4*np.ones((md.mesh.numberofvertices ,1))29 md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices)) 30 md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices)) 31 md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices)) 32 md.hydrology.sediment_transmitivity=1.5e-4*np.ones((md.mesh.numberofvertices)) 32 33 33 md.initialization.epl_head=np.zeros((md.mesh.numberofvertices ,1))34 md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices ,1))35 md.hydrology.spcepl_head=float('NaN')*np.ones((md.mesh.numberofvertices ,1))36 md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices ,1))34 md.initialization.epl_head=np.zeros((md.mesh.numberofvertices)) 35 md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices)) 36 md.hydrology.spcepl_head=float('NaN')*np.ones((md.mesh.numberofvertices)) 37 md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices)) 37 38 38 39 md.hydrology.epl_conductivity=1.5e-2 … … 61 62 totvol=np.zeros(4001) 62 63 time=np.arange(0.002,8.001,0.002) 63 store=md.constants.g*md.hydrology.sediment_porosity*md.materials.rho_freshwater*((md.hydrology.sediment_compressibility/md.hydrology.sediment_porosity)+md.hydrology.water_compressibility) ;64 sedstore=20.0*store ;64 store=md.constants.g*md.hydrology.sediment_porosity*md.materials.rho_freshwater*((md.hydrology.sediment_compressibility/md.hydrology.sediment_porosity)+md.hydrology.water_compressibility) 65 sedstore=20.0*store 65 66 for i in range(0,4000): 66 67 sedvol[i]=np.mean(md.results.TransientSolution[i].SedimentHead)*sedstore -
issm/trunk-jpl/test/NightlyRun/test332.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedHydrologyDC 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 from generic import generic … … 20 21 21 22 md=setflowequation(md,'SSA','all') 22 md.cluster=generic('name', oshostname(),'np',1)23 md.cluster=generic('name',gethostname(),'np',1) 23 24 md.hydrology=hydrologydc() 24 25 md.hydrology=md.hydrology.initialize(md) … … 27 28 md.hydrology.sedimentlimit_flag=1 28 29 md.hydrology.sedimentlimit=8000.0 29 md.initialization.sediment_head=n umpy.zeros((md.mesh.numberofvertices,1))30 md.hydrology.spcsediment_head=float('NaN')*n umpy.ones((md.mesh.numberofvertices,1))31 pos=n umpy.nonzero(md.mesh.y==0.)[0]30 md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices)) 31 md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices)) 32 pos=np.nonzero(md.mesh.y==0.)[0] 32 33 md.hydrology.spcsediment_head[pos]=0.0 33 md.basalforcings.groundedice_melting_rate = 2.0*n umpy.ones((md.mesh.numberofvertices,1))34 md.basalforcings.floatingice_melting_rate = 0.0*n umpy.ones((md.mesh.numberofvertices,1))35 md.hydrology.sediment_transmitivity= 3.0*n umpy.ones((md.mesh.numberofvertices,1))34 md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices)) 35 md.basalforcings.floatingice_melting_rate = 0.0*np.ones((md.mesh.numberofvertices)) 36 md.hydrology.sediment_transmitivity= 3.0*np.ones((md.mesh.numberofvertices)) 36 37 md.timestepping.time_step=0 37 38 md.timestepping.final_time=1.0 -
issm/trunk-jpl/test/NightlyRun/test333.py
r21281 r21408 2 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 from generic import generic … … 19 20 md.transient.issmb=True 20 21 md=setflowequation(md,'SSA','all') 21 md.cluster=generic('name', oshostname(),'np',1)22 md.cluster=generic('name',gethostname(),'np',1) 22 23 md.hydrology=hydrologydc() 23 24 md.hydrology=md.hydrology.initialize(md) … … 26 27 md.hydrology.sedimentlimit_flag=1 27 28 md.hydrology.sedimentlimit=800.0 28 md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices ,1))29 md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices ,1))29 md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices)) 30 md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices)) 30 31 31 md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices ,1))32 md.basalforcings.floatingice_melting_rate = 0.0*np.ones((md.mesh.numberofvertices ,1))33 md.hydrology.sediment_transmitivity= 3.0*np.ones((md.mesh.numberofvertices ,1))32 md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices)) 33 md.basalforcings.floatingice_melting_rate = 0.0*np.ones((md.mesh.numberofvertices)) 34 md.hydrology.sediment_transmitivity= 3.0*np.ones((md.mesh.numberofvertices)) 34 35 35 md.initialization.epl_head=np.zeros((md.mesh.numberofvertices ,1))36 md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices ,1))37 md.hydrology.spcepl_head=float('NaN')*np.ones((md.mesh.numberofvertices ,1))38 md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices ,1))36 md.initialization.epl_head=np.zeros((md.mesh.numberofvertices)) 37 md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices)) 38 md.hydrology.spcepl_head=float('NaN')*np.ones((md.mesh.numberofvertices)) 39 md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices)) 39 40 md.hydrology.epl_conductivity=30 40 41 md.hydrology.epl_initial_thickness=1 … … 50 51 eplvol=np.zeros(10) 51 52 time=np.arange(0.2,2.1,0.2) 52 store=md.constants.g*md.hydrology.sediment_porosity*md.materials.rho_freshwater*((md.hydrology.sediment_compressibility/md.hydrology.sediment_porosity)+md.hydrology.water_compressibility) ;53 sedstore=20.0*store ;53 store=md.constants.g*md.hydrology.sediment_porosity*md.materials.rho_freshwater*((md.hydrology.sediment_compressibility/md.hydrology.sediment_porosity)+md.hydrology.water_compressibility) 54 sedstore=20.0*store 54 55 for i in range(0,10): 55 56 sedvol[i]=np.mean(md.results.TransientSolution[i].SedimentHead)*sedstore -
issm/trunk-jpl/test/NightlyRun/test334.py
r21281 r21408 2 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 from generic import generic … … 18 19 md.transient.ishydrology=True 19 20 md=setflowequation(md,'SSA','all') 20 md.cluster=generic('name', oshostname(),'np',1)21 md.cluster=generic('name',gethostname(),'np',1) 21 22 md.hydrology=hydrologydc() 22 23 md.hydrology=md.hydrology.initialize(md) … … 25 26 md.hydrology.sedimentlimit_flag=1 26 27 md.hydrology.sedimentlimit=8000.0 27 md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices ,1))28 md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices ,1))28 md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices)) 29 md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices)) 29 30 md.hydrology.spcsediment_head[np.where(md.mesh.y==0)]=0.0 30 31 31 md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices ,1))32 md.basalforcings.floatingice_melting_rate = 0.0*np.ones((md.mesh.numberofvertices ,1))33 md.hydrology.sediment_transmitivity= 3.0*np.ones((md.mesh.numberofvertices ,1))32 md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices)) 33 md.basalforcings.floatingice_melting_rate = 0.0*np.ones((md.mesh.numberofvertices)) 34 md.hydrology.sediment_transmitivity= 3.0*np.ones((md.mesh.numberofvertices)) 34 35 35 36 md.timestepping.time_step=0 -
issm/trunk-jpl/test/NightlyRun/test335.py
r21281 r21408 2 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import * 11 11 12 12 13 from generic import generic … … 19 20 md.transient.issmb=True 20 21 md=setflowequation(md,'SSA','all') 21 md.cluster=generic('name', oshostname(),'np',1)22 md.cluster=generic('name',gethostname(),'np',1) 22 23 md.hydrology=hydrologydc() 23 24 md.hydrology=md.hydrology.initialize(md) … … 26 27 md.hydrology.sedimentlimit_flag=1 27 28 md.hydrology.sedimentlimit=800.0 28 md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices ,1))29 md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices ,1))30 md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices ,1))31 md.basalforcings.floatingice_melting_rate = np.zeros((md.mesh.numberofvertices ,1))32 md.hydrology.sediment_transmitivity=3*np.ones((md.mesh.numberofvertices ,1))29 md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices)) 30 md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices)) 31 md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices)) 32 md.basalforcings.floatingice_melting_rate = np.zeros((md.mesh.numberofvertices)) 33 md.hydrology.sediment_transmitivity=3*np.ones((md.mesh.numberofvertices)) 33 34 34 md.initialization.epl_head=np.zeros((md.mesh.numberofvertices ,1))35 md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices ,1))36 md.hydrology.spcepl_head=float('NaN')*np.ones((md.mesh.numberofvertices ,1))37 md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices ,1))35 md.initialization.epl_head=np.zeros((md.mesh.numberofvertices)) 36 md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices)) 37 md.hydrology.spcepl_head=float('NaN')*np.ones((md.mesh.numberofvertices)) 38 md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices)) 38 39 md.hydrology.epl_conductivity=30 39 40 md.hydrology.epl_initial_thickness=1 -
issm/trunk-jpl/test/NightlyRun/test336.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedSmbComponents2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 13 14 md=parameterize(md,'../Par/SquareShelf.py') 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 17 18 md.timestepping.time_step=1. … … 20 21 21 22 #Set up transient 22 smb=n umpy.ones((md.mesh.numberofvertices,1))*3.623 smb=n umpy.hstack((smb,smb*-1.))23 smb=np.ones((md.mesh.numberofvertices))*3.6 24 smb=np.vstack((smb,smb*-1.)).T 24 25 25 md.smb=SMBcomponents() ;26 md.smb.accumulation=n umpy.vstack((smb*2, [1.5,3.]));27 md.smb.runoff=n umpy.vstack((smb/2, [1.5,3.]));28 md.smb.evaporation=n umpy.vstack((smb/2, [1.5,3.]));26 md.smb=SMBcomponents() 27 md.smb.accumulation=np.vstack((smb*2, [1.5,3.])) 28 md.smb.runoff=np.vstack((smb/2, [1.5,3.])) 29 md.smb.evaporation=np.vstack((smb/2, [1.5,3.])) 29 30 md.transient.isthermal=False 30 31 … … 32 33 33 34 #Fields and tolerances to track changes 34 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \ 35 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \ 36 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \ 37 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4'] 38 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 39 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 40 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 41 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 42 field_values=[\ 43 md.results.TransientSolution[0].Vx,\ 44 md.results.TransientSolution[0].Vy,\ 45 md.results.TransientSolution[0].Vel,\ 46 md.results.TransientSolution[0].Pressure,\ 47 md.results.TransientSolution[0].Base,\ 48 md.results.TransientSolution[0].Surface,\ 49 md.results.TransientSolution[0].Thickness,\ 50 md.results.TransientSolution[0].SmbMassBalance,\ 51 md.results.TransientSolution[1].Vx,\ 52 md.results.TransientSolution[1].Vy,\ 53 md.results.TransientSolution[1].Vel,\ 54 md.results.TransientSolution[1].Pressure,\ 55 md.results.TransientSolution[1].Base,\ 56 md.results.TransientSolution[1].Surface,\ 57 md.results.TransientSolution[1].Thickness,\ 58 md.results.TransientSolution[1].SmbMassBalance,\ 59 md.results.TransientSolution[2].Vx,\ 60 md.results.TransientSolution[2].Vy,\ 61 md.results.TransientSolution[2].Vel,\ 62 md.results.TransientSolution[2].Pressure,\ 63 md.results.TransientSolution[2].Base,\ 64 md.results.TransientSolution[2].Surface,\ 65 md.results.TransientSolution[2].Thickness,\ 66 md.results.TransientSolution[2].SmbMassBalance,\ 67 md.results.TransientSolution[3].Vx,\ 68 md.results.TransientSolution[3].Vy,\ 69 md.results.TransientSolution[3].Vel,\ 70 md.results.TransientSolution[3].Pressure,\ 71 md.results.TransientSolution[3].Base,\ 72 md.results.TransientSolution[3].Surface,\ 73 md.results.TransientSolution[3].Thickness,\ 74 md.results.TransientSolution[3].SmbMassBalance,\ 75 ] 35 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', 36 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', 37 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', 38 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4'] 39 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 40 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 41 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 42 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 43 field_values=[md.results.TransientSolution[0].Vx, 44 md.results.TransientSolution[0].Vy, 45 md.results.TransientSolution[0].Vel, 46 md.results.TransientSolution[0].Pressure, 47 md.results.TransientSolution[0].Base, 48 md.results.TransientSolution[0].Surface, 49 md.results.TransientSolution[0].Thickness, 50 md.results.TransientSolution[0].SmbMassBalance, 51 md.results.TransientSolution[1].Vx, 52 md.results.TransientSolution[1].Vy, 53 md.results.TransientSolution[1].Vel, 54 md.results.TransientSolution[1].Pressure, 55 md.results.TransientSolution[1].Base, 56 md.results.TransientSolution[1].Surface, 57 md.results.TransientSolution[1].Thickness, 58 md.results.TransientSolution[1].SmbMassBalance, 59 md.results.TransientSolution[2].Vx, 60 md.results.TransientSolution[2].Vy, 61 md.results.TransientSolution[2].Vel, 62 md.results.TransientSolution[2].Pressure, 63 md.results.TransientSolution[2].Base, 64 md.results.TransientSolution[2].Surface, 65 md.results.TransientSolution[2].Thickness, 66 md.results.TransientSolution[2].SmbMassBalance, 67 md.results.TransientSolution[3].Vx, 68 md.results.TransientSolution[3].Vy, 69 md.results.TransientSolution[3].Vel, 70 md.results.TransientSolution[3].Pressure, 71 md.results.TransientSolution[3].Base, 72 md.results.TransientSolution[3].Surface, 73 md.results.TransientSolution[3].Thickness, 74 md.results.TransientSolution[3].SmbMassBalance] -
issm/trunk-jpl/test/NightlyRun/test337.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedSmbComponents3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 14 15 md.extrude(3,1.) 15 16 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 18 19 md.timestepping.time_step=1. … … 21 22 22 23 #Set up transient 23 smb=n umpy.ones((md.mesh.numberofvertices,1))*3.624 smb=n umpy.hstack((smb,smb*-1.))24 smb=np.ones((md.mesh.numberofvertices))*3.6 25 smb=np.vstack((smb,smb*-1.)).T 25 26 26 md.smb=SMBcomponents() ;27 md.smb.accumulation=n umpy.vstack((smb*2, [1.5,3.]));28 md.smb.runoff=n umpy.vstack((smb/2, [1.5,3.]));29 md.smb.evaporation=n umpy.vstack((smb/2, [1.5,3.]));27 md.smb=SMBcomponents() 28 md.smb.accumulation=np.vstack((smb*2, [1.5,3.])) 29 md.smb.runoff=np.vstack((smb/2, [1.5,3.])) 30 md.smb.evaporation=np.vstack((smb/2, [1.5,3.])) 30 31 md.transient.isthermal=False 31 32 … … 33 34 34 35 #Fields and tolerances to track changes 35 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \ 36 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \ 37 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \ 38 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4'] 39 field_tolerances=[\ 40 5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\ 41 5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\ 42 5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\ 43 5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10] 44 field_values=[\ 45 md.results.TransientSolution[0].Vx,\ 46 md.results.TransientSolution[0].Vy,\ 47 md.results.TransientSolution[0].Vel,\ 48 md.results.TransientSolution[0].Pressure,\ 49 md.results.TransientSolution[0].Base,\ 50 md.results.TransientSolution[0].Surface,\ 51 md.results.TransientSolution[0].Thickness,\ 52 md.results.TransientSolution[0].SmbMassBalance,\ 53 md.results.TransientSolution[1].Vx,\ 54 md.results.TransientSolution[1].Vy,\ 55 md.results.TransientSolution[1].Vel,\ 56 md.results.TransientSolution[1].Pressure,\ 57 md.results.TransientSolution[1].Base,\ 58 md.results.TransientSolution[1].Surface,\ 59 md.results.TransientSolution[1].Thickness,\ 60 md.results.TransientSolution[1].SmbMassBalance,\ 61 md.results.TransientSolution[2].Vx,\ 62 md.results.TransientSolution[2].Vy,\ 63 md.results.TransientSolution[2].Vel,\ 64 md.results.TransientSolution[2].Pressure,\ 65 md.results.TransientSolution[2].Base,\ 66 md.results.TransientSolution[2].Surface,\ 67 md.results.TransientSolution[2].Thickness,\ 68 md.results.TransientSolution[2].SmbMassBalance,\ 69 md.results.TransientSolution[3].Vx,\ 70 md.results.TransientSolution[3].Vy,\ 71 md.results.TransientSolution[3].Vel,\ 72 md.results.TransientSolution[3].Pressure,\ 73 md.results.TransientSolution[3].Base,\ 74 md.results.TransientSolution[3].Surface,\ 75 md.results.TransientSolution[3].Thickness,\ 76 md.results.TransientSolution[3].SmbMassBalance,\ 77 ] 36 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', 37 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', 38 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', 39 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4'] 40 field_tolerances=[5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10, 41 5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10, 42 5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10, 43 5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10] 44 field_values=[md.results.TransientSolution[0].Vx, 45 md.results.TransientSolution[0].Vy, 46 md.results.TransientSolution[0].Vel, 47 md.results.TransientSolution[0].Pressure, 48 md.results.TransientSolution[0].Base, 49 md.results.TransientSolution[0].Surface, 50 md.results.TransientSolution[0].Thickness, 51 md.results.TransientSolution[0].SmbMassBalance, 52 md.results.TransientSolution[1].Vx, 53 md.results.TransientSolution[1].Vy, 54 md.results.TransientSolution[1].Vel, 55 md.results.TransientSolution[1].Pressure, 56 md.results.TransientSolution[1].Base, 57 md.results.TransientSolution[1].Surface, 58 md.results.TransientSolution[1].Thickness, 59 md.results.TransientSolution[1].SmbMassBalance, 60 md.results.TransientSolution[2].Vx, 61 md.results.TransientSolution[2].Vy, 62 md.results.TransientSolution[2].Vel, 63 md.results.TransientSolution[2].Pressure, 64 md.results.TransientSolution[2].Base, 65 md.results.TransientSolution[2].Surface, 66 md.results.TransientSolution[2].Thickness, 67 md.results.TransientSolution[2].SmbMassBalance, 68 md.results.TransientSolution[3].Vx, 69 md.results.TransientSolution[3].Vy, 70 md.results.TransientSolution[3].Vel, 71 md.results.TransientSolution[3].Pressure, 72 md.results.TransientSolution[3].Base, 73 md.results.TransientSolution[3].Surface, 74 md.results.TransientSolution[3].Thickness, 75 md.results.TransientSolution[3].SmbMassBalance] -
issm/trunk-jpl/test/NightlyRun/test338.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedSmbMeltComponents2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 13 14 md=parameterize(md,'../Par/SquareShelf.py') 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 17 18 md.timestepping.time_step=1. 18 19 md.settings.output_frequency=1 19 md.timestepping.final_time=4 .20 md.timestepping.final_time=400. 20 21 21 22 #Set up transient 22 smb=n umpy.ones((md.mesh.numberofvertices,1))*3.623 smb=n umpy.hstack((smb,smb*-1.))23 smb=np.ones((md.mesh.numberofvertices))*3.6 24 smb=np.vstack((smb,smb*-1.)).T 24 25 25 md.smb=SMBmeltcomponents() ;26 md.smb.accumulation=n umpy.vstack((smb, [1.5,3.]));27 md.smb.evaporation=n umpy.vstack((smb/2, [1.5,3.]));28 md.smb.melt=n umpy.vstack((smb/2, [1.5,3.]));29 md.smb.refreeze=n umpy.vstack((smb, [1.5,3.]));26 md.smb=SMBmeltcomponents() 27 md.smb.accumulation=np.vstack((smb, [1.5,3.])) 28 md.smb.evaporation=np.vstack((smb/2, [1.5,3.])) 29 md.smb.melt=np.vstack((smb/2, [1.5,3.])) 30 md.smb.refreeze=np.vstack((smb, [1.5,3.])) 30 31 md.transient.isthermal=False 31 32 … … 33 34 34 35 #Fields and tolerances to track changes 35 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \ 36 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \ 37 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \ 38 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4'] 39 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 40 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 41 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\ 42 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 43 field_values=[\ 44 md.results.TransientSolution[0].Vx,\ 45 md.results.TransientSolution[0].Vy,\ 46 md.results.TransientSolution[0].Vel,\ 47 md.results.TransientSolution[0].Pressure,\ 48 md.results.TransientSolution[0].Base,\ 49 md.results.TransientSolution[0].Surface,\ 50 md.results.TransientSolution[0].Thickness,\ 51 md.results.TransientSolution[0].SmbMassBalance,\ 52 md.results.TransientSolution[1].Vx,\ 53 md.results.TransientSolution[1].Vy,\ 54 md.results.TransientSolution[1].Vel,\ 55 md.results.TransientSolution[1].Pressure,\ 56 md.results.TransientSolution[1].Base,\ 57 md.results.TransientSolution[1].Surface,\ 58 md.results.TransientSolution[1].Thickness,\ 59 md.results.TransientSolution[1].SmbMassBalance,\ 60 md.results.TransientSolution[2].Vx,\ 61 md.results.TransientSolution[2].Vy,\ 62 md.results.TransientSolution[2].Vel,\ 63 md.results.TransientSolution[2].Pressure,\ 64 md.results.TransientSolution[2].Base,\ 65 md.results.TransientSolution[2].Surface,\ 66 md.results.TransientSolution[2].Thickness,\ 67 md.results.TransientSolution[2].SmbMassBalance,\ 68 md.results.TransientSolution[3].Vx,\ 69 md.results.TransientSolution[3].Vy,\ 70 md.results.TransientSolution[3].Vel,\ 71 md.results.TransientSolution[3].Pressure,\ 72 md.results.TransientSolution[3].Base,\ 73 md.results.TransientSolution[3].Surface,\ 74 md.results.TransientSolution[3].Thickness,\ 75 md.results.TransientSolution[3].SmbMassBalance,\ 76 ] 36 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', 37 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', 38 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', 39 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4'] 40 field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 41 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 42 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10, 43 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 44 field_values=[md.results.TransientSolution[0].Vx, 45 md.results.TransientSolution[0].Vy, 46 md.results.TransientSolution[0].Vel, 47 md.results.TransientSolution[0].Pressure, 48 md.results.TransientSolution[0].Base, 49 md.results.TransientSolution[0].Surface, 50 md.results.TransientSolution[0].Thickness, 51 md.results.TransientSolution[0].SmbMassBalance, 52 md.results.TransientSolution[1].Vx, 53 md.results.TransientSolution[1].Vy, 54 md.results.TransientSolution[1].Vel, 55 md.results.TransientSolution[1].Pressure, 56 md.results.TransientSolution[1].Base, 57 md.results.TransientSolution[1].Surface, 58 md.results.TransientSolution[1].Thickness, 59 md.results.TransientSolution[1].SmbMassBalance, 60 md.results.TransientSolution[2].Vx, 61 md.results.TransientSolution[2].Vy, 62 md.results.TransientSolution[2].Vel, 63 md.results.TransientSolution[2].Pressure, 64 md.results.TransientSolution[2].Base, 65 md.results.TransientSolution[2].Surface, 66 md.results.TransientSolution[2].Thickness, 67 md.results.TransientSolution[2].SmbMassBalance, 68 md.results.TransientSolution[3].Vx, 69 md.results.TransientSolution[3].Vy, 70 md.results.TransientSolution[3].Vel, 71 md.results.TransientSolution[3].Pressure, 72 md.results.TransientSolution[3].Base, 73 md.results.TransientSolution[3].Surface, 74 md.results.TransientSolution[3].Thickness, 75 md.results.TransientSolution[3].SmbMassBalance] -
issm/trunk-jpl/test/NightlyRun/test339.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedSmbMeltComponents3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Square.exp',150000.) … … 14 15 md.extrude(3,1.) 15 16 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 18 19 md.timestepping.time_step=1. … … 21 22 22 23 #Set up transient 23 smb=n umpy.ones((md.mesh.numberofvertices,1))*3.624 smb=n umpy.hstack((smb,smb*-1.))24 smb=np.ones((md.mesh.numberofvertices))*3.6 25 smb=np.vstack((smb,smb*-1.)).T 25 26 26 md.smb=SMBmeltcomponents() ;27 md.smb.accumulation=n umpy.vstack((smb, [1.5,3.]));28 md.smb.evaporation=n umpy.vstack((smb/2, [1.5,3.]));29 md.smb.melt=n umpy.vstack((smb/2, [1.5,3.]));30 md.smb.refreeze=n umpy.vstack((smb, [1.5,3.]));27 md.smb=SMBmeltcomponents() 28 md.smb.accumulation=np.vstack((smb, [1.5,3.])) 29 md.smb.evaporation=np.vstack((smb/2, [1.5,3.])) 30 md.smb.melt=np.vstack((smb/2, [1.5,3.])) 31 md.smb.refreeze=np.vstack((smb, [1.5,3.])) 31 32 md.transient.isthermal=False 32 33 … … 34 35 35 36 #Fields and tolerances to track changes 36 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \ 37 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \ 38 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \ 39 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4'] 40 field_tolerances=[\ 41 1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\ 42 1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\ 43 1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\ 44 1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10] 45 field_values=[\ 46 md.results.TransientSolution[0].Vx,\ 47 md.results.TransientSolution[0].Vy,\ 48 md.results.TransientSolution[0].Vel,\ 49 md.results.TransientSolution[0].Pressure,\ 50 md.results.TransientSolution[0].Base,\ 51 md.results.TransientSolution[0].Surface,\ 52 md.results.TransientSolution[0].Thickness,\ 53 md.results.TransientSolution[0].SmbMassBalance,\ 54 md.results.TransientSolution[1].Vx,\ 55 md.results.TransientSolution[1].Vy,\ 56 md.results.TransientSolution[1].Vel,\ 57 md.results.TransientSolution[1].Pressure,\ 58 md.results.TransientSolution[1].Base,\ 59 md.results.TransientSolution[1].Surface,\ 60 md.results.TransientSolution[1].Thickness,\ 61 md.results.TransientSolution[1].SmbMassBalance,\ 62 md.results.TransientSolution[2].Vx,\ 63 md.results.TransientSolution[2].Vy,\ 64 md.results.TransientSolution[2].Vel,\ 65 md.results.TransientSolution[2].Pressure,\ 66 md.results.TransientSolution[2].Base,\ 67 md.results.TransientSolution[2].Surface,\ 68 md.results.TransientSolution[2].Thickness,\ 69 md.results.TransientSolution[2].SmbMassBalance,\ 70 md.results.TransientSolution[3].Vx,\ 71 md.results.TransientSolution[3].Vy,\ 72 md.results.TransientSolution[3].Vel,\ 73 md.results.TransientSolution[3].Pressure,\ 74 md.results.TransientSolution[3].Base,\ 75 md.results.TransientSolution[3].Surface,\ 76 md.results.TransientSolution[3].Thickness,\ 77 md.results.TransientSolution[3].SmbMassBalance,\ 78 ] 37 field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', 38 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', 39 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', 40 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4'] 41 field_tolerances=[1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10, 42 1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10, 43 1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10, 44 1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10] 45 field_values=[md.results.TransientSolution[0].Vx, 46 md.results.TransientSolution[0].Vy, 47 md.results.TransientSolution[0].Vel, 48 md.results.TransientSolution[0].Pressure, 49 md.results.TransientSolution[0].Base, 50 md.results.TransientSolution[0].Surface, 51 md.results.TransientSolution[0].Thickness, 52 md.results.TransientSolution[0].SmbMassBalance, 53 md.results.TransientSolution[1].Vx, 54 md.results.TransientSolution[1].Vy, 55 md.results.TransientSolution[1].Vel, 56 md.results.TransientSolution[1].Pressure, 57 md.results.TransientSolution[1].Base, 58 md.results.TransientSolution[1].Surface, 59 md.results.TransientSolution[1].Thickness, 60 md.results.TransientSolution[1].SmbMassBalance, 61 md.results.TransientSolution[2].Vx, 62 md.results.TransientSolution[2].Vy, 63 md.results.TransientSolution[2].Vel, 64 md.results.TransientSolution[2].Pressure, 65 md.results.TransientSolution[2].Base, 66 md.results.TransientSolution[2].Surface, 67 md.results.TransientSolution[2].Thickness, 68 md.results.TransientSolution[2].SmbMassBalance, 69 md.results.TransientSolution[3].Vx, 70 md.results.TransientSolution[3].Vy, 71 md.results.TransientSolution[3].Vel, 72 md.results.TransientSolution[3].Pressure, 73 md.results.TransientSolution[3].Base, 74 md.results.TransientSolution[3].Surface, 75 md.results.TransientSolution[3].Thickness, 76 md.results.TransientSolution[3].SmbMassBalance] -
issm/trunk-jpl/test/NightlyRun/test341.py
r21060 r21408 1 1 #Test Name: SquareSheetConstrainedCMm1qn3DragHO 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from m1qn3inversion import * 5 6 from triangle import * … … 8 9 from setflowequation import * 9 10 from solve import * 10 from MatlabFuncs import *11 11 12 md=triangle(model(),'../Exp/Square.exp',200000.); 13 md=setmask(md,'',''); 14 md=parameterize(md,'../Par/SquareSheetConstrained.py'); 12 13 md=triangle(model(),'../Exp/Square.exp',200000.) 14 md=setmask(md,'','') 15 md=parameterize(md,'../Par/SquareSheetConstrained.py') 15 16 md.extrude(3,1.) 16 md=setflowequation(md,'HO','all') ;17 md=setflowequation(md,'HO','all') 17 18 18 19 #control parameters 19 md.inversion=m1qn3inversion(md.inversion) ;20 md.inversion.iscontrol=1 ;20 md.inversion=m1qn3inversion(md.inversion) 21 md.inversion.iscontrol=1 21 22 md.inversion.control_parameters=['FrictionCoefficient'] 22 md.inversion.min_parameters=1.*n umpy.ones((md.mesh.numberofvertices,1))23 md.inversion.max_parameters=200.*n umpy.ones((md.mesh.numberofvertices,1))23 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices)) 24 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices)) 24 25 md.inversion.maxsteps=2 25 26 md.inversion.maxiter=6 26 27 md.inversion.cost_functions=[102,501] 27 md.inversion.cost_functions_coefficients=n umpy.ones((md.mesh.numberofvertices,2))28 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2)) 28 29 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7 29 md.inversion.vx_obs=md.initialization.vx ;30 md.inversion.vy_obs=md.initialization.vy ;30 md.inversion.vx_obs=md.initialization.vx 31 md.inversion.vy_obs=md.initialization.vy 31 32 32 md.cluster=generic('name', oshostname(),'np',3);33 md=solve(md,'Stressbalance') ;33 md.cluster=generic('name',gethostname(),'np',3) 34 md=solve(md,'Stressbalance') 34 35 35 36 #Fields and tolerances to track changes -
issm/trunk-jpl/test/NightlyRun/test401.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfStressSSA2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 13 14 md=parameterize(md,'../Par/SquareSheetShelf.py') 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Stressbalance') 17 18 -
issm/trunk-jpl/test/NightlyRun/test402.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfStressSSA3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(4,1.) 15 16 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md=solve(md,'Stressbalance') 18 19 -
issm/trunk-jpl/test/NightlyRun/test403.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfStressHO 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(5,1.) 15 16 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md=solve(md,'Stressbalance') 18 19 -
issm/trunk-jpl/test/NightlyRun/test404.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfStressFS 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(3,1.) 15 16 md=setflowequation(md,'FS','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md=solve(md,'Stressbalance') 18 19 -
issm/trunk-jpl/test/NightlyRun/test405.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfStressMHOPenalties 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(5,1.) 15 16 md=setflowequation(md,'SSA','../Exp/SquareHalfRight.exp','fill','HO','coupling','penalties') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md=solve(md,'Stressbalance') 18 19 -
issm/trunk-jpl/test/NightlyRun/test406.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfTherStea 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(4,1.) 15 16 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md.timestepping.time_step=0. 18 19 md=solve(md,'Thermal') -
issm/trunk-jpl/test/NightlyRun/test407.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfTherTran 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(4,1.) 15 16 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md.transient.isstressbalance=False 18 19 md.transient.ismasstransport=False -
issm/trunk-jpl/test/NightlyRun/test408.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfTranSSA3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md=setflowequation(md,'SSA','all') 16 17 md.transient.isthermal=False 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 md.transient.requested_outputs=['default','GroundedArea','FloatingArea','TotalFloatingBmb','TotalGroundedBmb','TotalSmb'] 19 20 md=solve(md,'Transient') -
issm/trunk-jpl/test/NightlyRun/test409.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfTranMHOPenalties 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(3,1.) 15 16 md=setflowequation(md,'SSA','../Exp/SquareHalfRight.exp','fill','HO','coupling','penalties') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.transient.requested_outputs=['default','GroundedArea'] ;17 md.cluster=generic('name',gethostname(),'np',3) 18 md.transient.requested_outputs=['default','GroundedArea'] 18 19 md=solve(md,'Transient') 19 20 -
issm/trunk-jpl/test/NightlyRun/test410.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfSteaSSA3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(3,2.) 15 16 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md.timestepping.time_step=0 18 19 md=solve(md,'Steadystate') -
issm/trunk-jpl/test/NightlyRun/test411.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfSteaHO 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(3,2.) 15 16 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md.timestepping.time_step=0. 18 19 md=solve(md,'Steadystate') -
issm/trunk-jpl/test/NightlyRun/test415.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfCMDragSteaSSA3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 18 19 md.inversion.iscontrol=1 19 20 md.inversion.control_parameters=['FrictionCoefficient'] 20 md.inversion.min_parameters=1.*n umpy.ones((md.mesh.numberofvertices,1))21 md.inversion.max_parameters=200.*n umpy.ones((md.mesh.numberofvertices,1))21 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices)) 22 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices)) 22 23 md.inversion.nsteps=2 23 24 md.inversion.cost_functions=[103,501] 24 md.inversion.cost_functions_coefficients=n umpy.ones((md.mesh.numberofvertices,2))25 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2)) 25 26 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7 26 md.inversion.gradient_scaling=3.*n umpy.ones((md.inversion.nsteps,1))27 md.inversion.maxiter_per_step=2*n umpy.ones((md.inversion.nsteps,1))28 md.inversion.step_threshold=0.3*n umpy.ones((md.inversion.nsteps,1))27 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps)) 28 md.inversion.maxiter_per_step=2*np.ones((md.inversion.nsteps)) 29 md.inversion.step_threshold=0.3*np.ones((md.inversion.nsteps)) 29 30 md.timestepping.time_step=0. 30 31 md.inversion.vx_obs=md.initialization.vx 31 32 md.inversion.vy_obs=md.initialization.vy 32 33 33 md.cluster=generic('name', oshostname(),'np',3)34 md.cluster=generic('name',gethostname(),'np',3) 34 35 md=solve(md,'Steadystate') 35 36 -
issm/trunk-jpl/test/NightlyRun/test416.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfCMDragSteaHO 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 18 19 md.inversion.iscontrol=1 19 20 md.inversion.control_parameters=['FrictionCoefficient'] 20 md.inversion.min_parameters=1.*n umpy.ones((md.mesh.numberofvertices,1))21 md.inversion.max_parameters=200.*n umpy.ones((md.mesh.numberofvertices,1))21 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices)) 22 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices)) 22 23 md.inversion.nsteps=2 23 24 md.inversion.cost_functions=[102,501] 24 md.inversion.cost_functions_coefficients=n umpy.ones((md.mesh.numberofvertices,2))25 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2)) 25 26 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7 26 md.inversion.gradient_scaling=3.*n umpy.ones((md.inversion.nsteps,1))27 md.inversion.maxiter_per_step=2*n umpy.ones((md.inversion.nsteps,1))28 md.inversion.step_threshold=0.3*n umpy.ones((md.inversion.nsteps,1))27 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps)) 28 md.inversion.maxiter_per_step=2*np.ones((md.inversion.nsteps)) 29 md.inversion.step_threshold=0.3*np.ones((md.inversion.nsteps)) 29 30 md.timestepping.time_step=0. 30 31 md.inversion.vx_obs=md.initialization.vx 31 32 md.inversion.vy_obs=md.initialization.vy 32 33 33 md.cluster=generic('name', oshostname(),'np',3)34 md.cluster=generic('name',gethostname(),'np',3) 34 35 md=solve(md,'Steadystate') 35 36 -
issm/trunk-jpl/test/NightlyRun/test419.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfStressSSAHOTiling 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(5,1.) 15 16 md=setflowequation(md,'SSA','../Exp/SquareHalfRight.exp','fill','HO') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md=solve(md,'Stressbalance') 18 19 -
issm/trunk-jpl/test/NightlyRun/test421.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfStressHOFS3dTiling 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(5,1.) 15 16 md=setflowequation(md,'FS','../Exp/SquareHalfRight.exp','fill','HO') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md=solve(md,'Stressbalance') 18 19 -
issm/trunk-jpl/test/NightlyRun/test422.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfStressSSAFS3dTiling 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(5,1.) 15 16 md=setflowequation(md,'FS','../Exp/SquareHalfRight.exp','fill','SSA') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md.stressbalance.reltol=0.4 18 19 md=solve(md,'Stressbalance') -
issm/trunk-jpl/test/NightlyRun/test423.py
r21060 r21408 1 1 #Test Name: RoundSheetShelfGLMigrationSSA2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from roundmesh import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 radius=1.e6 … … 14 15 md=roundmesh(model(),radius,50000.) 15 16 #fix center node to 0,0 16 rad=n umpy.sqrt(md.mesh.x**2+md.mesh.y**2)17 pos=n umpy.argmin(rad)17 rad=np.sqrt(md.mesh.x**2+md.mesh.y**2) 18 pos=np.argmin(rad) 18 19 md.mesh.x[pos]=0. 19 20 md.mesh.y[pos]=0. #the closest node to the center is changed to be exactly at the center 20 xelem=n umpy.mean(md.mesh.x[md.mesh.elements.astype(int)-1],axis=1)21 yelem=n umpy.mean(md.mesh.y[md.mesh.elements.astype(int)-1],axis=1)22 rad=n umpy.sqrt(xelem**2+yelem**2)23 flags=n umpy.zeros(md.mesh.numberofelements)24 pos=n umpy.nonzero(rad>=(radius-shelfextent))21 xelem=np.mean(md.mesh.x[md.mesh.elements.astype(int)-1],axis=1) 22 yelem=np.mean(md.mesh.y[md.mesh.elements.astype(int)-1],axis=1) 23 rad=np.sqrt(xelem**2+yelem**2) 24 flags=np.zeros(md.mesh.numberofelements) 25 pos=np.nonzero(rad>=(radius-shelfextent)) 25 26 flags[pos]=1 26 27 md=setmask(md,flags,'') 27 28 md=parameterize(md,'../Par/RoundSheetShelf.py') 28 29 md=setflowequation(md,'SSA','all') 29 md.cluster=generic('name', oshostname(),'np',3)30 md.cluster=generic('name',gethostname(),'np',3) 30 31 31 32 md.transient.isthermal=False -
issm/trunk-jpl/test/NightlyRun/test424.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfGroundingLine2dAggressive 2 import numpy3 2 from model import * 4 from MatlabFuncs import *3 from socket import gethostname 5 4 from triangle import * 6 5 from setmask import * … … 15 14 md.initialization.vx[:]=0. 16 15 md.initialization.vy[:]=0. 17 md.geometry.base=-700.-abs(md.mesh.y .reshape(-1,1)-500000.)/1000.18 md.geometry.bed =-700.-abs(md.mesh.y .reshape(-1,1)-500000.)/1000.16 md.geometry.base=-700.-abs(md.mesh.y-500000.)/1000. 17 md.geometry.bed =-700.-abs(md.mesh.y-500000.)/1000. 19 18 md.geometry.thickness[:]=1000. 20 19 md.geometry.surface=md.geometry.base+md.geometry.thickness … … 25 24 md.transient.requested_outputs=['IceVolume','IceVolumeAboveFloatation'] 26 25 27 md.cluster=generic('name', oshostname(),'np',3)26 md.cluster=generic('name',gethostname(),'np',3) 28 27 md=solve(md,'Transient') 29 28 30 29 #Fields and tolerances to track changes 31 field_names =['Bed1','Surface1','Thickness1','Floatingice1','IceVolume1','IceVolumeAboveFloatation1',\ 32 'Bed2','Surface2','Thickness2','Floatingice2','IceVolume2','IceVolumeAboveFloatation2',\ 33 'Bed3','Surface3','Thickness3','Floatingice3','IceVolume3','IceVolumeAboveFloatation3'] 34 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ 35 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ 36 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13] 37 field_values=[\ 38 md.results.TransientSolution[0].Base,\ 39 md.results.TransientSolution[0].Surface,\ 40 md.results.TransientSolution[0].Thickness,\ 41 md.results.TransientSolution[0].MaskGroundediceLevelset,\ 42 md.results.TransientSolution[0].IceVolume,\ 43 md.results.TransientSolution[0].IceVolumeAboveFloatation,\ 44 md.results.TransientSolution[1].Base,\ 45 md.results.TransientSolution[1].Surface,\ 46 md.results.TransientSolution[1].Thickness,\ 47 md.results.TransientSolution[1].MaskGroundediceLevelset,\ 48 md.results.TransientSolution[1].IceVolume,\ 49 md.results.TransientSolution[1].IceVolumeAboveFloatation,\ 50 md.results.TransientSolution[2].Base,\ 51 md.results.TransientSolution[2].Surface,\ 52 md.results.TransientSolution[2].Thickness,\ 53 md.results.TransientSolution[2].MaskGroundediceLevelset,\ 54 md.results.TransientSolution[2].IceVolume,\ 55 md.results.TransientSolution[2].IceVolumeAboveFloatation,\ 56 ] 30 field_names =['Bed1','Surface1','Thickness1','Floatingice1','IceVolume1','IceVolumeAboveFloatation1', 31 'Bed2','Surface2','Thickness2','Floatingice2','IceVolume2','IceVolumeAboveFloatation2', 32 'Bed3','Surface3','Thickness3','Floatingice3','IceVolume3','IceVolumeAboveFloatation3'] 33 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13, 34 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13, 35 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13] 36 field_values=[md.results.TransientSolution[0].Base, 37 md.results.TransientSolution[0].Surface, 38 md.results.TransientSolution[0].Thickness, 39 md.results.TransientSolution[0].MaskGroundediceLevelset, 40 md.results.TransientSolution[0].IceVolume, 41 md.results.TransientSolution[0].IceVolumeAboveFloatation, 42 md.results.TransientSolution[1].Base, 43 md.results.TransientSolution[1].Surface, 44 md.results.TransientSolution[1].Thickness, 45 md.results.TransientSolution[1].MaskGroundediceLevelset, 46 md.results.TransientSolution[1].IceVolume, 47 md.results.TransientSolution[1].IceVolumeAboveFloatation, 48 md.results.TransientSolution[2].Base, 49 md.results.TransientSolution[2].Surface, 50 md.results.TransientSolution[2].Thickness, 51 md.results.TransientSolution[2].MaskGroundediceLevelset, 52 md.results.TransientSolution[2].IceVolume, 53 md.results.TransientSolution[2].IceVolumeAboveFloatation] -
issm/trunk-jpl/test/NightlyRun/test425.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfGroundingLine2dSoft 2 import numpy3 2 from model import * 4 from MatlabFuncs import *3 from socket import gethostname 5 4 from triangle import * 6 5 from setmask import * … … 15 14 md.initialization.vx[:]=0. 16 15 md.initialization.vy[:]=0. 17 md.geometry.base=-700.-abs(md.mesh.y .reshape(-1,1)-500000.)/1000.18 md.geometry.bed =-700.-abs(md.mesh.y .reshape(-1,1)-500000.)/1000.16 md.geometry.base=-700.-abs(md.mesh.y-500000.)/1000. 17 md.geometry.bed =-700.-abs(md.mesh.y-500000.)/1000. 19 18 md.geometry.thickness[:]=1300. 20 19 md.geometry.surface=md.geometry.base+md.geometry.thickness … … 24 23 md.groundingline.migration='SoftMigration' 25 24 26 md.cluster=generic('name', oshostname(),'np',3)25 md.cluster=generic('name',gethostname(),'np',3) 27 26 md=solve(md,'Transient') 28 27 29 28 #Fields and tolerances to track changes 30 field_names =['Bed1','Surface1','Thickness1','Floatingice1',\ 31 'Bed2','Surface2','Thickness2','Floatingice2',\ 32 'Bed3','Surface3','Thickness3','Floatingice3'] 33 field_tolerances=[1e-13,1e-13,1e-13,1e-13,\ 34 1e-13,1e-13,1e-13,1e-13,\ 35 1e-13,1e-13,1e-13,1e-13] 36 field_values=[\ 37 md.results.TransientSolution[0].Base,\ 38 md.results.TransientSolution[0].Surface,\ 39 md.results.TransientSolution[0].Thickness,\ 40 md.results.TransientSolution[0].MaskGroundediceLevelset,\ 41 md.results.TransientSolution[1].Base,\ 42 md.results.TransientSolution[1].Surface,\ 43 md.results.TransientSolution[1].Thickness,\ 44 md.results.TransientSolution[1].MaskGroundediceLevelset,\ 45 md.results.TransientSolution[2].Base,\ 46 md.results.TransientSolution[2].Surface,\ 47 md.results.TransientSolution[2].Thickness,\ 48 md.results.TransientSolution[2].MaskGroundediceLevelset,\ 49 ] 29 field_names =['Bed1','Surface1','Thickness1','Floatingice1', 30 'Bed2','Surface2','Thickness2','Floatingice2', 31 'Bed3','Surface3','Thickness3','Floatingice3'] 32 field_tolerances=[1e-13,1e-13,1e-13,1e-13, 33 1e-13,1e-13,1e-13,1e-13, 34 1e-13,1e-13,1e-13,1e-13] 35 field_values=[md.results.TransientSolution[0].Base, 36 md.results.TransientSolution[0].Surface, 37 md.results.TransientSolution[0].Thickness, 38 md.results.TransientSolution[0].MaskGroundediceLevelset, 39 md.results.TransientSolution[1].Base, 40 md.results.TransientSolution[1].Surface, 41 md.results.TransientSolution[1].Thickness, 42 md.results.TransientSolution[1].MaskGroundediceLevelset, 43 md.results.TransientSolution[2].Base, 44 md.results.TransientSolution[2].Surface, 45 md.results.TransientSolution[2].Thickness, 46 md.results.TransientSolution[2].MaskGroundediceLevelset] -
issm/trunk-jpl/test/NightlyRun/test426.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfGroundingLine3dAggressive 2 import numpy3 2 from model import * 4 from MatlabFuncs import *3 from socket import gethostname 5 4 from triangle import * 6 5 from setmask import * … … 14 13 md.initialization.vx[:]=0. 15 14 md.initialization.vy[:]=0. 16 md.geometry.base=-700.-abs(md.mesh.y .reshape(-1,1)-500000.)/1000.17 md.geometry.bed =-700.-abs(md.mesh.y .reshape(-1,1)-500000.)/1000.15 md.geometry.base=-700.-abs(md.mesh.y-500000.)/1000. 16 md.geometry.bed =-700.-abs(md.mesh.y-500000.)/1000. 18 17 md.geometry.thickness[:]=1000. 19 18 md.geometry.surface=md.geometry.base+md.geometry.thickness 20 19 md.smb.mass_balance[:]=100. 21 md.extrude(3,1.) ;22 md=setflowequation(md,'SSA','all') ;20 md.extrude(3,1.) 21 md=setflowequation(md,'SSA','all') 23 22 md.transient.isstressbalance=False 24 23 md.transient.isgroundingline=True 25 24 md.groundingline.migration='AggressiveMigration' 26 25 md.transient.requested_outputs=['IceVolume','IceVolumeAboveFloatation'] 27 md.cluster=generic('name', oshostname(),'np',3)26 md.cluster=generic('name',gethostname(),'np',3) 28 27 29 28 md=solve(md,'Transient') 30 29 31 30 #Fields and tolerances to track changes 32 field_names =['Bed1','Surface1','Thickness1','Floatingice1','IceVolume1','IceVolumeAboveFloatation1', \33 'Bed2','Surface2','Thickness2','Floatingice2','IceVolume2','IceVolumeAboveFloatation2',\34 'Bed3','Surface3','Thickness3','Floatingice3','IceVolume3','IceVolumeAboveFloatation3',]31 field_names =['Bed1','Surface1','Thickness1','Floatingice1','IceVolume1','IceVolumeAboveFloatation1', 32 'Bed2','Surface2','Thickness2','Floatingice2','IceVolume2','IceVolumeAboveFloatation2', 33 'Bed3','Surface3','Thickness3','Floatingice3','IceVolume3','IceVolumeAboveFloatation3',] 35 34 36 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13, \37 1e-11,1e-10,1e-11,3e-11,2e-12,5e-12,\38 1e-10,1e-10,1e-10,5e-11,2e-12,5e-12]35 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13, 36 1e-11,1e-10,1e-11,3e-11,2e-12,5e-12, 37 1e-10,1e-10,1e-10,5e-11,2e-12,5e-12] 39 38 40 field_values=[\ 41 md.results.TransientSolution[0].Base,\ 42 md.results.TransientSolution[0].Surface,\ 43 md.results.TransientSolution[0].Thickness,\ 44 md.results.TransientSolution[0].MaskGroundediceLevelset,\ 45 md.results.TransientSolution[0].IceVolume,\ 46 md.results.TransientSolution[0].IceVolumeAboveFloatation,\ 47 md.results.TransientSolution[1].Base,\ 48 md.results.TransientSolution[1].Surface,\ 49 md.results.TransientSolution[1].Thickness,\ 50 md.results.TransientSolution[1].MaskGroundediceLevelset,\ 51 md.results.TransientSolution[1].IceVolume,\ 52 md.results.TransientSolution[1].IceVolumeAboveFloatation,\ 53 md.results.TransientSolution[2].Base,\ 54 md.results.TransientSolution[2].Surface,\ 55 md.results.TransientSolution[2].Thickness,\ 56 md.results.TransientSolution[2].MaskGroundediceLevelset,\ 57 md.results.TransientSolution[2].IceVolume,\ 58 md.results.TransientSolution[2].IceVolumeAboveFloatation,\ 59 ] 39 field_values=[md.results.TransientSolution[0].Base, 40 md.results.TransientSolution[0].Surface, 41 md.results.TransientSolution[0].Thickness, 42 md.results.TransientSolution[0].MaskGroundediceLevelset, 43 md.results.TransientSolution[0].IceVolume, 44 md.results.TransientSolution[0].IceVolumeAboveFloatation, 45 md.results.TransientSolution[1].Base, 46 md.results.TransientSolution[1].Surface, 47 md.results.TransientSolution[1].Thickness, 48 md.results.TransientSolution[1].MaskGroundediceLevelset, 49 md.results.TransientSolution[1].IceVolume, 50 md.results.TransientSolution[1].IceVolumeAboveFloatation, 51 md.results.TransientSolution[2].Base, 52 md.results.TransientSolution[2].Surface, 53 md.results.TransientSolution[2].Thickness, 54 md.results.TransientSolution[2].MaskGroundediceLevelset, 55 md.results.TransientSolution[2].IceVolume, 56 md.results.TransientSolution[2].IceVolumeAboveFloatation] -
issm/trunk-jpl/test/NightlyRun/test427.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfGroundingLine3dSoft 2 import numpy3 2 from model import * 4 from MatlabFuncs import *5 from triangle import * 3 from socket import gethostname 4 6 5 from setmask import * 7 6 from parameterize import * … … 14 13 md.initialization.vx[:]=0. 15 14 md.initialization.vy[:]=0. 16 md.geometry.base=-700.-abs(md.mesh.y .reshape(-1,1)-500000.)/1000.17 md.geometry.bed =-700.-abs(md.mesh.y .reshape(-1,1)-500000.)/1000.15 md.geometry.base=-700.-abs(md.mesh.y-500000.)/1000. 16 md.geometry.bed =-700.-abs(md.mesh.y-500000.)/1000. 18 17 md.geometry.thickness[:]=1300 19 18 md.geometry.surface=md.geometry.base+md.geometry.thickness … … 25 24 md.transient.isgroundingline=True 26 25 md.groundingline.migration='SoftMigration' 27 md.cluster=generic('name', oshostname(),'np',3)26 md.cluster=generic('name',gethostname(),'np',3) 28 27 md=solve(md,'Transient') 29 28 30 29 #Fields and tolerances to track changes 31 field_names =['Bed1','Surface1','Thickness1','Floatingice1',\ 32 'Bed2','Surface2','Thickness2','Floatingice2',\ 33 'Bed3','Surface3','Thickness3','Floatingice3'] 34 field_tolerances=[1e-13,1e-13,1e-13,1e-13,\ 35 5e-12,3e-12,7e-12,2e-11,\ 36 1e-10,5e-11,1e-10,7e-10] 37 field_values=[\ 38 md.results.TransientSolution[0].Base,\ 39 md.results.TransientSolution[0].Surface,\ 40 md.results.TransientSolution[0].Thickness,\ 41 md.results.TransientSolution[0].MaskGroundediceLevelset,\ 42 md.results.TransientSolution[1].Base,\ 43 md.results.TransientSolution[1].Surface,\ 44 md.results.TransientSolution[1].Thickness,\ 45 md.results.TransientSolution[1].MaskGroundediceLevelset,\ 46 md.results.TransientSolution[2].Base,\ 47 md.results.TransientSolution[2].Surface,\ 48 md.results.TransientSolution[2].Thickness,\ 49 md.results.TransientSolution[2].MaskGroundediceLevelset,\ 50 ] 30 field_names =['Bed1','Surface1','Thickness1','Floatingice1', 31 'Bed2','Surface2','Thickness2','Floatingice2', 32 'Bed3','Surface3','Thickness3','Floatingice3'] 33 field_tolerances=[1e-13,1e-13,1e-13,1e-13, 34 5e-12,3e-12,7e-12,2e-11, 35 1e-10,5e-11,1e-10,7e-10] 36 field_values=[md.results.TransientSolution[0].Base, 37 md.results.TransientSolution[0].Surface, 38 md.results.TransientSolution[0].Thickness, 39 md.results.TransientSolution[0].MaskGroundediceLevelset, 40 md.results.TransientSolution[1].Base, 41 md.results.TransientSolution[1].Surface, 42 md.results.TransientSolution[1].Thickness, 43 md.results.TransientSolution[1].MaskGroundediceLevelset, 44 md.results.TransientSolution[2].Base, 45 md.results.TransientSolution[2].Surface, 46 md.results.TransientSolution[2].Thickness, 47 md.results.TransientSolution[2].MaskGroundediceLevelset] -
issm/trunk-jpl/test/NightlyRun/test428.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfStressSSA2dNewton 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md.stressbalance.isnewton=1 16 17 md.stressbalance.restol=0.0001 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 md=solve(md,'Stressbalance') 19 20 -
issm/trunk-jpl/test/NightlyRun/test429.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfStressHONewton 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 16 17 md.stressbalance.isnewton=1 17 18 md.stressbalance.restol=0.0001 18 md.cluster=generic('name', oshostname(),'np',3)19 md.cluster=generic('name',gethostname(),'np',3) 19 20 md=solve(md,'Stressbalance') 20 21 -
issm/trunk-jpl/test/NightlyRun/test431.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfSteaEnthalpySSA3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(3,2.) 15 16 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md.timestepping.time_step=0. 18 19 md.thermal.isenthalpy=1 19 20 md.thermal.isdynamicbasalspc=1 20 md.initialization.waterfraction=n umpy.zeros((md.mesh.numberofvertices,1))21 md.initialization.watercolumn=n umpy.zeros((md.mesh.numberofvertices,1))21 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices)) 22 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices)) 22 23 md=solve(md,'Steadystate') 23 24 -
issm/trunk-jpl/test/NightlyRun/test432.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfSteaEnthalpyHO 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(3,2.) 15 16 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md.timestepping.time_step=0. 18 19 md.thermal.isenthalpy=1 19 md.initialization.waterfraction=n umpy.zeros((md.mesh.numberofvertices,1))20 md.initialization.watercolumn=n umpy.zeros((md.mesh.numberofvertices,1))20 md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices)) 21 md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices)) 21 22 md=solve(md,'Steadystate') 22 23 -
issm/trunk-jpl/test/NightlyRun/test433.py
r21060 r21408 1 1 #Test Name: RoundSheetShelfGLMigrationSSA3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from roundmesh import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 radius=1.e6 … … 14 15 md=roundmesh(model(),radius,50000.) 15 16 #fix center node to 0,0 16 rad=n umpy.sqrt(md.mesh.x**2+md.mesh.y**2)17 pos=n umpy.argmin(rad)17 rad=np.sqrt(md.mesh.x**2+md.mesh.y**2) 18 pos=np.argmin(rad) 18 19 md.mesh.x[pos]=0. 19 20 md.mesh.y[pos]=0. #the closest node to the center is changed to be exactly at the center 20 xelem=n umpy.mean(md.mesh.x[md.mesh.elements.astype(int)-1],axis=1)21 yelem=n umpy.mean(md.mesh.y[md.mesh.elements.astype(int)-1],axis=1)22 rad=n umpy.sqrt(xelem**2+yelem**2)23 flags=n umpy.zeros(md.mesh.numberofelements)24 pos=n umpy.nonzero(rad>=(radius-shelfextent))21 xelem=np.mean(md.mesh.x[md.mesh.elements.astype(int)-1],axis=1) 22 yelem=np.mean(md.mesh.y[md.mesh.elements.astype(int)-1],axis=1) 23 rad=np.sqrt(xelem**2+yelem**2) 24 flags=np.zeros(md.mesh.numberofelements) 25 pos=np.nonzero(rad>=(radius-shelfextent)) 25 26 flags[pos]=1 26 27 md=setmask(md,flags,'') … … 28 29 md=setflowequation(md,'SSA','all') 29 30 md.extrude(3,1.) 30 md.cluster=generic('name', oshostname(),'np',3)31 md.cluster=generic('name',gethostname(),'np',3) 31 32 32 33 md.transient.isthermal=False -
issm/trunk-jpl/test/NightlyRun/test434.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfL1L2 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(4,1.) 15 16 md=setflowequation(md,'L1L2','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md=solve(md,'Stressbalance') 18 19 -
issm/trunk-jpl/test/NightlyRun/test450.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfStressSSAHigherOrder 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 13 14 md=parameterize(md,'../Par/SquareSheetShelf.py') 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 17 18 field_names=[] -
issm/trunk-jpl/test/NightlyRun/test455.py
r21060 r21408 1 1 #Test Name: SquareSheetShelfStressHOHigherOrder 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(5,1.) 15 16 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 18 19 field_names=[] -
issm/trunk-jpl/test/NightlyRun/test501.py
r21060 r21408 1 1 #Test Name: PigStressSSA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Pig.exp',20000.) … … 12 13 md=parameterize(md,'../Par/Pig.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md=solve(md,'Stressbalance') 16 17 -
issm/trunk-jpl/test/NightlyRun/test502.py
r21060 r21408 1 1 #Test Name: PigStressHO 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Pig.exp',20000.) … … 13 14 md.extrude(3,0.9) 14 15 md=setflowequation(md,'HO','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Stressbalance') 17 18 -
issm/trunk-jpl/test/NightlyRun/test503.py
r21060 r21408 1 1 #Test Name: PigStressFS 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Pig.exp',20000.) … … 13 14 md.extrude(3,0.9) 14 15 md=setflowequation(md,'FS','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Stressbalance') 17 18 -
issm/trunk-jpl/test/NightlyRun/test504.py
r21060 r21408 1 1 #Test Name: PigTranSSA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Pig.exp',20000.) … … 12 13 md=parameterize(md,'../Par/Pig.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md=solve(md,'Transient') 16 17 -
issm/trunk-jpl/test/NightlyRun/test505.py
r21060 r21408 1 1 #Test Name: PigTranSSA3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Pig.exp',30000.) … … 13 14 md.extrude(3,1.) 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Transient') 17 18 -
issm/trunk-jpl/test/NightlyRun/test506.py
r21060 r21408 1 1 #Test Name: PigTranHO 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Pig.exp',30000.) … … 13 14 md.extrude(2,1.) 14 15 md=setflowequation(md,'HO','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Transient') 17 18 -
issm/trunk-jpl/test/NightlyRun/test507.py
r21060 r21408 1 1 #Test Name: PigTranFS 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Pig.exp',30000.) … … 13 14 md.extrude(2,1.) 14 15 md=setflowequation(md,'FS','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Transient') 17 18 -
issm/trunk-jpl/test/NightlyRun/test508.py
r21060 r21408 1 1 #Test Name: PigSteaSSA3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Pig.exp',35000.) … … 13 14 md.extrude(3,1.1) 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.timestepping.time_step=0. 17 18 md=solve(md,'Steadystate') -
issm/trunk-jpl/test/NightlyRun/test509.py
r21060 r21408 1 1 #Test Name: PigSteaHO 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Pig.exp',30000.) … … 13 14 md.extrude(3,1.) 14 15 md=setflowequation(md,'HO','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.timestepping.time_step=0. 17 18 md.thermal.penalty_threshold=7 -
issm/trunk-jpl/test/NightlyRun/test510.py
r21060 r21408 1 1 #Test Name: PigSteaFS 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Pig.exp',20000.) … … 13 14 md.extrude(2,1.) 14 15 md=setflowequation(md,'FS','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md.timestepping.time_step=0. 17 18 md=solve(md,'Steadystate') -
issm/trunk-jpl/test/NightlyRun/test511.py
r21060 r21408 1 1 #Test Name: PigCMBFS 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Pig.exp',11000.) … … 23 24 md.inversion.iscontrol=1 24 25 md.inversion.control_parameters=['MaterialsRheologyBbar'] 25 md.inversion.min_parameters=10.**6*n umpy.ones((md.mesh.numberofvertices,1))26 md.inversion.max_parameters=2.*10**9*n umpy.ones((md.mesh.numberofvertices,1))26 md.inversion.min_parameters=10.**6*np.ones((md.mesh.numberofvertices)) 27 md.inversion.max_parameters=2.*10**9*np.ones((md.mesh.numberofvertices)) 27 28 md.inversion.nsteps=2 28 29 md.inversion.cost_functions=[101] 29 md.inversion.cost_functions_coefficients=n umpy.ones((md.mesh.numberofvertices,1))30 md.inversion.gradient_scaling=10.**8*n umpy.ones((md.inversion.nsteps,1))31 md.inversion.maxiter_per_step=2.*n umpy.ones((md.inversion.nsteps,1))32 md.inversion.step_threshold=0.99*n umpy.ones((md.inversion.nsteps,1))30 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices)) 31 md.inversion.gradient_scaling=10.**8*np.ones((md.inversion.nsteps)) 32 md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps)) 33 md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps)) 33 34 md.inversion.vx_obs=md.initialization.vx 34 35 md.inversion.vy_obs=md.initialization.vy 35 36 36 md.cluster=generic('name', oshostname(),'np',1)37 md.cluster=generic('name',gethostname(),'np',1) 37 38 md=solve(md,'Stressbalance') 38 39 -
issm/trunk-jpl/test/NightlyRun/test512.py
r21060 r21408 1 1 #Test Name: PigCMDragHO 2 import numpy 2 import numpy as np 3 3 from model import * 4 from socket import gethostname 4 5 from triangle import * 5 6 from setmask import * … … 7 8 from setflowequation import * 8 9 from solve import * 9 from MatlabFuncs import * 10 10 11 11 12 md=triangle(model(),'../Exp/Pig.exp',20000.) … … 18 19 md.inversion.iscontrol=1 19 20 md.inversion.control_parameters=['FrictionCoefficient'] 20 md.inversion.min_parameters=1.*n umpy.ones((md.mesh.numberofvertices,1))21 md.inversion.max_parameters=200.*n umpy.ones((md.mesh.numberofvertices,1))21 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices)) 22 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices)) 22 23 md.inversion.nsteps=2 23 24 md.inversion.cost_functions=[103,501] 24 md.inversion.cost_functions_coefficients=n umpy.ones((md.mesh.numberofvertices,2))25 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2)) 25 26 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7 26 md.inversion.gradient_scaling=3.*n umpy.ones((md.inversion.nsteps,1))27 md.inversion.maxiter_per_step=2.*n umpy.ones((md.inversion.nsteps,1))28 md.inversion.step_threshold=2.99*n umpy.ones((md.inversion.nsteps,1))27 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps)) 28 md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps)) 29 md.inversion.step_threshold=2.99*np.ones((md.inversion.nsteps)) 29 30 md.inversion.vx_obs=md.initialization.vx 30 31 md.inversion.vy_obs=md.initialization.vy 31 32 32 md.cluster=generic('name', oshostname(),'np',3)33 md.cluster=generic('name',gethostname(),'np',3) 33 34 md=solve(md,'Stressbalance') 34 35 -
issm/trunk-jpl/test/NightlyRun/test513.py
r21060 r21408 1 1 #Test Name: PigCMDragSteaSSA3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Pig.exp',30000.) … … 17 18 md.inversion.iscontrol=1 18 19 md.inversion.control_parameters=['FrictionCoefficient'] 19 md.inversion.min_parameters=1.*n umpy.ones((md.mesh.numberofvertices,1))20 md.inversion.max_parameters=200.*n umpy.ones((md.mesh.numberofvertices,1))20 md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices)) 21 md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices)) 21 22 md.inversion.nsteps=2 22 23 md.inversion.cost_functions=[103,501] 23 md.inversion.cost_functions_coefficients=n umpy.ones((md.mesh.numberofvertices,2))24 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2)) 24 25 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7 25 md.inversion.gradient_scaling=3.*n umpy.ones((md.inversion.nsteps,1))26 md.inversion.maxiter_per_step=2.*n umpy.ones((md.inversion.nsteps,1))27 md.inversion.step_threshold=0.99*n umpy.ones((md.inversion.nsteps,1))26 md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps)) 27 md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps)) 28 md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps)) 28 29 md.inversion.vx_obs=md.initialization.vx 29 30 md.inversion.vy_obs=md.initialization.vy … … 31 32 32 33 md.thermal.penalty_lock=5 33 md.cluster=generic('name', oshostname(),'np',3)34 md.cluster=generic('name',gethostname(),'np',3) 34 35 md=solve(md,'Steadystate') 35 36 -
issm/trunk-jpl/test/NightlyRun/test514.py
r19049 r21408 1 1 #Test Name: PigBamgMesh 2 import numpy 2 import numpy as np 3 3 import copy 4 4 from model import * 5 from socket import gethostname 5 6 from bamg import * 6 7 from setmask import * … … 8 9 from ComputeHessian import * 9 10 from ComputeMetric import * 10 from MatlabFuncs import * 11 11 12 12 13 #Simple mesh 1 13 hVertices=10000.*n umpy.ones((27,1))14 hVertices=10000.*np.ones((27)) 14 15 hVertices[0:5]=1000. 15 16 md=bamg(model(),'domain','../Exp/Pig.exp','hmax',20000.,'hVertices',hVertices,'gradation',3.,'geometricalmetric',1) … … 38 39 39 40 #refine existing mesh 3 40 hVertices=float('nan')*n umpy.ones((md.mesh.numberofvertices,1))41 hVertices[n umpy.nonzero(md.mesh.vertexonboundary)]=500.41 hVertices=float('nan')*np.ones((md.mesh.numberofvertices)) 42 hVertices[np.nonzero(md.mesh.vertexonboundary)]=500. 42 43 md2=bamg(copy.deepcopy(md),'metric',md.miscellaneous.dummy,'hmin',1000.,'hmax',20000.,'gradation',3.,'geometricalmetric',1,'anisomax',1.,'hVertices',hVertices) 43 44 x5=md2.mesh.x … … 45 46 46 47 #refine existing mesh 4 47 md2=bamg(copy.deepcopy(md),'field',md.inversion.vy_obs,'hmin',1000.,'hmax',20000.,'gradation',3.,'geometricalmetric',1,'Hessiantype',0,'err',n umpy.array([[1.]]))48 md2=bamg(copy.deepcopy(md),'field',md.inversion.vy_obs,'hmin',1000.,'hmax',20000.,'gradation',3.,'geometricalmetric',1,'Hessiantype',0,'err',np.array([[1.]])) 48 49 x6=md2.mesh.x 49 50 y6=md2.mesh.y 50 51 51 52 #refine existing mesh 5 52 md2=bamg(copy.deepcopy(md),'field',n umpy.hstack((md.inversion.vy_obs,md.geometry.thickness)),'hmin',1000.,'hmax',20000.,'gradation',3.,'geometricalmetric',1,'Hessiantype',1,'err',numpy.array([[10.,100.]]))53 md2=bamg(copy.deepcopy(md),'field',np.hstack((md.inversion.vy_obs,md.geometry.thickness)),'hmin',1000.,'hmax',20000.,'gradation',3.,'geometricalmetric',1,'Hessiantype',1,'err',np.array([[10.,100.]])) 53 54 x7=md2.mesh.x 54 55 y7=md2.mesh.y -
issm/trunk-jpl/test/NightlyRun/test515.py
r21060 r21408 1 1 #Test Name: PigTherTranSUPG 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Pig.exp',30000.) … … 14 15 md=setflowequation(md,'HO','all') 15 16 md.thermal.stabilization=2 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md.transient.isstressbalance=False 18 19 md.transient.ismasstransport=False -
issm/trunk-jpl/test/NightlyRun/test516.py
r21060 r21408 1 1 #Test Name: PigTherSteaSUPG 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 15 16 md=setflowequation(md,'HO','all') 16 17 md.thermal.stabilization=2 17 md.cluster=generic('name', oshostname(),'np',3)18 md.cluster=generic('name',gethostname(),'np',3) 18 19 md.timestepping.time_step=0 19 20 md.thermal.penalty_threshold=40 -
issm/trunk-jpl/test/NightlyRun/test530.py
r21060 r21408 1 1 #Test Name: PigBalVel1 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Pig.exp',20000.) … … 12 13 md=parameterize(md,'../Par/Pig.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md=solve(md,'Balancevelocity') 16 17 -
issm/trunk-jpl/test/NightlyRun/test531.py
r21060 r21408 1 1 #Test Name: PigBalVel2 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 5 from setmask import * … … 6 7 from setflowequation import * 7 8 from solve import * 8 from MatlabFuncs import * 9 9 10 10 11 md=triangle(model(),'../Exp/Pig.exp',20000.) … … 14 15 md.initialization.vy[:]=0. 15 16 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md=solve(md,'Balancevelocity') 18 19 -
issm/trunk-jpl/test/NightlyRun/test601.py
r21060 r21408 1 1 #Test Name: 79NorthMasstransp2d 2 2 from model import * 3 from MatlabFuncs import * 3 from socket import gethostname 4 4 5 from triangle import * 5 6 from setmask import * … … 12 13 md=parameterize(md,'../Par/79North.py') 13 14 md=setflowequation(md,'SSA','all') 14 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 15 16 md=solve(md,'Masstransport') 16 17 -
issm/trunk-jpl/test/NightlyRun/test602.py
r21060 r21408 1 1 #Test Name: 79NorthMasstransp2dDG 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from meshconvert import * … … 17 18 md.masstransport.stabilization=3 18 19 md.masstransport.spcthickness=md.geometry.thickness 19 md.cluster=generic('name', oshostname(),'np',3)20 md.cluster=generic('name',gethostname(),'np',3) 20 21 md=solve(md,'Masstransport') 21 22 -
issm/trunk-jpl/test/NightlyRun/test603.py
r21060 r21408 1 1 #Test Name: 79NorthMasstransp3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(6,1.) 15 16 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md=solve(md,'Masstransport') 18 19 -
issm/trunk-jpl/test/NightlyRun/test604.py
r21060 r21408 1 1 #Test Name: 79NorthSurfSlop2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 13 14 md=parameterize(md,'../Par/79North.py') 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'SurfaceSlope') 17 18 -
issm/trunk-jpl/test/NightlyRun/test605.py
r21060 r21408 1 1 #Test Name: 79NorthSurfSlop3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(5,1.5) 15 16 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md=solve(md,'SurfaceSlope') 18 19 -
issm/trunk-jpl/test/NightlyRun/test606.py
r21060 r21408 1 1 #Test Name: 79NorthBedSlop2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 13 14 md=parameterize(md,'../Par/79North.py') 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'BedSlope') 17 18 -
issm/trunk-jpl/test/NightlyRun/test607.py
r21060 r21408 1 1 #Test Name: 79NorthBedSlop3d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 14 15 md.extrude(2,1.) 15 16 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)17 md.cluster=generic('name',gethostname(),'np',3) 17 18 md=solve(md,'BedSlope') 18 19 -
issm/trunk-jpl/test/NightlyRun/test608.py
r21060 r21408 1 1 #Test Name: 79NorthBalThic2d 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 13 14 md=parameterize(md,'../Par/79North.py') 14 15 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 16 17 md=solve(md,'Balancethickness') 17 18 -
issm/trunk-jpl/test/NightlyRun/test611.py
r21060 r21408 1 1 #Test Name: 79NorthCMBalThic2dCG 2 import numpy 2 import numpy as np 3 3 from model import * 4 from MatlabFuncs import * 4 from socket import gethostname 5 5 6 from triangle import * 6 7 from setmask import * … … 20 21 md.inversion.control_parameters=['BalancethicknessThickeningRate'] 21 22 md.inversion.thickness_obs=md.geometry.thickness 22 md.inversion.min_parameters=-50.*n umpy.ones((md.mesh.numberofvertices,1))23 md.inversion.max_parameters=50.*n umpy.ones((md.mesh.numberofvertices,1))23 md.inversion.min_parameters=-50.*np.ones((md.mesh.numberofvertices)) 24 md.inversion.max_parameters=50.*np.ones((md.mesh.numberofvertices)) 24 25 md.inversion.cost_functions=[201] 25 md.inversion.cost_functions_coefficients=n umpy.ones((md.mesh.numberofvertices,1))26 md.inversion.gradient_scaling=10./md.constants.yts*n umpy.ones((md.inversion.nsteps,1))27 md.inversion.maxiter_per_step=4*n umpy.ones((md.inversion.nsteps,1))28 md.inversion.step_threshold=0.99*n umpy.ones((md.inversion.nsteps,1))26 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices)) 27 md.inversion.gradient_scaling=10./md.constants.yts*np.ones((md.inversion.nsteps)) 28 md.inversion.maxiter_per_step=4*np.ones((md.inversion.nsteps)) 29 md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps)) 29 30 30 md.cluster=generic('name', oshostname(),'np',3)31 md.cluster=generic('name',gethostname(),'np',3) 31 32 md=solve(md,'Balancethickness') 32 33 -
issm/trunk-jpl/test/NightlyRun/test613.py
r21060 r21408 1 1 #Test Name: 79NorthCMBalThicVxVy 2 import numpy 2 import numpy as np 3 3 import copy 4 4 from model import * 5 from socket import gethostname 5 6 from triangle import * 6 7 from meshconvert import * … … 9 10 from setflowequation import * 10 11 from solve import * 11 from MatlabFuncs import * 12 12 13 13 14 md=triangle(model(),'../Exp/79North.exp',10000.) … … 19 20 #Ice sheet only 20 21 md=md.extract(md.mask.groundedice_levelset>0.) 21 pos=n umpy.nonzero(md.mesh.vertexonboundary)22 pos=np.nonzero(md.mesh.vertexonboundary) 22 23 md.balancethickness.spcthickness[pos]=md.geometry.thickness[pos] 23 24 … … 28 29 md.inversion.control_parameters=['Vx','Vy'] 29 30 md.balancethickness.stabilization=1 30 md.inversion.gradient_scaling=n umpy.hstack((10./md.constants.yts*numpy.ones((md.inversion.nsteps,1)),10./md.constants.yts*numpy.ones((md.inversion.nsteps,1))))31 md.inversion.min_parameters=n umpy.hstack((-2000.*numpy.ones((md.mesh.numberofvertices,1)),-2000.*numpy.ones((md.mesh.numberofvertices,1))))32 md.inversion.max_parameters=n umpy.hstack((+2000.*numpy.ones((md.mesh.numberofvertices,1)),+2000.*numpy.ones((md.mesh.numberofvertices,1))))31 md.inversion.gradient_scaling=np.vstack((10./md.constants.yts*np.ones((md.inversion.nsteps)),10./md.constants.yts*np.ones((md.inversion.nsteps)))).T 32 md.inversion.min_parameters=np.vstack((-2000.*np.ones((md.mesh.numberofvertices)),-2000.*np.ones((md.mesh.numberofvertices)))).T 33 md.inversion.max_parameters=np.vstack((+2000.*np.ones((md.mesh.numberofvertices)),+2000.*np.ones((md.mesh.numberofvertices)))).T 33 34 md.inversion.cost_functions=[201] 34 md.inversion.cost_functions_coefficients=n umpy.ones((md.mesh.numberofvertices,1))35 md.inversion.maxiter_per_step=4*n umpy.ones((md.inversion.nsteps,1))36 md.inversion.step_threshold=0.99*n umpy.ones((md.inversion.nsteps,1))35 md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices)) 36 md.inversion.maxiter_per_step=4*np.ones((md.inversion.nsteps)) 37 md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps)) 37 38 38 39 md.verbose.control=1 39 md.cluster=generic('name', oshostname(),'np',3)40 md.cluster=generic('name',gethostname(),'np',3) 40 41 md=solve(md,'Balancethickness') 41 42 … … 43 44 field_names =['Gradient1','Gradient2','Misfits','Vx','Vy','Thickness'] 44 45 field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12] 45 field_values=[\ 46 md.results.BalancethicknessSolution.Gradient1,\ 47 md.results.BalancethicknessSolution.Gradient2,\ 48 md.results.BalancethicknessSolution.J,\ 49 md.results.BalancethicknessSolution.Vx,\ 50 md.results.BalancethicknessSolution.Vy,\ 51 md.results.BalancethicknessSolution.Thickness,\ 52 ] 46 field_values=[md.results.BalancethicknessSolution.Gradient1, 47 md.results.BalancethicknessSolution.Gradient2, 48 md.results.BalancethicknessSolution.J, 49 md.results.BalancethicknessSolution.Vx, 50 md.results.BalancethicknessSolution.Vy, 51 md.results.BalancethicknessSolution.Thickness] -
issm/trunk-jpl/test/NightlyRun/test801.py
r21060 r21408 1 1 #Test Name: ValleyGlacierLevelsetSSA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 from squaremesh import *5 5 from setmask import * 6 6 from parameterize import * 7 7 from setflowequation import * 8 8 from solve import * 9 from MatlabFuncs import * 9 10 10 11 11 md=triangle(model(),'../Exp/Square.exp',50000) … … 13 13 md=parameterize(md,'../Par/ValleyGlacierShelf.py') 14 14 md=setflowequation(md,'SSA','all') 15 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 16 16 17 17 #Transient … … 27 27 28 28 #Fields and tolerances to track changes 29 field_names =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1',\ 30 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2',\ 31 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3'] 32 field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,\ 33 1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,\ 34 1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12] 35 field_values=[\ 36 md.results.TransientSolution[0].Vx,\ 37 md.results.TransientSolution[0].Vy,\ 38 md.results.TransientSolution[0].Vel,\ 39 md.results.TransientSolution[0].Pressure,\ 40 md.results.TransientSolution[0].Thickness,\ 41 md.results.TransientSolution[0].Surface,\ 42 md.results.TransientSolution[0].MaskIceLevelset,\ 43 md.results.TransientSolution[1].Vx,\ 44 md.results.TransientSolution[1].Vy,\ 45 md.results.TransientSolution[1].Vel,\ 46 md.results.TransientSolution[1].Pressure,\ 47 md.results.TransientSolution[1].Thickness,\ 48 md.results.TransientSolution[1].Surface,\ 49 md.results.TransientSolution[1].MaskIceLevelset,\ 50 md.results.TransientSolution[2].Vx,\ 51 md.results.TransientSolution[2].Vy,\ 52 md.results.TransientSolution[2].Vel,\ 53 md.results.TransientSolution[2].Pressure,\ 54 md.results.TransientSolution[2].Thickness,\ 55 md.results.TransientSolution[2].Surface,\ 56 md.results.TransientSolution[2].MaskIceLevelset,\ 57 ] 29 field_names =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1', 30 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2', 31 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3'] 32 field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12, 33 1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12, 34 1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12] 35 field_values=[md.results.TransientSolution[0].Vx, 36 md.results.TransientSolution[0].Vy, 37 md.results.TransientSolution[0].Vel, 38 md.results.TransientSolution[0].Pressure, 39 md.results.TransientSolution[0].Thickness, 40 md.results.TransientSolution[0].Surface, 41 md.results.TransientSolution[0].MaskIceLevelset, 42 md.results.TransientSolution[1].Vx, 43 md.results.TransientSolution[1].Vy, 44 md.results.TransientSolution[1].Vel, 45 md.results.TransientSolution[1].Pressure, 46 md.results.TransientSolution[1].Thickness, 47 md.results.TransientSolution[1].Surface, 48 md.results.TransientSolution[1].MaskIceLevelset, 49 md.results.TransientSolution[2].Vx, 50 md.results.TransientSolution[2].Vy, 51 md.results.TransientSolution[2].Vel, 52 md.results.TransientSolution[2].Pressure, 53 md.results.TransientSolution[2].Thickness, 54 md.results.TransientSolution[2].Surface, 55 md.results.TransientSolution[2].MaskIceLevelset] -
issm/trunk-jpl/test/NightlyRun/test802.py
r21060 r21408 1 1 #Test Name: ValleyGlacierLevelsetThermalSSA3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 from squaremesh import *5 5 from setmask import * 6 6 from parameterize import * 7 7 from setflowequation import * 8 8 from solve import * 9 from MatlabFuncs import * 9 10 10 11 11 md=triangle(model(),'../Exp/Square.exp',50000) … … 14 14 md.extrude(3,2.) 15 15 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 17 17 18 18 #Thermal model 19 pos_surf=n umpy.nonzero(md.mesh.vertexonsurface)[0]19 pos_surf=np.nonzero(md.mesh.vertexonsurface)[0] 20 20 md.thermal.spctemperature[pos_surf]=md.initialization.temperature[pos_surf] 21 21 … … 32 32 33 33 #Fields and tolerances to track changes 34 field_names =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Temperature1',\ 35 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Temperature2',\ 36 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Temperature3'] 37 field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,\ 38 1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,\ 39 1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 40 field_values=[\ 41 md.results.TransientSolution[0].Vx,\ 42 md.results.TransientSolution[0].Vy,\ 43 md.results.TransientSolution[0].Vel,\ 44 md.results.TransientSolution[0].Pressure,\ 45 md.results.TransientSolution[0].Thickness,\ 46 md.results.TransientSolution[0].Surface,\ 47 md.results.TransientSolution[0].MaskIceLevelset,\ 48 md.results.TransientSolution[0].Temperature,\ 49 md.results.TransientSolution[1].Vx,\ 50 md.results.TransientSolution[1].Vy,\ 51 md.results.TransientSolution[1].Vel,\ 52 md.results.TransientSolution[1].Pressure,\ 53 md.results.TransientSolution[1].Thickness,\ 54 md.results.TransientSolution[1].Surface,\ 55 md.results.TransientSolution[1].MaskIceLevelset,\ 56 md.results.TransientSolution[1].Temperature,\ 57 md.results.TransientSolution[2].Vx,\ 58 md.results.TransientSolution[2].Vy,\ 59 md.results.TransientSolution[2].Vel,\ 60 md.results.TransientSolution[2].Pressure,\ 61 md.results.TransientSolution[2].Thickness,\ 62 md.results.TransientSolution[2].Surface,\ 63 md.results.TransientSolution[2].MaskIceLevelset,\ 64 md.results.TransientSolution[2].Temperature,\ 65 ] 34 field_names =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Temperature1', 35 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Temperature2', 36 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Temperature3'] 37 field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12, 38 1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9, 39 1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 40 field_values=[md.results.TransientSolution[0].Vx, 41 md.results.TransientSolution[0].Vy, 42 md.results.TransientSolution[0].Vel, 43 md.results.TransientSolution[0].Pressure, 44 md.results.TransientSolution[0].Thickness, 45 md.results.TransientSolution[0].Surface, 46 md.results.TransientSolution[0].MaskIceLevelset, 47 md.results.TransientSolution[0].Temperature, 48 md.results.TransientSolution[1].Vx, 49 md.results.TransientSolution[1].Vy, 50 md.results.TransientSolution[1].Vel, 51 md.results.TransientSolution[1].Pressure, 52 md.results.TransientSolution[1].Thickness, 53 md.results.TransientSolution[1].Surface, 54 md.results.TransientSolution[1].MaskIceLevelset, 55 md.results.TransientSolution[1].Temperature, 56 md.results.TransientSolution[2].Vx, 57 md.results.TransientSolution[2].Vy, 58 md.results.TransientSolution[2].Vel, 59 md.results.TransientSolution[2].Pressure, 60 md.results.TransientSolution[2].Thickness, 61 md.results.TransientSolution[2].Surface, 62 md.results.TransientSolution[2].MaskIceLevelset, 63 md.results.TransientSolution[2].Temperature] -
issm/trunk-jpl/test/NightlyRun/test803.py
r21060 r21408 1 1 #Test Name: ValleyGlacierLevelsetEnthalpyHO3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 from squaremesh import *5 5 from setmask import * 6 6 from parameterize import * 7 7 from setflowequation import * 8 8 from solve import * 9 from MatlabFuncs import * 9 10 10 11 11 md=triangle(model(),'../Exp/Square.exp',50000) … … 14 14 md.extrude(3,2.) 15 15 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 17 17 18 18 #Thermal model 19 pos_surf=n umpy.nonzero(md.mesh.vertexonsurface)[0]19 pos_surf=np.nonzero(md.mesh.vertexonsurface)[0] 20 20 md.thermal.spctemperature[pos_surf]=md.initialization.temperature[pos_surf] 21 21 md.thermal.isenthalpy=True … … 34 34 35 35 #Fields and tolerances to track changes 36 field_names =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Enthalpy1','Watercolumn1',\ 37 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Enthalpy2','Watercolumn2',\ 38 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Enthalpy3','Watercolumn3'] 39 field_tolerances=[1e-10,1e-10,1e-10,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ 40 1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,1e-10,\ 41 1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 42 field_values=[\ 43 md.results.TransientSolution[0].Vx,\ 44 md.results.TransientSolution[0].Vy,\ 45 md.results.TransientSolution[0].Vel,\ 46 md.results.TransientSolution[0].Pressure,\ 47 md.results.TransientSolution[0].Thickness,\ 48 md.results.TransientSolution[0].Surface,\ 49 md.results.TransientSolution[0].MaskIceLevelset,\ 50 md.results.TransientSolution[0].Enthalpy,\ 51 md.results.TransientSolution[0].Watercolumn,\ 52 md.results.TransientSolution[1].Vx,\ 53 md.results.TransientSolution[1].Vy,\ 54 md.results.TransientSolution[1].Vel,\ 55 md.results.TransientSolution[1].Pressure,\ 56 md.results.TransientSolution[1].Thickness,\ 57 md.results.TransientSolution[1].Surface,\ 58 md.results.TransientSolution[1].MaskIceLevelset,\ 59 md.results.TransientSolution[1].Enthalpy,\ 60 md.results.TransientSolution[1].Watercolumn,\ 61 md.results.TransientSolution[2].Vx,\ 62 md.results.TransientSolution[2].Vy,\ 63 md.results.TransientSolution[2].Vel,\ 64 md.results.TransientSolution[2].Pressure,\ 65 md.results.TransientSolution[2].Thickness,\ 66 md.results.TransientSolution[2].Surface,\ 67 md.results.TransientSolution[2].MaskIceLevelset,\ 68 md.results.TransientSolution[2].Enthalpy,\ 69 md.results.TransientSolution[2].Watercolumn,\ 70 ] 36 field_names =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Enthalpy1','Watercolumn1', 37 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Enthalpy2','Watercolumn2', 38 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Enthalpy3','Watercolumn3'] 39 field_tolerances=[1e-10,1e-10,1e-10,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13, 40 1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,1e-10, 41 1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 42 field_values=[md.results.TransientSolution[0].Vx, 43 md.results.TransientSolution[0].Vy, 44 md.results.TransientSolution[0].Vel, 45 md.results.TransientSolution[0].Pressure, 46 md.results.TransientSolution[0].Thickness, 47 md.results.TransientSolution[0].Surface, 48 md.results.TransientSolution[0].MaskIceLevelset, 49 md.results.TransientSolution[0].Enthalpy, 50 md.results.TransientSolution[0].Watercolumn, 51 md.results.TransientSolution[1].Vx, 52 md.results.TransientSolution[1].Vy, 53 md.results.TransientSolution[1].Vel, 54 md.results.TransientSolution[1].Pressure, 55 md.results.TransientSolution[1].Thickness, 56 md.results.TransientSolution[1].Surface, 57 md.results.TransientSolution[1].MaskIceLevelset, 58 md.results.TransientSolution[1].Enthalpy, 59 md.results.TransientSolution[1].Watercolumn, 60 md.results.TransientSolution[2].Vx, 61 md.results.TransientSolution[2].Vy, 62 md.results.TransientSolution[2].Vel, 63 md.results.TransientSolution[2].Pressure, 64 md.results.TransientSolution[2].Thickness, 65 md.results.TransientSolution[2].Surface, 66 md.results.TransientSolution[2].MaskIceLevelset, 67 md.results.TransientSolution[2].Enthalpy, 68 md.results.TransientSolution[2].Watercolumn] -
issm/trunk-jpl/test/NightlyRun/test804.py
r21060 r21408 1 1 #Test Name: ValleyGlacierLevelsetCalvingSIA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 from squaremesh import *5 5 from setmask import * 6 6 from parameterize import * 7 7 from setflowequation import * 8 8 from solve import * 9 from MatlabFuncs import * 9 10 10 11 11 md=triangle(model(),'../Exp/Square.exp',50000) … … 13 13 md=parameterize(md,'../Par/ValleyGlacierShelf.py') 14 14 md=setflowequation(md,'SIA','all') 15 md.cluster=generic('name', oshostname(),'np',3)15 md.cluster=generic('name',gethostname(),'np',3) 16 16 17 17 #Transient … … 22 22 md.transient.isgroundingline=True 23 23 md.transient.isgia=False 24 md.transient.ismovingfront=True ;24 md.transient.ismovingfront=True 25 25 26 md.calving.calvingrate=1000.*n umpy.ones((md.mesh.numberofvertices,1))27 md.calving.meltingrate=n umpy.zeros((md.mesh.numberofvertices,1))26 md.calving.calvingrate=1000.*np.ones((md.mesh.numberofvertices)) 27 md.calving.meltingrate=np.zeros((md.mesh.numberofvertices)) 28 28 29 29 md=solve(md,'Transient') 30 30 31 31 #Fields and tolerances to track changes 32 field_names =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1',\ 33 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2',\ 34 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3'] 35 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\ 36 2e-13,2e-13,2e-13,1e-13,1e-13,1e-13,1e-13,\ 37 2e-13,2e-13,2e-13,1e-13,1e-13,1e-13,1e-13] 38 field_values=[\ 39 md.results.TransientSolution[0].Vx,\ 40 md.results.TransientSolution[0].Vy,\ 41 md.results.TransientSolution[0].Vel,\ 42 md.results.TransientSolution[0].Pressure,\ 43 md.results.TransientSolution[0].Thickness,\ 44 md.results.TransientSolution[0].Surface,\ 45 md.results.TransientSolution[0].MaskIceLevelset,\ 46 md.results.TransientSolution[1].Vx,\ 47 md.results.TransientSolution[1].Vy,\ 48 md.results.TransientSolution[1].Vel,\ 49 md.results.TransientSolution[1].Pressure,\ 50 md.results.TransientSolution[1].Thickness,\ 51 md.results.TransientSolution[1].Surface,\ 52 md.results.TransientSolution[1].MaskIceLevelset,\ 53 md.results.TransientSolution[2].Vx,\ 54 md.results.TransientSolution[2].Vy,\ 55 md.results.TransientSolution[2].Vel,\ 56 md.results.TransientSolution[2].Pressure,\ 57 md.results.TransientSolution[2].Thickness,\ 58 md.results.TransientSolution[2].Surface,\ 59 md.results.TransientSolution[2].MaskIceLevelset,\ 60 61 ] 32 field_names =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1', 33 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2', 34 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3'] 35 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13, 36 2e-13,2e-13,2e-13,1e-13,1e-13,1e-13,1e-13, 37 2e-13,2e-13,2e-13,1e-13,1e-13,1e-13,1e-13] 38 field_values=[md.results.TransientSolution[0].Vx, 39 md.results.TransientSolution[0].Vy, 40 md.results.TransientSolution[0].Vel, 41 md.results.TransientSolution[0].Pressure, 42 md.results.TransientSolution[0].Thickness, 43 md.results.TransientSolution[0].Surface, 44 md.results.TransientSolution[0].MaskIceLevelset, 45 md.results.TransientSolution[1].Vx, 46 md.results.TransientSolution[1].Vy, 47 md.results.TransientSolution[1].Vel, 48 md.results.TransientSolution[1].Pressure, 49 md.results.TransientSolution[1].Thickness, 50 md.results.TransientSolution[1].Surface, 51 md.results.TransientSolution[1].MaskIceLevelset, 52 md.results.TransientSolution[2].Vx, 53 md.results.TransientSolution[2].Vy, 54 md.results.TransientSolution[2].Vel, 55 md.results.TransientSolution[2].Pressure, 56 md.results.TransientSolution[2].Thickness, 57 md.results.TransientSolution[2].Surface, 58 md.results.TransientSolution[2].MaskIceLevelset] -
issm/trunk-jpl/test/NightlyRun/test805.py
r21060 r21408 1 1 #Test Name: ValleyGlacierLevelsetEnthCalvingHO3d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 from squaremesh import *5 5 from setmask import * 6 6 from parameterize import * 7 7 from setflowequation import * 8 8 from solve import * 9 from MatlabFuncs import * 9 10 10 11 11 md=triangle(model(),'../Exp/Square.exp',50000) … … 14 14 md.extrude(3,2.) 15 15 md=setflowequation(md,'HO','all') 16 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 17 17 18 18 #Thermal model 19 pos_surf=n umpy.nonzero(md.mesh.vertexonsurface)[0]19 pos_surf=np.nonzero(md.mesh.vertexonsurface)[0] 20 20 md.thermal.spctemperature[pos_surf]=md.initialization.temperature[pos_surf] 21 21 md.thermal.isenthalpy=True … … 29 29 md.transient.isgroundingline=True 30 30 md.transient.isgia=False 31 md.transient.ismovingfront=True ;31 md.transient.ismovingfront=True 32 32 33 md.calving.calvingrate=1000.*n umpy.ones((md.mesh.numberofvertices,1))34 md.calving.meltingrate=n umpy.zeros((md.mesh.numberofvertices,1))33 md.calving.calvingrate=1000.*np.ones((md.mesh.numberofvertices)) 34 md.calving.meltingrate=np.zeros((md.mesh.numberofvertices)) 35 35 36 36 md=solve(md,'Transient') 37 37 38 38 #Fields and tolerances to track changes 39 field_names =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Enthalpy1','Watercolumn1',\ 40 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Enthalpy2','Watercolumn2',\ 41 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Enthalpy3','Watercolumn3'] 42 field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,\ 43 1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,1e-10,\ 44 1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 45 field_values=[\ 46 md.results.TransientSolution[0].Vx,\ 47 md.results.TransientSolution[0].Vy,\ 48 md.results.TransientSolution[0].Vel,\ 49 md.results.TransientSolution[0].Pressure,\ 50 md.results.TransientSolution[0].Thickness,\ 51 md.results.TransientSolution[0].Surface,\ 52 md.results.TransientSolution[0].MaskIceLevelset,\ 53 md.results.TransientSolution[0].Enthalpy,\ 54 md.results.TransientSolution[0].Watercolumn,\ 55 md.results.TransientSolution[1].Vx,\ 56 md.results.TransientSolution[1].Vy,\ 57 md.results.TransientSolution[1].Vel,\ 58 md.results.TransientSolution[1].Pressure,\ 59 md.results.TransientSolution[1].Thickness,\ 60 md.results.TransientSolution[1].Surface,\ 61 md.results.TransientSolution[1].MaskIceLevelset,\ 62 md.results.TransientSolution[1].Enthalpy,\ 63 md.results.TransientSolution[1].Watercolumn,\ 64 md.results.TransientSolution[2].Vx,\ 65 md.results.TransientSolution[2].Vy,\ 66 md.results.TransientSolution[2].Vel,\ 67 md.results.TransientSolution[2].Pressure,\ 68 md.results.TransientSolution[2].Thickness,\ 69 md.results.TransientSolution[2].Surface,\ 70 md.results.TransientSolution[2].MaskIceLevelset,\ 71 md.results.TransientSolution[2].Enthalpy,\ 72 md.results.TransientSolution[2].Watercolumn,\ 73 ] 39 field_names =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Enthalpy1','Watercolumn1', 40 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Enthalpy2','Watercolumn2', 41 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Enthalpy3','Watercolumn3'] 42 field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11, 43 1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,1e-10, 44 1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10] 45 field_values=[md.results.TransientSolution[0].Vx, 46 md.results.TransientSolution[0].Vy, 47 md.results.TransientSolution[0].Vel, 48 md.results.TransientSolution[0].Pressure, 49 md.results.TransientSolution[0].Thickness, 50 md.results.TransientSolution[0].Surface, 51 md.results.TransientSolution[0].MaskIceLevelset, 52 md.results.TransientSolution[0].Enthalpy, 53 md.results.TransientSolution[0].Watercolumn, 54 md.results.TransientSolution[1].Vx, 55 md.results.TransientSolution[1].Vy, 56 md.results.TransientSolution[1].Vel, 57 md.results.TransientSolution[1].Pressure, 58 md.results.TransientSolution[1].Thickness, 59 md.results.TransientSolution[1].Surface, 60 md.results.TransientSolution[1].MaskIceLevelset, 61 md.results.TransientSolution[1].Enthalpy, 62 md.results.TransientSolution[1].Watercolumn, 63 md.results.TransientSolution[2].Vx, 64 md.results.TransientSolution[2].Vy, 65 md.results.TransientSolution[2].Vel, 66 md.results.TransientSolution[2].Pressure, 67 md.results.TransientSolution[2].Thickness, 68 md.results.TransientSolution[2].Surface, 69 md.results.TransientSolution[2].MaskIceLevelset, 70 md.results.TransientSolution[2].Enthalpy, 71 md.results.TransientSolution[2].Watercolumn] -
issm/trunk-jpl/test/NightlyRun/test806.py
r21060 r21408 1 1 #Test Name: SquareShelfLevelsetCalvingSSA2dLevermann 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 from squaremesh import *5 5 from setmask import * 6 6 from parameterize import * 7 7 from setflowequation import * 8 8 from solve import * 9 from MatlabFuncs import * 10 import numpy 9 10 import numpy as np 11 11 12 12 md=triangle(model(),'../Exp/Square.exp',50000.) … … 14 14 md=parameterize(md,'../Par/SquareShelf.py') 15 15 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 17 17 18 18 x = md.mesh.x … … 21 21 Lx = (xmax-xmin) 22 22 alpha = 2./3. 23 md.mask.ice_levelset = n umpy.float_((x - alpha*Lx)>0) - numpy.float_((x - alpha*Lx)<0)23 md.mask.ice_levelset = np.float_((x - alpha*Lx)>0) - np.float_((x - alpha*Lx)<0) 24 24 25 25 md.timestepping.time_step=10 … … 33 33 md.transient.isgroundingline=False 34 34 md.transient.isgia=False 35 md.transient.ismovingfront=True ;35 md.transient.ismovingfront=True 36 36 37 37 md.calving=calvinglevermann() 38 md.calving.coeff=4.89e13*n umpy.ones((md.mesh.numberofvertices,1))39 md.calving.meltingrate=n umpy.zeros((md.mesh.numberofvertices,1))40 md.levelset.spclevelset=n umpy.float('NaN')*numpy.ones((md.mesh.numberofvertices,1))38 md.calving.coeff=4.89e13*np.ones((md.mesh.numberofvertices)) 39 md.calving.meltingrate=np.zeros((md.mesh.numberofvertices)) 40 md.levelset.spclevelset=np.float('NaN')*np.ones((md.mesh.numberofvertices)) 41 41 42 42 md.transient.requested_outputs=['default','StrainRateparallel','StrainRateperpendicular','Calvingratex','Calvingratey','CalvingCalvingrate'] … … 45 45 46 46 #Fields and tolerances to track changes 47 field_names =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','StrainRateparallel1','StrainRateperpendicular1','CalvingCalvingrate1',\ 48 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','StrainRateparallel2','StrainRateperpendicular2','CalvingCalvingrate2',\ 49 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','StrainRateparallel3','StrainRateperpendicular3','CalvingCalvingrate3'] 50 field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,\ 51 2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,\ 52 2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,1e-11,5e-11,5e-11,1e-11] 53 field_values=[\ 54 md.results.TransientSolution[0].Vx,\ 55 md.results.TransientSolution[0].Vy,\ 56 md.results.TransientSolution[0].Vel,\ 57 md.results.TransientSolution[0].Pressure,\ 58 md.results.TransientSolution[0].Thickness,\ 59 md.results.TransientSolution[0].Surface,\ 60 md.results.TransientSolution[0].MaskIceLevelset,\ 61 md.results.TransientSolution[0].StrainRateparallel,\ 62 md.results.TransientSolution[0].StrainRateperpendicular,\ 63 md.results.TransientSolution[0].CalvingCalvingrate,\ 64 md.results.TransientSolution[1].Vx,\ 65 md.results.TransientSolution[1].Vy,\ 66 md.results.TransientSolution[1].Vel,\ 67 md.results.TransientSolution[1].Pressure,\ 68 md.results.TransientSolution[1].Thickness,\ 69 md.results.TransientSolution[1].Surface,\ 70 md.results.TransientSolution[1].MaskIceLevelset,\ 71 md.results.TransientSolution[1].StrainRateparallel,\ 72 md.results.TransientSolution[1].StrainRateperpendicular,\ 73 md.results.TransientSolution[1].CalvingCalvingrate,\ 74 md.results.TransientSolution[2].Vx,\ 75 md.results.TransientSolution[2].Vy,\ 76 md.results.TransientSolution[2].Vel,\ 77 md.results.TransientSolution[2].Pressure,\ 78 md.results.TransientSolution[2].Thickness,\ 79 md.results.TransientSolution[2].Surface,\ 80 md.results.TransientSolution[2].MaskIceLevelset,\ 81 md.results.TransientSolution[2].StrainRateparallel,\ 82 md.results.TransientSolution[2].StrainRateperpendicular,\ 83 md.results.TransientSolution[2].CalvingCalvingrate,\ 84 85 ] 47 field_names =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','StrainRateparallel1','StrainRateperpendicular1','CalvingCalvingrate1', 48 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','StrainRateparallel2','StrainRateperpendicular2','CalvingCalvingrate2', 49 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','StrainRateparallel3','StrainRateperpendicular3','CalvingCalvingrate3'] 50 field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11, 51 2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11, 52 2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,1e-11,5e-11,5e-11,1e-11] 53 field_values=[md.results.TransientSolution[0].Vx, 54 md.results.TransientSolution[0].Vy, 55 md.results.TransientSolution[0].Vel, 56 md.results.TransientSolution[0].Pressure, 57 md.results.TransientSolution[0].Thickness, 58 md.results.TransientSolution[0].Surface, 59 md.results.TransientSolution[0].MaskIceLevelset, 60 md.results.TransientSolution[0].StrainRateparallel, 61 md.results.TransientSolution[0].StrainRateperpendicular, 62 md.results.TransientSolution[0].CalvingCalvingrate, 63 md.results.TransientSolution[1].Vx, 64 md.results.TransientSolution[1].Vy, 65 md.results.TransientSolution[1].Vel, 66 md.results.TransientSolution[1].Pressure, 67 md.results.TransientSolution[1].Thickness, 68 md.results.TransientSolution[1].Surface, 69 md.results.TransientSolution[1].MaskIceLevelset, 70 md.results.TransientSolution[1].StrainRateparallel, 71 md.results.TransientSolution[1].StrainRateperpendicular, 72 md.results.TransientSolution[1].CalvingCalvingrate, 73 md.results.TransientSolution[2].Vx, 74 md.results.TransientSolution[2].Vy, 75 md.results.TransientSolution[2].Vel, 76 md.results.TransientSolution[2].Pressure, 77 md.results.TransientSolution[2].Thickness, 78 md.results.TransientSolution[2].Surface, 79 md.results.TransientSolution[2].MaskIceLevelset, 80 md.results.TransientSolution[2].StrainRateparallel, 81 md.results.TransientSolution[2].StrainRateperpendicular, 82 md.results.TransientSolution[2].CalvingCalvingrate] -
issm/trunk-jpl/test/NightlyRun/test807.py
r21060 r21408 1 1 #Test Name: SquareShelfLevelsetMeltingSSA2d 2 2 from model import * 3 from socket import gethostname 3 4 from triangle import * 4 from squaremesh import *5 5 from setmask import * 6 6 from parameterize import * 7 7 from setflowequation import * 8 8 from solve import * 9 from MatlabFuncs import * 10 import numpy 9 10 import numpy as np 11 11 12 12 md=triangle(model(),'../Exp/Square.exp',50000.) … … 14 14 md=parameterize(md,'../Par/SquareShelf.py') 15 15 md=setflowequation(md,'SSA','all') 16 md.cluster=generic('name', oshostname(),'np',3)16 md.cluster=generic('name',gethostname(),'np',3) 17 17 18 18 x = md.mesh.x … … 21 21 Lx = (xmax-xmin) 22 22 alpha = 2./3. 23 md.mask.ice_levelset = n umpy.float_((x - alpha*Lx)>0) - numpy.float_((x - alpha*Lx)<0)23 md.mask.ice_levelset = np.float_((x - alpha*Lx)>0) - np.float_((x - alpha*Lx)<0) 24 24 25 25 md.timestepping.time_step=10 … … 33 33 md.transient.isgroundingline=False 34 34 md.transient.isgia=False 35 md.transient.ismovingfront=True ;35 md.transient.ismovingfront=True 36 36 37 md.calving.calvingrate=n umpy.zeros((md.mesh.numberofvertices,1))38 md.calving.meltingrate=10000*n umpy.ones((md.mesh.numberofvertices,1))39 md.levelset.spclevelset=n umpy.float('NaN')*numpy.ones((md.mesh.numberofvertices,1))37 md.calving.calvingrate=np.zeros((md.mesh.numberofvertices)) 38 md.calving.meltingrate=10000*np.ones((md.mesh.numberofvertices)) 39 md.levelset.spclevelset=np.float('NaN')*np.ones((md.mesh.numberofvertices)) 40 40 41 41 md=solve(md,'Transient') 42 42 43 43 #Fields and tolerances to track changes 44 field_names =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1',\ 45 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2',\ 46 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3'] 47 field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,\ 48 2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,5e-11,\ 49 2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,5e-11] 50 field_values=[\ 51 md.results.TransientSolution[0].Vx,\ 52 md.results.TransientSolution[0].Vy,\ 53 md.results.TransientSolution[0].Vel,\ 54 md.results.TransientSolution[0].Pressure,\ 55 md.results.TransientSolution[0].Thickness,\ 56 md.results.TransientSolution[0].Surface,\ 57 md.results.TransientSolution[0].MaskIceLevelset,\ 58 md.results.TransientSolution[1].Vx,\ 59 md.results.TransientSolution[1].Vy,\ 60 md.results.TransientSolution[1].Vel,\ 61 md.results.TransientSolution[1].Pressure,\ 62 md.results.TransientSolution[1].Thickness,\ 63 md.results.TransientSolution[1].Surface,\ 64 md.results.TransientSolution[1].MaskIceLevelset,\ 65 md.results.TransientSolution[2].Vx,\ 66 md.results.TransientSolution[2].Vy,\ 67 md.results.TransientSolution[2].Vel,\ 68 md.results.TransientSolution[2].Pressure,\ 69 md.results.TransientSolution[2].Thickness,\ 70 md.results.TransientSolution[2].Surface,\ 71 md.results.TransientSolution[2].MaskIceLevelset,\ 72 73 ] 44 field_names =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1', 45 'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2', 46 'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3'] 47 field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11, 48 2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,5e-11, 49 2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,5e-11] 50 field_values=[md.results.TransientSolution[0].Vx, 51 md.results.TransientSolution[0].Vy, 52 md.results.TransientSolution[0].Vel, 53 md.results.TransientSolution[0].Pressure, 54 md.results.TransientSolution[0].Thickness, 55 md.results.TransientSolution[0].Surface, 56 md.results.TransientSolution[0].MaskIceLevelset, 57 md.results.TransientSolution[1].Vx, 58 md.results.TransientSolution[1].Vy, 59 md.results.TransientSolution[1].Vel, 60 md.results.TransientSolution[1].Pressure, 61 md.results.TransientSolution[1].Thickness, 62 md.results.TransientSolution[1].Surface, 63 md.results.TransientSolution[1].MaskIceLevelset, 64 md.results.TransientSolution[2].Vx, 65 md.results.TransientSolution[2].Vy, 66 md.results.TransientSolution[2].Vel, 67 md.results.TransientSolution[2].Pressure, 68 md.results.TransientSolution[2].Thickness, 69 md.results.TransientSolution[2].Surface, 70 md.results.TransientSolution[2].MaskIceLevelset]
Note:
See TracChangeset
for help on using the changeset viewer.