Subduction in Central America

Another episode of the GMT 3D adventures. A figure with a 3D view of the subduction in Central America.

Sorry, this time I couldn’t do it with a one-liner.

# Get the depth of these three cities
Gm, Gt, SJ = grdtrack("cam_slab2_dep_02.24.18.grd", [260.862 19.4326; 269.492 14.64; 275.925 9.908], f=:g).data[:,3]

# Create cylinder markers
FV_Mx = cylinder(0.2, 140, np=18, center=(260.862, 19.4326, Gm));
FV_Gt = cylinder(0.2, -Gt, np=18, center=(269.492, 14.64, Gt));
FV_SJ = cylinder(0.2, -SJ, np=18, center=(275.925, 9.908, SJ));

# Convert the subduction slab grids into a triangular mesh
D = grid2tri("cam_slab2_dep_02.24.18.grd", "cam_slab2_thk_02.24.18.grd", geog=true);

plot3(D, p=(70,30), zlabel="Depth (km)", title="Subduction in Central America", frame=:autoXYZg)
colorbar!(pos=(justify=:TR, horizontal=true, offset=(1,-2)),)

# Plot the coastlines drapped on the subducting slab
plot3!(coast(region=D, dump=true, Z="cam_slab2_dep_02.24.18.grd"), f=:g)

plot3!(FV_Mx);	plot3!(FV_SJ);	plot3!(FV_Gt)
text!(mat2ds([260.862 19.4326 10; 275.925 9.908 10; 269.492 14.64 10],
             ["Mexico City", "San José", "Guatemala"]),
             f=:g, font=14, angle=110, noclip=true, outline=true, show=1)

4 Likes