orog_mask_tools
1.13.0
|
Geo-reference utilities for a cubed-sphere grid. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | find_limit (p1_in, p2_in, latmin, latmax) |
Given two points on a cubed-sphere grid, compute the maximum and minimum latitudinal extent of the resulting great circle. More... | |
subroutine | middle (p1, p2, p) |
Compute the latitude and longitude of the middle point between two given points. More... | |
Geo-reference utilities for a cubed-sphere grid.
Definition in file find_limit.F90.
subroutine find_limit | ( | real*8, dimension(2), intent(in) | p1_in, |
real*8, dimension(2), intent(in) | p2_in, | ||
real*8, intent(out) | latmin, | ||
real*8, intent(out) | latmax | ||
) |
Given two points on a cubed-sphere grid, compute the maximum and minimum latitudinal extent of the resulting great circle.
[in] | p1_in | Latitude and longitude of point 1. |
[in] | p2_in | Latitude and longitude of point 2. |
[out] | latmin | Minimum latitudinal extent. |
[out] | latmax | Maximum latitudinal extent. |
Definition at line 16 of file find_limit.F90.
References middle().
Referenced by cal_lake_frac_depth().
subroutine middle | ( | real*8, dimension(2), intent(in) | p1, |
real*8, dimension(2), intent(in) | p2, | ||
real*8, dimension(2), intent(out) | p | ||
) |
Compute the latitude and longitude of the middle point between two given points.
There are two formulae available to compute it.
One derived from a more general m-sect formula:
xyz = sin((1-f)*theta) / sin(theta) * xyz1 + sin(f*theta) /sin(theta) * xyz2 ; where theta is the angle of xyz1, and xyz2.
xyz = 0.5 / sqrt[(1+dot(xyz1,xyz2))/2] * (xyz1+xyz2)
and the other one is the normalized middle point of the two end points:
xyz = 0.5 * (xyz1+xyz2), xyz = xyz / sqrt(dot(xyz,xyz))
[in] | p1 | Latitude/longitude of first end point. |
[in] | p2 | Latitude/longitude of second end point |
[out] | p | Latitude/longitude of the mid-point. |
Definition at line 80 of file find_limit.F90.
Referenced by find_limit().