Memory efficiency
The whole script is not very memory efficient. The full datasets (U,V,T) are loaded into memory.
This seems to be caused by the masking of land values with xr.where():
https://git.geomar.de/python/xorca_brokenline/blob/master/xorca_brokenline/init.py#L149
A solution might be to define the mask and do the masking after the selection of the section.