Re: Script to tally days below a given temperature - DO LOOP issue

From: Gus Correa <gus_at_nyahnyahspammersnyahnyah>
Date: Mon Jun 04 2012 - 13:43:48 MDT

Hi

You declared

ensemble = a[:]->number

which is not a scalar, then tried to use it as a loop counter:

    do ensemble = 0,9,1 ; ENSEMBLE LOOP MODELS 0,1...7,8

Have you tried to name the loop variable differently,
say:

    do emb = 0,9,1 ; ENSEMBLE LOOP MODELS 0,1...7,8

In addition, there may be more loose threads:
loop counter 'itime' vs. 'it' which appears inside the loops,
and the ensemble member counter doesn't seem to appear
inside the loop nest.

Gus Correa

On 06/04/2012 02:56 PM, Cannavina, Dominique wrote:
>
> Hi
>
> I am writing a script to count the number of occurances for given number
> of consecutive days that a temperature falls below a given temperature.
> The data I am am using is from the DEMETER project and each file
> contains 3 different models each running 9 ensembles to give daily
> minimum temperatures. The domain covering Europe.
>
> WhenI run the attached script I get the following error in the DO LOOP
>
> fatal:Loop variable must be scalar, can't execute loop
>
> I am not sure how to work around this as I need to loop through the days
> and ensemble runs for each model?
>
> Any help would be much appreciated.
>
> Kind regards
>
> Dominique
>
>
>
> _______________________________________________
> 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 Mon Jun 4 13:44:03 2012

This archive was generated by hypermail 2.1.8 : Wed Jun 06 2012 - 15:17:44 MDT