[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20050310: about "comma separated"
- Subject: 20050310: about "comma separated"
- Date: Fri, 11 Mar 2005 06:38:09 -0700
>From: =?gb2312?q?=D9=BE=20=C1=F5?= <address@hidden>
>Organization: ?
>Keywords: 200503101156.j2ABuBv2003211 IDV earthquake plot
Hi-
>Thanks a lot for your reply. What I really want is to
>mark up the locations of earthquakes on a map(china
>e.g.).
>
>Here is my situation: I boasted to my teacher that I
>can plot earthquake location with IDV days ago, and
>before long he's gonna see my result.
>
>I got the data from several "earthquake catalogue" on
>the web, so it's just in text format like below:
>7.0N 127.4E 7
>57.0N 153.0W 7.4
>13.2N 88.7W 8
>5.7S 101.1E 7.2
>23.2N 70.0E 7.8
>6.1S 102.1E 7.4
>1.9N 126.5E 7.1
>47.2N 122.5W 7
Before you can read it into the IDV, it needs to be massaged
a bit. First, you need to add a header that will explain
how the data should be laid out and what the names of each
of the columns are.
Next, you'll need (in the current IDV version) to add in a
column for time. For now, this can be just a column of
zeros.
Lastly, you'll have to change the lat/lon values to degrees.
We currently don't handle the N/S/E/W format.
The result will look like (for the data above):
index->(Latitude, Longitude, magnitude, Time)
Latitude Longitude magnitude Time
7.0 127.4 7 0
57.0 -153.0 7.4 0
13.2 -88.7 8 0
-5.7 101.1 7.2 0
23.2 70.0 7.8 0
-6.1 102.1 7.4 0
1.9 126.5 7.1 0
47.2 -122.5 7 0
Once you have this files massaged, then use the File Chooser to
load it in and set the Data Source Type to "Text Point Data files"
and add the source. You should get a Field in the Data Selector
that says Point Data. Display this as a plot. At first you
will see nothing. You'll need to create a station model that
will display your particular data.
From the Edit->Resources->Station Models menu, open the
Station Model Editor. Use the File->New menu to create
a new station model. Call it "Earthquake" or whatever you
want. From the editor, click on the Value label on the
left and then click in the canvas. That will put the glyph
on and pop up a window to set the properties. In the
Properties window, type "magnitude" (without the quotes)
in the text field and click OK. Right click on the
glyph in the canvas and from the pop-up menu, select
Center->Center. Now, click the File->Save menu to save
this layout.
Now, from your Point Data Plot Control window, select the
Earthquake station model and you should see the Earthquake
magnitudes plotted at their respective locations.
To use the power of the 3D nature of the IDV, if you have
the depth of the earthquakes, you could plot them in
3D space as well. If you modify the file to look like
(substituting the appropriate values):
index->(Latitude, Longitude, magnitude, Time, Altitude)
Latitude Longitude magnitude Time Altitude[unit="km"]
7.0 127.4 7 0 -20
57.0 -153.0 7.4 0 -10
13.2 -88.7 8 0 -5
-5.7 101.1 7.2 0 -50
23.2 70.0 7.8 0 -45
-6.1 102.1 7.4 0 -13
1.9 126.5 7.1 0 -4
47.2 -122.5 7 0 -0
You will see the locations in 3D. You can use the
View->Viewpoint->Vertical Scale.. menu to set the
vertical range from -50 to 0 km. You could also modify
your station model (or create a new one) that would use
a shape to show the locations (e.g. a sphere). See the
section of the User's Guide on using the Station Model
editor.
If you knew the time, you could add in real times. See
this document for the format of the text files:
http://www.ssec.wisc.edu/~billh/README.text
on how to format the text (or other fields).
Good luck.
Don Murray
**************************************************************************** <
Unidata User Support UCAR Unidata Program <
(303)497-8643 P.O. Box 3000 <
address@hidden Boulder, CO 80307 <
---------------------------------------------------------------------------- <
Unidata WWW Service http://my.unidata.ucar.edu/content/support <
---------------------------------------------------------------------------- <
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web. If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.