OpenSenseAction / poligrain

Simplify common tasks for working with point, line and gridded sensor data, focusing on rainfall observations.
https://poligrain.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2 stars 10 forks source link

Extend CML path ploting function for SMLs which have different location metadata #26

Open cchwala opened 4 months ago

cchwala commented 4 months ago

The CML path plotting function could easily be used for SML data if we calculate the second site coordinates for SMLs on the fly based on a assumed length. Note that for SMLs only one site is defined and the direction of the SML path to the satellite is then defined.

For a simple first implementation we could assume a fixed melting layer height and use this for calculating the "effective" length which we then use to calculate the coordinates of the second end of the line. We could e.g. also use dashed lines for SMLs to distinguish them from CML paths.

Updated: Even better than dashed lines for SMLs would be to add a marker to the SML line at the end which is on the ground.

cchwala commented 3 months ago

This could easily be added as a variation of the plot_cmls function in the xarray Accessor that is currently being developed in #29.

maxmargraf commented 3 months ago

Input from the SML datasets available within OpenSense typically have the following coordinates: lon and lat of the base station and the azimuth and elevation of the antenna. To plot the line of a SML one has to compute the point on the ground below the point where the microwave beam crosses the melting layer. This point can be calculated from the given coordinates.
I propose to add a new function in plot_map that returns the projected line on the ground. This line then can be used directly by the plot_cmls function. We might want to rename this to plot_lines and in turn rename the recent plot_lines to something more CML specific like plot_cml.