forked from usgs/earthquake-global_vs30
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
147 lines (112 loc) · 6.3 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
GLOBAL VS30 MAP
The software in this repository creates a global topographic-slope
based Vs30 model, and then iserts regional maps into the global
map where they are available.
It starts running in the Slope directory, where it makes a file
called "global_vs30.grd" and copies it to the top-level directory.
It then runs in each of the regional sub-directories (currently,
California, PNW, Utah, Japan, and Taiwan) each of which inserts its
regional map into the global map, tagging it with an "_<region>"
extension (e.g., California uses the "ca" extension, so if it were
to operate on the "global_vs30.grd" file, it would create a file
called "global_vs30_ca.grd". The top-level file is then removed,
and the region's custom file is copied into its place. The
next region then operates on that file (e.g., PNW, whose extension
is "waor" would act on "global_vs30_ca.grd" and create
"global_vs30_ca_waor.grd.
In this way, each stage of the process is captured in "Slope"
and the regional subdirectories, while the final product lives
in the top-level directory. This approach should make it easy to
add new regions, and to skip certain regions, without too much
custom programming.
PREREQUISITES AND CONFIGURATION
-------------------------------
Before starting, you should review the constants in Constants.mk. In
particular, make sure CDFLIB, CDFINC, GMTLIB, and GMTINC are set
correctly for your system. You'll also want to set the resolution
of the maps to one of the supported values; 30 arc-seconds is the
default. Note that the 7.5 second resolution makes very large files
and the GMT commands require system memory in excess of what most
machines can currently support. See Slope/commands_75.txt for a list
of commands that will make the 7.5 second map in two pieces, and
then join them at the end.
You will need to have certain software installed and within your
current search path. The required software is:
CURL -- (or curl) a utility to transfer data from a server via HTTP or
other protocols; if it isn't on your system, you can install it with a
package manager, or it can be had from various sources, but the main
one is http://curl.haxx.se.
GMT/NetCDF -- The Generic Mapping Tools package must be installed, and
NetCDF with it. GMT can be downloaded from: http://gmt.soest.hawaii.edu/.
Get version 4 -- this software hasn't been tested with version 5. Make
sure to install the full-resolution shoreline database.
The GDAL (Geospatial Data Abstraction Library) package must be available.
You will need at least version 1.9 -- earlier versions, like 1.4 will not
work. You will need to set a path to the gdal binaries in Constants.mk.
In particular, the programs gdal_rasterize and gdal_translate are used
herein. Gdal can be installed by most package managers, but they often
have very old versions. The software can also be found at www.gdal.org.
If you have runtime problems with the C programs ("smooth", "insert_grd",
"grad2vs30"), have a look at the STATIC variable in Constants.mk
MAKING THE MAPS
---------------
Once all of the proper software is installed, and the variables in
Constants.mk are set, you should just be able to do:
% make
And the process should proceed to make a global grid file with insert
maps for California, PNW, Utah, etc. To remove one or more regions, see
the top level Makefile and look at the instructions near the top.
If you want to make plots, it's set up in the regional Makefiles. Doing:
% make plots
will generate a complete set. To get rid of the plots, do:
% make clean_plots
To get rid of a lot of intermediate products (and all the plots), do:
% make clean
To get rid of everything except the stuff that can't be regenerated or
automatically downloaded, do:
% make veryclean
You can do "make clean" and "make veryclean" from the top-level directory,
in which case it runs those commands recursively in all the subdirectories.
In the top-level you can also run:
% make spotless
which will run "make veryclean" in all the subdirectories and also remove
the top level Vs30 file "global_vs30*.grd".
ADDING A REGION
---------------
To add a region, make a directory for it, and add the directory to the
lists near the top of the top-level Makefile. The copy the Makefile
from one of the regions (California, PNW, or Utah) and modify as
necessary. In particular, you can make your map in any way you want, so
many of the steps in creating the the grids may be different or unnecessary.
You may also insert your grid into the global grid however you want,
but the program src/insert_grd is provided for that purpose. It takes as
input a base grid file into which you want to insert your map, your grid,
a landmask, and a weighted clipping mask. The landmask and clipping mask
should be identically sized and co-registered with your grid. All three must
have the same resolution and co-register with the background grid, and must
fit entirely within it. The clipping mask should be 1 (one) where your grid
will replace the background grid, and 0 (zero) where the background grid is
left untouched. Values between 1 and 0 will produce and output that is the
weighted average of the two grids:
output = w * insert_grd + (1 - w) * background_grd
where w is the weight.
See the file src/README and the source .c files for more information on
insert_grd and the other programs available. In addition, the regional
Makefiles (for California, PNW, and Utah) have examples of their use.
ACKNOWLEGEMENTS
---------------
The California map was provided by Eric Thompson and based on the map
developed in Thompson et al. (2014) "A Vs30 Map for California with Geologic
and Topographic Constraints." BSSA, in press.
The Utah map was provided by Kris Pankow of UUSS.
The Washington/Oregon map was provided by Renate Hartog of UW.
The map of Japan is downloaded from http://www.j-shis.bosai.go.jp/ (see
the Japan Makefile for specifics of downloading). References are available
at the web site.
The Taiwan maps were provided by Eric Thompson based upon maps developed
in Thompson & Wald (2012) "Developing Vs30 Site-Condition Maps by Combining
Observations with Geologic and Topographic Constraints." Presented at
15WCEE, Lisbon, Portugal.
The getpar library was created by Robert W. Clayton of the California
Institute of Technology, and later amended by several others (see
source files for history). It is included by permission.