Re: coordinate index error when using wkSpaceTime

From: <mgehne_at_nyahnyahspammersnyahnyah>
Date: Tue Dec 17 2013 - 09:18:38 MST

Hi Patrick,

the error happens in wkSpaceTime during the 121 filtering to find the
background
spectrum. You can look at the actual ncl code in
$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl
by just opening it in a text editor.

Your error tells you the problem is around line 819. The smoothing is done
by looping
through all wave numbers -27 to 27. As far as I can tell you only have 49
wave numbers
so -24 to 24 and the loop wants to start at -27. Your data seem to be very
low resolution.

One option you can try is to copy the part of diagnostics_cam.ncl that
computes the wkSpaceTime
spectra, save it as a separate ncl function (Rename it so it does't
conflict with the wkSpaceTime defined in diagnostics_cam.ncl!), change the
smoothing wave numbers to go from -24 to 24 in that function, and load
that function at the beginning of your script. You can find examples of
how to do that in the mini language manual.

There may be an easier way, maybe somebody else has a better idea.

Hope this helps,
Maria

> Hello NCL community,
> I am trying to make spectra plots following Wheeler-Kiladis:
> http://www.ncl.ucar.edu/Applications/space_time.shtml
> But I keep getting the same dimension/index error.
> I've pasted the output including the error message after invoking the
"wkSpaceTime" routine.
> Thanks for any suggestions.
> ------------------------------------------------------------------------------------
Copyright (C) 1995-2013 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.1.2
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> (0)
> Variable: x (parameter)
> Type: float
> Total Size: 3686400 bytes
> 921600 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 2400] x [lat | 8] x [lon | 48]
> Coordinates:
> time: [ 0..2399]
> lat: [-15.55..15.55]
> lon: [ 0..352.5]
> Number Of Attributes: 4
> lev : 300
> units : hPa/s
> method : derived via kinematic method
> long_name : omega
> (0)
> (0) omega: min=-0.00905105 max=0.00760676
> (0) ===> Post removal of trend and signal <===
> Variable: x (parameter)
> Type: float
> Total Size: 3686400 bytes
> 921600 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 2400] x [lat | 8] x [lon | 48]
> Coordinates:
> time: [ 0..2399]
> lat: [-15.55..15.55]
> lon: [ 0..352.5]
> Number Of Attributes: 5
> _FillValue : -9.99e+33
> lev : 300
> units : hPa/s
> method : derived via kinematic method
> long_name : omega
> (0)
> (0) omega: min=-0.00898456 max=0.00754787
> Variable: xAS
> Type: float
> Total Size: 3686400 bytes
> 921600 values
> Number of Dimensions: 3
> Dimensions and sizes: [lat | 8] x [lon | 48] x [time | 2400]
> Coordinates:
> lat: [-15.55..15.55]
> lon: [ 0..352.5]
> time: [ 0..2399]
> Number Of Attributes: 3
> _FillValue : -9.99e+33
> long_name : antisymmetric & symmetric (separate hemispheres)
> units : hPa/s
> (0)
> (0) antisymmetric & symmetric (separate hemispheres): min=-0.00695537
max=0.00662813
> (0) ==============> nl=0 <==============
> (0) nw=0 ntStrt=0 ntLast=2303
> (0) ==============> nl=1 <==============
> (0) ==============> nl=2 <==============
> (0) ==============> nl=3 <==============
> (0) ==============> nl=4 <==============
> (0) ==============> nl=5 <==============
> (0) ==============> nl=6 <==============
> (0) ==============> nl=7 <==============
> Variable: peeAS
> Type: float
> Total Size: 3614240 bytes
> 903560 values
> Number of Dimensions: 3
> Dimensions and sizes: [lat | 8] x [wave | 49] x [freq | 2305]
> Coordinates:
> lat: [-15.55..15.55]
> wave: [-24..24]
> freq: [-12..12]
> Number Of Attributes: 1
> long_name : symmetric and asymmetric components
> (0)
> (0) symmetric and asymmetric components: min=2.02753e-31
max=1.1377e-08
> Variable: psumanti
> Type: float
> Total Size: 451780 bytes
> 112945 values
> Number of Dimensions: 2
> Dimensions and sizes: [wave | 49] x [freq | 2305]
> Coordinates:
> wave: [-24..24]
> freq: [-12..12]
> Number Of Attributes: 3
> sum_op_ncl : dim_sum_n over dimension(s): lat
> long_name : symmetric and asymmetric components
> _FillValue : 1e+20
> (0)
> (0) symmetric and asymmetric components: min=2.34585e-26
max=4.00848e-08
> fatal:NclOneDValGetClosestIndex: finish coordinate index out of range,
can't continue
> fatal:Could not obtain coordinate indexes, unable to perform subscript
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 819 in
file $NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Dec 17 09:18:49 2013

This archive was generated by hypermail 2.1.8 : Wed Dec 18 2013 - 14:29:51 MST