[cig-commits] r15854 - cs/plot-user-map/trunk

leif at geodynamics.org leif at geodynamics.org
Tue Oct 20 17:38:11 PDT 2009


Author: leif
Date: 2009-10-20 17:38:11 -0700 (Tue, 20 Oct 2009)
New Revision: 15854

Added:
   cs/plot-user-map/trunk/import-xy.py
   cs/plot-user-map/trunk/specfem_user_locations.xy
Log:
Script and data for merging historical Specfem dots into the "dot
archive".


Added: cs/plot-user-map/trunk/import-xy.py
===================================================================
--- cs/plot-user-map/trunk/import-xy.py	                        (rev 0)
+++ cs/plot-user-map/trunk/import-xy.py	2009-10-21 00:38:11 UTC (rev 15854)
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+
+
+from os.path import join
+
+
+archiveDir = "/home/leif/projects/user-maps/archive"
+
+
+
+def merge(code, imported):
+    
+    archive = join(archiveDir, code + ".py")
+    
+    stream = open(archive, 'r')
+    data = stream.read()
+    stream.close()
+    archivedLatLonList = eval(data)
+
+    tally = 0
+
+    for item in imported:
+        if not item in archivedLatLonList:
+            archivedLatLonList.append(item)
+            tally += 1
+    
+    stream = open(archive, "w")
+    print >>stream, repr(archivedLatLonList)
+    stream.close()
+
+    print "merged %d coordinates into '%s'" % (tally, archive)
+
+
+def main():
+
+    imported = []
+
+    stream = open("specfem_user_locations.xy", "r")
+    skip = True
+    for line in stream:
+        if skip:
+            skip = False
+            continue
+        lon, lat = line.split()
+        lat, lon = float(lat), float(lon)
+        imported.append((lat, lon))
+    
+    for code in ["Specfem3D", "Specfem3DGlobe"]:
+        merge(code, imported)
+    return
+
+
+if __name__ == "__main__":
+    main()


Property changes on: cs/plot-user-map/trunk/import-xy.py
___________________________________________________________________
Name: svn:executable
   + *

Added: cs/plot-user-map/trunk/specfem_user_locations.xy
===================================================================
--- cs/plot-user-map/trunk/specfem_user_locations.xy	                        (rev 0)
+++ cs/plot-user-map/trunk/specfem_user_locations.xy	2009-10-21 00:38:11 UTC (rev 15854)
@@ -0,0 +1,383 @@
+Lon Lat
+20.083 41.1
+-122.1634 37.4542
+-83.3 42.05
+-117 34.06
+-90.3 38.64
+23.64 39.93
+-122 37.86
+4.616 50.671
+8.5395 47.377
+120.4447 23.4809
+2.277 48.76
+-96.8 32.84
+-118.1256 34.1359
+54 27.76
+-96.3515 30.607
+-71.0935 42.3589
+8.582 53.54
+11.58333333 48.15
+-121 35.55
+120.4447 23.4809
+120.4447 23.4809
+-7.914 38.569
+8.5395 47.377
+-71.0935 42.3589
+-106.2502778 35.83333333
+149.0948 -35.2617
+-77.8 40.8
+-78.44 -0.325
+-122.0516667 36.9975
+174.7 -41.2
+127.017 37.518
+5.716666667 45.16666667
+-84.26 33.39
+-96.743 32.971
+-95.3937 29.7205
+120.4447 23.4809
+-73.9 41.01
+101.002 24.387
+105.204 8.835
+1.433333333 43.6
+-117.2377 32.8723
+-95.9 36.14
+-97.743 30.268
+151.207 -33.867
+-117.272 32.843
+-70.6 -33.4
+-72.252 41.807
+-123.0744444 44.04527778
+-71.1 42.37
+13.32 38.13
+-118.1256 34.1359
+-3.1811 51.4832
+-97.7 30.26
+149.1 -35.3
+0.116666667 52.2
+73.55 15.3
+-71.4024 41.8263
+-117.24 32.87
+-71.1 42.42
+-71.5 -16.3
+19.767 39.758
+5.3222 60.3888
+-95.2 38.97
+11.58333333 48.15
+110.727 35.208
+-73.58333333 45.5
+2.333333333 48.86666667
+-147.6453 64.8351
+9.1719 48.7676
+8.5395 47.35
+136.8833333 35
+-90.30694444 38.64805556
+-122.2577778 37.86972222
+20.083 41.1
+-7.914 38.569
+89.4108 43.073
+-71.2 46.61
+-113.49 53.55
+-118.1256 34.1359
+107.6 -6.91
+127.128 34.438
+11.58333333 48.15
+-106 35.08
+-106.2502778 35.83333333
+116.352 27.995
+-75.6 4.535
+116.3876 39.906
+-123.0744444 44.04527778
+116.3876 39.906
+-118.1256 34.1359
+-119.848 34.414
+116.3876 39.906
+102.702 25.051
+2.161 41.39
+73.85 18.56
+1.904 47.9
+32.85 39.99
+50.41 32.981
+-86.9225 40.42805556
+0.366666667 43.3
+104.071 30.67
+37.63 55.75
+8.5395 47.377
+-122.0516667 36.9975
+-75.909 42.101
+13.77 45.65
+116.3876 39.906
+120.055 27.662
+-118.1256 34.1359
+116.3876 39.906
+116.3876 39.906
+-97.73055556 30.28583333
+-3.2 55.95
+116.3876 39.906
+130.2 31.5
+-83 40.13
+-70.6673 41.5277
+-1.25 51.75
+-123.37 48.43
+-71.0935 42.3589
+4.829 45.75
+9.158 45.19
+-121 38.57
+7.736 48.58
+-91.774 37.955
+12.35 41.9
+-63.6 44.64
+-73.5 45.5
+31.255 30.084
+-84.096 9.928
+-122 47.41
+-99.1 19.24
+-123 44.56
+-84.06 39.81
+126.622 45.755
+2.701 48.405
+-105.0827 39.711
+12.98 52.4
+129.8 33.53
+13.77 45.65
+8.5395 47.377
+37.62 55.75
+20.96 49.87
+28.95 41
+18.637 54.357
+149.0948 -35.2617
+-97.73055556 30.28583333
+149.1633 -353448
+2.333333333 48.86666667
+-117.272 32.843
+5.3222 60.3888
+-106.3027 35.8818
+73.07 33.7
+6.088 50.77
+121.473 31.248
+-105.2638889 40.00555556
+-121.7669444 37.68194444
+-92.12 15.881
+-1.54 53.79
+117.2 31.86
+77.5881 12.9372
+10.44 43.69
+-71.0935 42.3589
+-72.922 41.313
+-77.01 38.9
+-88.22833333 40.10861111
+-97.73055556 30.28583333
+30.15 59.59
+37.63 55.75
+50.41 32.981
+-71.41666667 42.82888889
+139.809 35.683
+116.3876 39.906
+116.3876 39.906
+67.028 24.89
+17.64 59.85
+-77.1 38.88
+120.1 28.95
+-74.6566 40.3441
+-97.73055556 30.28583333
+10.166 36.819
+-72.03833333 40.80888889
+-122.1691667 37.42722222
+16.36 48.2
+-70.6673 41.5277
+11.345 44.505
+-97.73055556 30.28583333
+110.4 -6.97
+-123 49.26
+32.853 39.929
+-119.7 34.42
+116.3876 39.906
+-0.59 44.8
+2.701 48.4
+-71.1 42.42
+-76.48333333 44.23333333
+5.12 52.09
+136.8833333 35
+-71.4024 41.8263
+-123 49.26
+-83.71361111 42.29083333
+-88.22833333 40.10861111
+-87.2 14.09
+116.3876 39.906
+116.3876 39.906
+116.3876 39.906
+7.256 50.546
+116.3876 39.906
+120.4447 23.4809
+-97.73055556 30.28583333
+1.583333333 53.8
+121.473 31.248
+121.2 24.96
+-118.1256 34.1359
+-90.30694444 38.64805556
+117.2 31.86
+117.8 39.31
+117.8 39.31
+116.3876 39.906
+50.41 32.981
+-95.3 29.76
+116.3876 39.906
+121.7436 24.7595
+116.3876 39.906
+116.3876 39.906
+28.957 41.017
+126.98 37.56
+174.91 -41.21
+116.3876 39.906
+116.3876 39.906
+50.41 32.981
+116.3876 39.906
+117.2 31.86
+116.3876 39.906
+-118.2847222 34.02083333
+121.5 25.03
+-106 52.13
+116.3876 39.906
+116.3876 39.906
+116.3876 39.906
+116.3876 39.906
+116.3876 39.906
+18.637 54.357
+-71.4024 41.8263
+-2.59 51.45
+-71.0935 42.3589
+116.3876 39.906
+44.8 44.18
+-47.8 -15.7
+9.805 52.39
+-106 52.13
+-81 33.99
+-117.272 32.843
+31.255 30.084
+-90.30694444 38.64805556
+-122 43.74
+-90 35.14
+50.13 26.31
+2.333333333 48.86666667
+29.23 -1.69
+-97.4 35.22
+116.3876 39.906
+-90.30694444 38.64805556
+-118.2847222 34.02083333
+-9.27 38.75
+120.9 30.17
+-90.30694444 38.64805556
+-90.30694444 38.64805556
+-90.30694444 38.64805556
+-5.84 43.33
+-0.59 51.24
+29.94 31.21
+-95.55 29.61
+112.38 26.75
+110.73 35.21
+116.41 39.93
+116.41 39.93
+-73.91 41.01
+-36.54 -9.97
+-147.65 64.94
+-77.39 38.97
+117.19 39.16
+127.43 36.33
+116.41 39.93
+-97.74 30.27
+78.48 17.4
+78.48 17.4
+21.44 42
+3.06 36.78
+-90.2 38.63
+-118.15 34.16
+13.34 50.92
+77.59 12.94
+-71.06 42.36
+-75.91 42.1
+129.86 29.84
+116.41 39.93
+116.41 39.93
+120.17 30.25
+116.41 39.93
+116.41 39.93
+-99.14 19.25
+-71.1 42.36
+12.5 41.9
+130.05 39.03
+81.85 25.46
+-424 55.86
+-70.67 41.53
+116.41 39.93
+10.18 36.81
+3.06 36.78
+-63.62 44.65
+21.84 37.61
+77.59 12.94
+103.85 1.29
+126.62 45.76
+2.68 48.42
+13.04 52.36
+3.42 6.44
+0.11 52.21
+5.73 45.19
+20.59 50.38
+28.95 41.01
+18.65 54.35
+-97.75 30.4
+-97.75 30.4
+108.66 32.44
+116.41 39.93
+-115.31 32.46
+-2.98 53.41
+8.54 47.38
+-97.45 35.22
+-71.13 42.38
+72.92 41.31
+-96.73 32.96
+-87.65 41.87
+47.65 37.93
+-84.5 38.05
+67.03 24.89
+77.59 12.94
+-122.17 37.43
+11.35 44.5
+11.35 44.5
+139.76 35.68
+-119.7 34.42
+116.41 39.93
+116.41 39.93
+-9.31 38.88
+5.06 52.09
+-0.59 44.8
+-71.11 42.42
+107.61 -6.91
+107.61 -6.91
+107.61 -6.91
+-118.13 34.14
+-118.13 34.14
+-118.13 34.14
+-118.13 34.14
+-118.13 34.14
+-118.13 34.14
+116.41 39.93
+116.41 39.93
+116.41 39.93
+-90.2 38.63
+-90.2 38.63
+116.41 39.93
+116.41 39.93
+116.41 39.93
+116.41 39.93
+116.41 39.93
+116.41 39.93
+153.05 -26.69
+116.41 39.93
+116.41 39.93
+-89.4 43.04
+-118.24 34.05
+121.56 25.04
+121.56 25.04
+-106.66 52.13
+116.41 39.93
+116.41 39.93
+116.41 39.93



More information about the CIG-COMMITS mailing list