I am using the -Sj option in gmt plot to plot interseismic coupling.But somewhere I am confused regarding this option.I dont know what mistake I am doing but I am not getting the results the way I want.
I dont know why the output is coming like this. I have 1034 values in the table for each fault patch but I think its not taking all the values.
Please help!!
Hi Joaquim,
Even after using -R option , I am getting the same figure.
Somewhat I am trying to get this type of plot (though its generated in matlab) in GMT . I have the centroid long lat value of each element and its corresponding coupling value.
But am not able plot it using -Sj option.How to do it then?
@AdiMoh08 Your “trialcoupling.txt” file only has three columns, which I assume are the latitude and longitude of the center of your fault patch and the coupling value. I would suggest trying the -Sc plotting option first to plot circles at each point to make sure it is reading the file correctly. I think your plotting line is missing the command “awk” at the beginning of the line.
Don’t need this (that intends to swap the first two columns). Just use -:
But the result is what you got (except that the limits should be others). Sorry, but that’s what you have in the file.
Hi
awk i have used in my script. Sorry, i missed it while copying .yes those are the lat lon values of center of each fault patch and 3rd one is the coupling. I guess there is some error in my input file which I am not even able to pick.Could you suggest me how would I plot these fault patches and the variation of coupling values along them?
And I am confused in the -Sj option regarding what it exactly does??
Yes, I guess I am missing something in my input option but at the same time I am searching that how do i represent these fault patches showing coupling values in GMT , as shown in the above figure which I have attached just now.
yup, somewhere the input file is missing few more columns i guess which even i am trying to figure out.Not sure if i need the four coordinates of the edges of each patch to plot the coupling value or only centroid lat lon will do.
# Set the map region and projection
gmt basemap -R72/85/25/35 -JM10i -Ba2f2
# Add coastlines for reference
gmt coast -R72/85/25/35 -JM10i -W1/0.5p -N1/0.8p -Df
# Create a color palette for the coupling values
gmt makecpt -Crainbow -T0/1 -Ic > coupling.cpt
# Plot the coupling values at the respective lat/lon positions
If you want to get a plot of the exact rectangles of your model fault colored by the coupling value, you will need to make a file that contains the corners of each patch. As you found, the “-Sj” option plots rectangles at the locations of the centroids. You might be able get those rectangles to approximately connect, but it won’t be a continuous image.
I make plots like this by generating a GMT polygon output file with the slip or coupling on each patch specified with “-Z” lines. This is a part of my slip file:
How do you do that? I do it as well on Mirone (Matlab) for the .fsp and subfault formats but the code is not exactly simple. I wouldn’t mind adding this to GMT.jl
I use the Classic Slip Inversion (CSI) package. It is on GitHub at:
I am afraid it is all in Python, not Julia.
The CSI package has long had a function to write out the patches with their slip values in the GMT polygon format. It includes long, lat, depth or UTM coordinates, depending on a flag. This allows perspective views in GMT.
I tried the same earlier but I dont know why I am not getting the image you got.I am using basic maths to calculate the edges from the centroid of a rectangle but still not getting results like this.
}’ patch_uk.txt > patch1.txt
gmt plot patch1.txt -R72/85/25/35 -JM6i -Ccombined.cpt -L -W0.01c gmt colorbar -Dx6i/0.3i+w5i/0.25i+h -Ccombined.cpt -Bxa0.2f0.1+l"Coupling"
gmt end show
Do you calculate the edges of these patches like this?
I am curious because somewhere I am close but may be making some mistakes.
Hi Joaquim,
I’m currently using MATLAB code to calculate the slip and coupling of subfaults. However, I’m facing an issue with merging neighboring regions that have different convergence rates. The code I’m using can only estimate slip and coupling for one region at a time. If the same fault has different convergence rates, I need to estimate them separately and then attempt to merge them. Since I’m unable to write a code that can merge all the individual blocks with different convergence rates together, I’m looking for a solution from GMT.
Could you suggest me any solution that I can try in matlab?