Changeset 24313 for issm/trunk/test/NightlyRun/test245.py
- Timestamp:
- 11/01/19 12:01:57 (5 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
-
issm/trunk/test
- Property svn:mergeinfo changed
-
issm/trunk/test/NightlyRun/test245.py
r23394 r24313 11 11 from SMBpddSicopolis import * 12 12 13 md = triangle(model(), '../Exp/Square.exp',150000.)14 md = setmask(md, 'all','')15 md = parameterize(md, '../Par/SquareShelf.py')13 md = triangle(model(), '../Exp/Square.exp', 150000.) 14 md = setmask(md, 'all', '') 15 md = parameterize(md, '../Par/SquareShelf.py') 16 16 17 17 # Use of SMBpddSicopolis 18 md.smb =SMBpddSicopolis()18 md.smb = SMBpddSicopolis() 19 19 # initalize pdd fields 20 20 md.smb.initialize(md) 21 md.smb.s0p = md.geometry.surface 22 md.smb.s0t = md.geometry.surface 21 md.smb.s0p = md.geometry.surface.reshape(-1, 1) 22 md.smb.s0t = md.geometry.surface.reshape(-1, 1) 23 23 24 # 25 md.smb.monthlytemperatures = np.empty((md.mesh.numberofvertices +1,12))26 md.smb.precipitation = np.empty((md.mesh.numberofvertices +1,12))27 temp_ma_present = -10. * np.ones((md.mesh.numberofvertices, )) - md.smb.rlaps * md.geometry.surface / 1000.28 temp_mj_present = 10. * np.ones((md.mesh.numberofvertices, )) - md.smb.rlaps * md.geometry.surface / 1000.29 precipitation = 5. * np.ones((md.mesh.numberofvertices, ))30 for imonth in range(12): 31 md.smb.monthlytemperatures[0:md.mesh.numberofvertices,imonth] = md.materials.meltingpoint + temp_ma_present + (temp_mj_present - temp_ma_present) * np.sin((imonth + 1. - 4.) * np.pi / 6.0)32 md.smb.monthlytemperatures[md.mesh.numberofvertices,imonth] = ((imonth+1)/12.)33 md.smb.precipitation[0:md.mesh.numberofvertices,imonth] = precipitation34 md.smb.precipitation[md.mesh.numberofvertices,imonth] = ((imonth+1)/12.)24 25 md.smb.monthlytemperatures = np.empty((md.mesh.numberofvertices + 1, 12)) 26 md.smb.precipitation = np.empty((md.mesh.numberofvertices + 1, 12)) 27 temp_ma_present = -10. * np.ones((md.mesh.numberofvertices, )) - md.smb.rlaps * md.geometry.surface / 1000. 28 temp_mj_present = 10. * np.ones((md.mesh.numberofvertices, )) - md.smb.rlaps * md.geometry.surface / 1000. 29 precipitation = 5. * np.ones((md.mesh.numberofvertices, )) 30 for imonth in range(12): 31 md.smb.monthlytemperatures[0:md.mesh.numberofvertices, imonth] = md.materials.meltingpoint + temp_ma_present + (temp_mj_present - temp_ma_present) * np.sin((imonth + 1. - 4.) * np.pi / 6.0) 32 md.smb.monthlytemperatures[md.mesh.numberofvertices, imonth] = ((imonth + 1) / 12.) 33 md.smb.precipitation[0:md.mesh.numberofvertices, imonth] = precipitation 34 md.smb.precipitation[md.mesh.numberofvertices, imonth] = ((imonth + 1) / 12.) 35 35 36 36 # time steps and resolution … … 44 44 md.transient.isthermal = 0 45 45 46 md.transient.requested_outputs = ['default', 'TemperaturePDD']47 md.cluster = generic('name', gethostname(),'np',1)# 3 for the cluster48 md = solve(md, 'Transient')46 md.transient.requested_outputs = ['default', 'TemperaturePDD'] 47 md.cluster = generic('name', gethostname(), 'np', 1) # 3 for the cluster 48 md = solve(md, 'Transient') 49 49 50 50 #Fields and tolerances to track changes 51 field_names = ['TemperaturePDD1','SmbMassBalance1','TemperaturePDD2','SmbMassBalance2'] 52 field_tolerances = [1e-13,1e-13,1e-13,1e-13] 53 field_values = [ 54 md.results.TransientSolution[0].TemperaturePDD, 55 md.results.TransientSolution[0].SmbMassBalance, 56 md.results.TransientSolution[1].TemperaturePDD, 57 md.results.TransientSolution[1].SmbMassBalance, 58 ] 59 51 field_names = ['TemperaturePDD1', 'SmbMassBalance1', 'TemperaturePDD2', 'SmbMassBalance2'] 52 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13] 53 field_values = [md.results.TransientSolution[0].TemperaturePDD, 54 md.results.TransientSolution[0].SmbMassBalance, 55 md.results.TransientSolution[1].TemperaturePDD, 56 md.results.TransientSolution[1].SmbMassBalance]
Note:
See TracChangeset
for help on using the changeset viewer.