New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
grt_cir_dis.h90 in branches/dev_1784_OBS/NEMO/OPA_SRC/OBS – NEMO

source: branches/dev_1784_OBS/NEMO/OPA_SRC/OBS/grt_cir_dis.h90 @ 2001

Last change on this file since 2001 was 2001, checked in by djlea, 14 years ago

Adding observation operator code

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) ::&
18         & pa1, &  !  sin(lat1)
19         & pa2, &  !  sin(lat2)
20         & pb1, &  !  cos(lat1) * cos(lon1)
21         & pb2, &  !  cos(lat2) * cos(lon2)
22         & pc1, &  !  cos(lat1) * sin(lon1)
23         & pc2     !  cos(lat2) * sin(lon2)
24
25      grt_cir_dis = &
26         &  ASIN( SQRT( 1.0 - ( pa1 * pa2 + pb1 * pb2 + pc1 * pc2 )**2 ) )
27     
28   END FUNCTION grt_cir_dis
Note: See TracBrowser for help on using the repository browser.