[ncl-talk] Wondering how to write this if statement

Barry Lynn barry.h.lynn at gmail.com
Fri Sep 8 02:01:04 MDT 2017


Hi:

Thank you (but)...

It doesn't -- is there another "trick" we're leaving out?

I think there is another way to write it where you condition it, rathern
than use an if statement.

fatal:Conditional statements (if and do while) require SCALAR logical
values, see all and any functions

fatal:["Execute.c":8575]:Execute: Error occurred at or near line 41 in file
./radar_2.ncl

On Fri, Sep 8, 2017 at 10:35 AM, Marston Johnston <shejo284 at gmail.com>
wrote:

> As far as I can see that should work:
> if(dbz.lt.0.0) then
>
> Dbz = dbz + 256.0
>
> end if
>
>
>
> /M
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Marston S. Ward, PhD
>
> Department of Earth Sciences
>
> University of Gothenburg, Sweden
>
> Email: marston.johnston at gu.se
>
> SkypeID: marston.johnston
>
> Phone: +46-31-7864901 <+46%2031%20786%2049%2001>
>
> Only the fruitful thing is true!
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>
>
> *From: *ncl-talk <ncl-talk-bounces at ucar.edu> on behalf of Barry Lynn <
> barry.h.lynn at gmail.com>
> *Date: *Friday, 8 September 2017 at 09:33
> *To: *ncl-talk <ncl-talk at ucar.edu>
> *Subject: *[ncl-talk] Wondering how to write this if statement
>
>
>
> Hi:
>
>
>
> I am wondering how to properly write this if statement in NCL language.
>
>
>
>   if (dbz.lt.0)then
>
>    dbz = dbz + 256
>
>   end if
>
>
>
> --
>
> Barry H. Lynn, Ph.D
>
> Senior Lecturer,
>
> The Institute of the Earth Science,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
>
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
>
>
> C.E.O, Weather It Is, LTD
> Weather and Climate Focus
> http://weather-it-is.com
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
> US 914 432 3108 <(914)%20432-3108>
>
> _______________________________________________ ncl-talk mailing list
> ncl-talk at ucar.edu List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>



-- 
Barry H. Lynn, Ph.D
Senior Lecturer,
The Institute of the Earth Science,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581

C.E.O, Weather It Is, LTD
Weather and Climate Focus
http://weather-it-is.com
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
US 914 432 3108
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170908/be57467f/attachment.html>


More information about the ncl-talk mailing list