My Project
Public Member Functions | List of all members
mod_spherical::arc Interface Reference

Public Member Functions

subroutine arc_flt (XX1, YY1, XX2, YY2, ARCL)
 
subroutine arc_dbl (XX1, YY1, XX2, YY2, ARCL)
 

Detailed Description

Definition at line 58 of file mod_spherical.f90.

Member Function/Subroutine Documentation

◆ arc_dbl()

subroutine mod_spherical::arc::arc_dbl ( real(dp), intent(in)  XX1,
real(dp), intent(in)  YY1,
real(dp), intent(in)  XX2,
real(dp), intent(in)  YY2,
real(dp), intent(out)  ARCL 
)

Definition at line 94 of file mod_spherical.f90.

94  !----------------------------------------------------------------------------
95  ! function:
96  ! calculate the arc lenth for given two point on the spherical plane
97  ! input:
98  ! xx1,yy1,xx2,yy2 :are longitude and latitude of two points
99  ! output:
100  ! arcl : arc lenth of two points in spherical plane
101  !-----------------------------------------------------------------------------
102 
103  ! solve the arc length through the earth center
104  IMPLICIT NONE
105  REAL(DP) :: X1,Y1,X2,Y2,XA,YA,ZA,XB,YB,ZB,AB,AOB
106  REAL(DP),INTENT(OUT) :: ARCL
107  REAL(DP),INTENT(IN) :: XX1,YY1,XX2,YY2
108 
109  x1=xx1*deg2rad
110  y1=yy1*deg2rad
111 
112  x2=xx2*deg2rad
113  y2=yy2*deg2rad
114 
115  ! USE DOUBLE PRECISION COS AND SIN
116  xa=dcos(y1)*dcos(x1)
117  ya=dcos(y1)*dsin(x1)
118  za=dsin(y1)
119 
120  xb=dcos(y2)*dcos(x2)
121  yb=dcos(y2)*dsin(x2)
122  zb=dsin(y2)
123 
124  ab=dsqrt((xb-xa)**2+(yb-ya)**2+(zb-za)**2)
125  aob=(2.0_dp -ab*ab)/2.0_dp
126  aob=dacos(aob)
127  arcl=rearth*aob
128 
129  RETURN
real(dp), parameter rearth
Definition: mod_main.f90:884
real(dp), parameter deg2rad
Definition: mod_main.f90:885

◆ arc_flt()

subroutine mod_spherical::arc::arc_flt ( real(spa), intent(in)  XX1,
real(spa), intent(in)  YY1,
real(spa), intent(in)  XX2,
real(spa), intent(in)  YY2,
real(spa), intent(out)  ARCL 
)

Definition at line 133 of file mod_spherical.f90.

133  IMPLICIT NONE
134  REAL(SPA), INTENT(IN) :: XX1,YY1,XX2,YY2
135  REAL(SPA), INTENT(OUT) :: ARCL
136  REAL(DP) ARCL_DP
137  CALL arc_dbl(dble(xx1),dble(yy1),dble(xx2),dble(yy2),arcl_dp)
138  arcl = arcl_dp
subroutine arc_dbl(XX1, YY1, XX2, YY2, ARCL)

The documentation for this interface was generated from the following file: