SABER
type_tree Module Reference

Tree derived type. More...

Data Types

type  tree_type
 

Functions/Subroutines

subroutine tree_alloc (tree, mpl, n, mask)
 Allocation. More...
 
subroutine tree_init (tree, lon, lat)
 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...
 

Variables

real(kind_real), parameter nn_inc = 1.5
 

Detailed Description

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 49 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 263 of file type_tree.F90.

◆ tree_dealloc()

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

Release memory.

Definition at line 135 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 159 of file type_tree.F90.

Here is the call graph for this function:

◆ 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 
)
private

Initialization.

Parameters
[in]lonPoints longitudes (in radians)
[in]latPoints latitudes (in radians)

Definition at line 90 of file type_tree.F90.

Variable Documentation

◆ nn_inc

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

Definition at line 38 of file type_tree.F90.