[Shake-dev] Bug in gmtconvert?

Bruce Worden cbworden at gmail.com
Wed Apr 23 01:35:06 UTC 2014


Wow, that's interesting. I think it's my bug, not GMT's. Reading the man page, unless otherwise specified the -f option affects both input and output -- I assumed that meant the first two columns of input, but now I think it means the first two columns of *every file*. If I'm right, then the first parameter file (which is three columns) would be okay, but the subsequent parameters would have been wrong. Re-reading Jamie's message, I see that PGA (the first parameter) was, indeed, correct. (So was PSA30, but my guess it that it didn't exceed 360 %g.)

So I probably need to change it to -fo0x,1y. I added that flag so I could add decimal places to the grid coordinates without adding to every parameter, which would be a waste of space. If you removed the flag, you'll probably notice that the precision of the grid coordinates dropped from four places to two.

Sorry you had to track that down -- I'm sure it was a PITA. I'll do some testing and fix the bug in the next release. My guess is that we've never seen it before because a) there have been very few (if any) maps with accelerations or velocities > 360, and b) nobody has looked at those files this carefully.

Thanks,
Bruce

On Apr 22, 2014, at 4:34 PM, "Quitoriano, Vince" <vinceq at usgs.gov> wrote:

> 
> There seems to be a bug in gmtconvert in grind. It's used to paste together
> pga, pgv, etc. columns into grid.xml, rock_grid.xml, grid.xyz, and uncertainty.xml.
> The problem is that it's used with the option "-f0x,1y" which seems to treat every column into a degree measurement. (You'd think it should only affect the
> first two columns, 0 and 1, which are usually latitude and longitude.)
> 
> The upshot of this is that, in the above output files, any pgm value above
> 360 gets decremented by 360, just like a degree value.
> 
> Fortunately those files are output files and not really used by any subsequent
> processing, which is I think why the bug hasn't been caught (unless this is
> specific to a GMT version?)
> 
> I removed the -f option from gmtconvert in grind for those four files, and that
> seems to do the trick, but I'm not sure if it affects anything down the line.
> 
> -- 
> Vince Quitoriano (vinceq at usgs.gov) 
> USGS Did You Feel It?    http://earthquake.usgs.gov/earthquakes/dyfi 
> USGS ShakeMaps:        http://earthquake.usgs.gov/earthquakes/shakemap 
> _______________________________________________
> Shake-dev mailing list
> Shake-dev at geohazards.usgs.gov
> https://geohazards.usgs.gov/mailman/listinfo/shake-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://geohazards.usgs.gov/pipermail/shake-dev/attachments/20140422/ab31feea/attachment.html>


More information about the Shake-dev mailing list