Help: How to add coi to wavelet power spectrum when using funcion "ShadeCOI"?

From: lxf <heaven_bird334_at_nyahnyahspammersnyahnyah>
Date: Sat, 7 Jul 2007 22:34:09 +0800

Hi,

    I met some problem in using wavelet function ShadeCOI.
    The error information is :
+++++++++++++++++++++++++++++++++++++++++++++++
 Copyright (C) 1995-2007 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 4.3.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
fatal:Assignment type mismatch, right hand side can't be coerced to type of left hand side
fatal:Execute: Error occurred at or near line 2083 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl

fatal:Execute: Error occurred at or near line 54 in file wave_coi.ncl
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    And my scripts is :
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
    inf="./iy.txt" ;nami 365
    nm = 151

    y = new(nm,float)
    y = asciiread(inf,nm,"float")

  nt = dimsizes(y)
  time = ispan(1,nt,1)
  N = dimsizes(time)
  y!0 = "time"
  y&time= time

  mother = 2
  param = 6.0
  dt = 1 ;timesteps in units of years
  s0 = 2*dt
  dj = .125
  jtot = 1+floattointeger(((log10(N*dt/s0))/dj)/log10(2.))
  npad = N
  nadof = 0
  noise = 1
  siglvl = .05
  isigtest= 0

  w = wavelet (y,mother,dt,param,s0,dj,jtot,npad, \
                     noise,isigtest,siglvl,nadof)

                         ; create coordinate arrays for plot
  power = onedtond( w_at_power, (/jtot,N/) )
  power!0 = "period" ; Y axis
  power&period = w_at_period
  power!1 = "time" ; X axis
  power&time = y&time
  power_at_long_name = "Power Spectrum"
  power_at_units = "C^2/unit-freq"

  wks = gsn_open_wks("x11","ex")
  res = True
  res_at_gsnDraw = False
  res_at_gsnFrame = False
  plot = gsn_csm_contour(wks,power,res)
  plot = ShadeCOI(wks,plot,w,y&time,False)
  draw(plot)
  frame(wks)

end
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    I also attached the scrpts and data file behind the letter as "coi_of_wavelet.tar.gz".
    Can someone help me?
                                                   
Li

 

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Sat Jul 07 2007 - 08:34:09 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 11 2007 - 08:55:54 MDT