Re: help loop [Loop end must be scalar]

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 25 2013 - 10:25:53 MDT

Hi,

This is an NCL question and should be posted to ncl-talk, not ncarg-talk (which is for NCAR Graphics questions).

"cas1" and "cas1" are multi-dimensional variables that you read off the file. Using them as looping values really doesn't make sense.
That's why you are getting an error that the loop start and end must be scalars.

What do you need to accomplish with this loop?

--Mary

On Apr 24, 2013, at 4:23 PM, Vanúcia Schumacher wrote:

> Hi, someone could help me with this error in my script:
>
> data=addfile("pgbhnl.gdas.2000010912.grb2", "r")
> data1=addfile("pgbhnl.gdas.2000011512.grb2", "r")
> cas1=data->TMP_P0_L100_GLL0({500},:,:)
> cas2=data1->TMP_P0_L100_GLL0({500},:,:)
>
> x=0
> do i=cas1, cas2,1
> s=x+i
> end do
>
> fatal:Loop end must be scalar, can't execute loop
> fatal:Loop variable must be scalar, can't execute loop
> fatal:["Execute.c":8126]:Execute: Error occurred at or near line 7
>
>
> Thanks
> _______________________________________________
> ncarg-talk mailing list
> ncarg-talk@ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk

_______________________________________________
ncarg-talk mailing list
ncarg-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
Received on Thu Apr 25 10:26:00 2013

This archive was generated by hypermail 2.1.8 : Wed May 15 2013 - 10:21:23 MDT