Changeset 13247 for NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/OBS/grt_cir_dis.h90
- Timestamp:
- 2020-07-03T19:15:31+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/OBS/grt_cir_dis.h90
r10068 r13247 28 28 REAL(KIND=wp) :: pc2 ! cos(lat2) * sin(lon2) 29 29 30 REAL(KIND=wp) :: cosdist ! cosine of great circle distance 31 32 ! Compute cosine of great circle distance, constraining it to be between 33 ! -1 and 1 (rounding errors can take it slightly outside this range 34 cosdist = MAX( MIN( pa1 * pa2 + pb1 * pb2 + pc1 * pc2, 1.0_wp), -1.0_wp ) 35 30 36 grt_cir_dis = & 31 & ASIN( SQRT( 1.0 - ( pa1 * pa2 + pb1 * pb2 + pc1 * pc2 )**2) )37 & ASIN( SQRT( 1.0_wp - cosdist**2.0_wp ) ) 32 38 33 39 END FUNCTION grt_cir_dis
Note: See TracChangeset
for help on using the changeset viewer.