You are on page 1of 4

ZMAP QUICK TUTORIAL

1) Launch matlab.
2) Go to the zmap directory and type zmap. Zmap starts. If not
find the problem!
3) Click on data import filters in the menu. Choose ASCII
columns... and click on import
4) In the window, locate you earthquake catalog (file ending
with .map). Choose either cat_IGP_82_05.mat or
cat_NEIC_73_07.mat. Those files are attached to the email I
sent you. You also have them in ascii (the same names but
ending with .map).
5) A window called General Parameters opens. You can define
the beginning and ending date, the magnitude and depth range,
and decide to plot all big events with M>6 for example. Do not
touch the bin length. We need to find out what does exactly
this parameter. The IGP is complet above M>4 and the NEIC
above 5. If you want to do serious statistics, do not consider
events of larger magnitudes.
6) You obtain a seismicity map. You can add volcanoes or fault
doing Overlay>Volcanoes,..>Load/show plate boundaries or
Load/show Volcanoes. You can also load a coasling by doing
Overlay>Volcanoes,..>Load a coasline from GSHHS database.
In the new window that will appear (Map Input Parameter),
choose Lambert Projection and low resolution to have
somehting decent. A new window (Lambert Map) will appear.
Choose Importa coastline to map window).
7) I recomand you to keep the catalog in memory doing
Catalog>Keep this catalog in memory... If you make a mistake,
you can go back to the beginning by clicking Catalog>Reset
catalog... It is very useful otherwise you will have to go back to
step 2).
8) You can isolate a zone in the catalog by choosing Select>Select
Eq in polygon if you do not have a polygon file, or Select>Select
Eq in polygon (Menu) if you have it. If you choose the first
option, then the program will allow you to define the zone by
clicking on the left button of the mouse. Once the shape is
defined, right click on the mouse to validate. Zmap will ask you
where to save the polygon. DO IT!!! Otherwise you will loose
any information about the position of the polygon. Once you
have given the name, a cumulative number window appears. It
shows the cumulated number of earthquakes as a function of
time. You can keep the new catalog (the one you just extracted)
clicking Keep as newcat on the right bottom of this window.
Now a new seismicity map appears. You can save the new
catalog by doing Catalog>Save current catalog (ascii format). I
know that zmap prefers the mat format so it would be worth
saving them also in this format.
9) Lets go back to the full catalog by doing Catalog>Reset
catalog. We can do cross-sections in ztools>Create cross-
section. A new window appears Seismicity map (lambert). At
the bottom of this window, you can modify the lateral width of
the cross section. You can define the section choosing select
endpoints by mouse on the bottom left. Angle represents the
angle between the current section and the new section you can
plot selecting Rotate X-section. If you want the 2nd sections to
be perpendicular, put 90 degrees.
10) You can combine catalogs with zmap doing
Catalog>Combine. Becareful! It will only merge the events
together but not isolate the earthquakes common to the 2
catalogs. I explain it at point 11).
11) You can find the common earthquakes between 2
catalogs by doing Catalog>Compare two catalogs-find identical
events. Zmap will ask you to load the first catalog and then the
second one. Then a window appears asking for the maximum
distance of events and the maximum time seperation. I
recommand to use 100 km for the distance and keep 2 mn for
the maximum time. It is possible that the depth uncertainties in
the NEIC creates a difference of more than 50 km, especially
for deep earthquakes. Then click ok and zmap will plot a bunch
of windows which tests the agreement between the two
catalogs. I still have not figured out where is the new catalog
but you will find out.
NEW TRICKS

Topographic maps
To plot a topographic map, you first need to download a topography
file. For example, download
ftp://topex.ucsd.edu/pub/global_topo_2min/topo_8.2.img
Once this is done, go in the zmap directory and create a directory
dem. Put topo_8.2.img there and rename it to topo_6.2.img. Zmap
needs indeed this file to have this very name.

Now you can choose Ztools>Plot topographic map>2 deg resolution


(ETOPO 2) and you will get a fency map. Leave it as it is for the
moment.

If you do cross sections (see point 9), you can superimpose the topo
over them by cliking X+topo in the Cross-Section window. Wait a
little since it may take a while to draw the new figure.
This will also put the location of the section on the nice map we just
made.

You can also superimpose maps on the geographic map. Let us start
by doing a b-map. Launch it with Ztools>Mapping a- and b-values>
Calculate a Mc, a- and b-value map. Choose Constant Radius rather
that number of events. Set the radius to 50, the spacing to 0.5 deg for
x and 0.5 deg for y. Put 3.9 instead of 2.2 in Fixed Mc.... 3.9 is the
magnitude of completeness of the IGP catalog (cat_IGP_82_05.mat).
Click Go and now you have to set the limits of the computational grid
in the seismicity map window. Click left to set the points, and
validate with a right click. Do not build a big grid as it will take too long
to compute the results. Rather focuss on the areas of significant
seismicity.
A new window appears and ask you to save the calculation grid. Do it
or ignore it by clicking cancel. You will get a map which displays
colored squares. In Display, you will find various plotting options such
as shading interpolated that will smooth the figure and shading flat
will go back to the squares. Even if interpolated is more esthetic, it is
based on an interpolation so I rather prefer the squares.
You can superimpose the results over a topographic map by doing
Display>Plot map on top of topography (white background). You can
also choose a black background.
A new window ask you to choose a projection. Choose for example
Plate Carree Projection. A new window appears where you can
change the tick spacing, etc. Click ok. You will have a nice map with
the projected figure on top of it.

Exit zmap when it starts to do crasy things


If zmap starts doing weird things, try the following. Click refresh in the
Catalog menu of the Seismicity Map window. If it still goes on, close
all the windows, and type quitzmap in the matlab command window.
This will stop zmap. Then relaunch it (go back to point 1)).

Combining catalogs
When you combine 2 catalogs, I have not find out where zmap is
actually storing the new catalog. I have a written a function call
print_file.m that is written below.
Open a text editor such a word pad or vi.
Copy the following:
function print_file(in)
[nl,nc]=size(in);
if nc~=9, error('The file does not have 9 columns!!! STOP.');end
path=eval('pwd');
name='/out/cat_combined.txt';
name=strcat(path,name);
fid=fopen(name,'w');
for i=1:nl,
fprintf(fid,'%g %g %g %g %g %g %g %g
%g\n',in(i,1),in(i,2),in(i,3),in(i,4),in(i,5),in(i,6),in(i,7),in(i,8),in(i,9));
end
fclose(fid);
text1=['The combined catalog has been saved in: ',name];
disp(text1);
and save it as print_file.m . Put it in zmap/src.
Open comp2cat.m which is located in zmap/src. Add at the end of the
file:
print_file(in);

You can put it for instance at the line 328 of comp2cat.m


For security first copy comp2cat.m to comp2cat.m.old. In case you
did not do things right, you can still recover the original file.

You might also like