Re: assigning array indexes using gsn_csm_hov

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Tue, 10 Mar 2009 13:54:17 -0600

Gina,

Try making a second array variable that is a reordered subset of
pacav. Use vector subscripting to get the subset and the order you
want. Something like this (untested):

    months = (/ 10, 11, 0, 1, 2, 3 /) ; November to April
    rotated = pacav( months , : )
    plot = gsn_csm_hov (wks, rotated, res)

This should also carry over the correct reordered coordinates and
attributes. HTH.

Vector subscripting is documented here:
http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml#Subscripts

"There is more than one way to do this." ;-)

Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
http://cires.colorado.edu/science/centers/cdc/
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
http://www.cdc.noaa.gov/psd1/

Gina Henderson wrote:
> Hi there,
>
> I am plotting a zonal average using the gsn_csm_hov function and have a
> question regarding the time dimension of my array. My plotting array
> looks like: plot = gsn_csm_hov(wks, pacav( : , : ),res) where the first
> dimension is months 0:11 and the second is longitude. However I want to
> only plot months 11(nov) through 3(apr). Is there any way to index this?
>
> Thanks, Gina.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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 Mar 10 2009 - 13:54:17 MDT

This archive was generated by hypermail 2.2.0 : Thu Mar 12 2009 - 14:10:21 MDT