-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
from mapio.geodict import GeoDict
from mapio.shake import ShakeGrid
import matplotlib.pyplot as plt
shakefile = 'grid.xml' # Use 1906 San Francisco shakemap here
gdict = GeoDict({'xmin': -122.88698976549115,
'xmax': -122.2389795319979,
'ymin': 37.49798642716523,
'ymax': 38.065041960700796,
'dx': 9.315845794900122e-05,
'dy': 9.315845794900046e-05,
'ny': 6088,
'nx': 6957})
##% Load in ShakeMap
shakemap = ShakeGrid.load(shakefile, adjust='res')
##% Then subdivide to match smaller geodict
PGA = shakemap.getLayer('pga').subdivide(gdict).getData().astype(float)
'''
This leaves edges with values much lower than they should be (but not nodata)
causing problems on the edges in later calculations for ground failure
'''
plt.imshow(PGA)
plt.show()

Metadata
Metadata
Assignees
Labels
No labels