Skip to content

Commit

Permalink
Add shake map modules (#133)
Browse files Browse the repository at this point in the history
* Add shake map modules. Should be the same as https://github.com/usgs/shakemap

* Update location of the two programs

* Make it build again

* Update the THIS_MODULE_LIB

* Module functions were not decorated with EXTERN_MSC

* List all options in on line help

* Add license to vs30.c

* Add the GMT general header/license comment

* Add manuals

* Tweaks on online help

* Option -L can now accept line coords

* Fix -C default settings

* Uncomment the GMT_Init_IO() lines

* Introuce a -D option to transmit the trace fault line coordinates.

* Fix the PAD bug

* Install also some MSVC runtime dlls needed in some very virgin systems

* Update to how supplements are built.

* Add (empty) longopts include headers.

---------

Co-authored-by: Paul Wessel <pwessel@hawaii.edu>
  • Loading branch information
joa-quim and PaulWessel authored Dec 1, 2023
1 parent 2cca673 commit 0f1bc88
Show file tree
Hide file tree
Showing 10 changed files with 1,074 additions and 10 deletions.
10 changes: 10 additions & 0 deletions admin/add_windows_cpack.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,13 @@ if (GMTMEX_PATH)
DESTINATION ${GMT_BINDIR}
COMPONENT Runtime)
endif (GMTMEX_PATH)

install (PROGRAMS
${VCRUNTIME_PATH}/vcruntime140.dll
${VCRUNTIME_PATH}/vcruntime140_1.dll
${VCRUNTIME_PATH}/msvcp140.dll
${VCRUNTIME_PATH}/msvcp140_1.dll
${VCRUNTIME_PATH}/msvcp140_2.dll
${VCRUNTIME_PATH}/msvcp140_codecvt_ids.dll
DESTINATION ${GMT_BINDIR}
COMPONENT Runtime)
4 changes: 4 additions & 0 deletions doc/rst/source/modules-classic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,10 @@ seis
+----------------------------------+--------------------+
| :doc:`/supplements/seis/pssac` | |pssac_purpose| |
+----------------------------------+--------------------+
| :doc:`/supplements/seis/shake` | |shake_purpose| |
+--------------------------------+----------------------+
| :doc:`/supplements/seis/vs30` | |vs30_purpose| |
+--------------------------------+----------------------+

spotter
-------
Expand Down
6 changes: 6 additions & 0 deletions doc/rst/source/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ All modules are requested via a call to the :doc:`gmt` program.
supplements/seis/meca
supplements/seis/polar
supplements/seis/sac
supplements/seis/shake
supplements/seis/vs30
supplements/spotter/backtracker
supplements/spotter/gmtpmodeler
supplements/spotter/grdpmodeler
Expand Down Expand Up @@ -721,6 +723,10 @@ seis
+--------------------------------+------------------+
| :doc:`/supplements/seis/sac` | |sac_purpose| |
+--------------------------------+------------------+
| :doc:`/supplements/seis/shake` | |shake_purpose| |
+--------------------------------+------------------+
| :doc:`/supplements/seis/vs30` | |vs30_purpose| |
+--------------------------------+------------------+

spotter
-------
Expand Down
8 changes: 5 additions & 3 deletions doc/rst/source/reference/supplemental-packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ seis: Seismology
This package contains the programs
:doc:`coupe </supplements/seis/coupe>`,
:doc:`meca </supplements/seis/meca>`,
:doc:`polar </supplements/seis/polar>`, and
:doc:`sac </supplements/seis/sac>` which are used by seismologists
:doc:`polar </supplements/seis/polar>`,
:doc:`sac </supplements/seis/sac>`,
:doc:`sac </supplements/seis/vs30>`, and
:doc:`sac </supplements/seis/shake>`, which are used by seismologists
for plotting focal mechanisms (including cross-sections
and polarities) and SAC files.
and polarities), compute Vs30 velocities, intensity maps and SAC files.
The coupe, meca, and polar were developed by Kurt Feigl and Genevieve
Patau, while Dongdong Tian added sac; the package is now maintained by the GMT team.

Expand Down
8 changes: 2 additions & 6 deletions doc/rst/source/supplements/module_supplements_purpose.rst_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

