PDAFomi_check_dist2_loop Subroutine

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

Check distance in case of isotropic localization

This routine computes the distance between the location of a local analysis domains and all full observations and checks whether the observations lies within the localization radius. The computation can be for Cartesian grids with and without periodicity and for geographic coordinates. For Cartesian grids, the coordinates can be in any unit, while geographic coordinates must be provided in radians and the resulting distance will be in meters. 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-04 - Lars Nerger - Initial code based on PDAFomi_comp_dist2 * 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