Bug #1171

psmeca fails for negative magnitudes

Added by Thorsten almost 4 years ago. Updated over 3 years ago.

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


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


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


#1 Updated by Paul almost 4 years 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).

#2 Updated by Paul over 3 years ago

  • Status changed from Resolved to Closed

Closed as fixed.

Also available in: Atom PDF