Changeset 24384
- Timestamp:
- 11/22/19 02:48:36 (5 years ago)
- Location:
- issm/trunk-jpl/test/NightlyRun
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/NightlyRun/test1101.py
r24261 r24384 41 41 md.stressbalance.spcvy[pos] = 0. 42 42 43 #Create MPCs to have periodic boundary conditions 43 #Create MPCs to have periodic boundary conditions this is done on matlab indexing 44 44 posx = np.where(md.mesh.x == 0.)[0] 45 45 posx2 = np.where(md.mesh.x == np.max(md.mesh.x))[0] -
issm/trunk-jpl/test/NightlyRun/test1104.py
r24214 r24384 44 44 45 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)) 46 47 47 #Compute the stressbalance 48 48 md.stressbalance.abstol = np.nan … … 62 62 results.append(md.results.StressbalanceSolution) 63 63 64 # plotmodel(md, 'data', vx, 'data', vy, 'data', vz, 'layer 64 # plotmodel(md, 'data', vx, 'data', vy, 'data', vz, 'layer#all', md.mesh.numberoflayers) 65 65 66 66 #Fields and tolerances to track changes -
issm/trunk-jpl/test/NightlyRun/test1110.m
r21056 r24384 1 1 %Test Name: ISMIPF 2 2 %This test is a test from the ISMP-HOM Intercomparison project. 3 %TestF 3 %TestF 4 4 printingflag=false; 5 5 results={}; 6 6 7 for i= 1:4,7 for i=3, %1:4, 8 8 L=100000.; %in m 9 9 nx=30; %numberof nodes in x direction … … 55 55 md.masstransport.stabilization=1; 56 56 md.stressbalance.maxiter=1; 57 57 58 58 %Compute the stressbalance 59 59 md.cluster=generic('name',oshostname(),'np',8); … … 63 63 %save the results 64 64 results{i}=md.results.TransientSolution(end); 65 66 %Now plot vx and delta surface 65 66 %Now plot vx and delta surface 67 67 if (i==1 | i==3), 68 68 plotmodel(md,'data',(md.results.TransientSolution(end).Vx),'layer',md.mesh.numberoflayers,'sectionvalue','../Exp/ISMIP100000.exp','title','','xlabel','','ylabel','Velocity (m/yr)','linewidth',3,'grid','on','unit','km','ylim',[91 100]) -
issm/trunk-jpl/test/NightlyRun/test1110.py
r24214 r24384 4 4 from socket import gethostname 5 5 from bamg import * 6 from setmask import *7 from parameterize import *8 from setflowequation import *9 from solve import *10 from squaremesh import *6 from setmask import setmask 7 from parameterize import parameterize 8 from setflowequation import setflowequation 9 from solve import solve 10 from squaremesh import squaremesh 11 11 12 12 #This test is a test from the ISMP - HOM Intercomparison project. … … 15 15 results = [] 16 16 17 for i in range(4):17 for i in [1]: #range(4): 18 18 L = 100000. #in m 19 19 nx = 30 #numberof nodes in x direction … … 25 25 md = parameterize(md, '../Par/ISMIPF.py') 26 26 md = md.extrude(4, 1.) 27 28 27 if (i == 0 or i == 1): 29 28 md = setflowequation(md, 'HO', 'all') … … 42 41 else: 43 42 posA = np.where(md.mesh.vertexonbase) 44 posB = np.unique(np. concatenate(np.where(md.mesh.x == 0.), np.where(md.mesh.x == max(md.mesh.x))))45 posC = np.unique(np. concatenate(np.where(md.mesh.y == 0.), np.where(md.mesh.y == max(md.mesh.y))))43 posB = np.unique(np.hstack((np.where(md.mesh.x == 0.), np.where(md.mesh.x == np.nanmax(md.mesh.x))))) 44 posC = np.unique(np.hstack((np.where(md.mesh.y == 0.), np.where(md.mesh.y == np.nanmax(md.mesh.y))))) 46 45 pos = np.intersect1d(np.intersect1d(posA, posB), posC) 47 46 md.stressbalance.spcvx[pos] = 100. #because we need a dirichlet somewhere … … 53 52 54 53 #Create MPCs to have periodic boundary conditions 55 posx = np.where(md.mesh.x == 0.) 56 posx2 = np.where(md.mesh.x == max(md.mesh.x)) 54 posx = np.where(md.mesh.x == 0.)[0] 55 posx2 = np.where(md.mesh.x == max(md.mesh.x))[0] 56 # 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 57 # 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] 58 posy = np.where(md.mesh.y == 0)[0] 59 posy2 = np.where(md.mesh.y == np.max(md.mesh.y))[0] 57 60 58 posy = np.where(md.mesh.y == 0.) 59 posy2 = np.where(md.mesh.y == max(md.mesh.y)) 60 61 md.stressbalance.vertex_pairing = np.column_stack((posx, posx2, posy, posy2)) 62 md.masstransport.vertex_pairing = np.column_stack((posx, posx2, posy, posy2)) 61 md.stressbalance.vertex_pairing = np.vstack((np.vstack((posx + 1, posx2 + 1)).T, np.vstack((posy + 1, posy2 + 1)).T)) 62 md.masstransport.vertex_pairing = np.vstack((np.vstack((posx + 1, posx2 + 1)).T, np.vstack((posy + 1, posy2 + 1)).T)) 63 63 64 64 md.timestepping.time_step = 3. 65 md.timestepping.final_time = 30 0.66 md.settings.output_frequency = 5 065 md.timestepping.final_time = 30. #300. 66 md.settings.output_frequency = 5 #50 67 67 md.masstransport.stabilization = 1 68 68 md.stressbalance.maxiter = 1 … … 74 74 75 75 #save the results 76 results [i] = md.results.TransientSolution()76 results = np.append(results, md.results.TransientSolution[-1]) 77 77 78 78 #Now plot vx and delta surface 79 79 if (i == 0 or i == 2): 80 plotmodel(md, 'data', (md.results.TransientSolution().Vx),80 plotmodel(md, 'data', np.squeeze(md.results.TransientSolution[-1].Vx), 81 81 'layer', md.mesh.numberoflayers, 82 82 'sectionvalue', '../Exp/ISMIP100000.exp', … … 89 89 'ylim', [91, 100]) 90 90 elif (i == 1 or i == 3): 91 plotmodel(md, 'data', (md.results.TransientSolution().Vx),91 plotmodel(md, 'data', np.squeeze(md.results.TransientSolution[-1].Vx), 92 92 'layer', md.mesh.numberoflayers, 93 93 'sectionvalue', '../Exp/ISMIP100000.exp', … … 115 115 #system(['mv ismipfFSvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF']) 116 116 117 plotmodel(md, 'data', (md.results.TransientSolution().Surface) - md.geometry.surface,117 plotmodel(md, 'data', np.squeeze(md.results.TransientSolution[-1].Surface) - md.geometry.surface, 118 118 'layer', md.mesh.numberoflayers, 119 119 'sectionvalue', '../Exp/ISMIP100000.exp', -
issm/trunk-jpl/test/NightlyRun/test228.py
r24214 r24384 22 22 #Set up transient 23 23 smb = np.ones((md.mesh.numberofvertices)) * 3.6 24 smb = np.vstack((smb, smb * - 24 smb = np.vstack((smb, smb * -1.)).T 25 25 26 26 md.smb.mass_balance = np.vstack((smb, [1.5, 3.])) -
issm/trunk-jpl/test/NightlyRun/test230.py
r24214 r24384 23 23 #Set up transient 24 24 smb = np.ones((md.mesh.numberofvertices)) * 3.6 25 smb = np.vstack((smb, smb * - 25 smb = np.vstack((smb, smb * -1.)).T 26 26 27 27 md.smb.mass_balance = np.vstack((smb, [1.5, 3.])) -
issm/trunk-jpl/test/NightlyRun/test234.py
r24261 r24384 25 25 26 26 smb = np.ones((md.mesh.numberofvertices, )) * 3.6 27 smb = np.array([smb, smb * - 27 smb = np.array([smb, smb * -1]).T 28 28 29 29 md.smb.mass_balance = smb -
issm/trunk-jpl/test/NightlyRun/test235.py
r24261 r24384 25 25 26 26 smb = np.ones((md.mesh.numberofvertices, )) * 3.6 27 smb = np.array([smb, smb * - 27 smb = np.array([smb, smb * -1]).T 28 28 29 29 md.smb.mass_balance = smb -
issm/trunk-jpl/test/NightlyRun/test241.py
r24214 r24384 23 23 #Set up transient 24 24 smb = np.ones((md.mesh.numberofvertices)) * 3.6 25 smb = np.vstack((smb, smb * - 25 smb = np.vstack((smb, smb * -1.)).T 26 26 27 27 md.smb.mass_balance = np.vstack((smb, [1.5, 3.])) -
issm/trunk-jpl/test/NightlyRun/test242.py
r24214 r24384 24 24 #Set up transient 25 25 smb = np.ones((md.mesh.numberofvertices)) * 3.6 26 smb = np.vstack((smb, smb * - 26 smb = np.vstack((smb, smb * -1.)).T 27 27 28 28 md.smb.mass_balance = np.vstack((smb, [1.5, 3.])) -
issm/trunk-jpl/test/NightlyRun/test2424.py
r24261 r24384 45 45 #time is off by the year constant 46 46 for i in range(nsteps): 47 field_names.append('Time-' + str(md.results.TransientSolution[i].time) + ' - yr - ice_levelset - S - sl - (1 -di) * H')47 field_names.append('Time-' + str(md.results.TransientSolution[i].time) + '-yr-ice_levelset-S-sl-(1-di) * H') 48 48 field_tolerances.append(1e-12) 49 49 field_values.append(md.results.TransientSolution[i].MaskGroundediceLevelset.reshape(-1, ) - (md.geometry.surface - md.results.TransientSolution[i].Sealevel.reshape(-1, ) - (1 - md.materials.rho_ice / md.materials.rho_water) * md.geometry.thickness)) -
issm/trunk-jpl/test/NightlyRun/test250.py
r24261 r24384 24 24 25 25 smb = np.ones((md.mesh.numberofvertices, )) * 3.6 26 smb = np.array([smb, smb * - 26 smb = np.array([smb, smb * -1]).T 27 27 28 28 md.smb.mass_balance = smb -
issm/trunk-jpl/test/NightlyRun/test251.py
r24261 r24384 24 24 25 25 smb = np.ones((md.mesh.numberofvertices, )) * 3.6 26 smb = np.array([smb, smb * - 26 smb = np.array([smb, smb * -1]).T 27 27 28 28 md.smb.mass_balance = smb -
issm/trunk-jpl/test/NightlyRun/test333.py
r24240 r24384 49 49 md.timestepping.final_time = 2.0 50 50 51 #md.debug.valgrind = True51 md.debug.valgrind = True 52 52 md = solve(md, 'Transient') 53 53 -
issm/trunk-jpl/test/NightlyRun/test336.py
r24214 r24384 22 22 #Set up transient 23 23 smb = np.ones((md.mesh.numberofvertices)) * 3.6 24 smb = np.vstack((smb, smb * - 24 smb = np.vstack((smb, smb * -1.)).T 25 25 26 26 md.smb = SMBcomponents() -
issm/trunk-jpl/test/NightlyRun/test337.py
r24214 r24384 23 23 #Set up transient 24 24 smb = np.ones((md.mesh.numberofvertices)) * 3.6 25 smb = np.vstack((smb, smb * - 25 smb = np.vstack((smb, smb * -1.)).T 26 26 27 27 md.smb = SMBcomponents() -
issm/trunk-jpl/test/NightlyRun/test338.py
r24214 r24384 22 22 #Set up transient 23 23 smb = np.ones((md.mesh.numberofvertices)) * 3.6 24 smb = np.vstack((smb, smb * - 24 smb = np.vstack((smb, smb * -1.)).T 25 25 26 26 md.smb = SMBmeltcomponents() -
issm/trunk-jpl/test/NightlyRun/test339.py
r23793 r24384 23 23 #Set up transient 24 24 smb = np.ones((md.mesh.numberofvertices)) * 3.6 25 smb = np.vstack((smb, smb * - 25 smb = np.vstack((smb, smb * -1.)).T 26 26 27 27 md.smb = SMBmeltcomponents() -
issm/trunk-jpl/test/NightlyRun/test352.py
r24214 r24384 22 22 #Set up transient 23 23 smb = np.ones((md.mesh.numberofvertices)) * 3.6 24 smb = np.vstack((smb, smb * - 24 smb = np.vstack((smb, smb * -1.)).T 25 25 md.smb.mass_balance = np.vstack((smb, [1.5, 3.])) 26 26 md.transient.isthermal = False -
issm/trunk-jpl/test/NightlyRun/test353.py
r24214 r24384 22 22 #Set up transient 23 23 smb = np.ones((md.mesh.numberofvertices)) * 3.6 24 smb = np.vstack((smb, smb * - 24 smb = np.vstack((smb, smb * -1.)).T 25 25 26 26 md.smb = SMBcomponents() -
issm/trunk-jpl/test/NightlyRun/test354.py
r24214 r24384 22 22 #Set up transient 23 23 smb = np.ones((md.mesh.numberofvertices)) * 3.6 24 smb = np.vstack((smb, smb * - 24 smb = np.vstack((smb, smb * -1.)).T 25 25 26 26 md.smb = SMBmeltcomponents()
Note:
See TracChangeset
for help on using the changeset viewer.