Latitude,Longitude Coordinate Pairs from Matrix, Python Script
<p>I have two text files: 1) single array of latitude values, 2) single array of longitude values.  There are 94 latitude values in text file #1, and 192 longitude values in text file #2.  I want to do a 1 to 1 mapping so that there are 94 latitude x 192 longitude = 18048 coordinate pairs. I need to keep the exact precision of the individual values so thought writing as a string would be necessary.  </p>

<p>Through research I think it is necessary to read("rb") both files into memory, close them both and open a new file as writable("wb") named "latlon.txt".  The final format is a csv as such (lat,lon + /n).  I'm not sure how to write the script in python.  Here are the values to help illustrate my question:</p>

<pre><code>lon = 0, 1.875, 3.75, 5.625, 7.5, 9.375, 11.25, 13.125, 15, 16.875, 18.75, 
    20.625, 22.5, 24.375, 26.25, 28.125, 30, 31.875, 33.75, 35.625, 37.5, 
    39.375, 41.25, 43.125, 45, 46.875, 48.75, 50.625, 52.5, 54.375, 56.25, 
    58.125, 60, 61.875, 63.75, 65.625, 67.5, 69.375, 71.25, 73.125, 75, 
    76.875, 78.75, 80.625, 82.5, 84.375, 86.25, 88.125, 90, 91.875, 93.75, 
    95.625, 97.5, 99.375, 101.25, 103.125, 105, 106.875, 108.75, 110.625, 
    112.5, 114.375, 116.25, 118.125, 120, 121.875, 123.75, 125.625, 127.5, 
    129.375, 131.25, 133.125, 135, 136.875, 138.75, 140.625, 142.5, 144.375, 
    146.25, 148.125, 150, 151.875, 153.75, 155.625, 157.5, 159.375, 161.25, 
    163.125, 165, 166.875, 168.75, 170.625, 172.5, 174.375, 176.25, 178.125, 
    180, 181.875, 183.75, 185.625, 187.5, 189.375, 191.25, 193.125, 195, 
    196.875, 198.75, 200.625, 202.5, 204.375, 206.25, 208.125, 210, 211.875, 
    213.75, 215.625, 217.5, 219.375, 221.25, 223.125, 225, 226.875, 228.75, 
    230.625, 232.5, 234.375, 236.25, 238.125, 240, 241.875, 243.75, 245.625, 
    247.5, 249.375, 251.25, 253.125, 255, 256.875, 258.75, 260.625, 262.5, 
    264.375, 266.25, 268.125, 270, 271.875, 273.75, 275.625, 277.5, 279.375, 
    281.25, 283.125, 285, 286.875, 288.75, 290.625, 292.5, 294.375, 296.25, 
    298.125, 300, 301.875, 303.75, 305.625, 307.5, 309.375, 311.25, 313.125, 
    315, 316.875, 318.75, 320.625, 322.5, 324.375, 326.25, 328.125, 330, 
    331.875, 333.75, 335.625, 337.5, 339.375, 341.25, 343.125, 345, 346.875, 
    348.75, 350.625, 352.5, 354.375, 356.25, 358.125 ;

 lat = 88.5419501372975, 86.6531671712612, 84.7532299278375, 
    82.8507724666685, 80.9473590380955, 79.0434830262188, 77.1393485086043, 
    75.2350550220443, 73.3306568580251, 71.4261861337297, 69.5216630592775, 
    67.6171009860561, 65.7125090882981, 63.8078938782031, 61.9032601063951, 
    59.9986113201436, 58.0939502220327, 56.1892789076074, 54.2845990270979, 
    52.3799118980861, 50.4752185856401, 48.5705199603727, 46.6658167412098, 
    44.7611095273708, 42.8563988226079, 40.9516850538099, 39.0469685854431, 
    37.1422497308786, 35.2375287613668, 33.33280591321, 31.4280813935466, 
    29.523355385052, 27.6186280497899, 25.7138995323903, 23.8091699626917, 
    21.9044394579537, 19.9997081247232, 18.0949760604204, 16.1902433546966, 
    14.285510090607, 12.3807763456323, 10.4760421925768, 8.57130770036727, 
    6.6665729347709, 4.76183795905001, 2.85710283456696, 0.952367621352339, 
    -0.952367621352339, -2.85710283456696, -4.76183795905001, 
    -6.6665729347709, -8.57130770036727, -10.4760421925768, 
    -12.3807763456323, -14.285510090607, -16.1902433546966, 
    -18.0949760604204, -19.9997081247232, -21.9044394579537, 
    -23.8091699626917, -25.7138995323903, -27.6186280497899, 
    -29.523355385052, -31.4280813935466, -33.33280591321, -35.2375287613668, 
    -37.1422497308786, -39.0469685854431, -40.9516850538099, 
    -42.8563988226079, -44.7611095273708, -46.6658167412098, 
    -48.5705199603727, -50.4752185856401, -52.3799118980861, 
    -54.2845990270979, -56.1892789076074, -58.0939502220327, 
    -59.9986113201436, -61.9032601063951, -63.8078938782031, 
    -65.7125090882981, -67.6171009860561, -69.5216630592775, 
    -71.4261861337297, -73.3306568580251, -75.2350550220443, 
    -77.1393485086043, -79.0434830262188, -80.9473590380955, 
    -82.8507724666685, -84.7532299278375, -86.6531671712612, -88.5419501372975 ;`enter code here`
</code></pre>
