Dear all,<br><br>  When I tried to calculate the frequency wavenumber spectra by using the below script I am getting the following errors.<br><br>fatal:Dimension size mismatch, dimension (1) of left hand side reference does not have the same size as the right hand side reference after subscripting.<br>
fatal:Execute: Error occurred at or near line 229 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl<br><br>fatal:Execute: Error occurred at or near line 2910 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl<br>
<br>fatal:Execute: Error occurred at or near line 60 in file mjoclivar_10.ncl<br><br>Any help would be appreciated,<br>Thanking you<br><br><br><br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;<br>
load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl&quot;<br><br>;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br>begin<br>
                           ; time window<br><br>  twStrt = 20020102<br>  twLast = 20341231<br><br>  diri   = &quot;/home/sebi/convert/&quot;<br><br>  vName  = &quot;daily_preci&quot;        ; name of variable on the file<br>
  fili   = &quot;<a href="http://daily_preci.nc">daily_preci.nc</a>&quot;<br>  f      = addfile(diri+fili, &quot;r&quot;)<br><br>  pltDir  = &quot;./&quot;<br>  pltType = &quot;pdf&quot;<br>  pltName = &quot;t61_wave_freq&quot;<br>
<br>;************************************************************<br>; time indices corresponding to the desired time window<br>;************************************************************<br><br>  date  = f-&gt;time<br>
  iStrt = ind(date.eq.twStrt)        ; desired dates<br>  iLast = ind(date.eq.twLast)<br>  delete(date)<br><br>;************************************************************<br>; Read user specified period<br>;************************************************************<br>
<br>  if (getfilevartypes(f,vName) .eq. &quot;short&quot;) then<br>      X = short2flt( f-&gt;$vName$(iStrt:iLast,{-10:40},{50:150}) )  ; all data in window<br>  else<br>      X = f-&gt;$vName$(iStrt:iLast,{-10:40},{50:150})<br>
  end if<br>  printVarSummary( X )<br>  printMinMax(X, True)<br><br>  time  = X&amp;time                     ; clarity<br>;  date  = ut_calendar( time , -2 )   ; yyyymmdd<br>   date=time<br>;************************************************************<br>
  x = dim_avg_Wrap( X(time|:,lon|:,lat|:) )    ; (time,lon)<br>;************************************************************<br>; calculate and plot the spectra<br>;************************************************************<br>
  optWavFrq     = False<br>  optPlot       = TrueoptPlot@smth9 = False<br><br>  nameSeason = (/&quot;winter&quot; , &quot;summer&quot;/)<br><br>  do ns=0,dimsizes(nameSeason)-1<br>     wf      = mjo_wavenum_freq_season (x, date,nameSeason(ns), optWavFrq)<br>
     optPlot@tiMainString =&quot;Wave no:- Freq: spectra: &quot;+ nameSeason(ns)+&quot;: &quot;+twStrt+&quot;-&quot;+twLast<br>     mjo_wavenum_freq_season_plot (wf, nameSeason(ns), pltDir, pltType, pltName, optPlot)<br>  end do<br>
<br>end<br><br><br clear="all"><br> <br><br>