;================================================ ; ndvi_3.ncl ;================================================ ; Concepts illustrated: ; - Read multiple AVHRR NDVI files ; - Unpack variables ; - Due to large size (3600x7200) of variables increase graphic work space ;================================================= ; NDVI: Normalized Difference Vegetation Index-V4 ; ; NDVI values are derived from surface reflectance data acquired by the ; Advanced Very High Resolution Radiometer (AVHRR) sensor. The NDVI data ; provide the global change and resource management communities with ; vegetation data for historical trend analysis and vegetation monitoring ; studies for land surfaces around the globe. ; ; The NOAA NDVI are a consistent, long-term record of remotely sensed vegetation ; observations allows haracterization the health of vegetation in different regions. ;================================================= TEST = False diri = "./" fili = systemfunc("cd "+diri+" ; ls AVHRR-Land_v004*nc") nfili= dimsizes(fili) print(fili) nt = 0 wks = gsn_open_wks("png","ndvi") ; send graphics to PNG file res = True ; plot mods desired res@gsnMaximize = True res@cnFillOn = True ; color Fill res@cnFillMode = "RasterFill" ; Raster Mode res@cnLinesOn = False ; Turn off contour lines res@mpCenterLonF = 0 ; set map center at 180 res@mpFillOn = False res@cnMinLevelValF = -0.90 ; set min contour level res@cnMaxLevelValF = 0.90 ; one less than max res@cnLevelSpacingF = 0.10 ; set contour spacing res@cnFillPalette = "WhiteBlueGreenYellowRed" ; <<< VEGETATION ...place holder setvalues NhlGetWorkspaceObjectId() "wsMaximumSize" : 500000000 end setvalues do nf=0,nfili-1 pthi = diri+fili(nf) f = addfile(pthi, "r") ndvi = short2flt(f->NDVI(:,::50,::25)) ; original unpacked values else ndvi = short2flt(f->NDVI) ; original unpacked values end if ndvi@long_name = "NDVI: V4: CDR" printVarSummary(ndvi) printMinMax(ndvi,0) res@tiMainString = fili(nf) yyyymmdd = cd_calendar(ndvi&time, -2) res@gsnRightString = yyyymmdd(nt) plot = gsn_csm_contour_map_ce(wks, ndvi(nt,:,:), res) ; create plot end do