Re: MJO - error in subscript

From: Guilherme Martins <jgmsantos_at_nyahnyahspammersnyahnyah>
Date: Tue Aug 13 2013 - 17:16:38 MDT

Don't work!

If nMon=-1 ==> error here *monInfo(nMon,0) = namMonth(imon(0)-1) ==> line
94*
*
*
I can't understand here:

      if (iday(nt).eq.1) then
* nMon = nMon+1 ==> I have change the position. You told me to
put just before the "end if"*
          monInfo(nMon,0) = namMonth(imon(nt)-1)
          monInfo(nMon,1) = colMonth(imon(nt)-1)
      end if

Thanks,

Guilherme

2013/8/13 <mgehne@ucar.edu>

> Hi Guilherme,
>
> either put nMon = nMon+1 just before the "end if" command in your loop or
> initialize with nMon = -1.
> That should make nMon go from 0 to 11 instead of 1 to 12.
>
> Maria
>
>
> > Sorry Rick, but I can't understand. What do I need to do?
> >
> > if (iday(nt).eq.1) then
> > nMon = nMon+1
> > monInfo(nMon,0) = namMonth(imon(nt)-1)
> > monInfo(nMon,1) = colMonth(imon(nt)-1)
> > end if
> >
> > Where is the error, I can't see.
> >
> > Thanks,
> >
> > Guilherme.
> >
> >
> > 2013/8/13 Rick Brownrigg <brownrig@ucar.edu>
> >
> >> Line 125 is actually the line:
> >>
> >> monInfo(nMon,0) = namMonth(imon(nt)-1)
> >>
> >> and a few print statements to show nt, imon(nt) and nMon reveal that
> >> nMon
> >> ranges from 1-12, and at 12, it exceeds the bounds of monInfo (which is
> >> 12x2)
> >>
> >> HTH -- Rick
> >>
> >> On Aug 13, 2013, at 3:20 PM, Guilherme Martins <jgmsantos@gmail.com>
> >> wrote:
> >>
> >> Hi all,
> >>
> >> I'm run the script "mjoclivar_15.ncl". but I receive the error:
> >>
> >> fatal:Subscript out of range, error in subscript #0
> >> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 125 in
> >> file mjoclivar_15.ncl
> >>
> >> I saw the line 125, and the problem I saw is in "nMon = nMon+1"
> >>
> >> because finish in 11 and not 12.
> >>
> >> The files are in attach.
> >>
> >> Thanks,
> >>
> >> Guilherme.
> >>
> >> --
> >> *Guilherme Martins*
> >> https://sites.google.com/site/jgmsantos/
> >>
> >> <mjoclivar_15.ncl><MJO_PC_INDEX.novo.nc>
> >> _______________________________________________
> >> ncl-talk mailing list
> >> List instructions, subscriber options, unsubscribe:
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >>
> >>
> >>
> >
> >
> > --
> > *Guilherme Martins*
> > https://sites.google.com/site/jgmsantos/
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
>
>
>

-- 
*Guilherme Martins*
https://sites.google.com/site/jgmsantos/

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 13 17:17:32 2013

This archive was generated by hypermail 2.1.8 : Wed Aug 14 2013 - 18:35:09 MDT