source:
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/OBS/grt_cir_dis.h90
@
2281
Last change on this file since 2281 was 2281, checked in by smasson, 14 years ago | |
---|---|
|
|
File size: 1.1 KB |
Line | |
---|---|
1 | REAL(KIND=wp) FUNCTION grt_cir_dis( pa1, pa2, pb1, pb2, pc1, pc2 ) |
2 | !!---------------------------------------------------------------------- |
3 | !! *** FUNCTION grt_cir_dis *** |
4 | !! |
5 | !! ** Purpose : Great circle distance between pts (lat1,lon1) |
6 | !! & (lat2,lon2) |
7 | !! |
8 | !! ** Method : Geometry. |
9 | !! |
10 | !! History : |
11 | !! ! 1995-12 (G. Madec, E. Durand, A. Weaver, N. Daget) Original |
12 | !! ! 2006-03 (A. Vidard) Migration to NEMOVAR |
13 | !! ! 2006-10 (A. Weaver) Cleanup |
14 | !!---------------------------------------------------------------------- |
15 | |
16 | !! * Arguments |
17 | REAL(KIND=wp) :: pa1 ! sin(lat1) |
18 | REAL(KIND=wp) :: pa2 ! sin(lat2) |
19 | REAL(KIND=wp) :: pb1 ! cos(lat1) * cos(lon1) |
20 | REAL(KIND=wp) :: pb2 ! cos(lat2) * cos(lon2) |
21 | REAL(KIND=wp) :: pc1 ! cos(lat1) * sin(lon1) |
22 | REAL(KIND=wp) :: pc2 ! cos(lat2) * sin(lon2) |
23 | |
24 | grt_cir_dis = & |
25 | & ASIN( SQRT( 1.0 - ( pa1 * pa2 + pb1 * pb2 + pc1 * pc2 )**2 ) ) |
26 | |
27 | END FUNCTION grt_cir_dis |
Note: See TracBrowser
for help on using the repository browser.