fnemina / pyOSOAA

pyOSOAA is a python interface for the Ocean Successive Orders with Atmosphere - Advanced (OSOAA) radiative transfer.
GNU General Public License v3.0
20 stars 6 forks source link

I use the method you mentioned to compare NASA Seawifs Rayleigh lookup table with OSOAA Rayleigh scattering. #26

Closed fnemina closed 5 years ago

fnemina commented 5 years ago

I use the method you mentioned to compare NASA Seawifs Rayleigh lookup table with OSOAA Rayleigh scattering. But there are some differences between my results and yours. My results: fig_Relative error Relative error is as high as 10%. My code is here So, i have some question:

  1. The tau which in NASA Seawifs Rayleigh lookup table cannot be used to calculate transmittance because OSOAA has its own Tau.

  2. What is the step size of the parameters in the Rayleigh scattering lookup table you generated? Can you share your code?

Originally posted by @QiaoFeng0419 in https://github.com/fnemina/AtmosphericCorrection/issues/1#issuecomment-512065537

fnemina commented 5 years ago

@QiaoFeng0419 I moved your issue here because it will be more related to code here.

  1. I've added here 2fa8a889d470292fdddd16b3f05b42e45040e39b the option for the RunWavelengths helper to use a custom Rayleigh optical thickness given by the user. If you want to so it by hand the OSOAA method ap.setMot(taur) let's you input your own Rayleigh optical thickness.

Just change this line

rho_t, tau = RunWavelengths(s, wl/1000, view, taur=True)/np.cos(np.pi*view/180.0)

to

taur = ray.getTaur()
rho_t, tau = RunWavelengths(s, wl/1000, view, taur=taur)/np.cos(np.pi*view/180.0)

and it should work. Figure_1

Also, the getRadiance for Rayleigh that I coded doesn't returns normalized radiances. So you should normalize it too, by dividing by np.cos(np.pi*view/180.0), or you should not normalize the radiances calculated by the OSOAA. Both options are fine but you should be consistent. Here are some plots for comparison.

Figure_2 No normalization applied to OSOAA results Figure_3 Normalization only applied to OSOAA results

Here is the code I used modifying yours.

  1. As for the LUTs I generated, they are for a single wavelength yet, but I will implement the calculation for a band in the near future. Also, the number of data points used to compute the Fourier transform in phi was 11. Let me ask my boss about sharing this code and I'll write back to you.

Best regards Fran

ghost commented 5 years ago

I think the biggest problem with the errors is that the results of getRadiance are not normalized.

The normalized results are much better.

Thank you.

ghost commented 5 years ago

Can your boss let you share the code that generates the lookup table?

fnemina commented 5 years ago

Hello Qiao Feng, As long as both radiances are normalized or not normalized it's ok. I didn't normalize the getRadiance function because I am following the implementation of the seadas-L2Gen code and was going to do it at the end.

About the other code. We are evaluating it. The code is not yet in a stage to make it public. But I'll write back to you as soon as we can share it.