Hi Helen,
I showed you an inconsistency yesterday (figure 1: before change), that is, differences between the python interface (my script) and the DART(Fortran) interface to RTTOV. Yesterday I thought my script is wrong but now I think differently. I looked at a gridpoint with a large difference (0.29 vs 0.96 reflectance) and the cloud water/ice profiles seem to be flipped up-down, because
The profiles initially showed ice clouds lower than water clouds, which is very suspicious (colder ice clouds should be above), see image 2
The clouds were quite high in the stratosphere where no clouds should be (figure 2)
I unflipped the arrays in DART(Fortran) and now there are almost no differences anymore (figure 3: after change)
Reason
RTTOV uses a top-of-atmosphere-to-bottom convention while WRF uses the reverse.
obs_def_rttov_mod.f90 flips the array once for cfrac, pressure, temperature (correct)
but twice for cloud variables (wrong): once when putting clouds into an intermediate variable totalwater / totalice and a second time when putting totalwater into the RTTOV input variable
Summary
I think there is a bug concerning RTTOV with clouds for IR/VIS channels.
The results can be severely different in some cases. In most cases, the differences were small. Probably because the bug is less bad for deep clouds (dense cloud from the lower to higher layers) and worst when there are just high or just low clouds.
I'm sorry that this bug slipped through testing in 2020. I just found it by calculating obs on a grid and comparing the output from the two interfaces.
Lukas
Hi Helen, I showed you an inconsistency yesterday (figure 1: before change), that is, differences between the python interface (my script) and the DART(Fortran) interface to RTTOV. Yesterday I thought my script is wrong but now I think differently. I looked at a gridpoint with a large difference (0.29 vs 0.96 reflectance) and the cloud water/ice profiles seem to be flipped up-down, because
Reason
obs_def_rttov_mod.f90
flips the array once for cfrac, pressure, temperature (correct)but twice for cloud variables (wrong): once when putting clouds into an intermediate variable
totalwater
/totalice
and a second time when putting totalwater into the RTTOV input variableSummary
I'm sorry that this bug slipped through testing in 2020. I just found it by calculating obs on a grid and comparing the output from the two interfaces. Lukas