[gradsusr] Calculate distance between latitude-longitude in GrADS
PHILBERT LUHUNGA
philuhunga at yahoo.com
Mon Feb 16 07:14:49 EST 2015
Hi Davide, I learned the script but the final part of the script is not clear to me Alpha='acos ( cos ( 'Phi1' ) *cos ( 'Phi2') +
cos ( 'Theta1'-'Theta2' ) *sin ( 'Phi1' ) *sin ( 'Phi2'))'
* 'd asin ( sqrt ( 'd2'))'
* 'd acos ( 'Alpha')'
' d 'Alpha
*say 'T , P: 'Theta1' 'Phi1
*say 'T , P: 'Theta2' 'Phi2
*say 'A , cA : 'Alpha' 'subwrd ( result , 4)
return (subwrd ( result , 4 ) *_At)
what is a distance then. is it * d2=x*x+y*y+z*z?
AS EVER
LUHUNGA
--------------------
Philbert Modest Luhunga
University of Pretoria
Department of Geography,Geoinformatics and Meteorology
Private Bag X20 Hatfield 0028 South Africa
Tel +27 (0) 12 420 5164
Fax +27 (0) 12 420 6385
Mobile:+ 27826228060
Email address: philuhunga at yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20150216/fc49bc76/attachment.html
More information about the gradsusr
mailing list