-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
psmeca plotting full moment tensors #661
Comments
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. We appreciate that you took the time to contribute! Please make sure you read our Contributing Guide and abide by our Code of Conduct. |
The difference between the old utilmeca.c and our current one is quite large. I'll give a try. |
Thanks, hopefully not breaking existing test scripts. |
Hi @seisman, any luck testing Carl's revised code? Would be nice to get into GMT 6 beta. We are aiming for June 15. |
I'll try it again this weekend. |
@seisman I am trying to test the 3-line script (at the top of this issue) in GMT 6.0.0. I am getting some errors and was wondering if you could send me (or post here) your version of the test script, so that I can try. Thanks. |
@carltape I modified your script to GMT5 syntax, and included it in GMT's test directory. The test script is available from https://github.com/GenericMappingTools/gmt/blob/6.0/test/seis/full_moment_tensor.sh. |
@seisman Thank you! That was enough for me to update my own script here Huge thanks for tackling this issue -- everyone who plots full moment tensors will benefit. There are likely some lingering issues with psmeca, but this was the biggest one. Rather than open a new issue, can I ask why psmeca requires entries in the 11 and 12 columns? Is that true for all input files for psmeca? I did not see this in the 6.0.0 documentation here. We're not using the -C option, so I don't see why those columns are needed. They were not needed in 5.4.4. (You can see in my script that I created an awk command, but it'd be a pain to do this for all existing psmeca input files.) |
Yes, I agree those columns should be optional. I remember that I tried to fix the issue but realized that the current GMT I/O mechanism is too complicated to understand and I had no clue how to fix it. I've opened a new issue in #2016. Feel free to comment there. |
At the start of this issue, I listed input files for six moment tensors, along with a test script. The target, correct output figure is here. The figure produced by GMT 6.0.0 is here. 5/6 input files seem to plot correctly. The problem is associated with the lambda2=0 moment tensors, shown in the sixth set of moment tensors. These produce the errors like The input moment tensors are extremely simple, as they only have two non-zero entries. I documented the testing in this README. Somehow the capabilities in the Dreger-modified utilmeca.c are not being reproduced in GMT 6.0.0. Please let me know if you have questions. Thanks for your help. |
@carltape Thanks for your extensive tests. I'll look into your test script. As I understand it, I should run |
Great! Now I can reproduce your figure. I'll try debugging this weekend. |
@seisman Thanks for the quick update. I confirm here that it works for me: the lambda2=0 beachballs in the 6th set look good. I renamed some of my scripts and output files to better reflect the gmt versions I was testing. The "pr2018" script names will handle the variable number of columns for the psmeca input file (which is not possibly in 6.0.0) -- these scripts can be used with 6.0.0pr2067 as well -- for that version of GMT you get the correct output. I'll plan to update my own tests for a future official release of GMT. Thanks again. |
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Thank you for the sustained support of GMT. I have made some input files for testing plotting routines for full moment tensors. Examples, including figures and input files, can be found here:
https://github.com/carltape/compearth/blob/master/momenttensor/plot/gmt/beachball_plots/
This includes the test script lune_beachballs_min.csh
which was run using GMT 4.5.3 and using a modified version of utilmeca.c. The output figure is included, and it is also attached here as
lune_ngeo_iplot2_lplot1_kplot1_min_psmeca_custom.pdf
The example, partially converted for GMT 5, is:
This generates the file test.ps, which I have renamed and attached as
lune_ngeo_iplot2_lplot1_kplot1_min_psmeca_gmt5.4.5.pdf
Comparison between the two pdf files reveals two main differences.
6 are all-white and should be all-red (top).
6 are all-red and should be all-white (bottom).
1 is all-white and should have some red (upper middle).
1 has its colors flipped (lower middle).
For the all-red and all-white beachballs, this means that the eigenvalues of the moment tensors are either all positive (red) or all negative (white). This would seem to be a straightforward check. I'm not sure what fix is needed for the other two beachballs.
The correct plot was generated using a modified version of utilmeca.c, which can be found at the link at the top. It seems like this would be a better starting point than the current version of utilmeca.c. I have not tried to compile GMT 5.4.5 with the modified utilmeca.c to see how it works. Finally, in the repository above I have provided five additional sets of beachballs that would be useful for more comprehensive testing.
System information
The text was updated successfully, but these errors were encountered: