PDAFomi_check_dist2_noniso_loop Subroutine

public subroutine PDAFomi_check_dist2_noniso_loop(thisobs_l, thisobs, coordsA, cnt_obs, mode)

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

Arguments

Type IntentOptional Attributes Name
type(obs_l), intent(inout) :: thisobs_l
type(obs_f), intent(in) :: thisobs
real, intent(in) :: coordsA(:)
integer, intent(inout) :: cnt_obs
integer, intent(in) :: mode