.. |img2grd_purpose| replace:: Extract a subset from an img file in Mercator or Geographic format

.. |terrain_filter_purpose| replace:: Callable function to do image texture

.. |mgd77convert_purpose| replace:: Convert MGD77 data to other formats

.. |mgd77header_purpose| replace:: Create MGD77 headers from A77 files
Expand Down Expand Up @@ -98,11 +96,9 @@

.. |rotsmoother_purpose| replace:: Get mean rotations and covariance matrices from set of finite rotations

.. |grdbarb_purpose| replace:: Plot wind barb field from two component grids

.. |barb_purpose| replace:: Plot wind barbs in 2-D and 3-D
.. |shake_purpose| replace:: Compute Peak Ground Acceleration/Velocity and Intensity

.. |psbarb_purpose| replace:: Plot wind barbs in 2-D and 3-D
.. |vs30_purpose| replace:: Convert topographic slope to Vs30 velocities

.. |x2sys_binlist_purpose| replace:: Create bin index listing from track data files

Expand Down
2 changes: 1 addition & 1 deletion src/seis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
set (SUPPL_NAME seis)
set (SUPPL_HEADERS meca.h meca_symbol.h utilmeca.h seis_defaults.h sacio.h)
AUX_SOURCE_DIRECTORY (longopt SUPPL_LONG_OPT_H)
set (SUPPL_PROGS_SRCS psmeca.c pspolar.c pscoupe.c pssac.c ${SUPPL_LONG_OPT_H})
set (SUPPL_PROGS_SRCS psmeca.c pspolar.c pscoupe.c pssac.c shake.c vs30.c ${SUPPL_LONG_OPT_H})
set (SUPPL_LIB_SRCS ${SUPPL_PROGS_SRCS} utilmeca.c sacio.c)
set (SUPPL_EXAMPLE_FILES README.seis)
48 changes: 48 additions & 0 deletions src/seis/longopt/shake_inc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*--------------------------------------------------------------------
*
* Copyright (c) 1991-2023 by the GMT Team (https://www.generic-mapping-tools.org/team.html)
* See LICENSE.TXT file for copying and redistribution conditions.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; version 3 or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* Contact info: www.generic-mapping-tools.org
*--------------------------------------------------------------------*/

#ifndef SHAKE_INC_H
#define SHAKE_INC_H

/* Translation table from long to short module options, directives and modifiers */

static struct GMT_KEYWORD_DICTIONARY module_kw[] = { /* Local options for this module */
/* separator, short_option, long_option,
short_directives, long_directives,
short_modifiers, long_modifiers */
{ 0, 'G', "",
"", "",
"", "" },
{ 0, 'D', "",
"", "",
"", "" },
{ 0, 'L', "",
"", "",
"", "" },
{ 0, 'M', "",
"", "",
"", "" },
{ 0, 'C', "",
"", "",
"", "" },
{ 0, 'F', "",
"", "",
"", "" },
{ 0, '\0', "", "", "", "", ""} /* End of list marked with empty option and strings */
};

#endif /* !SHAKE_INC_H */
39 changes: 39 additions & 0 deletions src/seis/longopt/vs30_inc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*--------------------------------------------------------------------
*
* Copyright (c) 1991-2023 by the GMT Team (https://www.generic-mapping-tools.org/team.html)
* See LICENSE.TXT file for copying and redistribution conditions.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; version 3 or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* Contact info: www.generic-mapping-tools.org
*--------------------------------------------------------------------*/

#ifndef VS30_INC_H
#define VS30_INC_H

/* Translation table from long to short module options, directives and modifiers */

static struct GMT_KEYWORD_DICTIONARY module_kw[] = { /* Local options for this module */
/* separator, short_option, long_option,
short_directives, long_directives,
short_modifiers, long_modifiers */
{ 0, 'G', "",
"", "",
"", "" },
{ 0, 'C', "",
"", "",
"", "" },
{ 0, 'W', "",
"", "",
"", "" },
{ 0, '\0', "", "", "", "", ""} /* End of list marked with empty option and strings */
};

#endif /* !VS30_INC_H */
Loading

0 comments on commit 0f1bc88

Please sign in to comment.