Re: Plotting a 3D surface of patches from x,y,z,s data

Peter Schmidt <[email protected]>
Newsgroups gmane.comp.gis.gmt.user
Message-ID <[email protected]>
Hi Neta

Note that this solution applies to GMT4, other (easier? solutions may be 
available in GMT5)

There is no gmt solution that directly will plot the figure you want 
based on the output format you supplied. The gmt utility psxyz will 
manage to plot the figure but you will need to re-format the data using 
some scripting.

The way I would go about it is to write a script that generates a 
polygon of each patch and then plot these, basically the ouput from this 
script (to feed psxyz with) would look something like:

 > -Zslp_m
lon_deg lat_deg+dlat depth_km-dz
lon_deg lat_deg-dlat depth_km-dz
lon_deg lat_deg-dlat depth_km+dz
lon_deg lat_deg+dlat depth_km+dz
lon_deg lat_deg+dlat depth_km-dz
 > ...
...

where dlat is simple half the distance between the center of two patches 
and dz is half the vertical dimension of the patches.


regP


On 03/26/2014 02:02 PM, Neta Gins wrote:
> Hello,
>
> I am running an inversion code of geodetic data that calculates the 
> slip distribution on a fault plane.
>
> Below is the output of the code for a vertical fault striking north of 
> size 20km x 20km that starts at the surface of the earth and runs down 
> to depth of 20km.
> The fault plane is divided into 16 patches of size 5km x 5km each. 
> Each line in the output file represents the parameters at a node 
> placed in the center of a patch (as marked in black circles in the 
> schematic illustration below).
>
> lat_deg lon_deg depth_km x_local_km y_local_km length_km width_km slp_m
> 32.6239 35.1494 2.5000 2.5000 2.5000 5.0000 5.0000 0.0007
> 32.6239 35.1494 7.5000 2.5000 7.5000 5.0000 5.0000 0.0009
> 32.6239 35.1494 12.5000 2.5000 12.5000 5.0000 5.0000 0.0010
> 32.6239 35.1494 17.5000 2.5000 17.5000 5.0000 5.0000 0.0009
> 32.6689 35.1494 2.5000 7.5000 2.5000 5.0000 5.0000 0.0009
> 32.6689 35.1494 7.5000 7.5000 7.5000 5.0000 5.0000 0.0009
> 32.6689 35.1494 12.5000 7.5000 12.5000 5.0000 5.0000 0.0009
> 32.6689 35.1494 17.5000 7.5000 17.5000 5.0000 5.0000 0.0007
> 32.7139 35.1494 2.5000 12.5000 2.5000 5.0000 5.0000 0.0008
> 32.7139 35.1494 7.5000 12.5000 7.5000 5.0000 5.0000 0.0004
> 32.7139 35.1494 12.5000 12.5000 12.5000 5.0000 5.0000 0.0004
> 32.7139 35.1494 17.5000 12.5000 17.5000 5.0000 5.0000 0.0004
> 32.7588 35.1494 2.500017.5000 2.5000 5.0000 5.0000 0.0010
> 32.7588 35.1494 7.5000 17.5000 7.5000 5.0000 5.0000 0.0006
> 32.7588 35.1494 12.5000 17.5000 12.5000 5.0000 5.0000 0.0004
> 32.7588 35.1494 17.5000 17.5000 17.5000 5.0000 5.0000 0.0004
>
> I would like to plot the fault plane in 3D having each patch colored 
> according to the amount of slip (last column). I am trying to plot 
> something that looks like this:
>
> Inline image 6
>
> Any suggestions?
>
> Thank you,
>
> Neta
>
>
>
>
>
> To unsubscribe, send the message "signoff gmt-help" to 
> [email protected] 

-- 
********************************************************************************
Peter Schmidt                                      Tel: +46-18-4717104
Swedish National Seismological Network (SNSN)   Mobile: +46-73-3190975
Dept. of Earth Sciences:geophysics              e-mail: [email protected]
Uppsala University
Villavagen 16
SE-75236 Uppsala
********************************************************************************


To unsubscribe, send the message "signoff gmt-help" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.