
;; Empty NCL template
;; run code in recipes, use it carefully

;;DIAG_NORCPM; RUNTHESECODES: print("    no ncl code run here")

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
begin
    fana = addfile("npac_temp_ana_ts.nc","r")
    ffca = addfile("npac_temp_fca_ts.nc","r")
    dif = ffca->temp - fana->temp 
    dif := dif(:,0,0,0)
    ;;dif := dif(:,0,0) ;; t,z,ncell

    wks = gsn_open_wks("ps","npac_temp_nug_ts")
    plotres = True
        plotres@tiMainString = "npac temp nug. ts"
        plotres@gsnYRefLine = 0.
    lineres = True
    plot1 = gsn_csm_xy(wks,ispan(1,dimsizes(dif),1),dif,plotres)
    ;gsn_polyline(wks,plot1,nt,oa,lineres)

    ;; legend
    lgres = True
        lgres@lgLineLabelStrings = (/"",""/)
        lgres@vpWidthF  = .2
        lgres@vpHeightF = .1
        lgres@lgPerimOn = False
        lgres@lgJustification = "TopLeft"
        lgres@lgLineColors =       (/"green","black"/)
        lgres@lgDashIndexes = (/0,0/)
    ;gsn_legend_ndc(wks,2,(/"Obs","Model ens"/),.6,.8,lgres)
    ;drawNDCGrid(wks)
    ;draw(plot1)
    ;draw(plot2)
    ;frame(wks)
end


