; ===========================================
; hov.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/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"
; ===========================================
begin
f = addfile("sst_ff.nc", "r")
var = f->sst(:,10,:)
;time = cd_calendar(f->time,-1)
;print (time)
;==============================================
; create color plot
;=============================================
wks = gsn_open_wks ("x11", "sst" ) ; open ps file
gsn_define_colormap(wks,"BlWhRe") ; choose colormap
res = True ; plot mods desired
res@cnFillOn = True ; turn on color fill
res@trYReverse = True ; reverses y-axis
;------------------time convert for axis-----------------
restick = True
restick@ttmFormat = "%Y"
restick@ttmAxis = "YL"
restick@ttmMajorStride = 30
time_axis_labels( var&time, res, restick )
;---------------- modulate details -----------------------
res@gsnStringFont = "helvetica"
res@tmXBLabelFont = "helvetica"
res@tmYLLabelFont = "helvetica"
res@gsnSpreadColors = True ; use full range of colors
res@lbOrientation = "vertical"
res@lbLabelFont = "helvetica"
res@lbLabelFontHeightF = 0.02
res@tiYAxisString = "Year"
res@tiYAxisFont = "helvetica"
;-----------------------plot-----------------------------
plot = gsn_csm_hov(wks, var, res)
end