;------------------------------------------------------------------------------------------------ ; ; solzen_min, solzen_max, glintzen_min, glintzen_max, $ ; zsfc_min, zsfc_max, snow_class_min, snow_class_max, missing, $ ;------------------------------------------------------------------------------------------------ pro get_prob_3d, x, y, z, solzen, glintzen, zsfc, snow_class, 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 valid data if (solzen lt attrs.solzen_min or solzen gt attrs.solzen_max) then goto, skip if (glintzen lt attrs.solglintzen_min or glintzen gt attrs.solglintzen_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 (x eq missing) then goto, skip if (y eq missing) then goto, skip if (z eq missing) then goto, skip if (~finite(x)) then goto, skip if (~finite(y)) then goto, skip if (~finite(z)) then goto, skip ix = min([attrs.nbins_x -1,max([0,fix((x - attrs.x_min) / attrs.x_bin)])]) iy = min([attrs.nbins_y -1,max([0,fix((y - attrs.y_min) / attrs.y_bin)])]) iz = min([attrs.nbins_z -1,max([0,fix((z - attrs.z_min) / attrs.z_bin)])]) obs_prob = lut[isfc].obs[ix,iy,iz] if (obs_prob gt 0.0) then begin clear_cond_ratio = lut[isfc].clear[ix,iy,iz] ice_cond_ratio = lut[isfc].ice[ix,iy,iz] water_cond_ratio = lut[isfc].water[ix,iy,iz] endif skip: end