Re: Why these two lines do not execute?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Sep 11 2013 - 09:39:16 MDT

Wen,

It is hard to tell what the problem is because you have some weird line continuation characters below, and you have a lot of parentheses.

My guess is that you just have one too many parentheses below.

I suggest breaking up your "if" statement into more continued lines, so you can be sure you have the correct parentheses. Also, try removing some unnecessary parentheses.

For example, instead of:

> (.not. (ismissing(visib_full)))

You can simply do:

> .not.ismissing(visib_full)

and instead of:

> ((fog_full.eq.0) .and. (rain_full.eq.0) .and. (snow_full.eq.0) .and. (hail_full.eq.0))

You can have:

> (fog_full.eq.0 .and. rain_full.eq.0 .and. snow_full.eq.0 .and. hail_full.eq.0)

On Sep 8, 2013, at 10:25 PM, Wen.J.Qu <wen.j.qu@gmail.com> wrote:

> Dear all,
>
> Does anyone please help me out of this problem? Thanks in advance.
>
> These two lines do not execute with warnings follow.
>
> " ii = ind((.not. (ismissing(visib_full))) .and. ((fog_full.eq.0) .and. (rain_full.eq.0) .and. (snow_full.eq.0) .and. (hail_full.eq.0)) .and.\ (visib_full.lt.10) .and. ((year_full.eq.Year .and. (month_full.eq.12)) .or. (year_full.eq.Year+1 .and. ((month_full.eq.1) .or.\
> (month_full.eq.2)))))
>
> iii = ind((.not. (ismissing(visib_full))) .and. ((fog_full.eq.0) .and. (rain_full.eq.0) .and. (snow_full.eq.0) .and. (hail_full.eq.0)) .and.\ (visib_full.gt.10) .and. ((year_full.eq.Year .and. (month_full.eq.12)) .or. (year_full.eq.Year+1 .and. ((month_full.eq.1) .or.\
> (month_full.eq.2)))))"
>
>
> fatal:syntax error: line 169 in file 1973to2012_winter_non-fognon-prcpandvislt10_composite.ncl before or near )
> (month_full.eq.2)))
> -------------------------------------------^
>
> fatal:syntax error: line 172 in file 1973to2012_winter_non-fognon-prcpandvislt10_composite.ncl before or near )
> (month_full.eq.2)))
> -------------------------------------------^
>
> fatal:Syntax Error in block, block not executed
> fatal:error at line 3160 in file 1973to2012_winter_non-fognon-prcpandvislt10_composite.ncl
>
> What is wrong with my using of "/" here?
>
> Thanks.
>
> Wen.J.Qu
> 2013-09-09
> _______________________________________________
> 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 Sep 11 09:39:29 2013

This archive was generated by hypermail 2.1.8 : Mon Sep 16 2013 - 13:43:52 MDT