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/contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl" begin diri = "./" fili = "AFR_pr_area1.nc" f = addfile(diri+fili, "r") var = f->pr time = var&time fldmean = wgt_areaave_Wrap(var,1.0,1.0,0) wks = gsn_open_wks("pdf","Precipitation_area1") ;-- set resources res = True res@tiMainString = "Precipitation-area1" restime = True ;-- set time tickmark resources restime@ttmFormat = "%D %C %Y" ;-- time tickmark format res@xyLineColor = "Red" res@xyLineThicknessF = 3 res@tiYAxisString = "Precipitation (mm/day)" time_axis_labels(time,res,restime) ; sets the correct time labels res@tmXBLabelFontHeightF = 0.01 res@tmXBLabelJust = "CenterRight" res@tmXBLabelDeltaF = 1.0 res@tmXBLabelAngleF = 50.0 res@tmLabelAutoStride = True plot = gsn_csm_xy(wks, time , fldmean, res) end