Check distance in case of nonisotropic localization
This routine computes the distance between the observation and a model grid point and the cut-off radius of an ellipse (in 2D) or ellipsoid (in 3D) in the direction of the distance. Finally, the routine checks whether the distance is not larger than the cut-off radius.
Choices for distance computation - disttype: 0: Cartesian distance in ncoord dimensions 1: Cartesian distance in ncoord dimensions with periodicity (Needs specification of domsize(ncoord)) 2: Aproximate geographic distance with horizontal coordinates in radians (-pi/+pi) 3: Geographic distance computation using haversine formula 10-13: Variants of distance types 0-3, but particularly for 3 dimensions in which a 2+1 dimensional localization is applied (distance weighting only in the horizontal)
Revision history: * 2024-02 - Lars Nerger - Initial code * Later revisions - see repository log
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(obs_f), | intent(in) | :: | thisobs | |||
type(obs_l), | intent(in) | :: | thisobs_l | |||
real, | intent(in) | :: | coordsA(:) | |||
real, | intent(in) | :: | coordsB(:) | |||
real, | intent(out) | :: | distance2 | |||
real, | intent(inout) | :: | dists(:) | |||
real, | intent(out) | :: | cradius | |||
real, | intent(inout) | :: | sradius | |||
logical, | intent(out) | :: | checkdist | |||
integer, | intent(in) | :: | verbose | |||
integer, | intent(inout) | :: | cnt_obs |