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

Public Member Functions

subroutine area_flt (SIDE1, SIDE2, SIDE3, AREA1)
 
subroutine area_dbl (SIDEA, SIDEB, SIDEC, AREA1)
 

Detailed Description

Definition at line 68 of file mod_spherical.f90.

Member Function/Subroutine Documentation

◆ area_dbl()

subroutine mod_spherical::area::area_dbl ( real(dp), intent(in)  SIDEA,
real(dp), intent(in)  SIDEB,
real(dp), intent(in)  SIDEC,
real(dp), intent(out)  AREA1 
)

Definition at line 143 of file mod_spherical.f90.

143  !--------------------------------------------------------------------
144  ! function:
145  ! calculate the area of a triangle on a spherical plane
146  ! input:
147  ! side1,side2 and side3: are 3 arc lenth for one triangle
148  ! output:
149  ! areal: is area of a triangle on a spherical plane
150  !--------------------------------------------------------------------
151  IMPLICIT NONE
152  REAL(DP), INTENT(IN) :: SIDEA,SIDEB,SIDEC
153  REAL(DP), INTENT(OUT) :: AREA1
154  REAL(DP) :: SIDE1,SIDE2,SIDE3
155  REAL(DP) :: PSUM,PM,QMJC
156 
157  side1=sidea/rearth
158  side2=sideb/rearth
159  side3=sidec/rearth
160 
161  ! SLOWER TO CHECK THEN TO CALCULATE
162  ! IF(SIDE1 == 0.0_DP .OR. SIDE2 == 0.0_DP .OR. SIDE3 == 0.0_DP)THEN
163  ! AREA1=0.0_DP
164  ! ELSE
165 
166  psum=0.5_dp*(side1+side2+side3)
167  pm=dsin(psum)*dsin(psum-side1)*dsin(psum-side2)*dsin(psum-side3)
168  pm=dsqrt(pm)/(2.0_dp*dcos(side1*0.5_dp)*dcos(side2*0.5_dp)*dcos(side3*0.5_dp))
169  qmjc = 2.0_dp*dasin(pm)
170 
171  area1=rearth*rearth*qmjc
172 
173  ! END IF
174 
175  RETURN
real(dp), parameter rearth
Definition: mod_main.f90:884

◆ area_flt()

subroutine mod_spherical::area::area_flt ( real(spa), intent(in)  SIDE1,
real(spa), intent(in)  SIDE2,
real(spa), intent(in)  SIDE3,
real(spa), intent(out)  AREA1 
)

Definition at line 179 of file mod_spherical.f90.

179  IMPLICIT NONE
180  REAL(SPA), INTENT(IN) :: SIDE1,SIDE2,SIDE3
181  REAL(SPA), INTENT(OUT) :: AREA1
182  REAL(DP) :: AREA_DP
183 
184  CALL area_dbl(dble(side1),dble(side2),dble(side3),area_dp)
185  area1=area_dp
186 
subroutine area_dbl(SIDEA, SIDEB, SIDEC, AREA1)

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