# [ncl-talk] Is this a bug (or a mirage)?

Rick Brownrigg brownrig at ucar.edu
Wed Aug 10 07:35:45 MDT 2022

```What are the values of T, cold_hours, and hot_hours?

On Wed, Aug 10, 2022 at 2:10 AM Barry Lynn via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Hi:
>
> I can't figure out how this can be.  Why isn't "max"working and why are
> the values divided by 1000?
>
> cold_hours_cost = new(2,float)
>
> hot_hours_cost = new(2,float)
>
> p_cold = T*cold_hours
>
> p_hot = T*hot_hours
>
> cold_hours_cost(1) = p_cold
>
> hot_hours_cost(1) = p_hot
>
>  print("cold_hours = " + cold_hours_cost)
>
>  print("hot_hours = " + hot_hours_cost)
>
> max_c = max(cold_hours)
>
> max_h = max(hot_hours)
>
> print("max(cold_hours) = " + max_c)
>
> print("max(hot_hours) = " + max_h)
>
> (0) cold_hours = 0
>
> (1) cold_hours = -4111.11
>
> (0) hot_hours = 0
>
> (1) hot_hours = 4111.11
>
> (0) max(cold_hours) = -4.11111
>
> (0) max(hot_hours) = 4.11111
>
> --
>
> Barry H. Lynn, Ph.D
> Senior Scientist, Lecturer,
> The Institute of Earth Sciences,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
> Weather It Is, LTD
> Weather and Climate Focus
> https://weather-it-is.com <http://weather-it-is.com>
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220810/ce2233b7/attachment.htm>
```