Skip to content

Commit a0f3dea

Browse files
authored
Merge pull request #285 from ucgmsim/plot_cascadia
Plot cascadia
2 parents 13130de + 031bd3f commit a0f3dea

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

qcore/gmt.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def get_region(lon, lat):
130130
Returns closest region.
131131
"""
132132
rcode = np.loadtxt(
133-
resource_filename("qcore", "data/regions.ll"), usecols=0, dtype="U2"
133+
resource_filename("qcore", "data/regions.ll"), usecols=0, dtype="U"
134134
)
135135
rloc = np.loadtxt(resource_filename("qcore", "data/regions.ll"), usecols=(1, 2))
136136
return rcode[geo.closest_location(rloc, lon, lat)[0]]
@@ -216,6 +216,13 @@ def regional_resource(region, resource="topo", mod=None):
216216
# region to use when plotting the whole of NZ
217217
nz_region = (166, 179, -47.5, -34)
218218
kr_region = (125.76, 129.74, 33.05, 39)
219+
cascadia_region = (-130, -120, 38, 52)
220+
region_dict = {
221+
"NZ": nz_region,
222+
"KR": kr_region,
223+
"CASCADIA": cascadia_region,
224+
}
225+
219226
###
220227
### ACCESSORY FUNCTIONS
221228
###

qcore/srf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def get_hypo(srf, lonlat=True, depth=False, join_minor=False):
460460
"""
461461
Return hypocentre.
462462
srf: srf source file path
463-
lonlat: in tearms of longitude and latitude (True), raw km offsets (False)
463+
lonlat: in terms of longitude and latitude (True), raw km offsets (False)
464464
depth: return longitude, latitude and depth. False to only return 2 values
465465
"""
466466
# complexity increased by:

0 commit comments

Comments
 (0)