Re: Where oh where

From: James Correia, Jr <jimmyc42_at_nyahnyahspammersnyahnyah>
Date: Fri Oct 28 2011 - 18:58:38 MDT

It might be complicated in fortran but I dont see how that effects the where
in NCL.

You can still write:
var = where((t_ref2m .gt. 324.15) .or. (t_refm .lt. 293.15), Missing_value,
t_ref2m) ; .and. would fail since 1 grid point can not have two values

You can keep making changes to the array "var".
;code is untested
jimmyc

On Fri, Oct 28, 2011 at 7:43 PM, jrbuzan <jbuzan@purdue.edu> wrote:

> Hello,
>
> I have complicated where statement.
> I am not sure how to approach this in NCL. The examples do not seem
> to show how to bound a region with 2 arrays where there is a specific
> range that the function may be calculated.
>
> Is there a way to write multiple where statements within one where
> statement?
>
> Thanks,
>
> -Jonathan
>
> Example code.
> In fortran:
>
> WHERE ((t_ref2m.gt.324.15) .and. (t_ref2m.lt.293.15))
> Missing value
> ELSEWHERE
> WHERE ((rh_ref2m.lt.10.) .and. (t_ref2m.gt.322.15))
> Function
> END WHERE
> WHERE ((rh_ref2m.lt.20.) .and. (t_ref2m.gt.318.15) .and.
> (t_ref2m.lt.322.15))
> Function
> END WHERE
> WHERE ((rh_ref2m.lt.30.) .and. (t_ref2m.gt.314.15) .and.
> (t_ref2m.lt.318.15))
> Function
> END WHERE
> WHERE ((rh_ref2m.lt.40.) .and. (t_ref2m.gt.311.15) .and.
> (t_ref2m.lt.314.15))
> Function
> END WHERE
> WHERE ((rh_ref2m.lt.50.) .and. (t_ref2m.gt.308.15) .and.
> (t_ref2m.lt.311.15))
> Function
> END WHERE
> WHERE ((rh_ref2m.lt.60.) .and. (t_ref2m.gt.307.15) .and.
> (t_ref2m.lt.308.15))
> Function
> END WHERE
> WHERE ((rh_ref2m.lt.70.) .and. (t_ref2m.gt.306.15) .and.
> (t_ref2m.lt.307.15))
> Function
> END WHERE
> WHERE ((rh_ref2m.lt.80.) .and. (t_ref2m.gt.303.15) .and.
> (t_ref2m.lt.306.15))
> Function
> END WHERE
> WHERE ((rh_ref2m.lt.90.) .and. (t_ref2m.gt.301.15) .and.
> (t_ref2m.lt.303.15))
> Function
> END WHERE
> WHERE ((rh_ref2m.lt.100.) .and. (t_ref2m.gt.293.15) .and.
> (t_ref2m.lt.301.15))
> Function
> END WHERE
> END WHERE
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

-- 
James Correia Jr.
OU CIMMS Research Associate
SPC HWT Liaison
"The highest function of the teacher consists not so much in imparting
knowledge as in stimulating the pupil in its love and pursuit. To know how
to suggest is the art of teaching."
------------------------------------------------------------------------------------------
The views expressed in this email do not necessarily reflect those of NOAA,
the National Weather Service, or the University of Oklahoma.
------------------------------------------------------------------------------------------

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Oct 28 18:58:44 2011

This archive was generated by hypermail 2.1.8 : Tue Nov 01 2011 - 13:43:04 MDT