;----------------------------------------------------------------------------------------- ; grab the priors from the values stored in the lut ; note, these should be the same for all groups in the lut ; note, Sfc_Idx is assumed to 1 based so in IDL we subtract 1 ;----------------------------------------------------------------------------------------- pro grab_prior_from_lut, lut, Sfc_Idx, Prior_Prob_Clear, Prior_Prob_Water, Prior_Prob_Ice Prior_Prob_Water = lut[Sfc_Idx-1].water_fraction Prior_Prob_Ice = lut[Sfc_Idx-1].ice_fraction Prior_Prob_Cloud = lut[Sfc_Idx-1].cloud_fraction if (Prior_Prob_Cloud ge 0.0) then begin Prior_Prob_Clear = 1.0 - Prior_Prob_Cloud endif print, 'in grab_prior_from_lut ', Sfc_Idx, Prior_Prob_Water, Prior_Prob_Ice, Prior_Prob_Clear end