There appears to be a bug in the column indexing of the pressure input variable to the MODIS simulator. The calls to modis_subcolumn on lines 903-913 of cosp.F90 contain the following:
do i = 1, modisIN%nSunlit
call modis_subcolumn(modisIN%Ncolumns,modisIN%Nlevels,modisIN%pres(i,:), &
modisIN%tau(int(modisIN%sunlit(i)),:,:), &
modisIN%liqFrac(int(modisIN%sunlit(i)),:,:), &
modisIN%g(int(modisIN%sunlit(i)),:,:), &
modisIN%w0(int(modisIN%sunlit(i)),:,:), &
isccp_boxptop(int(modisIN%sunlit(i)),:), &
modisRetrievedPhase(i,:), &
modisRetrievedCloudTopPressure(i,:), &
modisRetrievedTau(i,:),modisRetrievedSize(i,:))
end do
It appears that most of the inputs are using the modisIN%sunlit array to index into just the sunlit columns, however modisIN%pres does not use this indexing here. As a result, it appears that for groups of columns that contain both sunlit and not-sunlit columns, there will be a mismatch between the pressure profiles and the other inputs used. It appears as though modisIN%pres(i,:) should be replaced with modisIN%pres(int(sunlit(i)),:) here.
There appears to be a bug in the column indexing of the pressure input variable to the MODIS simulator. The calls to
modis_subcolumn
on lines 903-913 ofcosp.F90
contain the following:It appears that most of the inputs are using the
modisIN%sunlit
array to index into just the sunlit columns, howevermodisIN%pres
does not use this indexing here. As a result, it appears that for groups of columns that contain both sunlit and not-sunlit columns, there will be a mismatch between the pressure profiles and the other inputs used. It appears as thoughmodisIN%pres(i,:)
should be replaced withmodisIN%pres(int(sunlit(i)),:)
here.