Changeset 27167 for issm/trunk-jpl/test/NightlyRun/test2004.py
- Timestamp:
- 08/01/22 06:36:56 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/NightlyRun/test2004.py
r26840 r27167 2 2 # 3 3 # TODO: 4 # - Save boundaries by name to some data structure with tag so that they can be 5 # copied to basins that use identical shapefiles and projections (will need 6 # to check if the cost of the additional structure, checks, and copying are 4 # - Save boundaries by name to some data structure with tag so that they can be 5 # copied to basins that use identical shapefiles and projections (will need 6 # to check if the cost of the additional structure, checks, and copying are 7 7 # greater than the cost of projecting). 8 8 # … … 41 41 #HemisphereWest #{{{ 42 42 sl.addbasin( 43 basin('continent', 'hemispherewest', 'name', 'hemispherewest', 'proj', laea(0, -90), 'boundaries', [ # Peru projection 358743 basin('continent', 'hemispherewest', 'name', 'hemispherewest', 'proj', laea(0, -90), 'boundaries', [ # Peru projection 3587 44 44 boundary('shppath', shppath, 'shpfilename', 'HemisphereSplit', 'proj', proj4326, 'orientation', 'reverse'), 45 45 boundary('shppath', shppath, 'shpfilename', 'NorthAntarctica', 'proj', proj3031), … … 49 49 boundary('shppath', shppath, 'shpfilename', 'RonneWestSummit', 'proj', proj3031), 50 50 boundary('shppath', shppath, 'shpfilename', 'WestAntarctica2', 'proj', proj3031, 'orientation', 'reverse'), 51 boundary('shppath', shppath, 'shpfilename', 'SouthAntarctica', 'proj', proj3031) 52 ] 51 boundary('shppath', shppath, 'shpfilename', 'SouthAntarctica', 'proj', proj3031)] 53 52 ) 54 53 ) … … 59 58 boundary('shppath', shppath, 'shpfilename', 'SouthAntarctica', 'proj', proj3031), 60 59 boundary('shppath', shppath, 'shpfilename', 'RossIceShelf', 'proj', proj3031), 61 boundary('shppath', shppath, 'shpfilename', 'RossWestFront','proj', proj3031), 62 boundary('shppath', shppath, 'shpfilename', 'RossFront', 'proj', proj3031, 'orientation', 'reverse') 63 ] 60 boundary('shppath', shppath, 'shpfilename', 'RossWestFront', 'proj', proj3031), 61 boundary('shppath', shppath, 'shpfilename', 'RossFront', 'proj', proj3031, 'orientation', 'reverse')] 64 62 ) 65 63 ) … … 67 65 #HemisphereEast: {{{ 68 66 sl.addbasin( 69 basin('continent', 'hemisphereeast', 'name', 'hemisphereeast', 'proj', laea(0, +90), 'boundaries', [ #Australian projection lat, long67 basin('continent', 'hemisphereeast', 'name', 'hemisphereeast', 'proj', laea(0, +90), 'boundaries', [ #Australian projection lat, long 70 68 boundary('shppath', shppath, 'shpfilename', 'HemisphereSplit', 'proj', proj4326), 71 69 boundary('shppath', shppath, 'shpfilename', 'SouthAntarctica', 'proj', proj3031), 72 boundary('shppath', shppath, 'shpfilename', 'RossFront', 'proj', proj3031),70 boundary('shppath', shppath, 'shpfilename', 'RossFront', 'proj', proj3031), 73 71 boundary('shppath', shppath, 'shpfilename', 'RossWestFront', 'proj', proj3031), 74 boundary('shppath', shppath, 'shpfilename', 'EastAntarctica2', 'proj', proj3031,'orientation', 'reverse'), 75 boundary('shppath', shppath, 'shpfilename', 'NorthAntarctica', 'proj', proj3031) 76 ] 72 boundary('shppath', shppath, 'shpfilename', 'EastAntarctica2', 'proj', proj3031, 'orientation', 'reverse'), 73 boundary('shppath', shppath, 'shpfilename', 'NorthAntarctica', 'proj', proj3031)] 77 74 ) 78 75 ) … … 90 87 boundary('shppath', shppath, 'shpfilename', 'RonneIceShelf', 'proj', proj3031), 91 88 boundary('shppath', shppath, 'shpfilename', 'RonneEastSummit', 'proj', proj3031), 92 boundary('shppath', shppath, 'shpfilename', 'RonneBrunt', 'proj', proj3031) 93 ] 89 boundary('shppath', shppath, 'shpfilename', 'RonneBrunt', 'proj', proj3031)] 94 90 ) 95 91 ) … … 101 97 boundary('shppath', shppath, 'shpfilename', 'RonneIceShelf', 'proj', proj3031), 102 98 boundary('shppath', shppath, 'shpfilename', 'RonneEastSummit', 'proj', proj3031), 103 boundary('shppath', shppath, 'shpfilename', 'RonneFront', 'proj', proj3031, 'orientation', 'reverse') 104 ] 99 boundary('shppath', shppath, 'shpfilename', 'RonneFront', 'proj', proj3031, 'orientation', 'reverse')] 105 100 ) 106 101 ) … … 114 109 hmin = hmin * 1000 115 110 hmax = hmax * 1000 116 tolerance = 100 # tolerance of 100m on Earth position when merging 3d meshes111 tolerance = 100 # tolerance of 100m on Earth position when merging 3d meshes 117 112 threshold = 5 118 defaultoptions = [ 119 'KeepVertices', 0, 120 'MaxCornerAngle', 0.0000000001, 121 'NoBoundaryRefinement', 1 122 ] 113 defaultoptions = ['KeepVertices', 0, 114 'MaxCornerAngle', 0.0000000001, 115 'NoBoundaryRefinement', 1] 123 116 alreadyloaded = 0 124 117 #}}} … … 134 127 135 128 # Mesh 136 md = bamg(model(), 'domain', domain, 'subdomains', coastline, 'hmin', hmin, 'hmax', hmax, *defaultoptions) # NOTE: Unpacking defaultoptions with '*'129 md = bamg(model(), 'domain', domain, 'subdomains', coastline, 'hmin', hmin, 'hmax', hmax, *defaultoptions) # NOTE: Unpacking defaultoptions with '*' 137 130 138 131 # Miscellaneous … … 254 247 landelsconocean = landels[np.nonzero(sumconnectedisonocean)[0]] 255 248 256 ind1 = np.hstack(( 257 md.mesh.elements[landelsconocean, 0], 258 md.mesh.elements[landelsconocean, 1], 259 md.mesh.elements[landelsconocean, 2] 260 )) 261 ind2 = np.hstack(( 262 md.mesh.elements[landelsconocean, 1], 263 md.mesh.elements[landelsconocean, 2], 264 md.mesh.elements[landelsconocean, 0] 265 )) 249 ind1 = np.hstack((md.mesh.elements[landelsconocean, 0], 250 md.mesh.elements[landelsconocean, 1], 251 md.mesh.elements[landelsconocean, 2])) 252 ind2 = np.hstack((md.mesh.elements[landelsconocean, 1], 253 md.mesh.elements[landelsconocean, 2], 254 md.mesh.elements[landelsconocean, 0])) 266 255 267 256 # Edge ind1 and ind2 … … 325 314 delHGLA = InterpFromMeshToMesh2d(index, longGLA, latGLA, delHGLA, longe, late) 326 315 327 # NOTE: For some reason, cannot apply pos to multiple arrays in a 328 # singlelike we might do in MATLAB. Instead, we iterate over 316 # NOTE: For some reason, cannot apply pos to multiple arrays in a 317 # singlelike we might do in MATLAB. Instead, we iterate over 329 318 # elements of pos. 330 319 # … … 461 450 md.solidearth.settings.rotation = 0 462 451 md.solidearth.settings.viscous = 0 463 md.solidearth.requested_outputs = [ 464 'default', 465 'DeltaIceThickness', 466 'Sealevel', 467 'Bed', 468 'SealevelBarystaticIceMask', 469 'SealevelBarystaticOceanMask', 470 ] 452 md.solidearth.requested_outputs = ['default', 453 'DeltaIceThickness', 454 'Sealevel', 455 'Bed', 456 'SealevelBarystaticIceMask', 457 'SealevelBarystaticOceanMask'] 471 458 md = solve(md, 'Transient') 472 459 Seustatic = md.results.TransientSolution.Sealevel
Note:
See TracChangeset
for help on using the changeset viewer.