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/UKMO/obs_oper_do_not_assim_update/NEMOGCM/NEMO/OPA_SRC/OBS – NEMO

source: branches/UKMO/obs_oper_do_not_assim_update/NEMOGCM/NEMO/OPA_SRC/OBS/grt_cir_dis.h90 @ 7915

Last change on this file since 7915 was 7773, checked in by mattmartin, 7 years ago

Committing updates after doing the following:

  • merging the branch dev_r4650_general_vert_coord_obsoper@7763 into this branch
  • updating it so that the following OBS changes were implemented correctly on top of the simplification changes:
    • generalised vertical coordinate for profile obs. This was done so that is now the default option.
    • sst bias correction implemented with the new simplified obs code.
    • included the biogeochemical obs types int he new simplified obs code.
    • included the changes to exclude obs in the boundary for limited area models
    • included other changes for the efficiency of the obs operator to remove global arrays.
File size: 1.4 KB
Line 
1   !!----------------------------------------------------------------------
2   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
3   !! $Id$
4   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
5   !!----------------------------------------------------------------------
6
7   REAL(KIND=wp) FUNCTION grt_cir_dis( pa1, pa2, pb1, pb2, pc1, pc2 )
8      !!----------------------------------------------------------------------
9      !!                     *** FUNCTION grt_cir_dis ***
10      !!
11      !! ** Purpose : Great circle distance between pts (lat1,lon1)
12      !!               & (lat2,lon2)
13      !!                   
14      !! ** Method   : Geometry.
15      !!
16      !! History :
17      !!        !  1995-12 (G. Madec, E. Durand, A. Weaver, N. Daget) Original
18      !!        !  2006-03 (A. Vidard) Migration to NEMOVAR
19      !!        !  2006-10 (A. Weaver) Cleanup
20      !!----------------------------------------------------------------------
21     
22      !! * Arguments
23      REAL(KIND=wp) :: pa1   !  sin(lat1)
24      REAL(KIND=wp) :: pa2   !  sin(lat2)
25      REAL(KIND=wp) :: pb1   !  cos(lat1) * cos(lon1)
26      REAL(KIND=wp) :: pb2   !  cos(lat2) * cos(lon2)
27      REAL(KIND=wp) :: pc1   !  cos(lat1) * sin(lon1)
28      REAL(KIND=wp) :: pc2   !  cos(lat2) * sin(lon2)
29
30      grt_cir_dis = &
31         &  ASIN( SQRT( 1.0 - ( pa1 * pa2 + pb1 * pb2 + pc1 * pc2 )**2 ) )
32     
33   END FUNCTION grt_cir_dis
Note: See TracBrowser for help on using the repository browser.