10.11.2012 Views

zmap a tool for analyses of seismicity patterns typical applications ...

zmap a tool for analyses of seismicity patterns typical applications ...

zmap a tool for analyses of seismicity patterns typical applications ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Importing data into ZMAP<br />

CHAPTER VI<br />

ASCII columns – the most simple way<br />

Importing data is <strong>of</strong>ten the first major hurdle that users have in running ZMAP. Within<br />

ZMAP, data are stored internally in the Matrix ‘a’ in the following <strong>for</strong>mat:<br />

Column 1 2 3 4 5 6 7 8 9<br />

Longitude Latitude Year Month Day Magnitude Depth Hour Minute<br />

The trick is to get your data into ‘a’. The most stable and easy solution is to create an<br />

ASCII file with exactly these columns, separated by at least one blank or tab. Note that<br />

zeros in column 4 and 5 will create errors. Western Longitudes are by convention<br />

negative. Such a file could look like this:<br />

-120.819 36.251 1980 1 1 3.7 6.60 2 9<br />

-120.825 36.249 1980 1 1 3.6 7.80 2 9<br />

-120.809 36.251 1980 1 2 1.5 6.54 0 54<br />

-120.817 36.255 1980 1 2 2.8 6.44 10 39<br />

-120.615 36.048 1980 1 3 0.5 4.58 12 19<br />

-120.815 36.265 1980 1 4 1.3 4.97 19 49<br />

-120.470 35.925 1980 1 7 0.8 4.62 7 39<br />

-120.565 36.016 1980 1 9 0.9 6.48 1 51<br />

-120.472 35.928 1980 1 9 2.9 10.35 17 54<br />

-120.643 36.083 1980 1 10 0.9 3.19 22 54<br />

-120.951 36.371 1980 1 15 1.9 8.44 2 39<br />

-120.934 36.357 1980 1 16 2.0 5.87 10 2<br />

You can test if it is an acceptable file by loading it into Matlab. Lets assume the file is<br />

stored in the filename mydata.dat, then typing<br />

load mydata.dat<br />

should create a variable mydata in the workspace, with 9 columns and as many row as<br />

earthquakes in you catalog. Quite frequently, you will encounter the following message:<br />

??? Error using ==> load<br />

Number <strong>of</strong> columns on line 6 <strong>of</strong> ASCII file C:\ZMAP6\out\park.dat<br />

must be the same as previous lines.<br />

You should check line 6 <strong>for</strong> inconsistencies and try again. Once this file can be loaded<br />

into Matlab, there are three ways to load it into ZMAP:<br />

• Using the ASCII file import option. From the ZMAP menu, select the “Create<br />

or Modify *.mat file’ option, the “EQ Datafile” option ASCII columns.<br />

54

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!