Changeset 23394 for issm/trunk/test
- Timestamp:
- 10/05/18 10:42:45 (7 years ago)
- Location:
- issm/trunk
- Files:
-
- 22 edited
- 12 copied
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
-
issm/trunk/test
-
issm/trunk/test/NightlyRun/runme.py
r23189 r23394 11 11 """ 12 12 RUNME - test deck for ISSM nightly runs 13 13 14 14 In a test deck directory (tests/Vertification/NightlyRun for example) 15 15 The following command will launch all the existing tests: … … 18 18 >> runme(id=[101,102]) 19 19 etc... 20 20 21 21 Available options: 22 22 'id' followed by the list of ids or (parts of) test names requested … … 37 37 'procedure' 'check' : run the test (default) 38 38 'update': update the archive 39 39 40 40 Usage: 41 41 runme(varargin) 42 42 43 43 Examples: 44 44 runme() … … 49 49 runme(id=[[101,102],['Dakota','Slr']]) 50 50 """ 51 52 51 from parallelrange import parallelrange 53 52 from IdToName import IdToName … … 82 81 flist=glob('test*.py') #File name must start with 'test' and must end by '.py' and must be different than 'test.py' 83 82 list_ids=[int(file[4:-3]) for file in flist if not file == 'test.py'] #Keep test id only (skip 'test' and '.py') 84 #print 'list_ids =',list_ids85 83 86 84 i1,i2=parallelrange(rank,numprocs,len(list_ids)) #Get tests for this cpu only 87 85 list_ids=list_ids[i1:i2+1] 88 #print 'list_ids after parallelrange =',list_ids 89 90 if id: 86 87 if np.size(id) > 0 and not id==None: 91 88 test_ids = set(GetIds(id)).intersection(set(list_ids)) 92 89 else: 93 90 # if no tests are specifically provided, do them all 94 91 test_ids = set(list_ids) 95 96 #print 'test_ids after list =',test_ids 92 97 93 # }}} 98 94 #GET exclude {{{ … … 100 96 101 97 test_ids=test_ids.difference(exclude_ids) 102 #print 'test_ids after exclude =',sorted(test_ids)103 #return104 98 # }}} 105 99 #Process Ids according to benchmarks {{{ … … 124 118 elif benchmark=='adolc': 125 119 test_ids=test_ids.intersection(set(range(3001,3200))) 126 #print 'test_ids after benchmark =',test_ids127 120 test_ids=list(test_ids) 128 121 test_ids.sort() 129 #print 'test_ids after sort =',test_ids130 122 # }}} 131 123 … … 190 182 if np.shape(field) != np.shape(archive): 191 183 raise RuntimeError("Field '"+archive_name+"' from test is malformed; shape is "+str(np.shape(field.T))+", should be "+str(np.shape(archive))+" (or "+str(np.shape(archive.T))+").") 192 184 193 185 error_diff=np.amax(np.abs(archive-field),axis=0)/(np.amax(np.abs(archive),axis=0)+float_info.epsilon) 194 186 -
issm/trunk/test/NightlyRun/test2084.m
r23189 r23394 1 2 %Test Name: GiaCaron. 1 %Test Name: GiaCaron 3 2 %Forward Love number solution for a viscoelastic earth, model M3-L70-V01 from 4 3 %Spada, G., Barletta, V. R., Klemann, V., Riva, R. E. M., Martinec, Z., … … 39 38 %loading love numbers 40 39 field_names ={'LoveH_loading_elastic','LoveK_loading_elastic','LoveL_loading_elastic'}; 41 field_tolerances={ 7.0e-10,7.0e-10,7.0e-10};40 field_tolerances={4.3e-9,4.3e-9,4.3e-9}; 42 41 field_values={... 43 42 (md.results.LoveSolution.LoveHr(:,1)),... … … 57 56 %Fields and tolerances to track changes 58 57 field_names ={field_names{:},'LoveH_loading_realpart','LoveK_loading_realpart','LoveL_loading_realpart','LoveH_loading_imagpart','LoveK_loading_imagpart','LoveL_loading_imagpart'}; 59 field_tolerances={field_tolerances{:}, 7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10};58 field_tolerances={field_tolerances{:},5e-7,5e-7,5e-7,5e-7,5e-7,5e-7}; 60 59 field_values={field_values{:},... 61 60 (md.results.LoveSolution.LoveHr(:,:)),... … … 75 74 %tidal love numbers 76 75 field_names ={field_names{:},'LoveH_tidal_elastic','LoveK_tidal_elastic','LoveL_tidal_elastic','LoveH_tidal_realpart','LoveK_tidal_realpart','LoveL_tidal_realpart','LoveH_tidal_imagpart','LoveK_tidal_imagpart','LoveL_tidal_imagpart'}; 77 field_tolerances={field_tolerances{:}, 7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10};76 field_tolerances={field_tolerances{:},8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6}; 78 77 field_values={field_values{:},... 79 78 (md.results.LoveSolution.LoveHr(:,1)),... … … 115 114 % 116 115 %field_names ={field_names{:},'LoveH_loadingVSS96_elastic','LoveK_loadingVSS96_elastic','LoveL_loadingVSS96_elastic','LoveH_loadingVSS96_realpart','LoveK_loadingVSS96_realpart','LoveL_loadingVSS96_realpart','LoveH_loadingVSS96_imagpart','LoveK_loadingVSS96_imagpart','LoveL_loadingVSS96_imagpart'}; 117 %field_tolerances={field_tolerances{:}, 7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10};116 %field_tolerances={field_tolerances{:},2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6}; 118 117 %field_values={field_values{:},... 119 118 % (md.results.LoveSolution.LoveHr(:,1)),... … … 147 146 148 147 field_names ={field_names{:},'LoveH_loadingVSS96_elastic','LoveK_loadingVSS96_elastic','LoveL_loadingVSS96_elastic','LoveH_loadingVSS96_realpart','LoveK_loadingVSS96_realpart','LoveL_loadingVSS96_realpart','LoveH_loadingVSS96_imagpart','LoveK_loadingVSS96_imagpart','LoveL_loadingVSS96_imagpart'}; 149 field_tolerances={field_tolerances{:}, 7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10};148 field_tolerances={field_tolerances{:},2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6}; 150 149 field_values={field_values{:},... 151 150 (md.results.LoveSolution.LoveHr(:,1)),... -
issm/trunk/test/NightlyRun/test2084.py
r23189 r23394 1 #Test Name: GiaCaron. Forward Love number solution for a viscoelastic earth, 2 # model M3-L70-V01 from Spada, G., Barletta, V. R., Klemann, V., Riva, R. E. M., 3 # Martinec, Z., Gasperini, P., Lund, B., Wolf, D., Vermeersen, L. L. A. 4 # and King, M. A. (2011), A benchmark study for glacial isostatic 5 # adjustment codes. Geophysical Journal International, 6 # 185: 106-132. doi:10.1111/j.1365-246X.2011.04952.x 1 #Test Name: GiaCaron 2 #Forward Love number solution for a viscoelastic earth, 3 #model M3-L70-V01 from Spada, G., Barletta, V. R., Klemann, V., Riva, R. E. M., 4 #Martinec, Z., Gasperini, P., Lund, B., Wolf, D., Vermeersen, L. L. A. 5 #and King, M. A. (2011), A benchmark study for glacial isostatic 6 #adjustment codes. Geophysical Journal International, 7 #185: 106-132. doi:10.1111/j.1365-246X.2011.04952.x 7 8 8 9 from model import * … … 48 49 #Fields and tolerances to track changes 49 50 #loading love numbers 50 field_names=['LoveH e','LoveKe','LoveLe']51 field_tolerances=[ 3.7e-9,3.7e-9,3.7e-9]51 field_names=['LoveH_loading_elastic','LoveK_loading_elastic','LoveL_loading_elastic'] 52 field_tolerances=[4.3e-9,4.3e-9,4.3e-9] 52 53 field_values=[ 53 54 np.array(md.results.LoveSolution.LoveHr)[:,0], … … 67 68 #Fields and tolerances to track changes 68 69 #loading love numbers 69 field_names+=['LoveH lr','LoveKlr','LoveLlr','LoveHli','LoveKli','LoveLli']70 field_tolerances+=[ 3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9]70 field_names+=['LoveH_loading_realpart','LoveK_loading_realpart','LoveL_loading_realpart','LoveH_loading_imagpart','LoveK_loading_imagpart','LoveL_loading_imagpart'] 71 field_tolerances+=[5e-7,5e-7,5e-7,5e-7,5e-7,5e-7] 71 72 field_values+=[ 72 73 np.array(md.results.LoveSolution.LoveHr), … … 87 88 88 89 #tidal love numbers, check 89 field_names+=['LoveH tr','LoveKtr','LoveLtr','LoveHti','LoveKti','LoveLti']90 field_tolerances+=[ 3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9]90 field_names+=['LoveH_tidal_elastic','LoveK_tidal_elastic','LoveL_tidal_elastic','LoveH_tidal_realpart','LoveK_tidal_realpart','LoveL_tidal_realpart','LoveH_tidal_imagpart','LoveK_tidal_imagpart','LoveL_tidal_imagpart'] 91 field_tolerances+=[8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6] 91 92 field_values+=[ 92 93 np.array(md.results.LoveSolution.LoveHr)[:,0], … … 127 128 #md=solve(md,'lv') 128 129 # 129 #field_names=[field_names,'LoveH mr','LoveKmr','LoveLmr','LoveHmi','LoveKmi','LoveLmi']130 #field_tolerances=[field_tolerances, 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]130 #field_names=[field_names,'LoveH_loadingVSS96_elastic','LoveK_loadingVSS96_elastic','LoveL_loadingVSS96_elastic','LoveH_loadingVSS96_realpart','LoveK_loadingVSS96_realpart','LoveL_loadingVSS96_realpart','LoveH_loadingVSS96_imagpart','LoveK_loadingVSS96_imagpart','LoveL_loadingVSS96_imagpart'] 131 #field_tolerances=[field_tolerances,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9] 131 132 #field_values=[field_values,\ 132 133 # (md.results.LoveSolution.LoveHr[:][0]),\ … … 186 187 md.love.nfreq=len(md.love.frequencies) 187 188 188 field_names+=['LoveH mr','LoveKmr','LoveLmr','LoveHmi','LoveKmi','LoveLmi']189 field_tolerances+=[ 3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9]189 field_names+=['LoveH_loadingVSS96_elastic','LoveK_loadingVSS96_elastic','LoveL_loadingVSS96_elastic','LoveH_loadingVSS96_realpart','LoveK_loadingVSS96_realpart','LoveL_loadingVSS96_realpart','LoveH_loadingVSS96_imagpart','LoveK_loadingVSS96_imagpart','LoveL_loadingVSS96_imagpart'] 190 field_tolerances+=[2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6] 190 191 field_values+=[ 191 192 np.array(md.results.LoveSolution.LoveHr)[:,0], -
issm/trunk/test/NightlyRun/test211.js
r21341 r23394 12 12 //Fields and tolerances to track changes 13 13 field_names=[ 14 'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1', 15 'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2', 14 'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1', 15 'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2', 16 16 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3']; 17 17 field_tolerances=[ 18 18 2e-08,2e-08,5e-05,2e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08, 19 5e-06,5e-06,8e-05,5e-06, 1e-07,5e-07,5e-07,5e-07,3e-06,5e-05,19 5e-06,5e-06,8e-05,5e-06,5e-07,5e-07,5e-07,5e-07,3e-06,5e-05, 20 20 8e-06,8e-06,8e-05,8e-06,5e-07,8e-07,8e-07,8e-07,5e-06,8e-05]; 21 21 field_values=[ -
issm/trunk/test/NightlyRun/test211.m
r21341 r23394 16 16 field_tolerances={... 17 17 2e-08,2e-08,5e-05,2e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,... 18 5e-06,5e-06,8e-05,5e-06, 1e-07,5e-07,5e-07,5e-07,3e-06,5e-05,...18 5e-06,5e-06,8e-05,5e-06,5e-07,5e-07,5e-07,5e-07,3e-06,5e-05,... 19 19 8e-06,8e-06,8e-05,8e-06,5e-07,8e-07,8e-07,8e-07,5e-06,8e-05}; 20 20 field_values={... -
issm/trunk/test/NightlyRun/test211.py
r21729 r23394 26 26 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3'] 27 27 field_tolerances=[2e-08,2e-08,5e-05,2e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08, 28 5e-06,5e-06,8e-05,5e-06,1e-07,5e-07,5e-07,5e-07,3e-06,5e-05,29 28 5e-06,5e-06,8e-05,5e-06,5e-07,5e-07,5e-07,5e-07,3e-06,5e-05, 29 8e-06,8e-06,8e-05,8e-06,5e-07,8e-07,8e-07,8e-07,5e-06,8e-05] 30 30 field_values=[md.results.TransientSolution[0].Vx, 31 31 md.results.TransientSolution[0].Vy, -
issm/trunk/test/NightlyRun/test215.m
r23189 r23394 24 24 %Fields and tolerances to track changes 25 25 field_names ={'Gradient','Misfits','MaterialsRheologyBbar','Pressure','Vel','Vx','Vy'}; 26 field_tolerances={4.6e-08,1e-08,2e-08, 1e-09,2e-09,2e-08,2e-08};26 field_tolerances={4.6e-08,1e-08,2e-08,2e-09,3e-09,2e-08,2e-08}; 27 27 field_values={... 28 28 (md.results.StressbalanceSolution.Gradient1),... -
issm/trunk/test/NightlyRun/test215.py
r23189 r23394 37 37 # Fields and tolerances to track changes 38 38 field_names =['Gradient','Misfits','MaterialsRheologyBbar','Pressure','Vel','Vx','Vy'] 39 field_tolerances=[4.6e-08,1e-08,2e-0 9,1e-08,2e-09,2e-08,2e-08]39 field_tolerances=[4.6e-08,1e-08,2e-08,2e-09,3e-09,2e-08,2e-08] 40 40 field_values=[md.results.StressbalanceSolution.Gradient1, 41 41 md.results.StressbalanceSolution.J, -
issm/trunk/test/NightlyRun/test290.m
r21341 r23394 11 11 %Fields and tolerances to track changes 12 12 field_names ={'Vx','Vy','Vz','Vel','Pressure'}; 13 field_tolerances={5e-5,5e-5,8e- 5,5e-5,1e-7};13 field_tolerances={5e-5,5e-5,8e-4,5e-4,2e-7}; 14 14 field_values={... 15 15 (md.results.StressbalanceSolution.Vx),... -
issm/trunk/test/NightlyRun/test290.py
r21729 r23394 21 21 #Fields and tolerances to track changes 22 22 field_names =['Vx', 'Vy', 'Vz', 'Vel','Pressure'] 23 field_tolerances=[5e-5,5e-5,8e- 5,5e-5,1e-7]23 field_tolerances=[5e-5,5e-5,8e-4,5e-4,2e-7] 24 24 field_values=[\ 25 25 md.results.StressbalanceSolution.Vx,\ -
issm/trunk/test/NightlyRun/test3015.m
r22758 r23394 15 15 %setup autodiff parameters 16 16 index=1; %this is the scalar component we are checking against 17 md.autodiff.independents={... 18 independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fos_forward_index',index) 17 18 if IssmConfig('_HAVE_CODIPACK_') 19 md.autodiff.independents={... 20 independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices) 21 }; 22 md.autodiff.dependents={... 23 dependent('name','IceVolume','type','scalar','fos_reverse_index',index)... 24 }; 25 md.autodiff.driver='fos_reverse'; 26 else 27 md.autodiff.independents={... 28 independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fos_forward_index',index) 19 29 }; 20 30 21 md.autodiff.dependents={... 22 dependent('name','IceVolume','type','scalar')... 23 }; 24 md.autodiff.driver='fos_forward'; 31 md.autodiff.dependents={... 32 dependent('name','IceVolume','type','scalar')... 33 }; 34 md.autodiff.driver='fos_forward'; 35 end 25 36 26 37 %parameters for the step-wise derivative … … 70 81 md=solve(md,'Masstransport'); 71 82 %retrieve directly 72 dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian; 83 if IssmConfig('_HAVE_CODIPACK_') 84 dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian(index); 85 else 86 dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian; 87 end 73 88 74 disp(sprintf('dV/dh: analytical: %16.16g\n using ad olc:%16.16g\n',dVdh_an,dVdh_ad));89 disp(sprintf('dV/dh: analytical: %16.16g\n using ad: %16.16g\n',dVdh_an,dVdh_ad)); 75 90 76 91 %Fields and tolerances to track changes -
issm/trunk/test/NightlyRun/test3480.m
r22758 r23394 18 18 md.inversion.iscontrol=1; 19 19 md.autodiff.isautodiff=1; 20 md.autodiff.driver='fos_reverse'; 20 21 21 22 md.friction.coefficient(1:md.mesh.numberofvertices,1)=50; -
issm/trunk/test/NightlyRun/test3481.m
r22758 r23394 18 18 md.inversion.iscontrol=1; 19 19 md.autodiff.isautodiff=1; 20 md.autodiff.driver='fos_reverse'; 20 21 21 22 md.friction.coefficient(1:md.mesh.numberofvertices,1)=50; -
issm/trunk/test/NightlyRun/test421.m
r23189 r23394 10 10 %Fields and tolerances to track changes 11 11 field_names ={'Vx','Vy','Vz','Vel','Pressure'}; 12 field_tolerances={ 1e-06,9e-07,2e-05,2e-06,2e-06};12 field_tolerances={2e-06,9e-07,2e-05,2e-06,2e-06}; 13 13 field_values={... 14 14 (md.results.StressbalanceSolution.Vx),... -
issm/trunk/test/NightlyRun/test421.py
r23189 r23394 20 20 #Fields and tolerances to track changes 21 21 field_names =['Vx','Vy','Vz','Vel','Pressure'] 22 field_tolerances=[ 1e-06,9e-07,2e-05,2e-06,2e-06]22 field_tolerances=[2e-06,9e-07,2e-05,2e-06,2e-06] 23 23 field_values=[\ 24 24 md.results.StressbalanceSolution.Vx,\ -
issm/trunk/test/NightlyRun/test455.m
r21341 r23394 14 14 md=solve(md,'Stressbalance'); 15 15 field_names ={field_names{:},['Vx' i{1}],['Vy' i{1}],['Vz' i{1}],['Vel' i{1}],['Pressure' i{1}]}; 16 field_tolerances={field_tolerances{:}, 6e-08,6e-08,6e-08,6e-08,3e-13};16 field_tolerances={field_tolerances{:},7e-08,6e-08,6e-08,6e-08,3e-13}; 17 17 field_values={field_values{:},... 18 18 (md.results.StressbalanceSolution.Vx),... -
issm/trunk/test/NightlyRun/test455.py
r21729 r23394 24 24 md=solve(md,'Stressbalance') 25 25 field_names =field_names+['Vx'+i,'Vy'+i,'Vz'+i,'Vel'+i,'Pressure'+i] 26 field_tolerances=field_tolerances+[ 6e-08,6e-08,6e-08,6e-08,3e-13]26 field_tolerances=field_tolerances+[7e-08,6e-08,6e-08,6e-08,3e-13] 27 27 field_values=field_values+[\ 28 28 md.results.StressbalanceSolution.Vx,\ -
issm/trunk/test/NightlyRun/test701.m
r23189 r23394 35 35 md.stressbalance.spcvx(find(vertexflags(md.mesh,4)))=0; 36 36 md.stressbalance.spcvy(find(vertexflags(md.mesh,4)))=0; 37 md.basalforcings.floatingice_melting_rate=zeros(md.mesh.numberofvertices,1); 37 38 38 39 %Misc -
issm/trunk/test/NightlyRun/test701.py
r23189 r23394 42 42 md.stressbalance.spcvx[np.where(md.mesh.vertexflags(4))] = 0. 43 43 md.stressbalance.spcvy[np.where(md.mesh.vertexflags(4))] = 0. 44 md.basalforcings.floatingice_melting_rate=np.zeros((md.mesh.numberofvertices,)) 44 45 45 46 #Misc -
issm/trunk/test/NightlyRun/test702.m
r23189 r23394 34 34 md.stressbalance.spcvx(find(vertexflags(md.mesh,4)))=800; 35 35 md.stressbalance.spcvy(find(vertexflags(md.mesh,4)))=0; 36 md.basalforcings.floatingice_melting_rate=zeros(md.mesh.numberofvertices,1); 36 37 37 38 %Misc
Note:
See TracChangeset
for help on using the changeset viewer.