Changeset 24214 for issm/trunk-jpl/test/Par/SquareThermal.py
- Timestamp:
- 10/11/19 00:27:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/Par/SquareThermal.py
r23707 r24214 1 import numpy 1 import numpy as np 2 2 from paterson import paterson 3 3 from SetMarineIceSheetBC import SetMarineIceSheetBC … … 5 5 #Ok, start defining model parameters here 6 6 7 md.timestepping.time_step =08 md.groundingline.migration ='None'7 md.timestepping.time_step = 0 8 md.groundingline.migration = 'None' 9 9 10 10 print(" creating thickness") 11 h =1000.12 md.geometry.thickness =h*numpy.ones((md.mesh.numberofvertices))13 md.geometry.base =-1000.*numpy.ones((md.mesh.numberofvertices))14 md.geometry.surface =md.geometry.base+md.geometry.thickness;11 h = 1000. 12 md.geometry.thickness = h * np.ones((md.mesh.numberofvertices)) 13 md.geometry.base = - 1000. * np.ones((md.mesh.numberofvertices)) 14 md.geometry.surface = md.geometry.base + md.geometry.thickness 15 15 16 16 print(" creating velocities") 17 md.initialization.vx =numpy.zeros((md.mesh.numberofvertices))18 md.initialization.vy =numpy.zeros((md.mesh.numberofvertices))19 md.initialization.vz =numpy.zeros((md.mesh.numberofvertices))17 md.initialization.vx = np.zeros((md.mesh.numberofvertices)) 18 md.initialization.vy = np.zeros((md.mesh.numberofvertices)) 19 md.initialization.vz = np.zeros((md.mesh.numberofvertices)) 20 20 21 21 print(" creating drag") 22 md.friction.coefficient =200.*numpy.ones((md.mesh.numberofvertices))23 md.friction.coefficient[n umpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.24 md.friction.p =numpy.ones((md.mesh.numberofelements))25 md.friction.q =numpy.ones((md.mesh.numberofelements))22 md.friction.coefficient = 200. * np.ones((md.mesh.numberofvertices)) 23 md.friction.coefficient[np.nonzero(md.mask.groundedice_levelset < 0.)[0]] = 0. 24 md.friction.p = np.ones((md.mesh.numberofelements)) 25 md.friction.q = np.ones((md.mesh.numberofelements)) 26 26 27 27 print(" creating temperatures") 28 md.initialization.temperature =(273.-20.)*numpy.ones((md.mesh.numberofvertices))29 md.initialization.pressure =numpy.zeros((md.mesh.numberofvertices,))30 md.initialization.waterfraction =numpy.zeros((md.mesh.numberofvertices,))31 md.initialization.watercolumn =numpy.zeros((md.mesh.numberofvertices,))28 md.initialization.temperature = (273. - 20.) * np.ones((md.mesh.numberofvertices)) 29 md.initialization.pressure = np.zeros((md.mesh.numberofvertices, )) 30 md.initialization.waterfraction = np.zeros((md.mesh.numberofvertices, )) 31 md.initialization.watercolumn = np.zeros((md.mesh.numberofvertices, )) 32 32 33 33 print(" creating flow law parameter") 34 md.materials.rheology_B =paterson(md.initialization.temperature)35 md.materials.rheology_n =3.*numpy.ones((md.mesh.numberofelements))34 md.materials.rheology_B = paterson(md.initialization.temperature) 35 md.materials.rheology_n = 3. * np.ones((md.mesh.numberofelements)) 36 36 37 37 print(" creating surface mass balance") 38 md.smb.mass_balance =numpy.ones((md.mesh.numberofvertices))/md.constants.yts #1m/a39 #md.basalforcings.melting_rate =0.*numpy.ones((md.mesh.numberofvertices))/md.constants.yts #1m/a40 md.basalforcings.groundedice_melting_rate =0.*numpy.ones((md.mesh.numberofvertices))/md.constants.yts #1m/a41 md.basalforcings.floatingice_melting_rate =0.*numpy.ones((md.mesh.numberofvertices))/md.constants.yts #1m/a38 md.smb.mass_balance = np.ones((md.mesh.numberofvertices)) / md.constants.yts #1m / a 39 #md.basalforcings.melting_rate = 0. * np.ones((md.mesh.numberofvertices)) / md.constants.yts #1m / a 40 md.basalforcings.groundedice_melting_rate = 0. * np.ones((md.mesh.numberofvertices)) / md.constants.yts #1m / a 41 md.basalforcings.floatingice_melting_rate = 0. * np.ones((md.mesh.numberofvertices)) / md.constants.yts #1m / a 42 42 43 43 #Deal with boundary conditions: 44 44 45 45 print(" boundary conditions for stressbalance model") 46 md =SetMarineIceSheetBC(md,'../Exp/SquareFront.exp')46 md = SetMarineIceSheetBC(md, '../Exp/SquareFront.exp') 47 47 48 48 print(" boundary conditions for thermal model") 49 md.thermal.spctemperature[:] =md.initialization.temperature50 md.basalforcings.geothermalflux =numpy.zeros((md.mesh.numberofvertices))51 md.basalforcings.geothermalflux[n umpy.nonzero(md.mask.groundedice_levelset>0.)[0]]=1.*10**-3 #1 mW/m^249 md.thermal.spctemperature[:] = md.initialization.temperature 50 md.basalforcings.geothermalflux = np.zeros((md.mesh.numberofvertices)) 51 md.basalforcings.geothermalflux[np.nonzero(md.mask.groundedice_levelset > 0.)[0]] = 1. * 10**- 3 #1 mW / m^2
Note:
See TracChangeset
for help on using the changeset viewer.