;$Id$ pro bayes_sfc_type_1d, land_class, snow_class, sst_back_uni, lon,lat, sfc_emiss_375, sfc_type_mask print, 'STARTING sfc type definition' SHALLOW_OCEAN = 0 LAND = 1 COASTLINE = 2 SHALLOW_INLAND_WATER = 3 EPHEMERAL_WATER = 4 DEEP_INLAND_WATER = 5 MODERATE_OCEAN = 6 DEEP_OCEAN = 7 SNOW = 2 SEA_ICE = 3 nx = n_elements(land_class) sfc_type_mask = make_array(nx,/BYTE,VALUE=0) for i = 0L, nx -1 do begin ;--- default LAND/OCEAN values if (land_class[i] eq LAND) then begin sfc_type_mask[i] = 3 endif else begin sfc_type_mask[i] = 1 endelse ;--- #2 - Shallow Ocean if (land_class[i] eq MODERATE_OCEAN or $ land_class[i] eq DEEP_INLAND_WATER or $ land_class[i] eq SHALLOW_INLAND_WATER or $ land_class[i] eq SHALLOW_OCEAN) then begin sfc_type_mask[i] = 2 endif ;--- include into Shallow Ocean SST fronts if (land_class[i] ne LAND and $ sst_back_uni[i] gt 0.5) then begin sfc_type_mask[i] = 1 endif ;--- #3 Unfrozen Land if (land_class[i] eq LAND or $ land_class[i] eq COASTLINE or $ land_class[i] eq EPHEMERAL_WATER) then begin sfc_type_mask[i] = 3 endif ;--- #4 Frozen Land if (snow_class[i] eq SNOW and lat[i] gt -60.0) then begin sfc_type_mask[i] = 4 endif ;--- #5 - Arctic if (lat[i] gt 0 and snow_class[i] eq SEA_ICE) then begin sfc_type_mask[i] = 5 endif ;---- #6 - Antarctica if (lat[i] lt 0 and snow_class[i] eq SEA_ICE) then begin sfc_type_mask[i] = 6 endif if (lat[i] lt -60 and snow_class[i] eq SNOW) then begin sfc_type_mask[i] = 6 endif if (lat[i] gt 60 and lon[i] gt -75.0 and lon[i] lt -10 and $ (land_class[i] eq LAND or land_class[i] eq COASTLINE) and $ snow_class[i] eq SNOW) then begin sfc_type_mask[i] = 6 endif ;--- #7 Desert - subset of unfrozen land if (sfc_type_mask[i] eq 3 and abs(lat[i]) lt 60.0) then begin if(sfc_emiss_375[i] lt 0.93) then begin ; if(sfc_type[i] eq 8 or sfc_type[i] eq 9 or sfc_type[i] eq 10 or sfc_type[i] eq 12) then begin sfc_type_mask[i] = 7 ; endif endif endif endfor end