[ncl-talk] Standard deviation Compute over time for each ensemble member

Sri nandini bax8609 at uni-hamburg.de
Fri Aug 14 03:52:15 MDT 2020


Hello ncl-users,

My code for computing standard deviation over the time for each ensemble 
member gives all zero. I would appreciate if someone can look over my 
code for mistakes?

;******************************************************************
; Compute over time for each ensemble member
; (a) Time Mean
; (b) Interannual variability (std. deviation)
;******************************************************************
   hist_anom=[time|156,ens|100,lat,lon]

    xEnsMonAvg = new((/nens,ntim,nlat,mlon/), typeof(hist_anom), 
hist_anom at _FillValue)
    xEnsMonStd = new((/nens,ntim,nlat,mlon/), typeof(hist_anom), 
hist_anom at _FillValue)

    do ne=0,nens-1                      ; loop over each ensemble member
    do nt=0,ntim-1                      ; loop over each year for 
current member

           work=hist_anom(nt::ntim,ne,:,:)              ; convenience 
and efficiency
           ;printVarSummary(work)                       ; [Time|1,lat,lon]

         xEnsMonAvg(ne,nt,:,:) = dim_avg_n(work,0)    ; ensemble avg
         xEnsMonStd(ne,nt,:,:) = dim_stddev_n(work,0) ; ensemble std
      end do
    end do

    printVarSummary(xEnsMonAvg)
    printVarSummary(xEnsMonStd)

Thanx

Sri



More information about the ncl-talk mailing list