libSUFR
a LIBrary of Some Useful Fortran Routines
All Classes Namespaces Files Functions Variables Pages
sufr_earth Module Reference

Procedures to deal with geography and the Earth. More...

Functions/Subroutines

pure real(double) function distance (lon1, lat1, lon2, lat2, miles)
 Compute the distance between two points over the Earth's surface.
 
pure real function distance_r (lon1, lat1, lon2, lat2, miles)
 Compute the distance between two points over the Earth's surface – single-precision version of distance()
 

Detailed Description

Procedures to deal with geography and the Earth.

Function/Subroutine Documentation

◆ distance()

pure real(double) function sufr_earth::distance ( real(double), intent(in) lon1,
real(double), intent(in) lat1,
real(double), intent(in) lon2,
real(double), intent(in) lat2,
logical, intent(in), optional miles )

Compute the distance between two points over the Earth's surface.

Parameters
lon1Longitude of first location (rad)
lat1Latitude of first location (rad)
lon2Longitude of second location (rad)
lat2Latitude of second location (rad)
milesReturn result in miles if present and True, otherwise return result in kilometres
Return values
distanceThe distance between the two points over the Earth's surface (in km or mi)

Definition at line 42 of file earth.f90.

References distance(), sufr_kinds::double, and sufr_constants::earthr.

Referenced by distance(), and distance_r().

Here is the call graph for this function:

◆ distance_r()

pure real function sufr_earth::distance_r ( real, intent(in) lon1,
real, intent(in) lat1,
real, intent(in) lon2,
real, intent(in) lat2,
logical, intent(in), optional miles )

Compute the distance between two points over the Earth's surface – single-precision version of distance()

Parameters
lon1Longitude of first location (rad)
lat1Latitude of first location (rad)
lon2Longitude of second location (rad)
lat2Latitude of second location (rad)
milesReturn result in miles if present and True, otherwise return result in kilometres
Return values
distance_rThe distance between the two points over the Earth's surface (in km or mi)

Definition at line 93 of file earth.f90.

References distance(), and distance_r().

Referenced by distance_r().

Here is the call graph for this function: