umr-lops / xsarsea

scientific functions to compute radar or geophysical parameters from satellite images over ocean
https://cerweb.ifremer.fr/datarmor/doc_sphinx/xsarsea/
MIT License
10 stars 6 forks source link

review of windspeed.py #67

Closed vincelhx closed 5 months ago

vincelhx commented 6 months ago

The first commint concerns cases where sigma0 <=0 or sigma0 == NaN (on the left side of the image here)

nrcs_copol before commit : wspd_co_before after commit : wspd_co_after

In this case in the previous version, xsarsea was replacing copol by ancillary and used ancillary for dualpol inversion. Now inversion returns NaN

vincelhx commented 5 months ago

the second change concerns the wind direction output from inversion. The returned angle was false before these commits. Now, the return complex can be used.

use this formula to get wind direction in meteorological convention : 90 - (np.angle(-np.conj(wind_xsarsea), deg=True)) + xr_dataset.ground_heading) % 360

vincelhx commented 5 months ago

Lut being symetrical, i chose phi or -phi by taking the closest angle from ancillary.

vincelhx commented 5 months ago

i also updated documentation. make html is ok @agrouaze

vincelhx commented 5 months ago

added cmod7 gmf