;********************************* ; eosdis_1.ncl ;********************************* load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" ;********************************* begin ;********************************* ; read in HDF file ;********************************* f = addfile("eos.hdf","r") ; print(f) ;************************************************************* ; read in first channel in EV_250_Aggr1km_RefSB (0.65 um) ;************************************************************* ch1 = f->EV_250_Aggr1km_RefSB(0,::5,::5) ch1_float = ch1*ch1@reflectance_scales(0) ; orig is integer, make float ;************************************************************* ; assign named dimensions ;************************************************************* ch1_float@long_name = "VISIBLE REFLECTANCE (0.6 um)" ch1_float@units = "unitless" ;************************************************************* ; create plot ;************************************************************* wks = gsn_open_wks("ps", "eosdis") gsn_define_colormap(wks,"gsdtol") ; choose colormap res = True res@cnFillOn = True ; color fill res@cnFillMode = "RasterFill" ; raster mode res@cnLinesOn = False ; Turn off contour lines res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels res@cnMinLevelValF = 0.0 ; set min contour level res@cnMaxLevelValF = 1.0 ; set max contour level res@cnLevelSpacingF = 0.04 ; set contour spacing res@gsnSpreadColors = True ; use full color map res@gsnSpreadColorStart = 11 ; start at color 11 res@gsnSpreadColorEnd = 32 ; end at color 32 res@lbLabelStride = 2 ; every other label bar label res@lbOrientation = "Vertical" ; vertical label bar res@tiMainString = "Sample from an EOS-DIS hdf file" res@tiXAxisString = "pixel" res@tiYAxisString = "scanline" plot = gsn_csm_contour(wks,ch1_float, res) ; create plot end