C2RCC: wrong computation of water reflectance from atmosphere path reflectance and transmittance

For several satellite instruments (Landsat, MERIS, OLCI, MSI) the computation of water reflectance from atmosphere path reflectance and transmittance is wrong. The wrong code found for all these instruments is

log_rw[i] = r_tosa[i] - rpath_nn[i] / (transu_nn[i] * transd_nn[i]);

The correct computation is

rwa[i] = (r_tosa[i] - rpath_nn[i]) / (transu_nn[i] * transd_nn[i]);

Besides the missing brackets, the right hand side of the equation yields water reflectance (but not the logarithm of water reflectance).

Thanks Ralf,

I turned it into an issue and assigned it to you.

[SIIITBX-431] Wrong computation of water reflectance from atmosphere path reflectance - JIRA (atlassian.net)

1 Like

Thank you Marco, I fixed the issue and created a pull request (assigned to you).

1 Like