;------------------------------------------------------------------------------------------------ ; ;------------------------------------------------------------------------------------------------ pro get_prob_1d, x, zen, solzen, lunzen, solglintzen, lunglintzen, solscatang, $ zsfc, snow_class, coast_mask, isfc, $ lut, attrs, prob_min_thresh, r_max, missing, $ clear_cond_ratio, water_cond_ratio, ice_cond_ratio, obs_prob clear_cond_ratio = missing water_cond_ratio = missing ice_cond_ratio = missing obs_prob = missing ;-- check for data that is withing the limits for this classifier if (zen ne missing and (zen lt attrs.zen_min or solzen gt attrs.zen_max)) then goto, skip if (solzen ne missing and (solzen lt attrs.solzen_min or solzen gt attrs.solzen_max)) then goto, skip if (solglintzen ne missing and $ (solglintzen lt attrs.solglintzen_min or solglintzen gt attrs.solglintzen_max)) then goto, skip if (lunglintzen ne missing and $ (lunglintzen lt attrs.lunglintzen_min or lunglintzen gt attrs.lunglintzen_max)) then goto, skip if (solscatang ne missing and $ (solscatang lt attrs.solscatang_min or solscatang gt attrs.solscatang_max)) then goto, skip if (zsfc lt attrs.zsfc_min or zsfc gt attrs.zsfc_max) then goto, skip if (snow_class lt attrs.snow_class_min or snow_class gt attrs.snow_class_max) then goto, skip if (coast_mask lt attrs.coast_mask_min or coast_mask gt attrs.coast_mask_max) then goto, skip ;--- check for valid data if (x eq missing) then goto, skip if (~finite(x)) then goto, skip ix = min([attrs.nbins_x -1,max([0,fix((x - attrs.x_min) / attrs.x_bin)])]) obs_prob = lut[isfc].obs[ix] if (obs_prob gt 0.0) then begin clear_cond_ratio = lut[isfc].clear[ix] ice_cond_ratio = lut[isfc].ice[ix] water_cond_ratio = lut[isfc].water[ix] endif skip: end