<div dir="ltr">Hi:<div><br></div><div>When you extract the data, you should check and see what the coordinates are.</div><div><br></div><div>If there are none, they can be added.</div><div><br></div><div>Barry</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 13, 2018 at 3:18 PM Ty Buckingham <<a href="mailto:ty.buckingham@manchester.ac.uk">ty.buckingham@manchester.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Yes, there's no problem with the data itself, I'm just not sure how to extract values that equal 1 into a new array so they keep their lat/lon values.
<div><br>
</div>
<div>Thanks</div>
<div>Ty<br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div id="m_4018091804752849522divRpF908109" style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Barry Lynn [<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>]<br>
<b>Sent:</b> 13 September 2018 12:44<br>
<b>To:</b> Ty Buckingham; ncl-talk<br>
<b>Subject:</b> Re: [ncl-talk] Getting the grid point values of certain values in a masked array<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Hi:
<div><br>
</div>
<div>Have you tried using PrintMinMAX(Variable, False) to see the range of your data?</div>
<div><br>
</div>
<div>Barry</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Thu, Sep 13, 2018 at 1:53 PM Ty Buckingham <<a href="mailto:ty.buckingham@manchester.ac.uk" rel="noopener noreferrer" target="_blank">ty.buckingham@manchester.ac.uk</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">I'm not entirely sure of the syntax. If I try something like:
<div><br>
</div>
<div>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
<span>  avo_masked  = where(avo_zoom.gt.0.006,1,avo_zoom@_FillValue)</span></p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
<span>  avo_gridpts = where(avo_masked.eq.1,avo_masked,0)</span></p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;line-height:normal;background-color:rgb(255,255,255)">
<font size="2">I still get all of the false values and their corresponding grid points, when I only want avo_gridpts to contain the values equal to 1 and their corresponding grid point values.</font></p>
<p style="margin-right:0px;margin-left:0px;line-height:normal;background-color:rgb(255,255,255)">
<font size="2"><br>
</font></p>
<p style="margin-right:0px;margin-left:0px;line-height:normal;background-color:rgb(255,255,255)">
<font size="2">Thanks</font></p>
<p style="margin-right:0px;margin-left:0px;line-height:normal;background-color:rgb(255,255,255)">
<font size="2">Ty</font></p>
<div>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div id="m_4018091804752849522m_1216321998368030659divRpF145979" style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Barry Lynn [<a href="mailto:barry.h.lynn@gmail.com" rel="noopener noreferrer" target="_blank">barry.h.lynn@gmail.com</a>]<br>
<b>Sent:</b> 13 September 2018 10:50<br>
<b>To:</b> Ty Buckingham<br>
<b>Subject:</b> Re: [ncl-talk] Getting the grid point values of certain values in a masked array<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Hi:
<div><br>
</div>
<div>There should be.  If you want to find only those values, then set the middle part of your where statement equal to that. </div>
<div><br>
</div>
<div>However, unless  the values are exact you might have a problem finding them.  Then, you might multiply by 1000 and then include the integer function.</div>
<div><br>
</div>
<div>Barry</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Thu, Sep 13, 2018 at 12:46 PM Ty Buckingham <<a href="mailto:ty.buckingham@manchester.ac.uk" rel="noopener noreferrer" target="_blank">ty.buckingham@manchester.ac.uk</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Barry,<br>
<br>
It is indeed. Is there anyway to extract the grid points of all the values equal to 0.006 and ignore the rest?<br>
<br>
Thanks<br>
Ty<br>
________________________________________<br>
From: Barry Lynn [<a href="mailto:barry.h.lynn@gmail.com" rel="noopener noreferrer" target="_blank">barry.h.lynn@gmail.com</a>]<br>
Sent: 13 September 2018 06:00<br>
To: Ty Buckingham<br>
Cc: ncl-talk<br>
Subject: Re: [ncl-talk] Getting the grid point values of certain values in a masked array<br>
<br>
Hi:<br>
<br>
The where statement:<br>
<br>
<br>
avo_masked  = where(avo_zoom.gt.0.006,0.006,avo_zoom@_FillValue)<br>
<br>
<br>
will set every grid with a value of 0.006 or greater equal to 0.006.<br>
<br>
<br>
Is that what you wanted to do?<br>
<br>
<br>
Barry<br>
<br>
On Thu, Sep 13, 2018 at 12:18 AM Ty Buckingham <<a href="mailto:ty.buckingham@manchester.ac.uk" rel="noopener noreferrer" target="_blank">ty.buckingham@manchester.ac.uk</a><mailto:<a href="mailto:ty.buckingham@manchester.ac.uk" rel="noopener noreferrer" target="_blank">ty.buckingham@manchester.ac.uk</a>>>
 wrote:<br>
Hi all,<br>
<br>
I have a masked array and wish to get the grid points (or lat/lons) of all of the values that are above a certain threshold. I've been messing around with 'where' and 'if' statements but can't quite get it.<br>
<br>
I've attached my script.<br>
<br>
Any help?<br>
<br>
Thanks in advance!<br>
Ty<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" rel="noopener noreferrer" target="_blank">ncl-talk@ucar.edu</a><mailto:<a href="mailto:ncl-talk@ucar.edu" rel="noopener noreferrer" target="_blank">ncl-talk@ucar.edu</a>><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
<br>
--<br>
Barry H. Lynn, Ph.D<br>
Senior Associate Scientist, Lecturer,<br>
The Institute of the Earth Science,<br>
The Hebrew University of Jerusalem,<br>
Givat Ram, Jerusalem 91904, Israel<br>
Tel: 972 547 231 170<br>
Fax: (972)-25662581<br>
<br>
C.E.O, Weather It Is, LTD<br>
Weather and Climate Focus<br>
<a href="http://weather-it-is.com" rel="noreferrer" target="_blank">http://weather-it-is.com</a><br>
Jerusalem, Israel<br>
Local: 02 930 9525<br>
Cell: 054 7 231 170<br>
Int-IS: x972 2 930 9525<br>
<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="m_4018091804752849522m_1216321998368030659gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">Barry H. Lynn, Ph.D
<div>
<div>Senior Associate Scientist, Lecturer,</div>
<div>
<div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)">
<span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)">
<span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)">
</div>
<span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)">
<span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div>
</div>
<div><span style="color:rgb(136,136,136)"><br>
</span></div>
<div>C.E.O, Weather It Is, LTD<br>
Weather and Climate Focus<br>
<a href="http://weather-it-is.com" rel="noopener noreferrer" target="_blank">http://weather-it-is.com</a><br>
Jerusalem, Israel<br>
Local: 02 930 9525<br>
Cell: 054 7 231 170<br>
Int-IS: x972 2 930 9525<br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="m_4018091804752849522gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">Barry H. Lynn, Ph.D
<div>
<div>Senior Associate Scientist, Lecturer,</div>
<div>
<div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)">
<span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)">
<span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)">
</div>
<span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)">
<span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div>
</div>
<div><span style="color:rgb(136,136,136)"><br>
</span></div>
<div>C.E.O, Weather It Is, LTD<br>
Weather and Climate Focus<br>
<a href="http://weather-it-is.com" rel="noopener noreferrer" target="_blank">http://weather-it-is.com</a><br>
Jerusalem, Israel<br>
Local: 02 930 9525<br>
Cell: 054 7 231 170<br>
Int-IS: x972 2 930 9525<br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Associate Scientist, Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br><br></div></div></div></div></div>