Re: (no subject)

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Dec 17 2009 - 09:01:50 MST

kalim ullah wrote:
> Dear NCL Users,
> If anyone know this probem how to handle it it will be great help for
> me. the script and error is given below:
> thanks and regards,
> kalim
>
> **************************
> 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 09:25:20 2009

This archive was generated by hypermail 2.1.8 : Thu Dec 17 2009 - 17:15:52 MST