SABER
type_tree Module Reference

Subroutines/functions list. More...

Data Types

type  tree_type
 

Functions/Subroutines

subroutine tree_alloc (tree, mpl, n, mask)
 Allocation. More...
 
subroutine tree_init (tree, lon, lat, interp_nn)
 Initialization. More...
 
subroutine tree_dealloc (tree)
 Release memory. More...
 
subroutine tree_find_nearest_neighbors (tree, lon, lat, nn, nn_index, nn_dist)
 Find nearest neighbors using a KDTree. More...
 
subroutine tree_count_nearest_neighbors (tree, lon, lat, sr, nn)
 Count nearest neighbors using a tree. More...
 
subroutine tree_inside (tree, lon, lat, inside_tree)
 Find if a point is inside (or close to) the tree points. More...
 

Variables

real(kind_real), parameter nn_inc = 1.5_kind_real
 Increase factor for the nearest neighbors numbers search. More...
 

Detailed Description

Subroutines/functions list.

Instrumentation functions Tree derived type

Function/Subroutine Documentation

◆ tree_alloc()

subroutine type_tree::tree_alloc ( class(tree_type), intent(inout)  tree,
type(mpl_type), intent(inout)  mpl,
integer, intent(in)  n,
logical, dimension(n), intent(in), optional  mask 
)
private

Allocation.

Parameters
[in,out]mplMPI data
[in]nNumber of points

Definition at line 75 of file type_tree.F90.

◆ tree_count_nearest_neighbors()

subroutine type_tree::tree_count_nearest_neighbors ( class(tree_type), intent(in)  tree,
real(kind_real), intent(in)  lon,
real(kind_real), intent(in)  lat,
real(kind_real), intent(in)  sr,
integer, intent(out)  nn 
)
private

Count nearest neighbors using a tree.

Parameters
[in]lonPoint longitude [in radians]
[in]latPoint latitude [in radians]
[in]srSpherical radius [in radians]
[out]nnNumber of nearest neighbors found

Definition at line 353 of file type_tree.F90.

◆ tree_dealloc()

subroutine type_tree::tree_dealloc ( class(tree_type), intent(inout)  tree)
private

Release memory.

Definition at line 206 of file type_tree.F90.

◆ tree_find_nearest_neighbors()

subroutine type_tree::tree_find_nearest_neighbors ( class(tree_type), intent(in)  tree,
real(kind_real), intent(in)  lon,
real(kind_real), intent(in)  lat,
integer, intent(in)  nn,
integer, dimension(nn), intent(out)  nn_index,
real(kind_real), dimension(nn), intent(out), optional  nn_dist 
)
private

Find nearest neighbors using a KDTree.

Parameters
[in]lonPoint longitude [in radians]
[in]latPoint latitude [in radians]
[in]nnNumber of nearest neighbors to find
[out]nn_indexNearest neighbors index
[out]nn_distNearest neighbors distance

Definition at line 240 of file type_tree.F90.

◆ tree_init()

subroutine type_tree::tree_init ( class(tree_type), intent(inout)  tree,
real(kind_real), dimension(tree%n), intent(in)  lon,
real(kind_real), dimension(tree%n), intent(in)  lat,
integer, intent(in), optional  interp_nn 
)
private

Initialization.

Parameters
[in]lonPoints longitudes [in radians]
[in]latPoints latitudes [in radians]
[in]interp_nnNumber of interpolation neighbor

Definition at line 122 of file type_tree.F90.

◆ tree_inside()

subroutine type_tree::tree_inside ( class(tree_type), intent(in)  tree,
real(kind_real), intent(in)  lon,
real(kind_real), intent(in)  lat,
logical, intent(out)  inside_tree 
)
private

Find if a point is inside (or close to) the tree points.

Parameters
[in]lonPoint longitude [in radians]
[in]latPoint latitude [in radians]
[out]inside_treeTrue if the point is inside the tree

Definition at line 388 of file type_tree.F90.

Variable Documentation

◆ nn_inc

real(kind_real), parameter type_tree::nn_inc = 1.5_kind_real

Increase factor for the nearest neighbors numbers search.

Definition at line 45 of file type_tree.F90.