Changeset 24260
- Timestamp:
- 10/18/19 16:10:28 (5 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/boundaryconditions/PattynSMB.py
r24256 r24260 32 32 # Here, -0.012 is the atmospheric Lapse rate from sea level in deg / m. 33 33 # It is multiplied by surface elevation from sea level 34 Tma = - 34 Tma = -15.15 - 0.012 * md.geometry.surface 35 35 36 36 # Calculate summer temperature, Eqn (12) -
issm/trunk-jpl/src/m/boundaryconditions/SetIceSheetBC.py
r24213 r24260 31 31 print(" boundary conditions for stressbalance model: spc set as zero") 32 32 33 #No ice front - 33 #No ice front -> do nothing 34 34 35 35 #Create zeros basalforcings and smb … … 51 51 md.thermal.spctemperature[pos] = md.initialization.temperature[pos] #impose observed temperature on surface 52 52 if not isinstance(md.basalforcings.geothermalflux, np.ndarray) or not np.size(md.basalforcings.geothermalflux) == md.mesh.numberofvertices: 53 md.basalforcings.geothermalflux = 50. * 10**- 53 md.basalforcings.geothermalflux = 50. * 10**-3 * np.ones((md.mesh.numberofvertices)) #50 mW / m^2 54 54 else: 55 55 print(" no thermal boundary conditions created: no observed temperature found") -
issm/trunk-jpl/src/m/boundaryconditions/love_numbers.py
r24256 r24260 4 4 def love_numbers(value, * varargin): 5 5 '''LOVE_NUMBERS: provide love numbers (value 'h', 'k', 'l', 'gamma' and 'lambda' 6 retrieved from: http: / / www.srosat.com / iag - jsg /loveNb.php6 retrieved from: http://www.srosat.com/iag-jsg/loveNb.php 7 7 Usage: series = love_numbers(value) 8 8 series = love_numbers(value, reference_frame) … … 10054 10054 if frame == 'CF': # from Blewitt, 2003, JGR 10055 10055 if value == 'h': 10056 series[1] = - 10056 series[1] = -0.269 10057 10057 elif value == 'k': 10058 10058 series[1] = 0.021 -
issm/trunk-jpl/src/m/inversions/parametercontroldrag.py
r24213 r24260 18 18 md = parametercontroldrag(md, 'nsteps', 20, 'cm_responses', 0) 19 19 md = parametercontroldrag(md, 'cm_min', 1, 'cm_max', 150, 'cm_jump', 0.99, 'maxiter', 20) 20 md = parametercontroldrag(md, eps_cm', 10^ -4, 'optscal', [10^7 10^8])20 md = parametercontroldrag(md, eps_cm', 10^-4, 'optscal', [10^7 10^8]) 21 21 22 22 See also PARAMETERCONTROLB -
issm/trunk-jpl/src/m/materials/cuffey.py
r24256 r24260 26 26 27 27 rigidity = np.zeros_like(T) 28 pos = np.nonzero(T <= - 28 pos = np.nonzero(T <= -45) 29 29 if len(pos): 30 30 rigidity[pos] = 10**8 * (-0.000396645116301 * (T[pos] + 50)**3 + 0.013345579471334 * (T[pos] + 50)**2 - 0.356868703259105 * (T[pos] + 50) + 7.272363035371383) -
issm/trunk-jpl/src/m/materials/nye.py
r24256 r24260 32 32 warnings.warn('H2O ICE - GUARANTEED MELTING. Some temperature values are beyond 273.15K.') 33 33 34 Rg = 8.3144598 # J mol^ - 1 K^ -134 Rg = 8.3144598 # J mol^-1 K^-1 35 35 36 36 if ice_type == 1: # CO2 ice 37 A_const = 10**(10.8) # s^ -1 MPa38 Q = 63000. # J mol^ -137 A_const = 10**(10.8) # s^-1 MPa 38 Q = 63000. # J mol^-1 39 39 n = 7. # Glen's exponent 40 40 elif ice_type == 2: # H2O ice 41 A_const = 9 * 10**4 # s^ -1 MPa42 Q = 60000. # J mol^ -141 A_const = 9 * 10**4 # s^-1 MPa 42 Q = 60000. # J mol^-1 43 43 n = 3. # Glen's exponent 44 44 else: … … 46 46 47 47 # Arrhenius Law 48 A = A_const * np.exp(-1 * Q / (T * Rg)) # s^ -1 MPa48 A = A_const * np.exp(-1 * Q / (T * Rg)) # s^-1 MPa 49 49 rigidity = A**(-1 / n) * 10**6 # s^(1 / n) Pa 50 50 -
issm/trunk-jpl/src/m/materials/paterson.py
r24256 r24260 28 28 # n = 3; T = temperature-273 29 29 # %From paterson, 30 # Temp = [0; - 2; - 5; - 10; - 15; - 20; - 25; - 30; - 35; - 40; - 45; -50]31 # A = [6.8 * 10^ - 15;2.4 * 10^ - 15;1.6 * 10^ - 15;4.9 * 10^ - 16;2.9 * 10^ - 16;1.7 * 10^ -16;9.4 *32 # 10^ - 17;5.1 * 10^ - 17;2.7 * 10^ - 17;1.4 * 10^ - 17;7.3 * 10^ - 18;3.6 * 10^ -18];;%s - 1(kPa - 3)30 # Temp = [0; -2; -5; -10; -15; -20; -25; -30; -35; -40; -45; -50] 31 # A = [6.8 * 10^-15;2.4 * 10^-15;1.6 * 10^-15;4.9 * 10^-16;2.9 * 10^-16;1.7 * 10^-16;9.4 * 32 # 10^-17;5.1 * 10^-17;2.7 * 10^-17;1.4 * 10^-17;7.3 * 10^-18;3.6 * 10^-18];;%s - 1(kPa - 3) 33 33 # %Convert into rigidity B 34 34 # B = A.^(-1 / n) * 10^3; %s^(1 / 3)Pa … … 38 38 39 39 rigidity = np.zeros_like(T) 40 pos1 = np.nonzero(T <= - 40 pos1 = np.nonzero(T <= -45)[0] 41 41 if len(pos1): 42 42 rigidity[pos1] = 10**8 * (-0.000292866376675 * (T[pos1] + 50)**3 + 0.011672640664130 * (T[pos1] + 50)**2 - 0.325004442485481 * (T[pos1] + 50) + 6.524779401948101) -
issm/trunk-jpl/src/m/mech/thomasparams.py
r24256 r24260 127 127 128 128 # a < -1 in areas of strong lateral compression or longitudinal compression and 129 # theta flips sign at a = - 129 # theta flips sign at a = -2 130 130 pos = np.nonzero(np.abs((np.abs(a) - 2.)) < 1.e-3) 131 131 if len(pos) > 0: -
issm/trunk-jpl/src/m/mesh/ComputeMetric.py
r24256 r24260 11 11 12 12 Example: 13 metric = ComputeMetric(hessian, 2 / 9, 10^ -1, 100, 10^5, [])13 metric = ComputeMetric(hessian, 2 / 9, 10^-1, 100, 10^5, []) 14 14 """ 15 15 … … 41 41 v2y[pos3] = 1. 42 42 43 #Compute new metric (for each node M = V * Lambda * V^ -1)43 #Compute new metric (for each node M = V * Lambda * V^-1) 44 44 45 45 metric = np.vstack((((v1x * v2y - v1y * v2x)**(-1) * (lambda1 * v2y * v1x - lambda2 * v1y * v2x)).reshape(-1, ), -
issm/trunk-jpl/src/m/mesh/bamg.py
r24256 r24260 19 19 BAMG - mesh generation 20 20 21 Available options (for more details see ISSM website http: / / issm.jpl.nasa.gov /):21 Available options (for more details see ISSM website http://issm.jpl.nasa.gov/): 22 22 23 23 - domain : followed by an ARGUS file that prescribes the domain outline … … 33 33 34 34 - anisomax : maximum ratio between the smallest and largest edges (default is 10^30) 35 - coeff : coefficient applied to the metric (2 - 35 - coeff : coefficient applied to the metric (2 -> twice as many elements, default is 1) 36 36 - cutoff : scalar used to compute the metric when metric type 2 or 3 are applied 37 37 - err : error used to generate the metric from a field … … 40 40 to apply several fields, use one column per field 41 41 - gradation : maximum ratio between two adjacent edges 42 - Hessiantype : 0 - 43 1 - 42 - Hessiantype : 0 -> use double P2 projection (default) 43 1 -> use Green formula 44 44 - KeepVertices : try to keep initial vertices when adaptation is done on an existing mesh (default 1) 45 45 - maxnbv : maximum number of vertices used to allocate memory (default is 10^6) 46 46 - maxsubdiv : maximum subdivision of exisiting elements (default is 10) 47 47 - metric : matrix (numberofnodes x 3) used as a metric 48 - Metrictype : 1 - 49 2 - 50 3 - 48 - Metrictype : 1 -> absolute error c / (err coeff^2) * Abs(H) (default) 49 2 -> relative error c / (err coeff^2) * Abs(H) / max(s, cutoff * max(s)) 50 3 -> rescaled absolute error c / (err coeff^2) * Abs(H) / (smax - smin) 51 51 - nbjacoby : correction used by Hessiantype = 1 (default is 1) 52 52 - nbsmooth : number of metric smoothing procedure (default is 3) … … 378 378 bamg_options['anisomax'] = options.getfieldvalue('anisomax', 10.**18) 379 379 bamg_options['coeff'] = options.getfieldvalue('coeff', 1.) 380 bamg_options['cutoff'] = options.getfieldvalue('cutoff', 10.**- 380 bamg_options['cutoff'] = options.getfieldvalue('cutoff', 10.**-5) 381 381 bamg_options['err'] = options.getfieldvalue('err', np.array([[0.01]])) 382 382 bamg_options['errg'] = options.getfieldvalue('errg', 0.1) … … 384 384 bamg_options['gradation'] = options.getfieldvalue('gradation', 1.5) 385 385 bamg_options['Hessiantype'] = options.getfieldvalue('Hessiantype', 0) 386 bamg_options['hmin'] = options.getfieldvalue('hmin', 10.**- 386 bamg_options['hmin'] = options.getfieldvalue('hmin', 10.**-100) 387 387 bamg_options['hmax'] = options.getfieldvalue('hmax', 10.**100) 388 388 bamg_options['hminVertices'] = options.getfieldvalue('hminVertices', np.empty((0, 1))) -
issm/trunk-jpl/src/m/mesh/bamgflowband.py
r24213 r24260 18 18 19 19 Example: 20 x = np.arrange(1, 3001, 100)20 x = np.arrange(1, 3001, 100) 21 21 h = linspace(1000, 300, numel(x)) 22 b= - 22 b= -917 / 1023 * h 23 23 md = bamgflowband(model, b + h, b, 'hmax', 80, 'vertical', 1, 'Markers', m) 24 24 """ -
issm/trunk-jpl/src/m/solve/parseresultsfromdisk.py
r24255 r24260 59 59 60 60 #Get time and step 61 if loadres['step'] != - 61 if loadres['step'] != -9999.: 62 62 saveres[index].__dict__['step'] = loadres['step'] 63 if loadres['time'] != - 63 if loadres['time'] != -9999.: 64 64 saveres[index].__dict__['time'] = loadres['time'] 65 65 … … 200 200 field = field * yts 201 201 elif fieldname == 'TotalFloatingBmb': 202 field = field / 10.**12 * yts #(GigaTon /year)202 field = field / 10.**12 * yts #(GigaTon/year) 203 203 elif fieldname == 'TotalFloatingBmbScaled': 204 field = field / 10.**12 * yts #(GigaTon /year)204 field = field / 10.**12 * yts #(GigaTon/year) 205 205 elif fieldname == 'TotalGroundedBmb': 206 field = field / 10.**12 * yts #(GigaTon /year)206 field = field / 10.**12 * yts #(GigaTon/year) 207 207 elif fieldname == 'TotalGroundedBmbScaled': 208 field = field / 10.**12 * yts #(GigaTon /year)208 field = field / 10.**12 * yts #(GigaTon/year) 209 209 elif fieldname == 'TotalSmb': 210 field = field / 10.**12 * yts #(GigaTon /year)210 field = field / 10.**12 * yts #(GigaTon/year) 211 211 elif fieldname == 'TotalSmbScaled': 212 field = field / 10.**12 * yts #(GigaTon /year)212 field = field / 10.**12 * yts #(GigaTon/year) 213 213 elif fieldname == 'GroundinglineMassFlux': 214 field = field / 10.**12 * yts #(GigaTon /year)214 field = field / 10.**12 * yts #(GigaTon/year) 215 215 elif fieldname == 'IcefrontMassFlux': 216 field = field / 10.**12 * yts #(GigaTon /year)216 field = field / 10.**12 * yts #(GigaTon/year) 217 217 elif fieldname == 'IcefrontMassFluxLevelset': 218 field = field / 10.**12 * yts #(GigaTon /year)218 field = field / 10.**12 * yts #(GigaTon/year) 219 219 elif fieldname == 'SmbMassBalance': 220 220 field = field * yts … … 255 255 field = temp_field 256 256 257 if time != - 257 if time != -9999: 258 258 time = time / yts 259 259
Note:
See TracChangeset
for help on using the changeset viewer.