grid_tools  1.3.0
 All Data Structures Files Functions Variables
pfun Module Reference

This module is for evaluating several useful real-valued functions that are not always available in Fortran compilers. More...

Data Types

interface  ahav
 
interface  ahavh
 
interface  atanh
 
interface  gd
 
interface  gdi
 
interface  hav
 
interface  havh
 
interface  sech
 
interface  sechs
 
interface  sinhox
 
interface  sinhoxm
 
interface  sinox
 
interface  sinoxm
 

Public Member Functions

real(dp) function ahav_d (a)
 Arc-haversine function for double precision real. More...
 
real(sp) function ahav_s (a)
 Arc-haversine function for single precision real. More...
 
real(dp) function ahavh_d (a)
 Hyperbolic arc-haversine for double precision real. More...
 
real(sp) function ahavh_s (a)
 Hyperbolic arc-haversine for single precision real. More...
 
real(dp) function atanh_d (t)
 Hyperbolic arc-tangent for double precision real. More...
 
real(sp) function atanh_s (t)
 Hyperbolic arc-tangent for single precision real. More...
 
real(dp) function hav_d (t)
 Haversine function for double precision real (for geometry on the sphere). More...
 
real(dp) function havh_d (t)
 Hyperbolic-haversine for double precision real (for pseudosphere geometry). More...
 
real(sp) function havh_s (t)
 Hyperbolic-haversine for single precision real (for pseudosphere geometry). More...
 
real(dp) function sech_d (x)
 Hyperbolic secant for double precision real. More...
 
real(sp) function sech_s (x)
 Hyperbolic secant for single precision real. More...
 
real(sp) function sechs_s (x)
 Hyperbolic secant-squared function (logistic distribution). More...
 
real(dp) function sinhox_d (x)
 Evaluate the symmetric real function sinh(x)/x. More...
 
real(dp) function sinhoxm_d (x)
 Evaluate the symmetric real function sinh(x)/x-1. More...
 
real(dp) function sinox_d (x)
 Evaluate the symmetric real function sin(x)/x. More...
 

Private Member Functions

real(dp) function gd_d (x)
 Gudermannian function (related to Mercator map projections) More...
 
real(sp) function gd_s (x)
 Gudermannian function (related to Mercator map projections) More...
 
real(dp) function gdi_d (y)
 Inverse Gudermannian function for double precision real. More...
 
real(sp) function gdi_s (y)
 Inverse Gudermannian function for single precision real. More...
 
real(sp) function hav_s (t)
 Haversine function for single precision real (for geometry on the sphere). More...
 
real(dp) function sechs_d (x)
 Hyperbolic secant-squared function (logistic distribution). More...
 
real(dp) function sinoxm_d (x)
 Evaluate the symmetric real function sin(x)/x-1, still accurate near x=0. More...
 

Detailed Description

This module is for evaluating several useful real-valued functions that are not always available in Fortran compilers.

These have applications in map transformations, spherical and pseudo-spherical surface geometry, probability distributions, and splines.

Author
R. J. Purser

Definition at line 11 of file pfun.f90.

Member Function/Subroutine Documentation

real(dp) function pfun::ahav_d ( real(dp), intent(in)  a)

Arc-haversine function for double precision real.

Parameters
[in]adouble precision real argument
Returns
t arc-haversine function of a
Author
R. J. Purser

Definition at line 156 of file pfun.f90.

real(sp) function pfun::ahav_s ( real(sp), intent(in)  a)

Arc-haversine function for single precision real.

Parameters
[in]asingle precision real argument
Returns
t arc-haversine function of a
Author
R. J. Purser

Definition at line 143 of file pfun.f90.

real(dp) function pfun::ahavh_d ( real(dp), intent(in)  a)

Hyperbolic arc-haversine for double precision real.

Parameters
[in]adouble precision real argument
Returns
t hyperbolic arc-haversine of a
Author
R. J. Purser

Definition at line 184 of file pfun.f90.

real(sp) function pfun::ahavh_s ( real(sp), intent(in)  a)

Hyperbolic arc-haversine for single precision real.

Note
The minus sign in the hyperbolic arc-haversine definition.
Parameters
[in]asingle precision real argument
Returns
t hyperbolic arc-haversine of a
Author
R. J. Purser

Definition at line 171 of file pfun.f90.

real(dp) function pfun::atanh_d ( real(dp), intent(in)  t)

Hyperbolic arc-tangent for double precision real.

Parameters
[in]tdouble precision real argument
Returns
a hyperbolic arc-tangent of t
Author
R. J. Purser

Definition at line 215 of file pfun.f90.

real(sp) function pfun::atanh_s ( real(sp), intent(in)  t)

Hyperbolic arc-tangent for single precision real.

(compilers now have this)

Parameters
[in]tsingle precision real argument
Returns
a hyperbolic arc-tangent of t
Author
R. J. Purser

