<div dir="ltr"><div>Hello NCL user. I wanna make mjo clivar 14, but I got some error. <br></div><div><br></div><div>This is my script:</div><div>ncl 0> ;******************************************************<br>ncl 1> ;<br>ncl 2> ; mjoclivar_14.ncl<br>ncl 3> ;<br>ncl 4> ;***********************************************************<br>ncl 5> ; Combined EOFs<br>ncl 6> ; Latest Update: July, 2016: Eun-Pa Lim; Bureau of Meteorology, Australia<br>ncl 7> ;***********************************************************<br>ncl 8> ;;<br>ncl 9> ;;      The following are automatically loaded from 6.2.0 onward<br>ncl 10> ;;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"  <br>ncl 11> ;;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"  <br>ncl 12> ;;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" <br>ncl 13> <br>ncl 14> undef("read_rename")<br>ncl 15> function read_rename(f[1]:file, varName[1]:string       \<br>ncl 15>                     ,iStrt[1]:integer, iLast[1]:integer \<br>ncl 15>                     ,latS[1]:numeric , latN[1]:numeric  )<br>ncl 16> ; Utility to force specific named dimensions<br>ncl 17> ; This is done for historical reasons (convenience) <br>ncl 18> begin<br>ncl 19>    work    = f->$varName$(iStrt:iLast,{latS:latN},:)   ; (time,lat,lon)<br>ncl 20>    work!0  = "time"                                    ; CAM model names<br>ncl 21>    work!1  = "lat"<br>ncl 22>    work!2  = "lon"<br>ncl 23>    return(work)<br>ncl 24> end<br>ncl 25> ; =========================>  MAIN  <==============================<br>ncl 26> begin<br>ncl 27>    neof    =  2<br>ncl 28> <br>/ncl 29>    latS    = -15<br>ncl 30>    latN    =  15<br>ncl 31> <br>ncl 32>    ymdStrt = 20180101                         ; start yyyymmdd<br>ncl 33>    ymdLast = 20181231                         ; last  <br>ncl 34> <br>ncl 35>    yrStrt  = ymdStrt/10000<br>ncl 36>    yrLast  = ymdLast/10000<br>ncl 37> <br>ncl 38>    pltDir  = "/home/peni/"                             ; plot directory<br>ncl 39>    pltType = "png" <br>ncl 40>    pltName = "mjoclivar"   <br>ncl 41> <br>ncl 42>    diri    = "/home/peni/"                             ; input directory<br>ncl 43> <br>ncl 44>    filolr  = "<a href="http://anomolr.nc">anomolr.nc</a>"<br>ncl 45>    filu200 = "<a href="http://uanom2.nc">uanom2.nc</a>"<br>ncl 46>    filu850 = "<a href="http://uanom.nc">uanom.nc</a>"<br>ncl 47> <br>ncl 48> ;************************************************<br>ncl 49> ; create BandPass Filter<br>ncl 50> ;************************************************<br>ncl 51>   ihp      = 2                             ; bpf=>band pass filter<br>rncl 52>   nWgt     = 201<br> ncl 53>   sigma    = 1.0                           ; Lanczos sigma<br>r ncl 54>   fca      = 1./100.<br>ncl 55>   fcb      = 1./20.<br> "olr", "u850", "u200"<br>  ceof = newncl 56>   wgt      = filwgts_lanczos (nWgt, ihp, fca, fcb, sigma )<br>ncl 57> <br> ncl 58> ;***********************************************************<br>ncl 59> ; Find the indices corresponding to the start/end times<br>ncl 60> ;***********************************************************<br>ncl 61>    f       = addfile (diri+filolr , "r")                         <br>ncl 62>    TIME    = f->time                          ; days since ...<br>ncl 63> <br>ncl 64>    YMD     = cd_calendar(TIME, -2)            ; entire (time,6)<br>ncl 65> <br>tncl 66>    iStrt   = ind(YMD.eq.ymdStrt)              ; index start<br>ncl 67>    iLast   = ind(YMD.eq.ymdLast)              ; index last <br>ncl 68>    delete([/ TIME, YMD /])<br>ncl 69> <br>nncl 70> ;***********************************************************<br>ncl 71> ; Read anomalies<br>ncl 72> ;***********************************************************<br>ncl 73> <br>ncl 74>    work    = read_rename(f,"anomolr",iStrt,iLast,latS,latN) ; (time,lat,lon) <br>ncl 75>    OLR     = dim_avg_n_Wrap(work, 1)                         ; (time,lon)<br>ncl 76> <br>ncl 77>    f       = addfile (diri+filu850 , "r")                         <br>ncl 78>    work    = read_rename(f,"uanom",iStrt,iLast,latS,latN) ; (time,lat,lon) <br>ncl 79>    U850    = dim_avg_n_Wrap(work, 1)          ; (time,lon)<br>ncl 80> <br>ncl 81>    f       = addfile (diri+filu200 , "r")                         <br>ncl 82>    work    = read_rename(f,"uanom2",iStrt,iLast,latS,latN) ; (time,lat,lon) <br>ncl 83>    U200    = dim_avg_n_Wrap(work, 1)          ; (time,lon)<br>ncl 84> <br>^ncl 85>    dimw    = dimsizes( work )<br>ncl 86>    ntim    = dimw(0)<br>ncl 87>    nlat    = dimw(1)<br>ncl 88>    mlon    = dimw(2)<br>ncl 89>    delete(work)<br>ncl 90> <br>ncl 91>    lon     = OLR&lon                                          <br>ncl 92>    time    = OLR&time                         <br>ncl 93>    date    = cd_calendar(time, -2)            ; yyyymmdd<br>ncl 94> <br>ncl 95> ;************************************************<br>ncl 96> ; Apply the band pass filter to the original anomalies<br>ncl 97> ;************************************************<br>ncl 98>    olr   = wgt_runave_n_Wrap ( OLR, wgt, 0, 0) ; (time,lon)<br>ncl 99>    u850  = wgt_runave_n_Wrap (U850, wgt, 0, 0)<br>ncl 100>    u200  = wgt_runave_n_Wrap (U200, wgt, 0, 0)<br>ncl 101> <br>ncl 102> ;************************************************<br>ncl 103> ; remove temporal means of band pass series: *not* necessary <br>ncl 104> ;************************************************<br>ncl 105>    olr   = dim_rmvmean_n( olr, 0)              ; (time,lon)<br>ncl 106>    u850  = dim_rmvmean_n(u850, 0)<br>ncl 107>    u200  = dim_rmvmean_n(u200, 0)<br>ncl 108> <br>ncl 109> ;************************************************<br>ncl 110> ; Compute the temporal variance at each lon<br>ncl 111> ;************************************************<br>ncl 112>    var_olr  = dim_variance_n_Wrap( olr, 0)     ; (lon)<br>ncl 113>    var_u850 = dim_variance_n_Wrap(u850, 0)<br>ncl 114>    var_u200 = dim_variance_n_Wrap(u200, 0)<br>ncl 115> <br>ncl 116> ;************************************************<br>ncl 117> ; Compute the zonal mean of the temporal variance<br>ncl 118> ;************************************************<br>ncl 119>   zavg_var_olr  = dim_avg_n_Wrap( var_olr , 0)     <br>ncl 120>   zavg_var_u850 = dim_avg_n_Wrap( var_u850, 0)<br>ncl 121>   zavg_var_u200 = dim_avg_n_Wrap( var_u200, 0)<br>ncl 122> <br>ncl 123> ;************************************************<br>ncl 124> ; Normalize by sqrt(avg_var*)<br>ncl 125> ;************************************************<br>ncl 126>   olr   =  olr/sqrt(zavg_var_olr )          ; (time,lon)<br>ncl 127>   u850  = u850/sqrt(zavg_var_u850)<br>ncl 128>   u200  = u200/sqrt(zavg_var_u200)<br>ncl 129> <br>ncl 130> ;************************************************<br>ncl 131> ; Combine the normalized data into one variable<br>ncl 132> ;************************************************<br>ncl 133>   cdata     = new ( (/3*mlon,ntim/), typeof(olr), getFillValue(olr))<br>ncl 134>   do ml=0,mlon-1<br>ncl 135>      cdata(ml       ,:) = (/  olr(:,ml) /)<br>ncl 136>      cdata(ml+  mlon,:) = (/ u850(:,ml) /)<br>ncl 137>      cdata(ml+2*mlon,:) = (/ u200(:,ml) /)<br>ncl 138>   end do<br>ncl 139> <br>=ncl 140> ;************************************************<br>ncl 141> ; Compute **combined** EOF; Sign of EOF is arbitrary<br>ncl 142> ;************************************************<br>ncl 143>   eof_cdata    = eofunc(cdata   , neof, False)      ; (neof,3*mlon)<br>ncl 144>   print("==============")<br>ncl 145>   printVarSummary(eof_cdata)<br>ncl 146>   printMinMax(eof_cdata, True)<br>ncl 147> <br>ncl 148>   eof_ts_cdata = eofunc_ts(cdata,eof_cdata,False)   ; (neof,3*ntim)<br>ncl 149>   print("==============")                                  <br>ncl 150>   printVarSummary(eof_ts_cdata)<br>ncl 151>   printMinMax(eof_ts_cdata, True)<br>ncl 152> <br>incl 153> ;************************************************<br>ncl 154> ; For clarity, explicitly extract each variable. Create time series <br>ncl 155> ;************************************************<br>ncl 156> <br>ncl 157>   nvar = 3  ; "olr", "u850", "u200"<br>ncl 158>   ceof = new( (/nvar,neof,mlon/), typeof(cdata), getFillValue(cdata))<br>ncl 159> <br>ncl 160>   do n=0,neof-1<br>ncl 161>      ceof(0,n,:) = eof_cdata(n,0:mlon-1)      ; olr<br>ncl 162>      ceof(1,n,:) = eof_cdata(n,mlon:2*mlon-1) ; u850<br>ncl 163>      ceof(2,n,:) = eof_cdata(n,2*mlon:)       ; u200<br>ncl 164>   end do<br>ncl 165> <br>(ncl 166>   ceof!0   = "var"<br>ncl 167>   ceof!1   = "eof"<br> ncl 168>   ceof!2   = "lon"   <br>ncl 169>   ceof&lon =  olr&lon<br>ncl 170> <br>ncl 171>   ceof_ts        = new( (/nvar,neof,ntim/), typeof(cdata), getFillValue(cdata))<br>ncl 172>   ceof_ts(0,:,:) = eofunc_ts_Wrap( olr(lon|:,time|:),ceof(0,:,:),False)   ; (0,neof,ntim)<br>ncl 173>   ceof_ts(1,:,:) = eofunc_ts_Wrap(u850(lon|:,time|:),ceof(1,:,:),False)   ; (1,neof,ntim)<br>ncl 174>   ceof_ts(2,:,:) = eofunc_ts_Wrap(u200(lon|:,time|:),ceof(2,:,:),False)   ; (2,neof,ntim)<br>ncl 175> <br>ncl 176> ;**********************************************t*<br>ncl 177> ; Add code contributed by Marcus N. Morgan, Florida Institute of Technology; Feb 2015<br>ncl 178> ; Calculate % variance (pcv_ )accounted for by OLR, U850 and U200<br>ncl 179> ;************************************************<br>ncl 180> <br> ncl 181>     pcv_eof_olr  = new(neof,typeof(ceof))<br>ncl 182>     pcv_eof_u850 = new(neof,typeof(ceof))<br>ncl 183>     pcv_eof_u200 = new(neof,typeof(ceof))<br>ncl 184>       <br>ncl 185>     do n=0,neof-1<br>ncl 186>        pcv_eof_olr(n)  = avg((ceof(0,n,:)*sqrt(ceof@eval(n)))^2)*100<br>ncl 187>        pcv_eof_u850(n) = avg((ceof(1,n,:)*sqrt(ceof@eval(n)))^2)*100<br>ncl 188>        pcv_eof_u200(n) = avg((ceof(2,n,:)*sqrt(ceof@eval(n)))^2)*100<br>ncl 189>      ;;print("pcv: neof="+(n+1)+":  "+pcv_eof_olr(n)+"  "+pcv_eof_u850(n)+"  "+pcv_eof_u200(n))<br>ncl 190>     end do<br>ncl 191> <br>ncl 192> ;************************************************<br>ncl 193> ; Change sign of EOFs for spatial structures of PC1 and PC2 <br>ncl 194> ; to represent convection over the tropical Indian Ocean and the tropical western Pacific Ocean, respectively <br>ncl 195> ; (Ad hoc approach) <br>ncl 196> ;************************************************<br>ncl 197>                    <br>ncl 198>   imax_olr_eof1   = maxind(ceof(0,0,:))         <br>ncl 199>   imax_olr_eof2   = maxind(ceof(0,1,:))    <br>ncl 200> <br>gncl 201>   lonmax_eof1 = ceof&lon(imax_olr_eof1)      ; longitude of max value (i.e. suppressed convection)<br>ncl 202>   lonmax_eof2 = ceof&lon(imax_olr_eof2)<br>ncl 203> <br>Pncl 204>   if (lonmax_eof1.ge.60 .and. lonmax_eof1.lt.180) then  ; Change the sign of EOF1 <br>ncl 205>       ceof(:,0,:)       = -ceof(:,0,:)                  ; if OLR is positive<br>ncl 206>       ceof_ts(:,0,:)    = -ceof_ts(:,0,:)               ;  over the tropical Indian Ocean<br>ncl 207>       eof_cdata(0,:)    = -eof_cdata(0,:)<br>ncl 208>       eof_ts_cdata(0,:) = -eof_ts_cdata(0,:)<br>ncl 209>   end if<br>ncl 210> <br>ncl 211>   if (lonmax_eof2.ge.120 .and. lonmax_eof2.lt.180) then  ; Change the sign of EOF2<br>ncl 212>       ceof(:,1,:)       = -ceof(:,1,:)                   ; if OLR is positive <br>ncl 213>       ceof_ts(:,1,:)    = -ceof_ts(:,1,:)                ; over the tropical western Pacific Ocean<br>ncl 214>       eof_cdata(1,:)    = -eof_cdata(1,:)<br>ncl 215>       eof_ts_cdata(1,:) = -eof_ts_cdata(1,:)<br>ncl 216>   end if<br>ncl 217> <br>ncl 218>   print("==============")<br>    = 0.                  ; reference line   ncl 219>   printVarSummary(eof_cdata)<br>ncl 220>   printMinMax(eof_cdata, True)<br>ncl 221> <br>=ncl 222> ;************************************************<br>ncl 223> ; Compute cross correlation of each variable's EOF time series at zero-lag<br>ncl 224> ;************************************************<br>ncl 225>   r_olr_u850  = escorc(ceof_ts(0,:,:) , ceof_ts(1,:,:) )  ; (neof)<br>ncl 226>   r_olr_u200  = escorc(ceof_ts(0,:,:) , ceof_ts(2,:,:) )<br>ncl 227>   r_u850_u200 = escorc(ceof_ts(1,:,:) , ceof_ts(2,:,:) )<br>ncl 228> <br> ncl 229>   print("==============")<br>ncl 230>   do n=0,neof-1<br>ncl 231>      print("neof="+n \<br>oncl 231>           +"  r_olr_u850=" +sprintf("%4.3f",r_olr_u850(n))  \<br>ncl 231>           +"  r_olr_u200=" +sprintf("%4.3f",r_olr_u200(n))  \<br> ; modify the panel plotncl 231>           +"  r_u850_u200="+sprintf("%4.3f",r_u850_u200(n)) )<br>ncl 232>   end do<br>ncl 233>   print("==============")<br>ncl 234> <br>ncl 235> ;************************************************<br>ncl 236> ; Compute cross correlation of the multivariate EOF; EOF 1 vs EOF 2<br>ncl 237> ;************************************************<br>ncl 238> <br> ncl 239>   mxlag     = 25<br>ncl 240>   rlag_01   = esccr(eof_ts_cdata(0,:),eof_ts_cdata(1,:), mxlag)   ; (N,mxlag+1)<br>ncl 241>   rlag_10   = esccr(eof_ts_cdata(1,:),eof_ts_cdata(0,:), mxlag)   ; (N,mxlag+1)<br>ncl 242>   ccr_12    = new ( (/2*mxlag+1/), float)    <br>ncl 243> <br>(ncl 244>   ccr_12(mxlag:)    = rlag_10(0:mxlag)   <br>ncl 245>   ccr_12(0:mxlag)   = rlag_01(::-1)       ; reverse order<br>ncl 246> ;;print(ccr_12)<br>ncl 247> <br>ncl 248> <br>ncl 249> ;************************************************<br>ncl 250> ; Normalize the multivariate EOF 1&2 component time series<br>ncl 251> ; Compute (PC1^2+PC2^2): values > 1 indicate "strong" periods<br>ncl 252> ;************************************************<br>ncl 253>   eof_ts_cdata(0,:) = eof_ts_cdata(0,:)/stddev(eof_ts_cdata(0,:))<br>ncl 254>   eof_ts_cdata(1,:) = eof_ts_cdata(1,:)/stddev(eof_ts_cdata(1,:))<br>ncl 255> <br> ncl 256>   mjo_ts_index      = eof_ts_cdata(0,:)^2 + eof_ts_cdata(1,:)^2 <br>ncl 257>   mjo_ts_index_smt  = runave(mjo_ts_index, 91, 0) ; 91-day running mean<br>ncl 258> <br>rncl 259>   nGood   = num(.not.ismissing(mjo_ts_index))     ; # non-missing<br>ncl 260>   nStrong = num(mjo_ts_index .ge. 1.0)<br>ncl 261>   print("nGood="+nGood+"   nStrong="+nStrong+"   nOther="+(nGood-nStrong))<br>ncl 262> <br>2ncl 263> ;************************************************<br>ncl 264> ; Write PC results to netCDF for use in another example.<br>ncl 265> ;************************************************<br>ncl 266>   mjo_ts_index!0    = "time"<br>ncl 267>   mjo_ts_index&time = time <br>ncl 268>   mjo_ts_index@long_name = "MJO PC INDEX" <br>ncl 269>   mjo_ts_index@info      = "(PC1^2 + PC2^2)" <br>ncl 270> <br>*ncl 271>   PC1           = eof_ts_cdata(0,:)<br>ncl 272>   PC1!0         = "time"<br>*******ncl 273>   PC1&time      =  time<br>ncl 274>   PC1@long_name = "PC1"<br>ncl 275>   PC1@info      = "PC1/stddev(PC1)"<br>ncl 276> <br> ncl 277>   PC2           = eof_ts_cdata(1,:)<br>ncl 278>   PC2!0         = "time"<br>ncl 279>   PC2&time      =  time<br>ncl 280>   PC2@long_name = "PC2"<br>ncl 281>   PC2@info      = "PC2/stddev(PC2)"<br>ncl 282> <br>"ncl 283>   diro = "/home/peni/"<br>ncl 284>   filo = "MJO_PC_INDEX.nc"<br>ncl 285>   system("/bin/rm -f "+diro+filo)   ; remove any pre-existing file<br>ncl 286>   ncdf = addfile(diro+filo,"c")     ; open output netCDF file<br>ncl 287>                                     ; make time an UNLIMITED dimension <br>ncl 288>   filedimdef(ncdf,"time",-1,True)   ; recommended  for most applications<br>ncl 289>                                     ; output variables directly<br>ncl 290>   ncdf->MJO_INDEX = mjo_ts_index    <br>ncl 291>   ncdf->PC1       = PC1     <br>ncl 292>   ncdf->PC2       = PC2     <br>ncl 293> <br>ncl 294> ;------------------------------------------------------------<br>ncl 295> ; PLOTS<br>ncl 296> ;------------------------------------------------------------<br>Pncl 297> <br>Cncl 298>   yyyymmdd = cd_calendar(time, -2)<br>ncl 299>   yrfrac   = yyyymmdd_to_yyyyfrac(yyyymmdd, 0.0)<br>ncl 300>   delete([/ yrfrac@long_name, lon@long_name /])<br>ncl 301> <br>ncl 302>   day      = ispan(-mxlag, mxlag, 1)<br>ncl 303>  ;day@long_name = "lag (day)"<br>ncl 304> <br>ncl 305>   pltPath = pltDir+pltName<br>ncl 306> <br>ncl 307>   wks = gsn_open_wks(pltType,pltPath)<br>ncl 308>   gsn_define_colormap(wks,"default")<br>ncl 309>   plot = new(3,graphic)                <br>ncl 310> <br>ncl 311> ;************************************************<br>ncl 312> ; Multivariate EOF plots<br>ncl 313> ;************************************************<br>ncl 314>   rts           = True<br>ncl 315>   rts@gsnDraw   = False       ; don't draw yet<br>ncl 316>   rts@gsnFrame  = False       ; don't advance frame yet<br>ncl 317>   rts@gsnScale  = True        ; force text scaling               <br>ncl 318> <br>ncl 319>   rts@vpHeightF = 0.40        ; Changes the aspect ratio<br>ncl 320>   rts@vpWidthF  = 0.85<br>ncl 321>   rts@vpXF      = 0.10        ; change start locations<br>ncl 322>   rts@vpYF      = 0.75        ; the plot<br>ncl 323>   rts@xyLineThicknesses = (/2, 2, 2/)<br>ncl 324>   rts@xyLineColors      = (/"black","red","blue"/)<br>ncl 325>   rts@gsnYRefLine       = 0.                  ; reference line   <br>ncl 326>   rts@trXMaxF           = max(lon)<br>ncl 327>   rts@trXMinF           = min(lon)<br>ncl 328> <br>ncl 329>   rts@pmLegendDisplayMode    = "Always"            ; turn on legend<br>ncl 330>   rts@pmLegendSide           = "Top"               ; Change location of <br>ncl 331>   rts@pmLegendParallelPosF   = 1.16                ; move units right<br>ncl 332>   rts@pmLegendOrthogonalPosF = -0.50               ; move units down<br>ncl 333>   rts@pmLegendWidthF         = 0.15                ; Change width and<br>ncl 334>   rts@pmLegendHeightF        = 0.15                ; height of legend.<br>ncl 335>   rts@lgLabelFontHeightF     = 0.0175<br>ncl 336> <br>ncl 337> <br>ncl 338>   rtsP                       = True                ; modify the panel plot<br>ncl 339> ;  rtsP@gsnMaximize           = True                ; large format<br>ncl 340>   rtsP@gsnPanelMainString     = "Multivariate EOF: 15S-15N: "+yrStrt+"-"+yrLast <br>ncl 341>   <br>ncl 342>   do n=0,neof-1<br>ncl 343>     rts@xyExplicitLegendLabels = (/"OLR: "+sprintf("%4.1f", pcv_eof_u200(n)) +"%" \<br>ncl 343>                                   ,"U850: "+sprintf("%4.1f", pcv_eof_u850(n))+"%" \<br>ncl 343>                                   ,"U200: "+sprintf("%4.1f", pcv_eof_olr(n))+"%" /)<br>ncl 344>     rts@gsnLeftString  = "EOF "+(n+1)<br>ncl 345>     rts@gsnRightString = sprintf("%3.1f",ceof@pcvar(n))  +"%"<br>ncl 346>     plot(n) = gsn_csm_xy (wks,lon,ceof(:,n,:),rts)<br>ncl 347>   end do<br>ncl 348>   gsn_panel(wks,plot(0:1),(/2,1/),rtsP)     ; now draw as one plot<br>ncl 349> <br>ncl 350> ;-----------------------------------------<br>ncl 351> ; The following doesn't work with some older versions of NCL<br>ncl 352> ; With old versions, the user must delete each individually.<br>ncl 353> ;----------------------------------------- <br>ncl 354>   delete([/ rts@xyExplicitLegendLabels, rts@pmLegendDisplayMode \<br>ncl 354>           , rts@xyLineThicknesses     , rts@gsnLeftString       \<br>ncl 354>           , rts@gsnRightString        , rts@xyLineColors        \<br>ncl 354>           , rts@trXMaxF               , rts@trXMinF             /] )<br>ncl 355> <br>ncl 356>   lag                        = ispan(-mxlag,mxlag,1)<br>ncl 357>   lag@long_name              = "lag (days)"<br>ncl 358> <br>ncl 359>   plot(0)                    = gsn_csm_xy (wks, lag ,ccr_12,rts)<br>ncl 360>   rtsP@gsnPanelMainString    = "Cross Correlation: Multivariate EOF: 15S-15N: " \<br>ncl 360>                    +  yrStrt+"-"+yrLast <br>ncl 361>   rtsP@gsnPaperOrientation   = "portrait"        ; force portrait<br>ncl 362>   gsn_panel(wks,plot(0),(/1,1/),rtsP)     ; now draw as one plot<br>ncl 363> <br>ncl 364> ;************************************************<br>ncl 365> ; MJO "strong" index <br>ncl 366> ;************************************************<br>ncl 367>   rts@gsnYRefLine        = 1.0<br>ncl 368>   rts@gsnYRefLineColor   = "black"<br>ncl 369>   rts@xyMonoDashPattern  = True<br>ncl 370>   rts@xyLineColors       = (/"black", "blue"/)<br>ncl 371>   rts@xyLineThicknesses  = (/1, 2/)<br>ncl 372>   rts@pmLegendDisplayMode    = "Always"            ; turn on legend<br>ncl 373>   rts@pmLegendWidthF         = 0.12                ; Change width and<br>ncl 374>   rts@pmLegendHeightF        = 0.10                ; height of legend.<br>ncl 375>   rts@pmLegendParallelPosF   = 0.86                ; move units right<br>ncl 376>   rts@pmLegendOrthogonalPosF = -0.40               ; move units down<br>ncl 377>   rts@xyExplicitLegendLabels = (/"daily", "91-day runavg" /)<br>ncl 378> <br>ncl 379>   mjo_ind_plt = new ( (/2,ntim/), typeof(mjo_ts_index))<br>ncl 380>   mjo_ind_plt(0,:) = mjo_ts_index<br>ncl 381>   mjo_ind_plt(1,:) = (/ mjo_ts_index_smt /)<br>ncl 382>   plot(0) = gsn_csm_xy(wks, yrfrac,mjo_ind_plt,rts)<br>ncl 383> <br>ncl 384>   rtsP@gsnPanelMainString   = "MJO Index: (PC1^2+ PC2^2) : 15S-15N: "+yrStrt+"-"+yrLast <br>ncl 385>   gsn_panel(wks,plot(0),(/1,1/),rtsP)     ; now draw as one plot<br>ncl 386> <br>ncl 387>  end</div><div><br></div><div> sub drveof: ier,jopt=  10  0 returned from vcmssm/crmssm<br>warning:eofunc: 10 eigenvectors failed to converge<br>(0)       ==============<br><br>Variable: eof_cdata<br>Type: double<br>Total Size: 6960 bytes<br>            870 values<br>Number of Dimensions: 2<br>Dimensions and sizes:       [2] x [435]<br>Coordinates: <br>Number Of Attributes: 5<br>  _FillValue :    -999000000<br>  method : no transpose<br>  matrix :       covariance<br>  pcvar :  ( -9.99e+08, -9.99e+08 )<br>  eval :     ( -999000000, -999000000 )<br>(0)  <br>(0)  min=-999000000   max=-999000000<br>warning:eofunc_ts: 2 eigenvectors failed to converge<br>(0)     ==============<br><br>Variable: eof_ts_cdata<br>Type: double<br>Total Size: 5840 bytes<br>            730 values<br>Number of Dimensions: 2<br>Dimensions and sizes:    [2] x [365]<br>Coordinates: <br>Number Of Attributes: 3<br>  _FillValue :    -999000000<br>  matrix : covariance<br>  ts_mean :        ( -999000000, -999000000 )<br>(0)  <br>(0)  min=-999000000   max=-999000000<br>warning:eofunc_ts: 2 eigenvectors failed to converge<br>warning:eofunc_ts: 2 eigenvectors failed to converge<br>warning:eofunc_ts: 2 eigenvectors failed to converge<br>warning:avg: Entire input array contains missing values, can't compute average<br>warning:avg: Entire input array contains missing values, can't compute average<br>warning:avg: Entire input array contains missing values, can't compute average<br>warning:avg: Entire input array contains missing values, can't compute average<br>warning:avg: Entire input array contains missing values, can't compute average<br>warning:avg: Entire input array contains missing values, can't compute average<br>fatal:Subscript out of range, error in subscript #0<br>fatal:An error occurred reading unknown<br>fatal:["Execute.c":8635]:Execute: Error occurred at or near line 201</div><div><br></div><div><br></div></div>