It would be nice, and should be fairly simple, to implement functionality to calculate the path length of a trajectory DSG field.
Some concrete examples would be: for a DSG field representing a flight trajectory or a storm track - the path length would be the distance travelled on the Earth/sphere by the flight or storm, at least according to the sampling of the trajectory encoded by the data, which could be useful for calculations.
We already have functionality to find distances on the sphere given the sphere's radius, usually taken as the Earth's radius, so that means most of the work required is already done.
I think either a new function cf.path_length or a new method on a field f.path_length (erroring immediately if the field isn't appropriate i.e. not a 2D DSG) would be a good way to enable this, where the name could be this or something similar, as a suggestion.
It would be nice, and should be fairly simple, to implement functionality to calculate the path length of a trajectory DSG field.
Some concrete examples would be: for a DSG field representing a flight trajectory or a storm track - the path length would be the distance travelled on the Earth/sphere by the flight or storm, at least according to the sampling of the trajectory encoded by the data, which could be useful for calculations.
We already have functionality to find distances on the sphere given the sphere's radius, usually taken as the Earth's radius, so that means most of the work required is already done.
I think either a new function
cf.path_lengthor a new method on a fieldf.path_length(erroring immediately if the field isn't appropriate i.e. not a 2D DSG) would be a good way to enable this, where the name could be this or something similar, as a suggestion.