grt_cir_dis_saa.h90 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. !!----------------------------------------------------------------------
  2. !! NEMO/OPA 3.3 , NEMO Consortium (2010)
  3. !! $Id: grt_cir_dis_saa.h90 2287 2010-10-18 07:53:52Z smasson $
  4. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  5. !!----------------------------------------------------------------------
  6. REAL(KIND=wp) FUNCTION grt_cir_dis_saa( pa, pb, pc )
  7. !!----------------------------------------------------------------------
  8. !! *** FUNCTION grt_cir_dis_saa ***
  9. !!
  10. !! ** Purpose : Great circle distance between pts (lat1,lon1)
  11. !! & (lat2,lon2) with a small-angle approximation
  12. !!
  13. !! ** Method : Geometry
  14. !!
  15. !! ** Action :
  16. !!
  17. !! History
  18. !! ! 95-12 (G. Madec, E. Durand, A. Weaver, N. Daget) Original
  19. !! ! 06-03 (A. Vidard) Migration to NEMOVAR
  20. !! ! 06-10 (A. Weaver) Cleanup
  21. !!----------------------------------------------------------------------
  22. !! * Arguments
  23. REAL(KIND=wp) :: pa ! lon1 - lon2
  24. REAL(KIND=wp) :: pb ! lat1 - lat2
  25. REAL(KIND=wp) :: pc ! cos(lat2)
  26. grt_cir_dis_saa = SQRT( pa * pa + ( pb * pc )**2 )
  27. END FUNCTION grt_cir_dis_saa