<html><body><div style="color:#000; background-color:#fff; font-family:garamond, new york, times, serif;font-size:24px"><div id="yiv5874615218"><div style="color:#000;background-color:#fff;font-family:garamond, new york, times, serif;font-size:24px;" id="yui_3_16_0_1_1424115604125_4965"><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624"><span id="yui_3_16_0_1_1424115604125_4964">Dear Davide, I wrote my script like </span></div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'sdfopen 1tasmin_AFR-44_ICHEC-EC-EARTH_historical_r3i1p1_DMI-HIRHAM5_v2_day_19710101-19751231.nc'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">*Distance between two points on the earth surface</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'lat1=-10.5'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'lon1=30'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style=""><br class="yiv5874615218" style=""></div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'lat2=-10.56'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'lon2=40.04'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style=""><br class="yiv5874615218" style=""></div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">*'dlon=lon1-lon2'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'dlat=lat1-lat2'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'r=6.371229*pow(10,6)'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'pi=3.14159'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'d2r=pi/180'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'define theta1=lon1*d2r'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'define phi1=(90-lat1)*d2r'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style=""><br class="yiv5874615218" style=""></div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'define p1=sin(Phi1)*cos(Theta1)'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'define l1=sin(Phi1)*sin(Theta1)'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'define m1=cos(Phi1)'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style=""><br class="yiv5874615218" style=""></div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'define theta2=lon2*d2r'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'define phi2=(90-lat2)*d2r'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style=""><br class="yiv5874615218" style=""></div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'define p2=sin(Phi2)*cos(Theta2)'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'define l2=sin(Phi1)*sin(Theta2)'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'define m2=cos(Phi2)'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style=""><br class="yiv5874615218" style=""></div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style=""><br class="yiv5874615218" style=""></div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'Alpha=acos(cos(Phi1)*cos(Phi2) + cos(Theta1-Theta2)*sin(Phi1)*sin(Phi2))'</div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624"></div><div dir="ltr" id="yiv5874615218yui_3_16_0_1_1424115604125_2624" class="yiv5874615218" style="">'d1=r*Alpha'</div><div></div><div id="yiv5874615218yui_3_16_0_1_1424115604125_2670" dir="ltr"> I am getting 1097610.00 m=1098km</div><div id="yiv5874615218yui_3_16_0_1_1424115604125_2670" dir="ltr">I compared with the online calculator at <a rel="nofollow" target="_blank" href="http://www.nhc.noaa.gov/gccalc.shtml" id="yiv5874615218yui_3_16_0_1_1424115604125_2801">N</a>OAA, they are getting 1097 km</div><div id="yiv5874615218yui_3_16_0_1_1424115604125_2670" dir="ltr"><br></div><div style="width:450px;font-family:'Georgia', 'Times', 'Times New Roman', 'serif';margin-top:5px;margin-bottom:5px;background-color:#ffffff;" id="yiv5874615218enhancrCard_0" class="yiv5874615218link-enhancr-attachment yiv5874615218link-enhancr-element"><table class="yiv5874615218link-enhancr-element" cellspacing="0" cellpadding="0" border="0" style="width:450px;height:170px;display:block;" id="yiv5874615218yui_3_16_0_1_1424115604125_2970"><tbody id="yiv5874615218yui_3_16_0_1_1424115604125_2969"><tr class="yiv5874615218link-enhancr-element"><td class="yiv5874615218link-enhancr-element" colspan="8" style="height:1px;background-color:#e5e5e5;font-size:1px;border-collapse:collapse;"><div class="yiv5874615218link-enhancr-element" style="height:1px;background-color:#e5e5e5;font-size:1px;line-height:0px;"><br></div></td></tr><tr id="yui_3_16_0_1_1424115604125_6131"><td colspan="2" class="yiv5874615218link-enhancr-element" style="height:9px;background-color:#ffffff;font-size:0pt;border-collapse:collapse;" id="yui_3_16_0_1_1424115604125_6130"><div class="yiv5874615218link-enhancr-element" style="height:9px;background-color:#ffffff;font-size:9pt;" id="yui_3_16_0_1_1424115604125_6129"></div></td></tr><tr class="yiv5874615218link-enhancr-element" id="yui_3_16_0_1_1424115604125_6137"><td class="yiv5874615218link-enhancr-element" colspan="8" style="height:1px;background-color:#e5e5e5;font-size:1px;border-collapse:collapse;" id="yui_3_16_0_1_1424115604125_6136"><div class="yiv5874615218link-enhancr-element" style="height:1px;background-color:#e5e5e5;font-size:1px;line-height:0px;" id="yui_3_16_0_1_1424115604125_6135"><br></div></td></tr></tbody></table></div><div id="yiv5874615218yui_3_16_0_1_1424115604125_2524"><div id="yiv5874615218yui_3_16_0_1_1424115604125_2523">AS EVER
<br>LUHUNGA
<br>
<br>--------------------
<br>Philbert Modest Luhunga
<br>University of Pretoria
<br>Department of Geography,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:+ 27826228060
<br>Email address: philuhunga@yahoo.co<br>m</div></div></div></div></div></body></html>