Return Cartesian coordinates from antenna coordinates.
Parameters:
ranges (array-like) – Distances to the center of the radar gates (bins) in meters.
azimuths (array-like) – Azimuth angle of the radar in degrees.
elevations (array-like) – Elevation angle of the radar in degrees.
earth_radius (float) – Radius of the earth (default is 6371000 m).
effective_radius_fraction (float) – Fraction of earth to use for the effective radius (default is 4/3).
site_altitude (float) – Altitude amsl of radar site
Returns:
x, y, z (array) – Cartesian coordinates in meters from the radar.
Notes
The calculation for Cartesian coordinate is adapted from equations
2.28(b) and 2.28(c) of Doviak and Zrnić [1]_ assuming a
standard atmosphere (4/3 Earth’s radius model).
\begin{gather*}
z = \sqrt{r^2+R^2+2*r*R*sin(\theta_e)} - R
\\
s = R * arcsin(\frac{r*cos(\theta_e)}{R+z})
\\
x = s * sin(\theta_a)
\\
y = s * cos(\theta_a)
\end{gather*}
Where r is the distance from the radar to the center of the gate,
\(\theta_a\) is the azimuth angle, \(\theta_e\) is the
elevation angle, s is the arc length, and R is the effective radius
of the earth, taken to be 4/3 the mean radius of earth (6371 km).
Add Cartesian coordinates from antenna coordinates.
Parameters:
ds (xarray.Dataset) – Xarray dataset containing range, azimuth, and elevation
earth_radius (float) – Radius of the earth. Defaults to a latitude-dependent radius derived from
WGS84 ellipsoid.
effective_radius_fraction (float) – Fraction of earth to use for the effective radius (default is 4/3).
target_crs (pyproj.CRS) – Coordinate reference system. If not provided, radar_crs() is used.
Returns:
ds (xarray.Dataset) – Dataset including x, y, and z as coordinates.
Notes
The calculation for Cartesian coordinate is adapted from equations
2.28(b) and 2.28(c) of Doviak and Zrnić [1]_ assuming a
standard atmosphere (4/3 Earth’s radius model).
\begin{gather*}
z = \sqrt{r^2+R^2+2*r*R*sin(\theta_e)} - R
\\
s = R * arcsin(\frac{r*cos(\theta_e)}{R+z})
\\
x = s * sin(\theta_a)
\\
y = s * cos(\theta_a)
\end{gather*}
Where r is the distance from the radar to the center of the gate,
\(\theta_a\) is the azimuth angle, \(\theta_e\) is the
elevation angle, s is the arc length, and R is the effective radius
of the earth, taken to be 4/3 the mean radius of earth (6371 km).
Return Cartesian coordinates from antenna coordinates.
Parameters:
ranges (array-like) – Distances to the center of the radar gates (bins) in meters.
azimuths (array-like) – Azimuth angle of the radar in degrees.
elevations (array-like) – Elevation angle of the radar in degrees.
earth_radius (float) – Radius of the earth (default is 6371000 m).
effective_radius_fraction (float) – Fraction of earth to use for the effective radius (default is 4/3).
site_altitude (float) – Altitude amsl of radar site
Returns:
x, y, z (array) – Cartesian coordinates in meters from the radar.
Notes
The calculation for Cartesian coordinate is adapted from equations
2.28(b) and 2.28(c) of Doviak and Zrnić [1]_ assuming a
standard atmosphere (4/3 Earth’s radius model).
\begin{gather*}
z = \sqrt{r^2+R^2+2*r*R*sin(\theta_e)} - R
\\
s = R * arcsin(\frac{r*cos(\theta_e)}{R+z})
\\
x = s * sin(\theta_a)
\\
y = s * cos(\theta_a)
\end{gather*}
Where r is the distance from the radar to the center of the gate,
\(\theta_a\) is the azimuth angle, \(\theta_e\) is the
elevation angle, s is the arc length, and R is the effective radius
of the earth, taken to be 4/3 the mean radius of earth (6371 km).
Add Cartesian coordinates from antenna coordinates.
Parameters:
ds (xarray.Dataset) – Xarray dataset containing range, azimuth, and elevation
earth_radius (float) – Radius of the earth. Defaults to a latitude-dependent radius derived from
WGS84 ellipsoid.
effective_radius_fraction (float) – Fraction of earth to use for the effective radius (default is 4/3).
target_crs (pyproj.CRS) – Coordinate reference system. If not provided, radar_crs() is used.
Returns:
ds (xarray.Dataset) – Dataset including x, y, and z as coordinates.
Notes
The calculation for Cartesian coordinate is adapted from equations
2.28(b) and 2.28(c) of Doviak and Zrnić [1]_ assuming a
standard atmosphere (4/3 Earth’s radius model).
\begin{gather*}
z = \sqrt{r^2+R^2+2*r*R*sin(\theta_e)} - R
\\
s = R * arcsin(\frac{r*cos(\theta_e)}{R+z})
\\
x = s * sin(\theta_a)
\\
y = s * cos(\theta_a)
\end{gather*}
Where r is the distance from the radar to the center of the gate,
\(\theta_a\) is the azimuth angle, \(\theta_e\) is the
elevation angle, s is the arc length, and R is the effective radius
of the earth, taken to be 4/3 the mean radius of earth (6371 km).