Bug #1171

psmeca fails for negative magnitudes

Added by Thorsten 10 days ago. Updated 7 days ago.

Status:ResolvedStart date:2017-12-04
Priority:NormalDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:Candidate for next bugfix release
Affected version:4.5.16 Platform:

Description

GMT4.5.16 meca/psmeca fails when the moment to magnitude conversion yields negative magnitudes, results are plotted the wrong way around after going through a zero size transition. This behavior is usually not encountered but can be an issue if using CMTs to visualize other stress/strain tensors when units have nothing to do with actual moment. An easy fix is to add something like

if(size < 0){
fprintf(stderr,"%s: WARNING: skipping negative size %g\n",GMT_program,size);
size = 0;
}

in line 783 of psmeca.c

Associated revisions

Revision 19486
Added by Paul 7 days ago

More work on grd2kml, fix issue #1171, disallow -Ei and -Q simultaneously in grdimage

Revision 19488
Added by Paul 7 days ago

Fix issue #1171

History

#1 Updated by Paul 7 days ago

  • Status changed from New to Resolved
  • Assignee changed from Thorsten to Paul
  • Target version set to Candidate for next bugfix release
  • % Done changed from 0 to 100

Thanks Thorsten, I have applied your suggested fix to GMT 4, 5, and 6. In subversion, r10398 (GMT4) and r19488 (GMT6 trunk and GMT5.4 branch).

Also available in: Atom PDF