Definition at line 197 of file pfun.f90.

real(dp) function pfun::gd_d ( real(dp), intent(in)  x)
private

Gudermannian function (related to Mercator map projections)

Parameters
[in]xdouble precision real argument of function
Returns
y Gudermannian function of x
Author
R. J. Purser

Definition at line 53 of file pfun.f90.

real(sp) function pfun::gd_s ( real(sp), intent(in)  x)
private

Gudermannian function (related to Mercator map projections)

Parameters
[in]xsingle precision real argument of function
Returns
y Gudermannian function of x
Author
R. J. Purser

Definition at line 40 of file pfun.f90.

real(dp) function pfun::gdi_d ( real(dp), intent(in)  y)
private

Inverse Gudermannian function for double precision real.

Parameters
[in]ydouble precision real argument
Returns
x inverse Gudermannian function of y
Author
R. J. Purser

Definition at line 77 of file pfun.f90.

real(sp) function pfun::gdi_s ( real(sp), intent(in)  y)
private

Inverse Gudermannian function for single precision real.

Parameters
[in]ysingle precision real argument
Returns
x inverse Gudermannian function of y
Author
R. J. Purser

Definition at line 65 of file pfun.f90.

real(dp) function pfun::hav_d ( real(dp), intent(in)  t)

Haversine function for double precision real (for geometry on the sphere).

Parameters
[in]tdouble precision real argument
Returns
a haversine function of t
Author
R. J. Purser

Definition at line 102 of file pfun.f90.

real(sp) function pfun::hav_s ( real(sp), intent(in)  t)
private

Haversine function for single precision real (for geometry on the sphere).

Parameters
[in]tsingle precision real argument
Returns
a haversine function of t
Author
R. J. Purser

Definition at line 89 of file pfun.f90.

real(dp) function pfun::havh_d ( real(dp), intent(in)  t)

Hyperbolic-haversine for double precision real (for pseudosphere geometry).

Parameters
[in]tdouble precision real argument
Returns
a hyperbolic-haversine function of t
Author
R. J. Purser

Definition at line 130 of file pfun.f90.

real(sp) function pfun::havh_s ( real(sp), intent(in)  t)

Hyperbolic-haversine for single precision real (for pseudosphere geometry).

Note
The minus sign in the hyperbolic-haversine definition.
Parameters
[in]tsingle precision real argument
Returns
a hyperbolic-haversine function of t
Author
R. J. Purser

Definition at line 117 of file pfun.f90.

real(dp) function pfun::sech_d ( real(dp), intent(in)  x)

Hyperbolic secant for double precision real.

Parameters
[in]xdouble precision real argument
Returns
r hyperbolic secant of x
Author
R. J. Purser

Definition at line 250 of file pfun.f90.

real(sp) function pfun::sech_s ( real(sp), intent(in)  x)

Hyperbolic secant for single precision real.

Parameters
[in]xsingle precision real argument
Returns
r hyperbolic secant of x
Author
R. J. Purser

Definition at line 233 of file pfun.f90.

real(dp) function pfun::sechs_d ( real(dp), intent(in)  x)
private

Hyperbolic secant-squared function (logistic distribution).

Parameters
[in]xdouble precision real argument
Returns
r sech-squared of x
Author
R. J. Purser

Definition at line 278 of file pfun.f90.

real(sp) function pfun::sechs_s ( real(sp), intent(in)  x)

Hyperbolic secant-squared function (logistic distribution).

Parameters
[in]xsingle precision real argument
Returns
r sech-squared of x
Author
R. J. Purser

Definition at line 266 of file pfun.f90.

real(dp) function pfun::sinhox_d ( real(dp), intent(in)  x)

Evaluate the symmetric real function sinh(x)/x.

Parameters
[in]xdouble precision real argument
Returns
r sinh(x)/x
Author
R. J. Purser

Definition at line 344 of file pfun.f90.

real(dp) function pfun::sinhoxm_d ( real(dp), intent(in)  x)

Evaluate the symmetric real function sinh(x)/x-1.

still accurate near x=0.

Parameters
[in]xdouble precision real argument
Returns
r sinh(x)-1
Author
R. J. Purser

Definition at line 324 of file pfun.f90.

real(dp) function pfun::sinox_d ( real(dp), intent(in)  x)

Evaluate the symmetric real function sin(x)/x.

Parameters
[in]xdouble precision real argument
Returns
r sin(x)/x
Author
R. J. Purser

Definition at line 310 of file pfun.f90.

real(dp) function pfun::sinoxm_d ( real(dp), intent(in)  x)
private

Evaluate the symmetric real function sin(x)/x-1, still accurate near x=0.

Parameters
[in]xdouble precision real argument
Returns
r sin(x)/x-1
Author
R. J. Purser

Definition at line 290 of file pfun.f90.


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