<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi All<br>
<br>
I am making images for animation software and I am just having a bit of trouble when it comes to plotting the ship track data which is in text format.<br>
<br>
I have got 25 images that I loop through the wind data and I would like to overlay dots for the ship tracks. However the data for the ship tracks is not 25 time steps like for the wind it has more time steps. I would like to make if statements that say when
the year is 1815 and the month is 4 then plot all those ship track points on images 1.<br>
Then another if statement for month 5 etc etc.<br>
<br>
Here is what the ship txt file looks like:<br>
1815 4 20 10.00 -34.73 28.45 1022.8 48 <br>
1815 4 21 10.00 -36.02 25.60 1027.2 65 <br>
1815 4 22 10.00 -35.93 24.28 1036.3 54 <br>
1815 4 23 11.00 -36.30 22.35 1012.6 62 <br>
1815 4 24 11.00 -35.23 22.10 1016.0 52 <br>
1815 4 25 11.00 -35.45 21.85 1029.5 51 <br>
1815 4 28 11.00 -35.02 16.20 1021.7 56 <br>
1815 4 29 11.00 -32.88 13.12 1022.8 23 <br>
1815 4 30 11.00 -30.58 10.47 1029.5 0 <br>
1815 5 3 12.00 -26.67 6.35 1019.4 66 <br>
1815 5 6 12.00 -24.17 3.33 1019.4 43 <br>
1815 5 7 12.00 -22.98 2.93 1020.0 22 <br>
1815 6 17 8.00 -38.02 55.53 1022.8 85 <br>
1815 6 18 8.00 -37.30 59.02 1032.9 79 <br>
1815 6 19 8.00 -35.70 62.03 1026.1 52 <br>
1815 6 20 8.00 -35.36 63.95 1005.8 53 <br>
1815 6 21 8.00 -35.02 65.87 999.1 55 <br>
1815 6 22 7.00 -35.00 70.05 1009.5 50 <br>
1815 6 23 7.00 -34.93 73.55 1016.0 43 <br>
1815 6 24 7.00 -35.03 77.03 1016.0 57 <br>
1815 6 25 7.00 -34.87 81.20 1023.4 41 <br>
1815 6 26 6.00 -34.10 83.47 1023.4 43 <br>
1815 6 27 6.00 -33.83 84.08 1025.5 34 <br>
1815 6 28 6.00 -33.00 85.43 1026.1 35 <br>
1815 6 29 6.00 -34.30 86.13 1025.8 46 <br>
1815 6 30 6.00 -34.75 89.05 1026.1 49 <br>
1815 7 1 6.00 -34.55 90.93 1021.1 40 <br>
1815 7 2 6.00 -32.38 91.80 1014.3 21 <br>
1815 7 5 6.00 -25.43 95.43 1019.4 55 <br>
1815 7 6 6.00 -23.32 96.08 1019.4 36 <br>
1815 7 7 6.00 -22.87 96.60 1022.8 26 <br>
1815 7 9 5.00 -21.53 98.00 1016.0 18 <br>
1815 7 10 5.00 -19.28 100.53 1016.0 90 <br>
1815 7 11 5.00 -17.42 102.23 1016.0 72 <br>
1816 1 19 6.00 -18.55 85.42 1011.2 85 <br>
1816 1 20 6.00 -19.38 83.78 1012.6 93 <br>
1816 1 21 7.00 -20.60 81.12 1016.0 1 <br>
1816 1 22 7.00 -21.60 78.98 1016.0 18 <br>
1816 1 23 7.00 -23.08 75.97 1019.4 35 <br>
1816 1 26 7.00 -25.53 67.78 1016.0 57 <br>
1816 1 27 8.00 -25.98 65.50 1016.0 55 <br>
1816 1 28 8.00 -26.37 62.78 1016.0 62 <br>
1816 1 31 8.00 -28.17 53.28 1022.8 83 <br>
1816 2 1 9.00 -28.60 52.22 1014.6 82 <br>
1816 2 2 9.00 -28.37 51.38 1015.3 81 <br>
1816 2 3 9.00 -28.50 48.98 1015.3 88 <br>
1816 2 4 9.00 -29.28 46.07 1011.6 96 <br>
1816 2 5 9.00 -29.27 45.13 1005.8 95 <br>
1816 2 6 9.00 -28.83 44.02 1011.9 84 <br>
1816 2 7 5.00 -6.30 104.70 1016.0 64 <br>
1816 2 7 9.00 -29.42 41.40 1022.8 91 <br>
1816 2 8 5.00 -6.42 104.25 1016.0 64 <br>
1816 2 9 5.00 -7.47 103.83 1014.3 73 <br>
1816 2 9 10.00 -31.18 36.58 1019.4 16 <br>
1816 2 10 10.00 -31.37 35.78 1020.0 15 <br>
1816 2 11 5.00 -9.23 102.50 1012.6 92 <br>
1816 2 11 10.00 -32.53 33.80 1019.4 23 <br>
1816 2 12 5.00 -10.02 101.68 1009.2 1 <br>
1816 2 12 10.00 -34.20 31.33 1012.6 41 <br>
1816 2 13 5.00 -11.72 100.07 1009.2 10 <br>
1816 2 13 10.00 -35.00 28.07 1009.9 58 <br>
1816 2 14 5.00 -13.83 98.75 1009.2 38 <br>
1816 2 14 10.00 -34.57 25.33 1005.8 45 <br>
1816 2 15 6.00 -15.85 95.00 1012.6 55 <br>
1816 2 16 6.00 -17.30 92.08 1016.0 72 <br>
1816 2 16 11.00 -35.17 22.17 1016.0 52 <br>
1816 2 17 6.00 -18.25 89.42 1016.0 89 <br>
1816 2 17 11.00 -34.95 18.97 1007.9 48 <br>
1816 2 18 6.00 -19.32 87.12 1016.0 97 <br>
1816 2 18 11.00 -35.05 18.50 1009.2 58 <br>
1816 2 19 6.00 -20.22 84.30 1016.0 4 <br>
1816 2 19 11.00 -33.68 15.83 1013.3 35 <br>
1816 2 20 7.00 -20.95 81.68 1016.0 1 <br>
1816 2 20 11.00 -31.58 13.08 1012.6 13 <br>
1816 2 21 7.00 -21.90 78.97 1016.0 18 <br>
1816 2 21 11.00 -29.97 11.17 1009.2 91 <br>
1816 2 22 7.00 -23.08 75.33 1016.0 35 <br>
1816 2 22 11.00 -28.63 12.22 1007.5 82 <br>
1816 2 23 7.00 -24.08 71.75 1012.6 41 <br>
1816 2 24 7.00 -25.13 68.88 1010.6 58 <br>
1816 2 25 8.00 -25.27 65.58 1009.2 55 <br>
1816 2 25 12.00 -24.75 7.30 1016.0 47 <br>
1816 2 26 8.00 -27.12 62.87 1012.6 72 <br>
1816 2 26 12.00 -22.90 4.60 1016.0 24 <br>
1816 2 27 8.00 -27.38 61.52 1014.6 71 <br>
1816 2 27 12.00 -21.23 2.47 1016.0 12 <br>
1816 2 28 12.00 -19.85 0.58 1016.0 90 <br>
1816 2 29 8.00 -28.70 57.35 1010.9 87 <br>
1816 3 1 8.00 -29.15 55.50 1015.0 95 <br>
1816 3 2 9.00 -29.18 52.17 1014.6 92 <br>
1816 3 5 9.00 -31.28 42.78 1017.0 12 <br>
1816 3 6 9.00 -32.37 39.32 1026.1 29 <br>
1816 3 10 10.00 -35.00 26.83 1019.4 56 <br>
1816 3 11 11.00 -36.22 22.18 1012.6 62 <br>
1816 3 12 11.00 -35.83 20.57 1010.9 50 <br>
1816 3 13 11.00 -35.08 18.67 1014.6 58 <br>
1816 3 14 11.00 -33.47 15.57 1009.2 35 <br>
1816 3 15 11.00 -31.03 12.17 1009.2 12 <br>
1816 3 16 11.00 -29.17 9.55 1015.3 99 <br>
1816 3 17 11.00 -27.62 7.52 1014.6 77 <br>
1816 3 18 12.00 -26.33 5.82 1015.3 65 <br>
1816 3 19 12.00 -25.02 4.03 1015.0 54 <br>
1816 3 20 12.00 -24.43 3.30 1014.3 43 <br>
1816 3 21 12.00 -22.85 1.67 1014.3 21 <br>
1816 5 1 -99.99 7.95 77.57 1005.6 77 <br>
1816 5 2 -99.99 6.27 78.77 1007.9 68 <br>
1816 5 3 -99.99 5.48 80.23 1001.1 50 <br>
1816 5 4 -99.99 5.67 80.80 1007.2 50 <br>
1816 5 5 -99.99 6.13 81.92 1006.5 61 <br>
1816 5 6 -99.99 7.67 82.28 1006.2 72 <br>
1816 5 7 -99.99 8.58 81.92 1005.6 81 <br>
1816 5 8 -99.99 10.03 80.08 1006.6 0 <br>
1816 5 9 -99.99 11.01 80.50 1006.7 10 <br>
1816 5 10 -99.99 11.98 80.18 1005.0 10 <br>
1816 5 11 -99.99 12.11 80.43 1006.4 20 <br>
1816 5 12 -99.99 12.23 80.50 1001.0 20 <br>
1816 5 13 -99.99 14.30 80.80 1000.7 40 <br>
1816 5 14 -99.99 16.03 82.65 999.1 62 <br>
1816 5 15 -99.99 17.87 84.50 999.2 74 <br>
1816 6 29 12.00 -36.07 0.00 1026.8 60 <br>
1816 6 30 12.00 -36.85 3.57 1024.8 63 <br>
1816 7 1 12.00 -36.88 7.25 1020.0 67 <br>
1816 7 2 11.00 -36.88 9.23 1016.0 69 <br>
1816 7 3 11.00 -36.45 12.05 1016.0 62 <br>
1816 7 4 11.00 -36.65 14.20 1010.6 64 <br>
1816 7 5 11.00 -36.87 15.78 1015.3 65 <br>
1816 7 6 11.00 -38.03 17.52 1012.6 87 <br>
1816 7 7 11.00 -38.72 18.47 1005.8 88 <br>
1816 7 8 11.00 -38.53 21.28 1002.8 81 <br>
1816 7 9 10.00 -37.42 24.37 1009.2 74 <br>
1816 7 10 10.00 -36.60 27.10 1032.9 67 <br>
1816 7 11 10.00 -36.50 31.50 1015.3 61 <br>
1816 7 12 10.00 -36.30 35.00 1014.0 65 <br>
1816 7 13 10.00 -35.78 36.90 1019.4 56 <br>
1816 7 14 9.00 -36.43 41.18 1008.5 61 <br>
1816 7 15 9.00 -36.78 44.98 1012.6 64 <br>
1816 7 16 9.00 -37.00 49.20 1010.6 79 <br>
1816 7 17 8.00 -36.90 53.05 1009.2 63 <br>
1816 7 18 8.00 -37.10 57.08 1002.4 77 <br>
1816 7 19 8.00 -37.23 60.12 1032.9 70 <br>
1816 7 20 8.00 -37.18 62.97 1021.1 72 <br>
1816 7 21 8.00 -37.45 66.47 1021.1 76 <br>
1816 7 22 7.00 -37.55 71.00 1021.1 71 <br>
1816 7 23 7.00 -37.57 75.45 1016.0 75 <br>
1816 7 24 7.00 -37.52 79.45 1008.2 79 <br>
1816 7 25 6.00 -36.72 83.07 1011.9 63 <br>
1816 7 26 6.00 -35.83 87.72 1012.6 57 <br>
1816 7 27 6.00 -35.15 91.45 1009.9 51 <br>
1816 7 28 6.00 -33.42 94.82 1016.0 34 <br>
1816 7 29 5.00 -31.45 98.12 1010.2 18 <br>
1816 7 30 5.00 -28.68 100.77 1013.3 80 <br>
1816 7 31 5.00 -25.40 102.13 1019.4 52 <br>
1816 8 1 5.00 -22.87 102.87 1020.4 22 <br>
1816 8 2 5.00 -21.08 103.98 1019.4 13 <br>
1816 8 3 5.00 -18.00 104.98 1016.0 84 <br>
1816 8 4 5.00 -14.75 105.58 1016.0 45 <br>
1816 8 5 5.00 -11.52 105.62 1014.3 15 <br>
1816 8 6 5.00 -8.67 105.63 1016.0 85 <br>
1816 8 22 -99.99 15.65 90.37 999.8 50 <br>
1816 8 23 -99.99 14.92 91.77 1002.8 41 <br>
1816 8 24 -99.99 13.62 93.22 1004.1 33 <br>
1816 8 25 -99.99 12.67 94.38 1004.0 24 <br>
1816 8 27 -99.99 8.12 97.80 1007.3 87 <br>
1816 8 28 -99.99 6.47 97.60 1002.8 67 <br>
1816 8 30 -99.99 5.03 99.55 1007.9 59 <br>
1816 8 31 -99.99 4.50 99.85 1007.5 49 <br>
1816 9 2 -99.99 4.17 100.35 1007.2 40 <br>
1816 9 3 -99.99 3.50 100.58 1006.5 30 <br>
1816 9 4 -99.99 3.50 100.58 1006.5 30 <br>
1816 9 6 -99.99 2.17 102.22 1008.2 22 <br>
1816 9 8 -99.99 1.60 102.08 1009.2 12 <br>
1816 9 9 -99.99 2.27 103.55 1009.9 23 <br>
1816 9 11 -99.99 3.60 105.00 1007.9 35 <br>
1816 9 12 -99.99 5.13 105.78 1006.5 55 <br>
1816 9 13 -99.99 6.48 106.07 1005.9 66 <br>
1816 9 14 -99.99 8.85 107.90 1004.6 87 <br>
1816 9 16 -99.99 12.30 112.18 1003.7 22 <br>
1816 9 17 -99.99 14.17 113.62 1001.4 43 <br>
1816 9 18 -99.99 16.03 114.53 997.1 64 <br>
1816 9 19 -99.99 16.13 115.47 997.1 65 <br>
1816 9 20 -99.99 16.22 115.82 1000.1 65 <br>
1816 9 21 -99.99 16.75 116.02 1005.6 66 <br>
1816 9 22 -99.99 17.65 116.47 1004.6 76 <br>
1816 9 23 -99.99 18.52 116.75 1001.3 86 <br>
1816 9 24 -99.99 19.38 117.17 1004.4 97 <br>
1816 9 25 -99.99 19.92 115.85 1009.5 95 <br>
1816 9 26 -99.99 20.45 114.53 1013.2 4 <br>
1816 9 27 -99.99 20.70 113.22 1009.5 3 <br>
1816 12 4 -99.99 19.95 114.67 1018.9 94 <br>
1816 12 5 -99.99 16.67 112.07 1009.6 62 <br>
1816 12 7 -99.99 10.10 108.60 1010.0 8 <br>
1816 12 9 -99.99 5.11 104.83 1005.9 54 <br>
1816 12 10 -99.99 2.47 104.52 1006.5 24 <br>
1816 12 11 -99.99 2.48 103.80 1007.8 23 <br>
1816 12 14 -99.99 2.53 101.63 1006.5 21 <br>
1816 12 15 -99.99 2.70 101.30 1003.1 21 <br>
1816 12 16 -99.99 2.87 100.99 1006.2 20 <br>
1816 12 17 -99.99 3.70 100.68 1007.5 30 <br>
1816 12 18 -99.99 4.30 100.37 1008.2 40 <br>
1816 12 19 -99.99 4.75 100.25 1007.9 40 <br>
1816 12 20 -99.99 5.93 98.73 1008.6 58 <br>
1816 12 21 -99.99 6.55 96.15 1008.6 66 <br>
1816 12 23 -99.99 7.03 90.10 1009.9 70 <br>
1816 12 24 -99.99 6.70 86.72 1009.3 66 <br>
1816 12 25 -99.99 6.60 83.30 1009.3 63 <br>
1816 12 26 -99.99 5.78 80.75 1008.2 50 <br>
1816 12 27 -99.99 5.86 80.52 1007.2 50 <br>
1816 12 28 -99.99 5.94 80.28 1008.2 50 <br>
1816 12 30 -99.99 5.92 79.82 1009.2 59 <br>
1816 12 31 -99.99 5.95 79.97 1009.2 59 <br>
1817 1 1 -99.99 6.27 80.13 1008.9 60 <br>
1817 1 2 -99.99 6.95 79.02 1010.6 69 <br>
1817 2 9 -99.99 17.07 87.47 1012.7 77 <br>
1817 2 10 -99.99 16.90 87.05 1013.0 67 <br>
1817 2 11 -99.99 15.33 86.05 1014.6 56 <br>
1817 2 13 -99.99 12.00 84.22 1011.8 24 <br>
1817 2 14 -99.99 10.07 83.57 1011.7 3 <br>
1817 2 15 -99.99 9.13 82.72 1011.4 92 <br>
1817 2 16 -99.99 6.27 81.87 1008.9 61 <br>
1817 2 17 -99.99 6.16 80.98 1008.9 60 <br>
1817 2 18 -99.99 6.05 80.08 1007.9 60 <br>
1817 2 19 -99.99 6.10 79.17 1006.5 69 <br>
1817 2 20 -99.99 6.63 79.15 1008.6 69 <br>
1817 2 21 -99.99 6.65 79.13 1008.9 69 <br>
1817 2 22 -99.99 6.83 79.10 1007.6 69 <br>
1817 2 23 -99.99 7.47 78.20 1011.0 78 <br>
1817 2 24 -99.99 8.32 76.40 1010.7 86 <br>
1817 2 25 -99.99 8.48 76.72 1008.3 86 <br>
1817 2 26 -99.99 8.80 76.50 1009.0 86 <br>
1817 2 27 -99.99 9.42 76.24 1009.3 96 <br>
1817 2 28 -99.99 10.00 75.98 1010.7 5 <br>
1817 3 1 -99.99 10.28 75.78 1011.0 5 <br>
1817 3 2 -99.99 11.00 75.82 1010.4 15 <br>
1817 3 3 -99.99 11.33 75.85 1012.4 15 <br>
1817 3 4 -99.99 11.53 75.05 1010.1 15 <br>
1817 3 5 -99.99 11.62 74.78 1008.4 14 <br>
1817 3 6 -99.99 11.80 75.28 1009.4 15 <br>
1817 3 7 -99.99 12.10 75.28 1007.7 25 <br>
1817 3 8 -99.99 12.73 74.97 1008.4 24 <br>
1817 3 9 -99.99 12.97 74.83 1008.1 24 <br>
1817 3 10 -99.99 13.67 74.50 1011.5 34 <br>
1817 3 11 -99.99 14.17 74.26 1010.2 44 <br>
1817 3 12 -99.99 14.80 74.02 1008.2 44 <br>
1817 3 13 -99.99 15.17 73.78 1008.9 53 <br>
1817 3 14 -99.99 15.77 73.57 1009.2 53 <br>
1817 3 15 -99.99 16.43 73.35 1008.3 63 <br>
1817 3 16 -99.99 17.18 73.10 1009.7 73 <br>
1817 3 17 -99.99 17.78 72.94 1007.0 72 <br>
1817 3 18 -99.99 18.33 72.78 1009.0 82 <br>
1817 4 23 -99.99 17.47 72.90 1004.3 72 <br>
1817 4 24 -99.99 15.92 73.17 1006.9 53 <br>
1817 4 25 -99.99 14.88 73.82 1005.5 43 <br>
1817 4 27 -99.99 12.67 74.47 1008.8 24 <br>
1817 4 28 -99.99 11.58 75.35 1009.1 15 <br>
1817 4 29 -99.99 10.23 76.05 1009.0 6 <br>
1817 4 30 -99.99 9.95 76.45 1010.0 96 <br>
<br>
Many thanks in advance.<br>
<br>
Kind Regards<br>
Melissa<br>
<br>
<br>
Here is the code:<br>
;----------------------------------------------------------------------<br>
; wind_vector_ship_tracks_1.ncl<br>
;----------------------------------------------------------------------<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" <br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" <br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" <br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"<br>
begin<br>
<br>
f=addfile("/mnt/geog/ml382/McGill_Project/ReanalysisV2/ua_1815-1817_ens_anim.nc", "r")
<br>
<br>
g=addfile("/mnt/geog/ml382/McGill_Project/ReanalysisV2/va_1815-1817_ens_anim.nc", "r")
<br>
<br>
<br>
latS = -70.<br>
latN = 50. <br>
lonL = 0.<br>
lonR = 150.<br>
<br>
u = f->ua(:,0,:,:)<br>
v = g->va(:,0,:,:)<br>
<br>
lat = f->lat<br>
lon = f->lon<br>
time = f->time<br>
<br>
<br>
do gg = 0,dimsizes(time)-1 <br>
<br>
u_avg = dim_avg_n_Wrap(u,0) ;<br>
v_avg = dim_avg_n_Wrap(v,0) ;<br>
<br>
u_avg = u_avg/5<br>
v_avg = v_avg/5<br>
<br>
speed = sqrt(u(gg,:,:)^2+v(gg,:,:)^2)<br>
<br>
speed!0 = "lat"<br>
speed!1 = "lon"<br>
speed&lat = lat<br>
speed&lon = lon<br>
speed@long_name = "Wind Speed"<br>
speed@units = "m/s"<br>
<br>
printVarSummary(u)<br>
printVarSummary(v)<br>
printVarSummary(speed)<br>
<br>
<br>
wks = gsn_open_wks("X11","MtTambora_Animation_"+time(gg)+"") ; specifies a plot<br>
;gsn_define_colormap(wks,"WhiteBlue") ; choose color map<br>
plot = new (dimsizes(time),"graphic")<br>
plot1= new (dimsizes(time),"graphic")<br>
plot2= new (dimsizes(time),"graphic")<br>
<br>
;---Create plot<br>
<br>
res = True ; plot mods desired<br>
<br>
res@cnFillOn = True ; turn on color for contours<br>
res@cnLinesOn = False ; turn off contour lines<br>
res@cnLineLabelsOn = False ; turn off contour line labels<br>
res@gsnScalarContour = True ; contours desired<br>
res@gsnDraw = False ; do not draw the plot<br>
res@gsnFrame = False <br>
<br>
<br>
res@vcRefMagnitudeF = 2.0 ; define vector ref mag<br>
res@vcRefLengthF = 0.008 ; define length of vec ref<br>
res@vcRefAnnoOrthogonalPosF = -1.0 ; move ref vector<br>
res@vcRefAnnoArrowLineColor = "black" ; change ref vector color<br>
res@vcRefAnnoArrowUseVecColor = False ; don't use vec color for ref<br>
<br>
res@vcLineArrowColor = "black" ; change vector color<br>
res@vcLineArrowThicknessF = 2.0 ; change vector thickness<br>
res@vcVectorDrawOrder = "PostDraw" ; draw vectors last<br>
res@vcMinDistanceF = 0.02<br>
<br>
res@gsnLeftString = ""<br>
res@gsnMainString = "" <br>
res@gsnRightString = ""<br>
<br>
res@mpMinLonF = lonL ; select a subregion<br>
res@mpMaxLonF = lonR<br>
res@mpMinLatF = latS<br>
res@mpMaxLatF = latN<br>
<br>
<br>
pres = True<br>
<br>
pres@mpFillOn = False<br>
pres@cnFillOn = True ; color on<br>
pres@cnLinesOn = False ; turn off contour lines<br>
pres@gsnScalarContour = True ; vectors over contours<br>
pres@gsnSpreadColors = True ; use full colormap<br>
pres@gsnAddCyclic = False<br>
pres@gsnDraw = False ; do not draw the plot<br>
pres@gsnFrame = False <br>
pres@lbLabelBarOn = False<br>
pres@gsnMaximize = True<br>
<br>
pres@mpMinLonF = lonL ; select a subregion<br>
pres@mpMaxLonF = lonR<br>
pres@mpMinLatF = latS<br>
pres@mpMaxLatF = latN<br>
<br>
<br>
pres@gsnLeftString = ""<br>
pres@gsnMainString = "" <br>
pres@gsnRightString = ""<br>
<br>
pres@cnLevelSelectionMode= "ManualLevels" ; manual levels<br>
pres@cnMinLevelValF = -100 ; min level<br>
pres@cnMaxLevelValF = 120 ; max level<br>
pres@cnLevelSpacingF = 10 ; contour spacing<br>
<br>
<br>
mres = True <br>
mres@gsMarkerIndex = 3 ; polymarker style<br>
mres@gsMarkerSizeF = 20. ; polymarker size<br>
mres@gsMarkerColor = "red" <br>
<br>
mpres = True ; plot mods desired<br>
mpres@xyMarkLineModes = "Markers" ; choose which have markers<br>
mpres@xyMarkers = 16 ; choose type of marker <br>
mpres@xyMarkerColor = "red" ; Marker color<br>
mpres@xyMarkerSizeF = 0.01 ; Marker size (default 0.01)<br>
<br>
;Ship track data<br>
<br>
ship = "/mnt/geog/ml382/McGill_Project/ReanalysisV2/Ship_tracks_Scen2.txt"<br>
data = asciiread(ship,-1,"string")<br>
year = stringtofloat(str_get_cols(data, 1,5))<br>
month = stringtofloat(str_get_cols(data,8,9))<br>
day = stringtofloat(str_get_cols(data,11,13))<br>
hour = stringtofloat(str_get_cols(data,15,20))<br>
slat = stringtofloat(str_get_cols(data,22,28))<br>
slon = stringtofloat(str_get_cols(data,31,37))<br>
<br>
nrow = numAsciiRow("ship")<br>
<br>
print(nrow)<br>
<br>
print(slat)<br>
print(slon)<br>
print(month)<br>
print(year)<br>
<br>
print(data)<br>
<br>
<br>
x=slon <br>
y=slat<br>
<br>
if (gg.eq.0) then<br>
year=1815<br>
month=4<br>
<br>
<br>
polyres = True ; poly marker mods desired <br>
polyres@gsMarkerIndex = 16 ; choose circle as polymarker<br>
polyres@gsMarkerSizeF = 7.0 ; select size to avoid streaking<br>
polyres@gsMarkerColor = "red" ; choose color<br>
<br>
<br>
<br>
pres@gsnLeftString = "Mount Tambora Winds and Shipping Tracks "+time(gg)+""<br>
plot(gg) = gsn_csm_contour_map(wks,speed(:,:),pres)<br>
plot1(gg)= gsn_csm_vector(wks,u(gg,:,:),v(gg,:,:),res)<br>
<br>
dum = gsn_add_polymarker(wks,plot(gg),x,y,polyres) ; draw polymarkers<br>
<br>
<br>
<br>
overlay(plot(gg),plot1(gg))<br>
<br>
<br>
;overlay(plot(gg),dum(gg)) <br>
<br>
<br>
draw(plot(gg))<br>
<br>
end if<br>
<br>
frame(wks)<br>
end do<br>
;end do<br>
;end do<br>
end<br>
<br>
</div>
</body>
</html>