Re: (no subject)

From: kalim ullah <kalimrid_at_nyahnyahspammersnyahnyah>
Date: Thu Dec 17 2009 - 18:50:19 MST

Dear Sir, thanks alot for your help, now it is working properly.
regards
kalim

--- On Thu, 12/17/09, Dennis Shea <shea@ucar.edu> wrote:

From: Dennis Shea <shea@ucar.edu>
Subject: Re: (no subject)
To: "kalim ullah" <kalimrid@yahoo.com>
Cc: ncl-talk@ucar.edu
Date: Thursday, December 17, 2009, 8:01 AM

>  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"
>   begin
> ;************************************************
> ; Read the file
> ;************************************************
>   a    = addfile("precip.mon.mean.nc","r")
>   prc  = a->precip                                 ; (time,lat,lon)
>   time = a->time                                ; (time) ==> YYMM
>  ; ntim = dimsizes(time)
>  ; yyyymm  = ut_calendar(time, -1)            ; convert to yyyymm
>   prcClm  = clmMonTLL( prc(0:359,:,:))                  ; Climatology
>   printVarSummary(prcClm)
> ****************************************
>  (0)     gsn_csm_contour_map_ce: Fatal: the input data array must be 1D or 2D
> fatal:Illegal right-hand side type for assignment
> fatal:Execute: Error occurred at or near line 51 in file cl1.ncl
>
========

You did *not* include the relevant part of the code.

I speculate that you used something like:

   plot = gsn_csm_contour_map_ce(wks, prcClm, res)

Since you did a "printVarSummary(prcClm)" you can readily
see the the variable is 3-dimensional

    prcClm(12,lat,lon)

The error message tells you that the argument must be 1D or 2D.

One solution
   do n=0,11
      plot = gsn_csm_contour_map_ce(wks, prcClm(n,:,:), res)
   end do

For example, if n=5 [June] and you were to use

   printVarSummary(n,:,:)

You would see that this is a two-dimensional array

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Dec 17 18:50:25 2009

This archive was generated by hypermail 2.1.8 : Mon Dec 21 2009 - 09:22:56 MST