<html><body><div style="color:#000; background-color:#fff; font-family:garamond, new york, times, serif;font-size:24px"><div id="yui_3_16_0_1_1424080067804_34754" dir="ltr"><span id="yui_3_16_0_1_1424080067804_35032">Hi Davide, I learned the <gs id="69064144-8cd9-4fa0-a65e-d8291332318e" ginger_software_uiphraseguid="942654d1-ba28-4201-a821-38b997fe2a3f" class="GINGER_SOFTWARE_mark">script but</gs> the final part of the script is not clear to me&nbsp;</span></div><div id="yui_3_16_0_1_1424080067804_34754" dir="ltr"><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">&nbsp; &nbsp; Alpha='acos<gs id="24faf687-fc62-43e5-bca2-46dfef817de1" ginger_software_uiphraseguid="1e90ef72-d033-46e3-ae28-ae395e607ef9" class="GINGER_SOFTWARE_mark">( </gs>cos<gs id="a8867853-d4ce-4ec3-9901-9c3b897f5654" ginger_software_uiphraseguid="1e90ef72-d033-46e3-ae28-ae395e607ef9" class="GINGER_SOFTWARE_mark">(</gs>'Phi1'<gs id="93737afa-84b5-4b1b-bad2-86c921ac6850" ginger_software_uiphraseguid="1e90ef72-d033-46e3-ae28-ae395e607ef9" class="GINGER_SOFTWARE_mark">)</gs>*cos<gs id="015b0b3d-d334-4f8c-a726-dbafeaa6f224" ginger_software_uiphraseguid="1e90ef72-d033-46e3-ae28-ae395e607ef9" class="GINGER_SOFTWARE_mark">(</gs>'Phi2') +</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><gs id="d8958e93-6da3-4eab-80b2-acdafd735f2f" ginger_software_uiphraseguid="9b88425a-2e30-4218-913f-55c79a328415" class="GINGER_SOFTWARE_mark">cos</gs><gs id="8952e8e6-b232-4700-95f0-97ced4d4e38d" ginger_software_uiphraseguid="9b88425a-2e30-4218-913f-55c79a328415" class="GINGER_SOFTWARE_mark">(</gs>'Theta1'-'Theta2'<gs id="e95c176b-730d-43b2-885a-f58d6b90a0f2" ginger_software_uiphraseguid="9b88425a-2e30-4218-913f-55c79a328415" class="GINGER_SOFTWARE_mark">)</gs>*sin<gs id="9021b974-9a5c-4a7d-9cbf-c02394701266" ginger_software_uiphraseguid="9b88425a-2e30-4218-913f-55c79a328415" class="GINGER_SOFTWARE_mark">(</gs>'Phi1'<gs id="cde1c5df-8eaa-40e1-a488-3617e367962a" ginger_software_uiphraseguid="9b88425a-2e30-4218-913f-55c79a328415" class="GINGER_SOFTWARE_mark">)</gs>*sin<gs id="2bb60e3e-f428-4eab-a6bc-e4602e8820af" ginger_software_uiphraseguid="9b88425a-2e30-4218-913f-55c79a328415" class="GINGER_SOFTWARE_mark">(</gs>'Phi2'))'</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">*&nbsp; &nbsp; 'd <gs id="c2ee4ba7-f80f-4ef4-82e7-a427b9b74743" ginger_software_uiphraseguid="e51d3623-fabf-42d1-b549-fa9041ae92fc" class="GINGER_SOFTWARE_mark">asin</gs><gs id="1c914313-8a62-44c3-93f6-7adec029688c" ginger_software_uiphraseguid="e51d3623-fabf-42d1-b549-fa9041ae92fc" class="GINGER_SOFTWARE_mark">(</gs>sqrt<gs id="9fe44ed9-e0b2-4625-9d7a-ceea5ecad02d" ginger_software_uiphraseguid="e51d3623-fabf-42d1-b549-fa9041ae92fc" class="GINGER_SOFTWARE_mark">(</gs>'d2'))'</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">*&nbsp; &nbsp; 'd <gs id="61c89c29-cc21-4dd8-a166-e081f0482338" ginger_software_uiphraseguid="019bac8e-5cd3-4991-861b-686c5dbdbea6" class="GINGER_SOFTWARE_mark">acos</gs><gs id="bca3fb45-2581-48b6-9cff-22752dfab828" ginger_software_uiphraseguid="019bac8e-5cd3-4991-861b-686c5dbdbea6" class="GINGER_SOFTWARE_mark">(</gs>'Alpha')'</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">&nbsp; &nbsp; '<gs id="4e88a54e-d0a6-42b5-90a8-8b9b8ffd7e87" ginger_software_uiphraseguid="bfb7ec9b-30c6-43e4-b820-a611b3a446eb" class="GINGER_SOFTWARE_mark">d</gs> 'Alpha</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">*say 'T<gs id="a8fe7598-dce8-4896-a91e-7e116857df82" ginger_software_uiphraseguid="1c0c9bbf-dad6-48e1-b1e1-633aa1ab57d1" class="GINGER_SOFTWARE_mark">,</gs>P: 'Theta1' 'Phi1</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">*say 'T<gs id="669aa3d7-c1eb-4aed-998a-f52b92ee02d7" ginger_software_uiphraseguid="3f6cc3d7-f91c-4b88-baeb-1ed9c2e1c510" class="GINGER_SOFTWARE_mark">,</gs>P: 'Theta2' 'Phi2</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">*say 'A<gs id="652a9410-9fe8-440e-8990-bd04e38e44e3" ginger_software_uiphraseguid="cbd3b87a-8d25-4048-b588-15bfc25b4ed7" class="GINGER_SOFTWARE_mark">,</gs><gs id="5db61528-7212-4071-b3ac-ab2afc646f10" ginger_software_uiphraseguid="cbd3b87a-8d25-4048-b588-15bfc25b4ed7" class="GINGER_SOFTWARE_mark">cA</gs>: 'Alpha' 'subwrd<gs id="52a05e04-3ba5-4e00-8a9b-58d4c0031553" ginger_software_uiphraseguid="cbd3b87a-8d25-4048-b588-15bfc25b4ed7" class="GINGER_SOFTWARE_mark">(</gs>result<gs id="88c6f37f-a9f4-4e67-8194-e4f1c70db5df" ginger_software_uiphraseguid="cbd3b87a-8d25-4048-b588-15bfc25b4ed7" class="GINGER_SOFTWARE_mark">,</gs>4)</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">&nbsp; <gs id="4c6a00d7-3de3-4c8b-b333-b629bfb7dfed" ginger_software_uiphraseguid="53540799-c6cd-4921-8ce5-9cafc40e4720" class="GINGER_SOFTWARE_mark">return</gs> (subwrd<gs id="f06f2ffb-05b2-45a2-abb0-e86d7d6ee7e3" ginger_software_uiphraseguid="53540799-c6cd-4921-8ce5-9cafc40e4720" class="GINGER_SOFTWARE_mark">(</gs>result<gs id="3c1c33a0-8f74-4691-bcb1-476012e34805" ginger_software_uiphraseguid="53540799-c6cd-4921-8ce5-9cafc40e4720" class="GINGER_SOFTWARE_mark">,</gs>4<gs id="80027232-1370-4210-8357-a3b10d43a7d8" ginger_software_uiphraseguid="53540799-c6cd-4921-8ce5-9cafc40e4720" class="GINGER_SOFTWARE_mark">)</gs>*_At) &nbsp;&nbsp;</span><br></div><div></div><div id="yui_3_16_0_1_1424080067804_34755" dir="ltr">&nbsp;<gs id="01b6deef-81b9-4567-8210-a375ec0a27ec" ginger_software_uiphraseguid="6ae2554f-59cd-4bc5-90ce-c7467caf234f" class="GINGER_SOFTWARE_mark">what</gs> is a distance then. <gs id="db48731a-d98f-4db0-9be4-0968863f4949" ginger_software_uiphraseguid="adf59bc7-fc8d-4462-a1d8-24aab13ea993" class="GINGER_SOFTWARE_mark">is</gs> it *&nbsp;&nbsp;&nbsp; d2=x*x+y*y+z*z?</div><div id="yui_3_16_0_1_1424080067804_34755" dir="ltr"><br></div><div class="" style=""><o:p class="" style=""></o:p></div><div id="yui_3_16_0_1_1424080067804_34757"><div id="yui_3_16_0_1_1424080067804_34756">AS EVER
<br>LUHUNGA
<br>
<br>--------------------
<br>Philbert Modest Luhunga
<br>University of Pretoria&nbsp;
<br>Department of Geography<gs id="8ff7fe05-ec70-460b-a4d0-d61cb806e064" ginger_software_uiphraseguid="dfbd59d7-a753-4d09-a303-905c4ed98eee" class="GINGER_SOFTWARE_mark">,</gs>Geoinformatics and Meteorology
<br>Private Bag X20 Hatfield 0028 South Africa
<br>Tel +27 (0) 12 420 5164
<br>Fax +27 (0) 12 420 6385
<br>Mobile<gs id="65a4619c-b7ce-46c7-b2b5-7fde040e0472" ginger_software_uiphraseguid="5bc2690b-61aa-4892-b356-4aa65c63310f" class="GINGER_SOFTWARE_mark">:</gs>+ 27826228060
<br>Email address: philuhunga@yahoo.com</div></div><br>  <div style="font-family: garamond, new york, times, serif; font-size: 24px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <hr size="1">  <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Davide Sacchetti &lt;davide.sacchetti@arpal.gov.it&gt;<br> <b><span style="font-weight: bold;">To:</span></b> PHILBERT LUHUNGA &lt;philuhunga@yahoo.com<gs id="a58587d5-a336-40d4-9948-b1c61f75a663" ginger_software_uiphraseguid="102160c6-966e-4c2c-b470-3b283585a553" class="GINGER_SOFTWARE_mark">&gt;;</gs> GrADS Users Forum &lt;gradsusr@gradsusr.org&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, February 16, 2015 10:42 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [<gs id="bc4130a3-8c16-4693-8330-cf5a05dd3596" ginger_software_uiphraseguid="62d2b3b2-afe6-491b-bc2f-4a95636ec637" class="GINGER_SOFTWARE_mark">gradsusr</gs>] Calculate distance between latitude-longitude in GrADS<br> </font> </div> <div class="y_msg_container"><br>&nbsp; <gs id="9440a94c-f977-4e40-a731-8758c18f4315" ginger_software_uiphraseguid="9500aeeb-808a-42a9-b4fd-d1fcaa76b9b1" class="GINGER_SOFTWARE_mark">function</gs> <gs id="ce61ca2b-a077-4b3f-aa88-2200946bd0d9" ginger_software_uiphraseguid="9500aeeb-808a-42a9-b4fd-d1fcaa76b9b1" class="GINGER_SOFTWARE_mark">dist</gs><gs id="ec9e4555-58e9-4232-9a85-466705910192" ginger_software_uiphraseguid="9500aeeb-808a-42a9-b4fd-d1fcaa76b9b1" class="GINGER_SOFTWARE_mark">(</gs>lon1<gs id="1c18bd35-4d57-410c-b3a0-19f8018304f1" ginger_software_uiphraseguid="9500aeeb-808a-42a9-b4fd-d1fcaa76b9b1" class="GINGER_SOFTWARE_mark">,</gs>lat1<gs id="7e8ea4d8-5bb7-48f4-be81-063a7ce3c5af" ginger_software_uiphraseguid="9500aeeb-808a-42a9-b4fd-d1fcaa76b9b1" class="GINGER_SOFTWARE_mark">,</gs>lon2<gs id="b2fb9e75-c586-4b5a-86b3-0e5a543ae1ca" ginger_software_uiphraseguid="9500aeeb-808a-42a9-b4fd-d1fcaa76b9b1" class="GINGER_SOFTWARE_mark">,</gs>lat2)<br clear="none">* Distance between two points on the <gs id="badac191-d0d2-44c1-b6fa-7484d243aafe" ginger_software_uiphraseguid="773be938-0340-4fa9-ac56-734ae2301682" class="GINGER_SOFTWARE_mark">Earth</gs> surface<br clear="none">&nbsp; &nbsp; _At=6371229<br clear="none">&nbsp; &nbsp; _PI=3<gs id="7e27f14a-244a-4f1a-9daf-541da0a3f0ee" ginger_software_uiphraseguid="24141566-243a-4747-be21-6e23d1cba552" class="GINGER_SOFTWARE_mark">.</gs>141592654<br clear="none">&nbsp; &nbsp; _D2R=_PI/180<br clear="none">&nbsp; &nbsp; _R2D=180/_PI<br clear="none">&nbsp; &nbsp; Theta1=lon1*_D2R;Phi1=<gs id="9307160e-6c7a-4242-bc1d-721744f21c21" ginger_software_uiphraseguid="a6a1239c-01e6-4e4f-bfe9-f303cd786c6b" class="GINGER_SOFTWARE_mark">(</gs>90-lat1<gs id="5554f32f-850f-4684-af50-f8ebb05ef206" ginger_software_uiphraseguid="a6a1239c-01e6-4e4f-bfe9-f303cd786c6b" class="GINGER_SOFTWARE_mark">)</gs>*_D2R<br clear="none">&nbsp; &nbsp; '<gs id="ed57ac8a-c09d-4ed4-8e84-f56459dce81a" ginger_software_uiphraseguid="db0d1170-966e-4fc4-9b42-c86193b5c538" class="GINGER_SOFTWARE_mark">d</gs> sin<gs id="b95b7706-c8ee-4980-9d12-7d0c05cc435b" ginger_software_uiphraseguid="db0d1170-966e-4fc4-9b42-c86193b5c538" class="GINGER_SOFTWARE_mark">(</gs>'Phi1'<gs id="826256f7-0c45-4546-a2d6-50bc64f94aa5" ginger_software_uiphraseguid="db0d1170-966e-4fc4-9b42-c86193b5c538" class="GINGER_SOFTWARE_mark">)</gs>*cos<gs id="105e22ec-8d17-4ec0-bbbd-4f5a4ca8b6f1" ginger_software_uiphraseguid="db0d1170-966e-4fc4-9b42-c86193b5c538" class="GINGER_SOFTWARE_mark">(</gs>'Theta1')'<br clear="none">&nbsp; &nbsp; x1=subwrd<gs id="92c7b8b0-a65e-45c1-8f45-0fbae8cea682" ginger_software_uiphraseguid="f0a68445-9589-4f01-a741-831d460cd6f4" class="GINGER_SOFTWARE_mark">(</gs>result<gs id="32b53bb9-b1c7-4d74-8b9a-7a74e6fa2e0e" ginger_software_uiphraseguid="f0a68445-9589-4f01-a741-831d460cd6f4" class="GINGER_SOFTWARE_mark">,</gs>4)<br clear="none">&nbsp; &nbsp; '<gs id="fe73caad-27cb-4dd9-862c-21acbe25e1fc" ginger_software_uiphraseguid="e02f1d87-d2fa-43f8-8a67-011b1b732794" class="GINGER_SOFTWARE_mark">d</gs> sin<gs id="31131078-7afb-4856-8f7c-dc8aaa102c7c" ginger_software_uiphraseguid="e02f1d87-d2fa-43f8-8a67-011b1b732794" class="GINGER_SOFTWARE_mark">(</gs>'Phi1'<gs id="ab6545ea-083d-4600-a89a-ac6237fd8459" ginger_software_uiphraseguid="e02f1d87-d2fa-43f8-8a67-011b1b732794" class="GINGER_SOFTWARE_mark">)</gs>*sin<gs id="86ee40b5-729a-48a4-8370-e334b53ea0c7" ginger_software_uiphraseguid="e02f1d87-d2fa-43f8-8a67-011b1b732794" class="GINGER_SOFTWARE_mark">(</gs>'Theta1')'<br clear="none">&nbsp; &nbsp; y1=subwrd<gs id="72ae233a-c7cb-47e5-8c28-6413c37bd563" ginger_software_uiphraseguid="84bbe010-ad8d-4541-954c-4a98a9431a4d" class="GINGER_SOFTWARE_mark">(</gs>result<gs id="0d7ff38c-1407-4878-8473-c80524bc26f4" ginger_software_uiphraseguid="84bbe010-ad8d-4541-954c-4a98a9431a4d" class="GINGER_SOFTWARE_mark">,</gs>4)<br clear="none">&nbsp; &nbsp; '<gs id="c37fcca3-f139-4806-b155-1d1a8af61d1c" ginger_software_uiphraseguid="de24a124-54f5-4c1c-946f-d011c0a1bebf" class="GINGER_SOFTWARE_mark">d</gs> cos<gs id="2a4f3bc2-3ced-406c-aaac-96781331e2b8" ginger_software_uiphraseguid="de24a124-54f5-4c1c-946f-d011c0a1bebf" class="GINGER_SOFTWARE_mark">(</gs>'Phi1')'<br clear="none">&nbsp; &nbsp; z1=subwrd<gs id="a9da1b05-96fc-4f24-a6c3-9fba5c0fd306" ginger_software_uiphraseguid="632bd836-6596-4cb1-b5a2-d31208ca9374" class="GINGER_SOFTWARE_mark">(</gs>result<gs id="a7335588-4425-4904-8d34-3fa2a316e3eb" ginger_software_uiphraseguid="632bd836-6596-4cb1-b5a2-d31208ca9374" class="GINGER_SOFTWARE_mark">,</gs>4)<br clear="none">&nbsp; &nbsp; Theta2=lon2*_D2R;Phi2=<gs id="cd4cc581-b8b6-4633-82ca-2530c73a6bb8" ginger_software_uiphraseguid="b28e602c-1934-432d-825d-6e5aaa483a5c" class="GINGER_SOFTWARE_mark">(</gs>90-lat2<gs id="48a52af3-0c2d-4a32-a06b-75bd8cce16c2" ginger_software_uiphraseguid="b28e602c-1934-432d-825d-6e5aaa483a5c" class="GINGER_SOFTWARE_mark">)</gs>*_D2R<br clear="none">&nbsp; &nbsp; '<gs id="381879a0-fc91-4372-96f4-b96ad8a302f0" ginger_software_uiphraseguid="d4d35f5d-a556-4d39-86fc-caa3f6d58ea0" class="GINGER_SOFTWARE_mark">d</gs> sin<gs id="f0aa18af-7909-4aea-bc31-b46b7248729a" ginger_software_uiphraseguid="d4d35f5d-a556-4d39-86fc-caa3f6d58ea0" class="GINGER_SOFTWARE_mark">(</gs>'Phi2'<gs id="7fd3d535-8fd5-42e9-aa79-fff79932e8ca" ginger_software_uiphraseguid="d4d35f5d-a556-4d39-86fc-caa3f6d58ea0" class="GINGER_SOFTWARE_mark">)</gs>*cos<gs id="e877022c-72f1-48e9-bd3b-42caeffb2dc5" ginger_software_uiphraseguid="d4d35f5d-a556-4d39-86fc-caa3f6d58ea0" class="GINGER_SOFTWARE_mark">(</gs>'Theta2')'<br clear="none">&nbsp; &nbsp; x2=subwrd<gs id="c3fc41a9-e82a-4794-998e-ce544c2d82d8" ginger_software_uiphraseguid="08e65054-a2af-4cf8-a24c-56122489ba48" class="GINGER_SOFTWARE_mark">(</gs>result<gs id="2b5faf19-ccfd-4525-8296-a2a39af0ce63" ginger_software_uiphraseguid="08e65054-a2af-4cf8-a24c-56122489ba48" class="GINGER_SOFTWARE_mark">,</gs>4)<br clear="none">&nbsp; &nbsp; '<gs id="efdfa5da-ea92-4f29-a6ad-1003fd059f94" ginger_software_uiphraseguid="a46bd0ec-8134-4e85-8256-6b27c9c18b4c" class="GINGER_SOFTWARE_mark">d</gs> sin<gs id="fd9c72d4-2f12-45ea-b0b6-97812d897762" ginger_software_uiphraseguid="a46bd0ec-8134-4e85-8256-6b27c9c18b4c" class="GINGER_SOFTWARE_mark">(</gs>'Phi2'<gs id="6462b28a-3376-47f3-887c-ed84d6085ac6" ginger_software_uiphraseguid="a46bd0ec-8134-4e85-8256-6b27c9c18b4c" class="GINGER_SOFTWARE_mark">)</gs>*sin<gs id="8fbdb9d5-887a-428e-bd73-aa735c398a16" ginger_software_uiphraseguid="a46bd0ec-8134-4e85-8256-6b27c9c18b4c" class="GINGER_SOFTWARE_mark">(</gs>'Theta2')'<br clear="none">&nbsp; &nbsp; y2=subwrd<gs id="2a4ab9ab-1958-4030-a11a-98d766fcc1b9" ginger_software_uiphraseguid="f39e7ce2-ade9-4b5b-985e-28f8f8e32bfc" class="GINGER_SOFTWARE_mark">(</gs>result<gs id="68524bc3-2beb-43f1-a7ab-2d47636c2eec" ginger_software_uiphraseguid="f39e7ce2-ade9-4b5b-985e-28f8f8e32bfc" class="GINGER_SOFTWARE_mark">,</gs>4)<br clear="none">&nbsp; &nbsp; '<gs id="f4e65167-440c-4c69-960b-78f22b9a3fd1" ginger_software_uiphraseguid="815f56b2-49fc-4db9-bfea-a09c64dd6b73" class="GINGER_SOFTWARE_mark">d</gs> cos<gs id="94fdd356-c5c9-4270-a7bf-bdfd73f818a0" ginger_software_uiphraseguid="815f56b2-49fc-4db9-bfea-a09c64dd6b73" class="GINGER_SOFTWARE_mark">(</gs>'Phi2')'<br clear="none">&nbsp; &nbsp; z2=subwrd<gs id="90440df8-6438-4851-8894-4694f0bfa447" ginger_software_uiphraseguid="42798ee2-2177-403a-ae06-b4d29fa6a07a" class="GINGER_SOFTWARE_mark">(</gs>result<gs id="404f5658-a985-4496-b8b9-694e8c25f7fb" ginger_software_uiphraseguid="42798ee2-2177-403a-ae06-b4d29fa6a07a" class="GINGER_SOFTWARE_mark">,</gs>4)<br clear="none">*&nbsp; &nbsp; x=y1*z2-y2*z1<br clear="none">*&nbsp; &nbsp; y=x2*z1-x1*z2<br clear="none">*&nbsp; &nbsp; z=x1*y2-x2*y1<br clear="none">*&nbsp; &nbsp; d2=x*x+y*y+z*z<br clear="none">&nbsp; &nbsp; Alpha='acos<gs id="4596ba44-f052-4cc8-9063-ad875f6e6263" ginger_software_uiphraseguid="69719696-b8db-470f-a81a-bcc1b08c2399" class="GINGER_SOFTWARE_mark">( </gs>cos<gs id="27260c66-9cab-415f-894f-ece85b74e6f0" ginger_software_uiphraseguid="69719696-b8db-470f-a81a-bcc1b08c2399" class="GINGER_SOFTWARE_mark">(</gs>'Phi1'<gs id="d679953d-7329-4e81-88e4-77b4b9ee8b7e" ginger_software_uiphraseguid="69719696-b8db-470f-a81a-bcc1b08c2399" class="GINGER_SOFTWARE_mark">)</gs>*cos<gs id="f9c62154-0437-41f4-b22b-ab31243cab31" ginger_software_uiphraseguid="69719696-b8db-470f-a81a-bcc1b08c2399" class="GINGER_SOFTWARE_mark">(</gs>'Phi2') +<br clear="none"><gs id="193d07e7-3414-4e79-bd3b-47f812e37250" ginger_software_uiphraseguid="873b9347-abeb-451c-8bfc-6c0af71efbde" class="GINGER_SOFTWARE_mark">cos</gs><gs id="7456645b-5de4-4c9d-a78d-51e07daee2b6" ginger_software_uiphraseguid="873b9347-abeb-451c-8bfc-6c0af71efbde" class="GINGER_SOFTWARE_mark">(</gs>'Theta1'-'Theta2'<gs id="ac88600e-0a59-4f61-891c-0c15c62c60f8" ginger_software_uiphraseguid="873b9347-abeb-451c-8bfc-6c0af71efbde" class="GINGER_SOFTWARE_mark">)</gs>*sin<gs id="fd746ea5-6f60-4529-962a-7e9c2af10663" ginger_software_uiphraseguid="873b9347-abeb-451c-8bfc-6c0af71efbde" class="GINGER_SOFTWARE_mark">(</gs>'Phi1'<gs id="cf925f55-a10c-4b7b-a1c5-812a108036da" ginger_software_uiphraseguid="873b9347-abeb-451c-8bfc-6c0af71efbde" class="GINGER_SOFTWARE_mark">)</gs>*sin<gs id="438d3442-3096-404e-bc9e-7e7f6370ebc5" ginger_software_uiphraseguid="873b9347-abeb-451c-8bfc-6c0af71efbde" class="GINGER_SOFTWARE_mark">(</gs>'Phi2'))'<br clear="none">*&nbsp; &nbsp; 'd <gs id="b0a0fe27-43cb-4c9b-9bf7-72361c023993" ginger_software_uiphraseguid="8ee48e66-8341-45a0-8c10-8906f84821f7" class="GINGER_SOFTWARE_mark">asin</gs><gs id="7d818cc2-6941-4217-bd46-96464bfd11a0" ginger_software_uiphraseguid="8ee48e66-8341-45a0-8c10-8906f84821f7" class="GINGER_SOFTWARE_mark">(</gs>sqrt<gs id="f0d16bf5-146e-41d0-a555-750b7f577e2b" ginger_software_uiphraseguid="8ee48e66-8341-45a0-8c10-8906f84821f7" class="GINGER_SOFTWARE_mark">(</gs>'d2'))'<br clear="none">*&nbsp; &nbsp; 'd <gs id="7fbb36f1-a0fe-4b76-b2c8-ff168e8db49f" ginger_software_uiphraseguid="249badcd-376b-41aa-b336-e7313bdb567c" class="GINGER_SOFTWARE_mark">acos</gs><gs id="2bddf6cc-b238-4f2b-963c-6986bb4c5cb2" ginger_software_uiphraseguid="249badcd-376b-41aa-b336-e7313bdb567c" class="GINGER_SOFTWARE_mark">(</gs>'Alpha')'<br clear="none">&nbsp; &nbsp; '<gs id="ea751293-6484-48dd-aad4-4ec21dac346a" ginger_software_uiphraseguid="4f357814-45c0-49b5-bd7f-251114778436" class="GINGER_SOFTWARE_mark">d</gs> 'Alpha<br clear="none">*say 'T<gs id="a60f92c0-8890-43b3-8056-baef103e0428" ginger_software_uiphraseguid="8100f42a-2860-4c58-86e2-ff504384b0d6" class="GINGER_SOFTWARE_mark">,</gs>P: 'Theta1' 'Phi1<br clear="none">*say 'T<gs id="53d9e8ee-3a38-474e-96e3-6e1892cb31bc" ginger_software_uiphraseguid="afa44087-00c7-4f32-9ad9-ab0ad32e62af" class="GINGER_SOFTWARE_mark">,</gs>P: 'Theta2' 'Phi2<br clear="none">*say 'A<gs id="7a5523b5-5233-455f-ba8a-11501e079a76" ginger_software_uiphraseguid="fcbf8730-19af-4285-84dd-1b0859584677" class="GINGER_SOFTWARE_mark">,</gs><gs id="5c5b09ab-51ae-4c0e-a5b7-21c7ef1d4956" ginger_software_uiphraseguid="fcbf8730-19af-4285-84dd-1b0859584677" class="GINGER_SOFTWARE_mark">cA</gs>: 'Alpha' 'subwrd<gs id="4856fb7c-5293-4bee-a859-c085cafa67f9" ginger_software_uiphraseguid="fcbf8730-19af-4285-84dd-1b0859584677" class="GINGER_SOFTWARE_mark">(</gs>result<gs id="08cebf94-673b-48ba-b6c9-9380ad2f4d82" ginger_software_uiphraseguid="fcbf8730-19af-4285-84dd-1b0859584677" class="GINGER_SOFTWARE_mark">,</gs>4)<br clear="none">&nbsp; <gs id="5a30edca-eeda-45a9-8c8a-e45d08be05f6" ginger_software_uiphraseguid="e4ae483d-e819-4c85-a498-463b571757ce" class="GINGER_SOFTWARE_mark">return</gs> (subwrd<gs id="e5e50d2c-69ad-4f1e-92d4-8e3b82f1db48" ginger_software_uiphraseguid="e4ae483d-e819-4c85-a498-463b571757ce" class="GINGER_SOFTWARE_mark">(</gs>result<gs id="10a5f3ec-e99c-40ce-a558-55966e4e68a7" ginger_software_uiphraseguid="e4ae483d-e819-4c85-a498-463b571757ce" class="GINGER_SOFTWARE_mark">,</gs>4<gs id="bf5a6eed-6455-48b2-a8d6-bcec7cbc96dd" ginger_software_uiphraseguid="e4ae483d-e819-4c85-a498-463b571757ce" class="GINGER_SOFTWARE_mark">)</gs>*_At)&nbsp; &nbsp;  <br clear="none"><br clear="none"><br clear="none"><br clear="none"><br clear="none"><br clear="none">On Mon, 2015-02-16 at 07:45 +0000, PHILBERT LUHUNGA wrote:<br clear="none">&gt; <gs id="3719e699-7a0b-4799-8766-b532ebcc6f50" ginger_software_uiphraseguid="2097ff93-7b7a-4792-a053-d53f8136bd73" class="GINGER_SOFTWARE_mark">Hi does</gs> <gs id="adeb9cb6-dffe-4e44-af88-f6283dbeca49" ginger_software_uiphraseguid="2097ff93-7b7a-4792-a053-d53f8136bd73" class="GINGER_SOFTWARE_mark">any one</gs> knows how to compute <gs id="be4897d5-68a2-46c9-bf2b-8b25bf8dc7ce" ginger_software_uiphraseguid="2097ff93-7b7a-4792-a053-d53f8136bd73" class="GINGER_SOFTWARE_mark">distance</gs> between two latitude and<br clear="none">&gt; <gs id="f6d65c87-8496-4341-80f3-4a9d9dffc8e5" ginger_software_uiphraseguid="4b759d83-1664-4105-86fe-bd68c7df720c" class="GINGER_SOFTWARE_mark">longitude</gs> points in GrADs. I have two points<br clear="none">&gt; lon1=30<br clear="none">&gt; lat1=-6<br clear="none">&gt; lon2=30<gs id="03a28f6a-9930-4f45-92bc-2688a8ccf4b4" ginger_software_uiphraseguid="ce062ea8-f8d2-497a-9e17-27794250b0c1" class="GINGER_SOFTWARE_mark">.</gs>6<br clear="none">&gt; lat2=-6.4<br clear="none">&gt; <br clear="none">&gt; <br clear="none">&gt; <gs id="bad58f80-6154-4f9d-8fca-60c895fb18b5" ginger_software_uiphraseguid="486e4bd3-420f-48e4-be06-1dc5f793b06b" class="GINGER_SOFTWARE_mark">please</gs> help<br clear="none">&gt;&nbsp; <br clear="none">&gt; AS EVER <br clear="none">&gt; LUHUNGA <br clear="none">&gt; <br clear="none">&gt; -------------------- <br clear="none">&gt; Philbert Modest Luhunga <br clear="none">&gt; University of Pretoria&nbsp; <br clear="none">&gt; Department of Geography<gs id="9b5b234c-184a-4d9e-8c85-5077b15a322b" ginger_software_uiphraseguid="53098e2c-fca5-4c11-850f-630ec88c8a29" class="GINGER_SOFTWARE_mark">,</gs>Geoinformatics and Meteorology <br clear="none">&gt; Private Bag X20 Hatfield 0028 South Africa <br clear="none">&gt; Tel +27 (0) 12 420 5164 <br clear="none">&gt; Fax +27 (0) 12 420 6385 <br clear="none">&gt; Mobile<gs id="d53e48c7-ca08-4352-a2e8-fcee04f39f4c" ginger_software_uiphraseguid="2d911574-5643-46ca-a2cd-99c6db2ad82e" class="GINGER_SOFTWARE_mark">:</gs>+ 27826228060 <br clear="none">&gt; Email address: <a shape="rect" ymailto="mailto:philuhunga@yahoo.com" href="mailto:philuhunga@yahoo.com">philuhunga@yahoo.com</a><br clear="none">&gt; _______________________________________________<br clear="none">&gt; <gs id="578830f1-2b25-4bce-bb7f-40f9979013bd" ginger_software_uiphraseguid="2f43605b-fb15-4a53-932d-3806a84ea50f" class="GINGER_SOFTWARE_mark">gradsusr</gs> mailing list<br clear="none">&gt; <a shape="rect" ymailto="mailto:gradsusr@gradsusr.org" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br clear="none">&gt; <a shape="rect" href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br clear="none"><br clear="none">-- <br clear="none">Davide Sacchetti<br clear="none">Centro Funzionale Meteo Idrologico di Protezione Civile della Regione Liguria<br clear="none">ARPAL Unità Tecnica Complessa di livello Regionale<br clear="none"><gs id="1ab444d6-22ff-4c9c-a1d2-7f10821d0a8f" ginger_software_uiphraseguid="2b1e7de7-c26d-4690-968d-0f41faa23c92" class="GINGER_SOFTWARE_mark">V.</gs><gs id="3eccdd85-1080-4185-90fb-dddbef86a6bc" ginger_software_uiphraseguid="2b1e7de7-c26d-4690-968d-0f41faa23c92" class="GINGER_SOFTWARE_mark">le</gs> Brigare Partigiane 2 16121 Genova (I)<br clear="none"><gs id="06bb10a6-5058-4a1b-b8ca-275d11225191" ginger_software_uiphraseguid="a51d1a11-7d23-47be-973e-5a9a4ac557a1" class="GINGER_SOFTWARE_mark">tel</gs>: +39 010 6437535&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fax: +39 010 6437520<div class="qtdSeparateBR"><br><br></div><div class="yqt6649205627" id="yqtfd80258"><br clear="none"><gs id="da9992a2-ba3b-4630-a421-7790b6345bc2" ginger_software_uiphraseguid="05818134-6d7d-447e-a1b3-419e43770376" class="GINGER_SOFTWARE_mark">mail</gs>: </div><a shape="rect" ymailto="mailto:davide.sacchetti@arpal.gov.it" href="mailto:davide.sacchetti@arpal.gov.it">davide.sacchetti@arpal.gov.it</a>&nbsp; &nbsp;  web: www.meteoliguria.it<div class="yqt6649205627" id="yqtfd94148"><br clear="none"><br clear="none"><br clear="none"></div><br><br></div> </div> </div>  </div></body></html>