[gradsusr] Calculate distance between latitude-longitude in GrADS

Davide Sacchetti davide.sacchetti at arpal.gov.it
Mon Feb 16 08:26:52 EST 2015


I don't remember ...
you are on a sphere: you cannot use d2=x*x+y*y+z*z

At "eye" Alpha is the angular distance between point 1 and 2, then the
distance is Alpha*Radius

bye bye
Davide

On Mon, 2015-02-16 at 12:14 +0000, PHILBERT LUHUNGA wrote:
> 
> 
>  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
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

-- 
Davide Sacchetti
Centro Funzionale Meteo Idrologico di Protezione Civile della Regione Liguria
ARPAL Unità Tecnica Complessa di livello Regionale
V.le Brigare Partigiane 2 16121 Genova (I)
tel: +39 010 6437535                    fax: +39 010 6437520
mail: davide.sacchetti at arpal.gov.it     web: www.meteoliguria.it




More information about the gradsusr mailing list