;cldmask_scs.pro ;Cloud Mask algorithm ; ;Creates a binary mask of cloud presence at designated height levels ; for the entire SHEBA year from the radar and lidar cloud boundaries. ; ;Must IDL> restore,'raw.fy.dat' from the d:/lidar directory ; ; ;hts=findgen(129)/10.+0.1 ;100m hts=findgen(257)/20.+0.1 ;50m ;hts=findgen(513)/40.+0.1 ;25m echomask=intarr(50112,n_elements(hts))*0 cloudmask=echomask depolmask=float(echomask) for i=0L,n_elements(echomask[*,0])-1 do begin maxl=0 for l=0,11 do begin wh=where((hts ge basel[i,l]) and (hts le topl[i,l]),numh) if wh[0] ne -1 then begin echomask[i,wh]=1 cloudmask[i,wh]=1 depolmask[i,wh]=depol[i,l] maxl=maxl>hts[wh[numh-1]] endif endfor for r=0,9 do begin wh=where((hts ge baser[i,r]) and (hts le topr[i,r])) if wh[0] ne -1 then echomask[i,wh]=1 if (r eq 0) and (baser[i,r] lt .110) then echomask[i,0]=1 wh2=where((hts ge baser[i,r]) and (hts le topr[i,r]) and (hts ge maxl)) if wh2[0] ne -1 then cloudmask[i,wh2]=1 endfor endfor end ;prog