Open BaptisteVandecrux opened 2 years ago
Seems useless because we enter this part of the code only when powe is between 0.9 and 1.2
fox11 function not used
Aren't the following line ineffective: https://github.com/GEUS-SICE/pySICE/blob/53488af5dd6d6ccce1790fc8ea7055230c491a0f/fortran/version%206.1%202022/s.f#L459-L474
Because we have: https://github.com/GEUS-SICE/pySICE/blob/53488af5dd6d6ccce1790fc8ea7055230c491a0f/fortran/version%206.1%202022/s.f#L438 looping through all wavelength just above
when removing this line: https://github.com/GEUS-SICE/pySICE/blob/a6b016def648682d340db9835d9ae2cfdb85bcb6/fortran/version%206.1%202022/s.f#L1155
the output is very different. That is strange because wav is not used in the whole code and alam is not used in func1
r0 should be calculated once for each pixel and then its value could be directly used by all the other steps for that pixel. However, when trying to rename rv into r0 and only use r0 then the result is different.
Here all these values are calculated again here but they are not used to calculate tozon, TOC, TOX, TVODA further down. Yet when removed, the algorithm produces different output.
alam should be replaced by 0.62
here ctoa is used to find the fractional pixels, but ctoa was corrected (=brightened up) using that same snow fraction earlier in the code. Additionally, thv0 is a threshold in surface spherical albedo, why is it not compared to the TOA reflectance?
amf not declared! solves it all!
For the reference here is some info from Alex about the difference between solved spectral albedo:
https://github.com/GEUS-SICE/pySICE/blob/17ea753053add33b1bf124e9d4403311d008dd06/sice.py#L366-L438
This part solves the following equation: Where Rc is the TOA reflectance measured by OLCI, Ra, Ta, ra are the reflecance, transmittance and spherical albedo of the atmosphere, R0 is the reflectance of the non-absorbing underlying surface reflectance, and rs is the surface spherical albedo.
and the directly calculated spectral albedo: https://github.com/GEUS-SICE/pySICE/blob/17ea753053add33b1bf124e9d4403311d008dd06/sice.py#L522-L533
It is a new formulation presented in https://doi.org/10.3389/fenvs.2021.644551 and reads as:
Here is the (rephrased) comment from Alex:
The solved spectral albedo is calculated directly from reflectance avoiding any assumptions on impurities, which can be wrong. I trust the solved spectral albedo more...as compared to the direct calculation of spectral albedo. As a consequence solved spectral albedo is being used for the broadband albedo calculation.
The next point- why I provide directly calculated spectral albedo as spectral output? This is because I can make it for each OLCI wavelength. This is not possible with the solved albedo.
of course we can give 2 possibilities for the users - so they have 2 versions of spectral labedo (for selected wavelengths or for all wavelengths ( but with assumption on the type of impurities))
However, BBA must be always calculated from the (solved) reflectance-spherical albedo chain (not involving impurity assumption).
https://github.com/GEUS-SICE/pySICE/blob/53488af5dd6d6ccce1790fc8ea7055230c491a0f/fortran/version%206.1%202022/s.f#L569
Seems quite drastic