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. fatal:Execute: Error occurred at or near line 229 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/d

From: Sabeerali(sebi) <sabeerl_at_nyahnyahspammersnyahnyah>
Date: Sat Jan 09 2010 - 11:46:58 MST

Dear all,

  When I tried to calculate the frequency wavenumber spectra by using the
below script I am getting the following errors.

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.
fatal:Execute: Error occurred at or near line 229 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl

fatal:Execute: Error occurred at or near line 2910 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl

fatal:Execute: Error occurred at or near line 60 in file mjoclivar_10.ncl

Any help would be appreciated,
Thanking you

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/diagnostics_cam.ncl"

;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
begin
                           ; time window

  twStrt = 20020102
  twLast = 20341231

  diri = "/home/sebi/convert/"

  vName = "daily_preci" ; name of variable on the file
  fili = "daily_preci.nc"
  f = addfile(diri+fili, "r")

  pltDir = "./"
  pltType = "pdf"
  pltName = "t61_wave_freq"

;************************************************************
; time indices corresponding to the desired time window
;************************************************************

  date = f->time
  iStrt = ind(date.eq.twStrt) ; desired dates
  iLast = ind(date.eq.twLast)
  delete(date)

;************************************************************
; Read user specified period
;************************************************************

  if (getfilevartypes(f,vName) .eq. "short") then
      X = short2flt( f->$vName$(iStrt:iLast,{-10:40},{50:150}) ) ; all data
in window
  else
      X = f->$vName$(iStrt:iLast,{-10:40},{50:150})
  end if
  printVarSummary( X )
  printMinMax(X, True)

  time = X&time ; clarity
; date = ut_calendar( time , -2 ) ; yyyymmdd
   date=time
;************************************************************
  x = dim_avg_Wrap( X(time|:,lon|:,lat|:) ) ; (time,lon)
;************************************************************
; calculate and plot the spectra
;************************************************************
  optWavFrq = False
  optPlot = TrueoptPlot@smth9 = False

  nameSeason = (/"winter" , "summer"/)

  do ns=0,dimsizes(nameSeason)-1
     wf = mjo_wavenum_freq_season (x, date,nameSeason(ns), optWavFrq)
     optPlot@tiMainString ="Wave no:- Freq: spectra: "+ nameSeason(ns)+":
"+twStrt+"-"+twLast
     mjo_wavenum_freq_season_plot (wf, nameSeason(ns), pltDir, pltType,
pltName, optPlot)
  end do

end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Jan 9 11:47:05 2010

This archive was generated by hypermail 2.1.8 : Tue Jan 12 2010 - 15:38:20 MST