Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Variables
Type
Visibility
Attributes
Name
Initial
real(kind=wp),
private
::
a
real(kind=wp),
private
::
dlam
real(kind=wp),
private
::
dphi
real(kind=wp),
private
::
h
real(kind=wp),
private
::
p1
real(kind=wp),
private
::
p2
Source Code
pure function great_circle(r,lat1,lon1,lat2,lon2)result(d)!! Great-circle distance (m) between two geographic points (deg),!! via the haversine formula (numerically stable for short arcs).real(wp),intent(in)::r,lat1,lon1,lat2,lon2real(wp)::dreal(wp)::p1,p2,dphi,dlam,a,hp1=lat1*DEG2RADp2=lat2*DEG2RADdphi=(lat2-lat1)*DEG2RADdlam=(lon2-lon1)*DEG2RAD! wrap dlam into [-pi, pi] so the antimeridian doesn't blow updlam=modulo(dlam+3.14159265358979323846_wp,2.0_wp*3.14159265358979323846_wp)&-3.14159265358979323846_wph=sin(0.5_wp*dphi)**2+cos(p1)*cos(p2)*sin(0.5_wp*dlam)**2a=2.0_wp*atan2(sqrt(h),sqrt(max(0.0_wp,1.0_wp-h)))d=r*aend function great_circle