Re: dim_num_n error

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Jul 11 2012 - 13:43:56 MDT

Hi Cecile,

This is a bug we fixed in version 6.1.0-beta. This routine was supposed to allow an array of dimensions, but it was
incorrectly prototyped to only allow one value. That's why it's saying it expected 1 elelment, when you were giving
it 2 elements.

I know this error message looks a little strange. The argument numbering starts at 0, with the leftmost
argument, so when it says "argument (1)", it actually means the second argument. Likewise, when it says "dimension (0)",
it means the leftmost dimension of a variable. In your case, your second argument is just a 1D array, so "dimension (0)
of argument (1)" is just the length of your 1D array.

You may want to download the new version for a fix.

--Mary

On Jul 10, 2012, at 6:26 PM, Cecille M. Villanueva-Birriel wrote:

> Hello,
>
> I am trying to do some average and i am using the function dim_num_n to count. However, I get the following error
>
> Number of elements of dimension (0) of argument (1) is (2) in function (dim_num_n), expected (1) elements
>
> In my script I have it as
>
> li = dim_num_n(wsm6.ne.0,(/2,3/))
>
> What is wrong with this?
>
> Thanks,
> Cecille
>
>
>
> --
> ********************************************************
> Cecille M. Villanueva Birriel
> Graduate Research Assistant
> Cloud Microphysics Research Group
> Purdue University
> Department of Earth and Atmospheric Sciences
> 550 Stadium Mall Drive, West Lafayette, IN 47907-2051
> email: cvillanu@purdue.edu
> ********************************************************
> _______________________________________________
> 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 Wed Jul 11 13:44:11 2012

This archive was generated by hypermail 2.1.8 : Thu Jul 12 2012 - 10:16:50 MDT