Changeset 25158
- Timestamp:
- 06/25/20 14:50:08 (5 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 1 added
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/m/boundaryconditions/getlovenumbers.m ¶
r25143 r25158 1 1 function series=getlovenumbers(varargin) 2 %LOVE_NUMBERS: provide love numbers 3 % retrieved from: http://www.srosat.com/iag-jsg/loveNb.php 4 % in a chosen reference frame 5 % 2 %GETLOVENUMBERS: provide love numbers retrieved from: 3 %http://www.srosat.com/iag-jsg/loveNb.php in a chosen reference frame 4 % 6 5 % Usage: 7 % series = love_numbers('type','loadingverticaldisplacement','referenceframe','CM','maxdeg',1001)6 % series = getlovenumbers('type','loadingverticaldisplacement','referenceframe','CM','maxdeg',1000) 8 7 % 9 % - type = one of 'loadingverticaldisplacement', 'loadinggravitationalpotential', 'loadinghorizontaldisplacement', ... 10 % 'tidalverticaldisplacement', 'tidalgravitationalpotential', 'tidalhorizontaldisplacement' 8 % - type = one of 'loadingverticaldisplacement', 9 % 'loadinggravitationalpotential', 'loadinghorizontaldisplacement', 10 % 'tidalverticaldisplacement', 'tidalgravitationalpotential', 11 % 'tidalhorizontaldisplacement' 11 12 % - reference_frame = one of 'CM' (default) and 'CF'. 12 % - maxdeg = default 100 113 % - maxdeg = default 1000 13 14 % 14 15 % Example: 15 % h=love_number('type','loadingverticaldisplacement','referenceframe','CM','maxdeg',maxdeg);16 % k=love_number('type','loadinggravitationalpotential','referenceframe','CM','maxdeg',maxdeg);17 % l=love_number('type','loadinghorizontaldisplacement','referenceframe','CM','maxdeg',maxdeg);18 % th=love_number('type','tidalverticaldisplacement','referenceframe','CM','maxdeg',maxdeg);19 % tk=love_number('type','tidalgravitationalpotential','referenceframe','CM','maxdeg',maxdeg);20 % tl=love_number('type','tidalhorizontaldisplacement','referenceframe','CM','maxdeg',maxdeg);16 % h=getlovenumbers('type','loadingverticaldisplacement','referenceframe','CM','maxdeg',maxdeg); 17 % k=getlovenumbers('type','loadinggravitationalpotential','referenceframe','CM','maxdeg',maxdeg); 18 % l=getlovenumbers('type','loadinghorizontaldisplacement','referenceframe','CM','maxdeg',maxdeg); 19 % th=getlovenumbers('type','tidalverticaldisplacement','referenceframe','CM','maxdeg',maxdeg); 20 % tk=getlovenumbers('type','tidalgravitationalpotential','referenceframe','CM','maxdeg',maxdeg); 21 % tl=getlovenumbers('type','tidalhorizontaldisplacement','referenceframe','CM','maxdeg',maxdeg); 21 22 22 23 %recover options: … … 36 37 37 38 love_numbers=[... 38 0 0 0 0 0 0 0 39 -1.28740059 -1.00000000-0.89858519 1.28740059 0.42519882 0.89858519 0.0000000039 0 0 0 0 0 0 0 40 -1.28740059 -1.00000000 -0.89858519 1.28740059 0.42519882 0.89858519 0.00000000 40 41 -1.00025365 -0.30922675 0.02060926 1.69102690 0.46358648 0.67016399 0.61829668; 41 42 -1.06243501 -0.19927948 0.06801636 1.86315553 0.55741597 0.73270416 0.56270589; … … 10055 10056 series=love_numbers(:,6); 10056 10057 else 10057 error(['love_numbers error message: unknow type:' type]);10058 error(['love_numbers error message: unknown type:' type]); 10058 10059 end 10059 10060 … … 10070 10071 end 10071 10072 else 10072 error(['love_numbers error message: unknow reference frame:' frame]);10073 error(['love_numbers error message: unknown reference frame:' frame]); 10073 10074 end 10074 10075 -
TabularUnified issm/trunk-jpl/src/m/classes/giaivins.py ¶
r25157 r25158 39 39 def setdefaultparameters(self): #{{{ 40 40 self.cross_section_shape = 1 41 42 return self43 41 #}}} 44 42 -
TabularUnified issm/trunk-jpl/src/m/classes/giamme.py ¶
r25157 r25158 38 38 39 39 def setdefaultparameters(self): # {{{ 40 return self40 return 41 41 #}}} 42 42 -
TabularUnified issm/trunk-jpl/src/m/classes/linearbasalforcings.py ¶
r25125 r25158 66 66 self.upperwater_melting_rate = 0.0 67 67 self.upperwater_elevation = -400.0 68 69 return self70 68 #}}} 71 69 def checkconsistency(self, md, solution, analyses): # {{{ -
TabularUnified issm/trunk-jpl/src/m/classes/lovenumbers.py ¶
r25157 r25158 3 3 from checkfield import checkfield 4 4 from fielddisplay import fielddisplay 5 from getlovenumbers import getlovenumbers 6 from pairoptions import pairoptions 5 7 from WriteData import WriteData 6 8 7 9 8 class lovenumbers(object): 10 class lovenumbers(object): #{{{ 9 11 ''' 10 12 LOVENUMBERS numbers class definition … … 15 17 ''' 16 18 17 def __init__(self, *args): 19 def __init__(self, *args): #{{{ 18 20 #regular love numbers: 19 21 self.h = [] #provided by PREM model … … 25 27 self.tk = [] 26 28 self.tl = [] 27 self.tk2secular = 0 #deg 2 secular number. 29 self.tk2secular = 0 #deg 2 secular number. 30 31 options = pairoptions(*args) 32 maxdeg = options.getfieldvalue('maxdeg', 1000) 33 referenceframe = options.getfieldvalue('referenceframe', 'CM') 34 self.setdefaultparameters(maxdeg, referenceframe) 28 35 #}}} 29 36 -
TabularUnified issm/trunk-jpl/src/m/classes/materials.py ¶
r25125 r25158 1 1 import numpy as np 2 3 from checkfield import checkfield 2 4 from fielddisplay import fielddisplay 3 5 from project3d import project3d 4 from checkfield import checkfield5 6 from WriteData import WriteData 6 7 8 7 9 class materials(object): 8 """10 ''' 9 11 MATERIALS class definition 10 12 11 13 Usage: 12 14 materials = materials() 13 """14 15 def __init__(self, *args): #{{{15 ''' 16 17 def __init__(self, *args): #{{{ 16 18 self.nature = [] 17 19 if not len(args): … … 57 59 setattr(self, 'rho_ice', 0) 58 60 setattr(self, 'rho_water', 0) 61 setattr(self, 'rho_freshwater', 0) 59 62 setattr(self, 'earth_density', 0) 60 63 else: … … 65 68 #}}} 66 69 67 def setdefaultparameters(self): #{{{68 for i in range(len(self.nature)): 69 nat = self.nature[i] 70 if nat == 'ice': 71 #ice density (kg /m^3)70 def setdefaultparameters(self): #{{{ 71 for i in range(len(self.nature)): 72 nat = self.nature[i] 73 if nat == 'ice': 74 #ice density (kg/m^3) 72 75 self.rho_ice = 917. 73 #ocean water density (kg /m^3)76 #ocean water density (kg/m^3) 74 77 self.rho_water = 1023. 75 #fresh water density (kg /m^3)78 #fresh water density (kg/m^3) 76 79 self.rho_freshwater = 1000. 77 #water viscosity (N.s /m^2)80 #water viscosity (N.s/m^2) 78 81 self.mu_water = 0.001787 79 #ice heat capacity cp (J / kg /K)82 #ice heat capacity cp (J/kg/K) 80 83 self.heatcapacity = 2093. 81 84 #ice latent heat of fusion L (J / kg) 82 85 self.latentheat = 3.34e5 83 #ice thermal conductivity (W / m /K)86 #ice thermal conductivity (W/m/K) 84 87 self.thermalconductivity = 2.4 85 #wet ice thermal conductivity (W / m /K)88 #wet ice thermal conductivity (W/m/K) 86 89 self.temperateiceconductivity = 0.24 87 90 #the melting point of ice at 1 atmosphere of pressure in K 88 91 self.meltingpoint = 273.15 89 #rate of change of melting point with pressure (K /Pa)92 #rate of change of melting point with pressure (K/Pa) 90 93 self.beta = 9.8e-8 91 #mixed layer (ice-water interface) heat capacity (J / kg /K)94 #mixed layer (ice-water interface) heat capacity (J/kg/K) 92 95 self.mixed_layer_capacity = 3974. 93 #thermal exchange velocity (ice-water interface) (m /s)96 #thermal exchange velocity (ice-water interface) (m/s) 94 97 self.thermal_exchange_velocity = 1.00e-4 95 98 #Rheology law: what is the temperature dependence of B with T … … 108 111 self.burgers_mu = [np.nan, np.nan] 109 112 self.isburgers = [0, 0] 110 self.density = [5.51e3, 5.50e3] # (Pa) #mantle and lithosphere density [kg /m^3]113 self.density = [5.51e3, 5.50e3] # (Pa) #mantle and lithosphere density [kg/m^3] 111 114 self.issolid = [1, 1] # is layer solid or liquid. 112 115 elif nat == 'hydro': 113 #ice density (kg /m^3)116 #ice density (kg/m^3) 114 117 self.rho_ice = 917. 115 #ocean water density (kg /m^3)118 #ocean water density (kg/m^3) 116 119 self.rho_water = 1023. 117 #average density of the Earth (kg /m^3)120 #average density of the Earth (kg/m^3) 118 121 self.earth_density = 5512 122 #fresh water density (kg/m^3) 123 self.rho_freshwater = 1000. 119 124 else: 120 125 raise RuntimeError("materials setdefaultparameters error message: nature of the material not supported yet! ('ice' or 'litho' or 'hydro')") 121 122 return self 123 #}}} 124 125 def __repr__(self): # {{{ 126 #}}} 127 128 def __repr__(self): #{{{ 126 129 string = " Materials:" 127 130 for i in range(len(self.nature)): … … 129 132 if nat == 'ice': 130 133 string = "%s\n%s" % (string, 'Ice:') 131 string = "%s\n%s" % (string, fielddisplay(self, "rho_ice", "ice density [kg /m^3]"))132 string = "%s\n%s" % (string, fielddisplay(self, "rho_water", "ocean water density [kg /m^3]"))133 string = "%s\n%s" % (string, fielddisplay(self, "rho_freshwater", "fresh water density [kg /m^3]"))134 string = "%s\n%s" % (string, fielddisplay(self, "mu_water", "water viscosity [N s /m^2]"))135 string = "%s\n%s" % (string, fielddisplay(self, "heatcapacity", "heat capacity [J / kg /K]"))136 string = "%s\n%s" % (string, fielddisplay(self, "thermalconductivity", "ice thermal conductivity [W / m /K]"))137 string = "%s\n%s" % (string, fielddisplay(self, "temperateiceconductivity", "temperate ice thermal conductivity [W / m /K]"))134 string = "%s\n%s" % (string, fielddisplay(self, "rho_ice", "ice density [kg/m^3]")) 135 string = "%s\n%s" % (string, fielddisplay(self, "rho_water", "ocean water density [kg/m^3]")) 136 string = "%s\n%s" % (string, fielddisplay(self, "rho_freshwater", "fresh water density [kg/m^3]")) 137 string = "%s\n%s" % (string, fielddisplay(self, "mu_water", "water viscosity [N s/m^2]")) 138 string = "%s\n%s" % (string, fielddisplay(self, "heatcapacity", "heat capacity [J/kg/K]")) 139 string = "%s\n%s" % (string, fielddisplay(self, "thermalconductivity", "ice thermal conductivity [W/m/K]")) 140 string = "%s\n%s" % (string, fielddisplay(self, "temperateiceconductivity", "temperate ice thermal conductivity [W/m/K]")) 138 141 string = "%s\n%s" % (string, fielddisplay(self, "meltingpoint", "melting point of ice at 1atm in K")) 139 string = "%s\n%s" % (string, fielddisplay(self, "latentheat", "latent heat of fusion [J /m^3]"))140 string = "%s\n%s" % (string, fielddisplay(self, "beta", "rate of change of melting point with pressure [K /Pa]"))141 string = "%s\n%s" % (string, fielddisplay(self, "mixed_layer_capacity", "mixed layer capacity [W / kg /K]"))142 string = "%s\n%s" % (string, fielddisplay(self, "thermal_exchange_velocity", "thermal exchange velocity [m /s]"))143 string = "%s\n%s" % (string, fielddisplay(self, "rheology_B", "flow law parameter [Pa s^(1 /n)]"))142 string = "%s\n%s" % (string, fielddisplay(self, "latentheat", "latent heat of fusion [J/m^3]")) 143 string = "%s\n%s" % (string, fielddisplay(self, "beta", "rate of change of melting point with pressure [K/Pa]")) 144 string = "%s\n%s" % (string, fielddisplay(self, "mixed_layer_capacity", "mixed layer capacity [W/kg/K]")) 145 string = "%s\n%s" % (string, fielddisplay(self, "thermal_exchange_velocity", "thermal exchange velocity [m/s]")) 146 string = "%s\n%s" % (string, fielddisplay(self, "rheology_B", "flow law parameter [Pa s^(1/n)]")) 144 147 string = "%s\n%s" % (string, fielddisplay(self, "rheology_n", "Glen's flow law exponent")) 145 148 string = "%s\n%s" % (string, fielddisplay(self, "rheology_law", "law for the temperature dependance of the rheology: 'None', 'BuddJacka', 'Cuffey', 'CuffeyTemperate', 'Paterson', 'Arrhenius', 'LliboutryDuval', 'NyeCO2', or 'NyeH2O'")) … … 154 157 string = "%s\n%s" % (string, fielddisplay(self, 'burgers_mu', 'array describing each layer''s transient shear modulus, only for Burgers rheologies (numlayers) [Pa]')) 155 158 string = "%s\n%s" % (string, fielddisplay(self, 'isburgers', 'array describing whether we adopt a MaxWell (0) or Burgers (1) rheology (default 0)')) 156 string = "%s\n%s" % (string, fielddisplay(self, 'density', 'array describing each layer''s density (numlayers) [kg /m^3]'))159 string = "%s\n%s" % (string, fielddisplay(self, 'density', 'array describing each layer''s density (numlayers) [kg/m^3]')) 157 160 string = "%s\n%s" % (string, fielddisplay(self, 'issolid', 'array describing whether the layer is solid or liquid (default 1) (numlayers)')) 158 161 elif nat == 'hydro': 159 162 string = "%s\n%s" % (string, 'Hydro:') 160 string = "%s\n%s" % (string, fielddisplay(self, "rho_ice", "ice density [kg / m^3]")) 161 string = "%s\n%s" % (string, fielddisplay(self, "rho_water", "ocean water density [kg / m^3]")) 162 string = "%s\n%s" % (string, fielddisplay(self, "earth_density", "mantle density [kg / m^3]")) 163 string = "%s\n%s" % (string, fielddisplay(self, "rho_ice", "ice density [kg/m^3]")) 164 string = "%s\n%s" % (string, fielddisplay(self, "rho_water", "ocean water density [kg/m^3]")) 165 string = "%s\n%s" % (string, fielddisplay(self, "earth_density", "mantle density [kg/m^3]")) 166 string = "%s\n%s" % (string, fielddisplay(self, "rho_freshwater", "fresh water density [kg/m^3]")) 167 163 168 else: 164 169 raise RuntimeError("materials constructor error message: nature of the material not supported yet! ('ice' or 'litho' or 'hydro')") … … 167 172 #}}} 168 173 169 def checkconsistency(self, md, solution, analyses): #{{{174 def checkconsistency(self, md, solution, analyses): #{{{ 170 175 for i in range(len(self.nature)): 171 176 nat = self.nature[i] … … 207 212 md = checkfield(md, 'fieldname', 'materials.rho_water', '>', 0) 208 213 md = checkfield(md, 'fieldname', 'materials.earth_density', '>', 0, 'numel', [1]) 214 md = checkfield(md, 'fieldname', 'materials.rho_freshwater', '>', 0) 209 215 else: 210 216 raise RuntimeError("materials checkconsistency error message: nature of the material not supported yet! ('ice' or 'litho' or 'hydro')") 211 217 212 218 return md 213 # 214 215 def marshall(self, prefix, md, fid): #{{{219 #}}} 220 221 def marshall(self, prefix, md, fid): #{{{ 216 222 #1: MatdamageiceEnum 2: MatestarEnum 3: MaticeEnum 4: MatenhancediceEnum 5: MaterialsEnum 217 223 WriteData(fid, prefix, 'name', 'md.materials.nature', 'data', naturetointeger(self.nature), 'format', 'IntMat', 'mattype', 3) … … 252 258 WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'rho_water', 'format', 'Double') 253 259 WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'earth_density', 'format', 'Double') 254 else: 255 raise RuntimeError("materials constructor error message: nature of the material not supported yet! ('ice' or 'litho' or 'hydro')") 256 # }}} 257 258 def extrude(self, md): # {{{ 260 WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'rho_freshwater', 'format', 'Double') 261 else: 262 raise RuntimeError("materials constructor error message: nature of the material not supported yet! ('ice' or 'litho' or 'hydro')") 263 #}}} 264 265 def extrude(self, md): #{{{ 259 266 for i in range(len(self.nature)): 260 267 nat = self.nature[i] … … 265 272 #}}} 266 273 267 def naturetointeger(strnat):#{{{268 intnat = np.zeros(len(strnat))269 270 for i in range(len(intnat)):271 if strnat[i] == 'damageice':272 intnat[i] = 1273 elif strnat[i] == 'estar':274 intnat[i] = 2275 elif strnat[i] == 'ice':276 intnat[i] = 3277 elif strnat[i] == 'enhancedice':278 intnat[i] = 4279 # elif strnat[i] == 'materials':280 # intnat[i] = 5 #this case will never happen, kept to ensure equivalent of codes between IoCodeToMeterialsEnum and IoCodeToNatureEnum281 elif strnat[i] == 'litho':282 intnat[i] = 6283 elif strnat[i] == 'hydro':284 intnat[i] = 7285 else:286 raise RuntimeError("materials constructor error message: nature of the material not supported yet! ('ice' or 'litho' or 'hydro')")287 288 return intnat289 #}}}274 def naturetointeger(strnat): #{{{ 275 intnat = np.zeros(len(strnat)) 276 277 for i in range(len(intnat)): 278 if strnat[i] == 'damageice': 279 intnat[i] = 1 280 elif strnat[i] == 'estar': 281 intnat[i] = 2 282 elif strnat[i] == 'ice': 283 intnat[i] = 3 284 elif strnat[i] == 'enhancedice': 285 intnat[i] = 4 286 # elif strnat[i] == 'materials': 287 # intnat[i] = 5 #this case will never happen, kept to ensure equivalent of codes between IoCodeToMeterialsEnum and IoCodeToNatureEnum 288 elif strnat[i] == 'litho': 289 intnat[i] = 6 290 elif strnat[i] == 'hydro': 291 intnat[i] = 7 292 else: 293 raise RuntimeError("materials constructor error message: nature of the material not supported yet! ('ice' or 'litho' or 'hydro')") 294 295 return intnat 296 #}}} -
TabularUnified issm/trunk-jpl/src/m/classes/mesh3dsurface.py ¶
r25157 r25158 94 94 #test/NightlyRun/runme.py. 95 95 self.average_vertex_connectivity = 25 96 97 return self98 96 # }}} 99 97 -
TabularUnified issm/trunk-jpl/src/m/classes/model.py ¶
r25136 r25158 182 182 def __repr__(obj): #{{{ 183 183 #print "Here %s the number: %d" % ("is", 37) 184 string = "%19s: % - 22s - - %s" % ("mesh", "[%s, %s]" % ("1x1", obj.mesh.__class__.__name__), "mesh properties")185 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("mask", "[%s, %s]" % ("1x1", obj.mask.__class__.__name__), "defines grounded and floating elements"))186 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("geometry", "[%s, %s]" % ("1x1", obj.geometry.__class__.__name__), "surface elevation, bedrock topography, ice thickness, ..."))187 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("constants", "[%s, %s]" % ("1x1", obj.constants.__class__.__name__), "physical constants"))188 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("smb", "[%s, %s]" % ("1x1", obj.smb.__class__.__name__), "surface mass balance"))189 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("basalforcings", "[%s, %s]" % ("1x1", obj.basalforcings.__class__.__name__), "bed forcings"))190 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("materials", "[%s, %s]" % ("1x1", obj.materials.__class__.__name__), "material properties"))191 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("damage", "[%s, %s]" % ("1x1", obj.damage.__class__.__name__), "damage propagation laws"))192 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("friction", "[%s, %s]" % ("1x1", obj.friction.__class__.__name__), "basal friction / drag properties"))193 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("flowequation", "[%s, %s]" % ("1x1", obj.flowequation.__class__.__name__), "flow equations"))194 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("timestepping", "[%s, %s]" % ("1x1", obj.timestepping.__class__.__name__), "time stepping for transient models"))195 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("initialization", "[%s, %s]" % ("1x1", obj.initialization.__class__.__name__), "initial guess / state"))196 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("rifts", "[%s, %s]" % ("1x1", obj.rifts.__class__.__name__), "rifts properties"))197 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("solidearth", "[%s, %s]" % ("1x1", obj.solidearth.__class__.__name__), "solidearth inputs and settings"))198 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("dsl", "[%s, %s]" % ("1x1", obj.dsl.__class__.__name__), "dynamic sea level"))199 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("debug", "[%s, %s]" % ("1x1", obj.debug.__class__.__name__), "debugging tools (valgrind, gprof)"))200 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("verbose", "[%s, %s]" % ("1x1", obj.verbose.__class__.__name__), "verbosity level in solve"))201 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("settings", "[%s, %s]" % ("1x1", obj.settings.__class__.__name__), "settings properties"))202 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("toolkits", "[%s, %s]" % ("1x1", obj.toolkits.__class__.__name__), "PETSc options for each solution"))203 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("cluster", "[%s, %s]" % ("1x1", obj.cluster.__class__.__name__), "cluster parameters (number of cpus...)"))204 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("balancethickness", "[%s, %s]" % ("1x1", obj.balancethickness.__class__.__name__), "parameters for balancethickness solution"))205 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("stressbalance", "[%s, %s]" % ("1x1", obj.stressbalance.__class__.__name__), "parameters for stressbalance solution"))206 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("groundingline", "[%s, %s]" % ("1x1", obj.groundingline.__class__.__name__), "parameters for groundingline solution"))207 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("hydrology", "[%s, %s]" % ("1x1", obj.hydrology.__class__.__name__), "parameters for hydrology solution"))208 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("masstransport", "[%s, %s]" % ("1x1", obj.masstransport.__class__.__name__), "parameters for masstransport solution"))209 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("thermal", "[%s, %s]" % ("1x1", obj.thermal.__class__.__name__), "parameters for thermal solution"))210 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("steadystate", "[%s, %s]" % ("1x1", obj.steadystate.__class__.__name__), "parameters for steadystate solution"))211 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("transient", "[%s, %s]" % ("1x1", obj.transient.__class__.__name__), "parameters for transient solution"))212 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("levelset", "[%s, %s]" % ("1x1", obj.levelset.__class__.__name__), "parameters for moving boundaries (level - set method)"))213 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("calving", "[%s, %s]" % ("1x1", obj.calving.__class__.__name__), "parameters for calving"))214 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("frontalforcings", "[%s, %s]" % ("1x1", obj.frontalforcings.__class__.__name__), "parameters for frontalforcings"))215 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("gia", "[%s, %s]" % ("1x1", obj.gia.__class__.__name__), "parameters for gia solution"))216 string = "%s\n%s" % (string, '%19s: % - 22s - - %s' % ("love", "[%s, %s]" % ("1x1", obj.love.__class__.__name__), "parameters for lovesolution"))217 string = "%s\n%s" % (string, '%19s: % - 22s - - %s' % ("esa", "[%s, %s]" % ("1x1", obj.esa.__class__.__name__), "parameters for elastic adjustmentsolution"))218 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("autodiff", "[%s, %s]" % ("1x1", obj.autodiff.__class__.__name__), "automatic differentiation parameters"))219 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("inversion", "[%s, %s]" % ("1x1", obj.inversion.__class__.__name__), "parameters for inverse methods"))220 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("qmu", "[%s, %s]" % ("1x1", obj.qmu.__class__.__name__), "dakota properties"))221 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("amr", "[%s, %s]" % ("1x1", obj.amr.__class__.__name__), "adaptive mesh refinement properties"))222 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("outputdefinition", "[%s, %s]" % ("1x1", obj.outputdefinition.__class__.__name__), "output definition"))223 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("results", "[%s, %s]" % ("1x1", obj.results.__class__.__name__), "model results"))224 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("radaroverlay", "[%s, %s]" % ("1x1", obj.radaroverlay.__class__.__name__), "radar image for plot overlay"))225 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("miscellaneous", "[%s, %s]" % ("1x1", obj.miscellaneous.__class__.__name__), "miscellaneous fields"))184 string = "%19s: % - 22s - - %s" % ("mesh", "[%s, %s]" % ("1x1", obj.mesh.__class__.__name__), "mesh properties") 185 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("mask", "[%s, %s]" % ("1x1", obj.mask.__class__.__name__), "defines grounded and floating elements")) 186 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("geometry", "[%s, %s]" % ("1x1", obj.geometry.__class__.__name__), "surface elevation, bedrock topography, ice thickness, ...")) 187 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("constants", "[%s, %s]" % ("1x1", obj.constants.__class__.__name__), "physical constants")) 188 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("smb", "[%s, %s]" % ("1x1", obj.smb.__class__.__name__), "surface mass balance")) 189 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("basalforcings", "[%s, %s]" % ("1x1", obj.basalforcings.__class__.__name__), "bed forcings")) 190 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("materials", "[%s, %s]" % ("1x1", obj.materials.__class__.__name__), "material properties")) 191 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("damage", "[%s, %s]" % ("1x1", obj.damage.__class__.__name__), "damage propagation laws")) 192 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("friction", "[%s, %s]" % ("1x1", obj.friction.__class__.__name__), "basal friction / drag properties")) 193 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("flowequation", "[%s, %s]" % ("1x1", obj.flowequation.__class__.__name__), "flow equations")) 194 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("timestepping", "[%s, %s]" % ("1x1", obj.timestepping.__class__.__name__), "time stepping for transient models")) 195 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("initialization", "[%s, %s]" % ("1x1", obj.initialization.__class__.__name__), "initial guess / state")) 196 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("rifts", "[%s, %s]" % ("1x1", obj.rifts.__class__.__name__), "rifts properties")) 197 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("solidearth", "[%s, %s]" % ("1x1", obj.solidearth.__class__.__name__), "solidearth inputs and settings")) 198 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("dsl", "[%s, %s]" % ("1x1", obj.dsl.__class__.__name__), "dynamic sea level")) 199 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("debug", "[%s, %s]" % ("1x1", obj.debug.__class__.__name__), "debugging tools (valgrind, gprof)")) 200 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("verbose", "[%s, %s]" % ("1x1", obj.verbose.__class__.__name__), "verbosity level in solve")) 201 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("settings", "[%s, %s]" % ("1x1", obj.settings.__class__.__name__), "settings properties")) 202 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("toolkits", "[%s, %s]" % ("1x1", obj.toolkits.__class__.__name__), "PETSc options for each solution")) 203 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("cluster", "[%s, %s]" % ("1x1", obj.cluster.__class__.__name__), "cluster parameters (number of cpus...)")) 204 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("balancethickness", "[%s, %s]" % ("1x1", obj.balancethickness.__class__.__name__), "parameters for balancethickness solution")) 205 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("stressbalance", "[%s, %s]" % ("1x1", obj.stressbalance.__class__.__name__), "parameters for stressbalance solution")) 206 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("groundingline", "[%s, %s]" % ("1x1", obj.groundingline.__class__.__name__), "parameters for groundingline solution")) 207 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("hydrology", "[%s, %s]" % ("1x1", obj.hydrology.__class__.__name__), "parameters for hydrology solution")) 208 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("masstransport", "[%s, %s]" % ("1x1", obj.masstransport.__class__.__name__), "parameters for masstransport solution")) 209 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("thermal", "[%s, %s]" % ("1x1", obj.thermal.__class__.__name__), "parameters for thermal solution")) 210 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("steadystate", "[%s, %s]" % ("1x1", obj.steadystate.__class__.__name__), "parameters for steadystate solution")) 211 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("transient", "[%s, %s]" % ("1x1", obj.transient.__class__.__name__), "parameters for transient solution")) 212 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("levelset", "[%s, %s]" % ("1x1", obj.levelset.__class__.__name__), "parameters for moving boundaries (level - set method)")) 213 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("calving", "[%s, %s]" % ("1x1", obj.calving.__class__.__name__), "parameters for calving")) 214 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("frontalforcings", "[%s, %s]" % ("1x1", obj.frontalforcings.__class__.__name__), "parameters for frontalforcings")) 215 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("gia", "[%s, %s]" % ("1x1", obj.gia.__class__.__name__), "parameters for gia solution")) 216 string = "%s\n%s" % (string, '%19s: % - 22s - - %s' % ("esa", "[%s, %s]" % ("1x1", obj.esa.__class__.__name__), "parameters for elastic adjustment solution")) 217 string = "%s\n%s" % (string, '%19s: % - 22s - - %s' % ("love", "[%s, %s]" % ("1x1", obj.love.__class__.__name__), "parameters for love solution")) 218 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("autodiff", "[%s, %s]" % ("1x1", obj.autodiff.__class__.__name__), "automatic differentiation parameters")) 219 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("inversion", "[%s, %s]" % ("1x1", obj.inversion.__class__.__name__), "parameters for inverse methods")) 220 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("qmu", "[%s, %s]" % ("1x1", obj.qmu.__class__.__name__), "dakota properties")) 221 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("amr", "[%s, %s]" % ("1x1", obj.amr.__class__.__name__), "adaptive mesh refinement properties")) 222 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("outputdefinition", "[%s, %s]" % ("1x1", obj.outputdefinition.__class__.__name__), "output definition")) 223 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("results", "[%s, %s]" % ("1x1", obj.results.__class__.__name__), "model results")) 224 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("radaroverlay", "[%s, %s]" % ("1x1", obj.radaroverlay.__class__.__name__), "radar image for plot overlay")) 225 string = "%s\n%s" % (string, "%19s: % - 22s - - %s" % ("miscellaneous", "[%s, %s]" % ("1x1", obj.miscellaneous.__class__.__name__), "miscellaneous fields")) 226 226 return string 227 227 # }}} … … 665 665 md.smb.extrude(md) 666 666 md.initialization.extrude(md) 667 667 668 md.flowequation.extrude(md) 668 669 669 md.stressbalance.extrude(md) 670 670 md.thermal.extrude(md) 671 671 md.masstransport.extrude(md) 672 673 # Calving variables674 md.hydrology.extrude(md)675 672 md.levelset.extrude(md) 676 673 md.calving.extrude(md) 677 674 md.frontalforcings.extrude(md) 675 md.hydrology.extrude(md) 676 md.solidearth.extrude(md) 677 md.dsl.extrude(md) 678 678 679 679 #connectivity … … 690 690 if md.damage.isdamage == 1: 691 691 md.damage.extrude(md) 692 md.gia.extrude(md)693 692 md.mask.extrude(md) 694 693 md.qmu.extrude(md) -
TabularUnified issm/trunk-jpl/src/m/classes/rotational.py ¶
r25157 r25158 43 43 #mean rotational velocity of earth 44 44 self.angularvelocity = 7.2921e-5 # [s^-1] 45 46 return self47 45 #}}} 48 46 -
TabularUnified issm/trunk-jpl/src/m/classes/sealevelmodel.py ¶
r25125 r25158 43 43 44 44 # Create a default object 45 self = self.setdefaultparameters()45 self.setdefaultparameters() 46 46 47 47 if len(args): -
TabularUnified issm/trunk-jpl/src/m/classes/solidearth.py ¶
r25157 r25158 24 24 self.settings = solidearthsettings() 25 25 self.surfaceload = surfaceload() 26 self.love numbers= lovenumbers()26 self.love = lovenumbers() 27 27 self.rotational = rotational() 28 28 self.planetradius = planetradius('earth') … … 53 53 54 54 def setdefaultparameters(self): # {{{ 55 return self55 return 56 56 #}}} 57 57 -
TabularUnified issm/trunk-jpl/src/m/classes/solidearthsettings.py ¶
r25157 r25158 61 61 #horizontal displacemnet? (not by default) 62 62 self.horiz = 0 63 64 return self65 63 #}}} 66 64 67 65 def checkconsistency(self, md, solution, analyses): # {{{ 68 if ('SealevelriseAnalysis' not in analyses) or (solution == 'TransientSolution' and md.transient.iss olidearthsettings== 0):66 if ('SealevelriseAnalysis' not in analyses) or (solution == 'TransientSolution' and md.transient.isslr == 0): 69 67 return md 70 68 -
TabularUnified issm/trunk-jpl/src/m/classes/surfaceload.py ¶
r25157 r25158 37 37 38 38 def setdefaultparameters(self): # {{{ 39 return self39 return 40 40 #}}} 41 41 -
TabularUnified issm/trunk-jpl/src/m/solve/marshall.py ¶
r25137 r25158 3 3 4 4 def marshall(md): 5 """5 ''' 6 6 MARSHALL - outputs a compatible binary file from @model md, for certain solution type. 7 7 … … 11 11 Usage: 12 12 marshall(md) 13 """13 ''' 14 14 if md.verbose.solution: 15 15 print(("marshalling file '%s.bin'." % md.miscellaneous.name)) -
TabularUnified issm/trunk-jpl/test/NightlyRun/test2002.py ¶
r25131 r25158 4 4 from gmshplanet import * 5 5 from gmtmask import * 6 from love _numbers import *6 from lovenumbers import * 7 7 from materials import * 8 8 from model import * … … 14 14 #mesh earth: 15 15 md = model() 16 md.mesh = gmshplanet('radius', 6.371012 * 10**3, 'resolution', 700.)#500 km resolution mesh16 md.mesh = gmshplanet('radius', 6.371012e3, 'resolution', 700.) #500 km resolution mesh 17 17 18 18 #parameterize solidearth solution: 19 19 #solidearth loading: 20 md.solidearth.deltathickness = np.zeros((md.mesh.numberofelements)) 21 md.solidearth.sealevel = np.zeros((md.mesh.numberofvertices)) 22 md.dsl.global_average_thermosteric_sea_level_change=np.zeros((2, )) 23 md.dsl.sea_surface_height_change_above_geoid=np.zeros((md.mesh.numberofvertices+1, )) 24 md.dsl.sea_water_pressure_change_at_sea_floor=np.zeros((md.mesh.numberofvertices+1, )) 25 20 md.solidearth.surfaceload.icethicknesschange = np.zeros(md.mesh.numberofelements) 21 md.solidearth.sealevel = np.zeros(md.mesh.numberofvertices) 22 md.dsl.global_average_thermosteric_sea_level_change = np.zeros((1, 1)) 23 md.dsl.sea_surface_height_change_above_geoid = np.zeros(md.mesh.numberofvertices + 1) 24 md.dsl.sea_water_pressure_change_at_sea_floor = np.zeros(md.mesh.numberofvertices + 1) 26 25 27 26 #antarctica 28 27 late = np.sum(md.mesh.lat[md.mesh.elements - 1], axis=1) / 3 29 28 longe = np.sum(md.mesh.long[md.mesh.elements - 1], axis=1) / 3 30 pos = np.where(late < -80) 31 md.solidearth.deltathickness[pos] = -100 29 pos = np.where(late < -80)[0] 30 md.solidearth.surfaceload.icethicknesschange[pos] = -100 31 32 32 #greenland 33 pos = np.where(np.logical_and.reduce((late > 70, late < 80, longe > -60, longe < -30))) 34 md.solidearth. deltathickness[pos] = -10033 pos = np.where(np.logical_and.reduce((late > 70, late < 80, longe > -60, longe < -30)))[0] 34 md.solidearth.surfaceload.icethicknesschange[pos] = -100 35 35 36 36 #elastic loading from love numbers: 37 nlov = 101 38 md.solidearth.love_h = love_numbers('h')[:nlov] 39 md.solidearth.love_k = love_numbers('k')[:nlov] 40 md.solidearth.love_l = love_numbers('l')[:nlov] 37 md.solidearth.lovenumbers = lovenumbers('maxdeg', 100) 38 print(md.solidearth.lovenumbers.h) 41 39 42 40 #mask: … … 55 53 56 54 #make sure that the elements that have loads are fully grounded: 57 pos = np.nonzero(md.solidearth. deltathickness)[0]55 pos = np.nonzero(md.solidearth.surfaceload.icethicknesschange)[0] 58 56 md.mask.ocean_levelset[md.mesh.elements[pos, :] - 1] = 1 59 57 60 58 #make sure wherever there is an ice load, that the mask is set to ice: 61 icemask[md.mesh.elements[pos, :] - 1] = -1 62 md.mask.ice_levelset = icemask59 #pos = np.nonzero(md.solidearth.surfaceload.icethicknesschange)[0] # Do we need to do this twice? 60 md.mask.ice_levelset[md.mesh.elements[pos, :] - 1] = 1 63 61 64 md.solidearth. ocean_area_scaling = 062 md.solidearth.settings.ocean_area_scaling = 0 65 63 66 64 #geometry for the bed, arbitrary 67 md.geometry.thickness = np.ones((md.mesh.numberofvertices)) 68 md.geometry.surface = np.zeros((md.mesh.numberofvertices)) 69 md.geometry.base = md.geometry.surface - md.geometry.thickness 70 md.geometry.bed = md.geometry.base 65 md.geometry.bed = -np.ones(md.mesh.numberofvertices) 71 66 72 67 #materials 73 68 md.materials=materials('hydro') 74 75 #New stuff76 md.solidearth.spcthickness = np.nan * np.ones((md.mesh.numberofvertices, ))77 md.solidearth.Ngia = np.zeros((md.mesh.numberofvertices, ))78 md.solidearth.Ugia = np.zeros((md.mesh.numberofvertices, ))79 md.solidearth.hydro_rate = np.zeros((md.mesh.numberofvertices, ))80 69 81 70 #Miscellaneous … … 83 72 84 73 #Solution parameters 85 md.solidearth. reltol = np.nan86 md.solidearth. abstol = 1e-387 md.solidearth. geodetic= 174 md.solidearth.settings.reltol = np.nan 75 md.solidearth.settings.abstol = 1e-3 76 md.solidearth.settings.computesealevelchange = 1 88 77 89 78 #max number of iteration reverted back to 10 (i.e., the original default value) 90 md.solidearth. maxiter = 1079 md.solidearth.settings.maxiter = 10 91 80 92 81 #eustatic run: 93 md.solidearth. rigid = 094 md.solidearth. elastic = 095 md.solidearth. rotation = 082 md.solidearth.settings.rigid = 0 83 md.solidearth.settings.elastic = 0 84 md.solidearth.settings.rotation = 0 96 85 md = solve(md, 'Sealevelrise') 97 86 Seustatic = md.results.SealevelriseSolution.Sealevel 98 87 99 88 #eustatic + rigid run: 100 md.solidearth. rigid = 1101 md.solidearth. elastic = 0102 md.solidearth. rotation = 089 md.solidearth.settings.rigid = 1 90 md.solidearth.settings.elastic = 0 91 md.solidearth.settings.rotation = 0 103 92 md = solve(md, 'Sealevelrise') 104 93 Srigid = md.results.SealevelriseSolution.Sealevel 105 94 106 95 #eustatic + rigid + elastic run: 107 md.solidearth. rigid = 1108 md.solidearth. elastic = 1109 md.solidearth. rotation = 096 md.solidearth.settings.rigid = 1 97 md.solidearth.settings.elastic = 1 98 md.solidearth.settings.rotation = 0 110 99 md = solve(md, 'Sealevelrise') 111 100 Selastic = md.results.SealevelriseSolution.Sealevel 112 101 113 102 #eustatic + rigid + elastic + rotation run: 114 md.solidearth. rigid = 1115 md.solidearth. elastic = 1116 md.solidearth. rotation = 1103 md.solidearth.settings.rigid = 1 104 md.solidearth.settings.elastic = 1 105 md.solidearth.settings.rotation = 1 117 106 md = solve(md, 'Sealevelrise') 118 107 Srotation = md.results.SealevelriseSolution.Sealevel -
TabularUnified issm/trunk-jpl/test/NightlyRun/test2003.py ¶
r25125 r25158 1 1 #Test Name: EarthSolidearth_rotationalFeedback 2 2 import numpy as np 3 4 from socket import gethostname 5 6 from gmshplanet import * 7 from gmtmask import * 8 from lovenumbers import * 3 9 from model import * 4 from socket import gethostname10 from paterson import * 5 11 from solve import * 6 from gmshplanet import * 7 from love_numbers import * 8 from paterson import * 9 from gmtmask import * 12 10 13 11 14 #mesh earth: … … 21 24 md.dsl.sea_water_pressure_change_at_sea_floor=np.zeros((md.mesh.numberofvertices+1, )) 22 25 23 24 26 #antarctica 25 27 #Access every element in lat using the indices in elements … … 31 33 32 34 #elastic loading from love numbers: 33 nlov = 1000 34 md.solidearth.love_h = np.array(love_numbers('h')) 35 md.solidearth.love_h = np.resize(md.solidearth.love_h, nlov + 1) 36 md.solidearth.love_k = np.array(love_numbers('k')) 37 md.solidearth.love_k = np.resize(md.solidearth.love_k, nlov + 1) 38 md.solidearth.love_l = np.array(love_numbers('l')) 39 md.solidearth.love_l = np.resize(md.solidearth.love_l, nlov + 1) 35 md.solidearth.lovenumbers = lovenumbers('maxdeg', 1000) 40 36 #}}} 41 37 -
TabularUnified issm/trunk-jpl/test/NightlyRun/test2010.py ¶
r25125 r25158 1 1 #Test Name: MomentOfIntertia 2 from socket import gethostname 3 2 4 import numpy as np 5 6 from gmshplanet import * 7 from gmtmask import * 8 from lovenumbers import * 3 9 from model import * 4 from socket import gethostname10 from paterson import * 5 11 from solve import * 6 from gmshplanet import * 7 from love_numbers import * 8 from paterson import * 9 from gmtmask import * 12 10 13 11 14 #mesh earth: … … 32 35 33 36 #elastic loading from love numbers: 34 nlov = 1000 35 md.solidearth.love_h = np.array(love_numbers('h')) 36 md.solidearth.love_h = np.resize(md.solidearth.love_h, nlov + 1) 37 md.solidearth.love_k = np.array(love_numbers('k')) 38 md.solidearth.love_k = np.resize(md.solidearth.love_k, nlov + 1) 39 md.solidearth.love_l = np.array(love_numbers('l')) 40 md.solidearth.love_l = np.resize(md.solidearth.love_l, nlov + 1) 37 md.solidearth.lovenumbers = lovenumbers('maxdeg', 1000) 41 38 42 39 #}}} -
TabularUnified issm/trunk-jpl/test/NightlyRun/test2101.py ¶
r24912 r25158 1 1 #Test Name: EarthEsa 2 2 #Elastostatic adjustment for an elemental ice unloading 3 from socket import gethostname 3 4 4 5 import numpy as np 6 7 from gmshplanet import * 8 from gmtmask import * 9 from lovenumbers import * 5 10 from model import * 6 from socket import gethostname11 from paterson import * 7 12 from solve import * 8 from gmshplanet import * 9 from love_numbers import * 10 from paterson import * 11 from gmtmask import * 13 12 14 13 15 #mesh earth: … … 21 23 22 24 #love numbers: 23 nlov = 10000 24 md.esa.love_h = np.array(love_numbers('h')) #Originally had CM arg 25 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1) 26 md.esa.love_l = np.array(love_numbers('l')) #Originally had CM arg 27 md.esa.love_l = np.resize(md.esa.love_l, nlov + 1) 25 md.solidearth.lovenumbers = lovenumbers('maxdeg', 10000) 28 26 29 27 #mask: {{{ -
TabularUnified issm/trunk-jpl/test/NightlyRun/test2110.py ¶
r24862 r25158 1 1 #Test Name: Esa2Dsurface 2 2 #Elastostatic adjustment for an elemental ice unloading 3 from socket import gethostname 3 4 4 5 import numpy as np 6 7 from lovenumbers import * 5 8 from model import * 6 from socket import gethostname 9 from paterson import * 10 from roundmesh import * 7 11 from solve import * 8 from roundmesh import * 9 from love_numbers import * 10 from paterson import * 12 11 13 12 14 #mesh earth: … … 24 26 25 27 #love numbers: 26 nlov = 10000 # horizontal displacements do not work for low degree truncation, e.g., 101 27 md.esa.love_h = np.array(love_numbers('h')) 28 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1) 29 md.esa.love_l = np.array(love_numbers('l')) 30 md.esa.love_l = np.resize(md.esa.love_l, nlov + 1) 28 md.solidearth.lovenumbers = lovenumbers('maxdeg', 10000) 31 29 32 30 #mask: {{{ -
TabularUnified issm/trunk-jpl/test/NightlyRun/test2111.py ¶
r24862 r25158 1 1 #Test Name: Esa2Dsurface 2 2 #AIS - - southern hemisphere example for north - south, east - west components of horiz motion 3 from socket import gethostname 3 4 4 5 import numpy as np 6 7 from lovenumbers import * 5 8 from model import * 6 from socket import gethostname 9 from paterson import * 10 from roundmesh import * 7 11 from solve import * 8 from roundmesh import * 9 from love_numbers import * 10 from paterson import * 12 11 13 12 14 #mesh ais: {{{ … … 24 26 # }}} 25 27 #love numbers: {{{ 26 nlov = 10000 # horizontal displacements do not work for low degree truncation, e.g., 101 27 md.esa.love_h = np.array(love_numbers('h', 'CF')) 28 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1) 29 md.esa.love_l = np.array(love_numbers('l', 'CF')) 30 md.esa.love_l = np.resize(md.esa.love_l, nlov + 1) 28 md.solidearth.lovenumbers = lovenumbers('maxdeg', 10000, 'referenceframe', 'CF') 31 29 # }}} 32 30 #mask: {{{ -
TabularUnified issm/trunk-jpl/test/NightlyRun/test2112.py ¶
r24862 r25158 1 1 #Test Name: Esa2Dsurface 2 2 #AIS 2 - - load centered at the south pole! 3 from socket import gethostname 4 3 5 import numpy as np 6 7 from lovenumbers import * 4 8 from model import * 5 from socket import gethostname 9 from paterson import * 10 from roundmesh import * 6 11 from solve import * 7 from roundmesh import * 8 from love_numbers import * 9 from paterson import * 12 10 13 11 14 #mesh ais: {{{ … … 23 26 # }}} 24 27 #love numbers: {{{ 25 nlov = 10000 # horizontal displacements do not work for low degree truncation, e.g., 101 26 md.esa.love_h = np.array(love_numbers('h', 'CF')) 27 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1) 28 md.esa.love_l = np.array(love_numbers('l', 'CF')) 29 md.esa.love_l = np.resize(md.esa.love_l, nlov + 1) 28 md.solidearth.lovenumbers = lovenumbers('maxdeg', 10000, 'referenceframe', 'CF') 30 29 # }}} 31 30 #mask: {{{ -
TabularUnified issm/trunk-jpl/test/NightlyRun/test2113.py ¶
r24862 r25158 2 2 #Northern hemisphere example for north - south, east - west components of horiz motion 3 3 #Same as test2111.m except that AIS is assumed to have located in Northern Hemisphere 4 from socket import gethostname 4 5 5 6 import numpy as np 7 8 from lovenumbers import * 6 9 from model import * 7 from socket import gethostname 10 from paterson import * 11 from roundmesh import * 8 12 from solve import * 9 from roundmesh import * 10 from love_numbers import * 11 from paterson import * 13 12 14 13 15 #mesh ais: {{{ … … 25 27 # }}} 26 28 #love numbers: {{{ 27 nlov = 10000 # horizontal displacements do not work for low degree truncation, e.g., 101 28 md.esa.love_h = np.array(love_numbers('h', 'CF')) 29 md.esa.love_h = np.resize(md.esa.love_h, nlov + 1) 30 md.esa.love_l = np.array(love_numbers('l', 'CF')) 31 md.esa.love_l = np.resize(md.esa.love_l, nlov + 1) 29 md.solidearth.lovenumbers = lovenumbers('maxdeg', 10000, 'referenceframe', 'CF') 32 30 # }}} 33 31 #mask: {{{
Note:
See TracChangeset
for help on using the changeset viewer.