<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style><style></style><style></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<div id="divRpF38718" style="direction: ltr;"><span style="font-size: 10pt; font-family: Tahoma;">Hello Mary,</span></div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt"><font size="2" face="Tahoma" color="black"><span dir="ltr" style="font-size:10pt"><br>
</span></font></div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt"><font size="2" face="Tahoma" color="black"><span dir="ltr" style="font-size:10pt">Sorry for the double email, in the previous one I forgot to -cc- ncl-talk.</span></font></div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt"><font size="2" face="Tahoma" color="black"><span dir="ltr" style="font-size:10pt"><br>
Thanks for the response. In the original script the longitudes were indeed from -180 to 180. I have reorganised the longitudes of the polygon following your suggestion and also have used the underlying grid with longitudes from 0 to 360, however, it didn't
make any difference unfortunately.<br>
<br>
I have attached: <br>
- simplified & cleaned code using the gc_inout function for a box over the equator & having a zonal extent larger than 180 degrees (with lon 0->360)<br>
- simplified & cleaned script for visualization of the output of the code<br>
- the plot<br>
<br>
I also sent a file </span></font><font size="2" face="Tahoma" color="black"><span dir="ltr" style="font-size:10pt"><font size="2" face="Tahoma" color="black"><span dir="ltr" style="font-size:10pt">to the ftp (using my emailaddress)</span></font> you can use
as input for the code; it contains era-interim on a guassian grid. Furthermore I sent to the ftp also plots of the real application I intended with gc_inout, demonstrating this issue with gc_inout for polygons with a zonal extent > 180 degrees over the equator<br>
<br>
I'm looking forward very much to a solution or a way to work around the issue.<br>
Thank you very much for your help thus far!<br>
<br>
Kind regards,<br>
Andries<br>
<br>
</span></font>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF590278" style="direction:ltr"><font size="2" face="Tahoma" color="#000000"><b>From:</b> Mary Haley [haley@ucar.edu]<br>
<b>Sent:</b> 15 December 2016 17:01<br>
<b>To:</b> Devries, Andries<br>
<b>Cc:</b> ncl-talk@ucar.edu<br>
<b>Subject:</b> Re: [ncl-talk] gc_inout; problem with polygons over equator & zonal extent > 180 degr<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div class="gmail_default" style="font-size:small">Andries,</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">Sorry for the delay in response. We are working on getting a new release out and have a tight deadline.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">I always thought gc_inout handled points across the equator just fine, but I haven't specifically tried this out. If your longitudes go from -180 to 180, then one thing you could try is converting them to go
from 0 to 360, which may take care of that big jump:</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">lon = where(lon.lt.0,lon+360,lon)</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">If this doesn't help, can you send us a clean script that shows the issue?</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">--Mary</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Dec 12, 2016 at 2:41 PM, Devries, Andries <span dir="ltr">
<<a href="mailto:a.devries@mpic.de" target="_blank">a.devries@mpic.de</a>></span> wrote:<br>
<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">Dear NCL users/developers,<br>
<br>
I ran into a problem with ncl (v.6.3.0) using the function gc_inout. I used the function to identify grid points on a gaussian grid (512x256) within a polygon. When the polygon has a zonal extent larger than 180 degrees and extends over the equator (covers
partly both northern and southern hemispheres), a problem occurs; on the edges gridpoints are missing that should have been identified.
<div><br>
</div>
<div>I attached 2 simple idealized plots that demonstrate the issue; all gridpoints should be identified within the boxes:<br>
plot1) box lon-100:100, lat 10:30; everything fine<br>
plot2) box lon-100:100, lat -10:10; gridpoints on both edges are missing<br>
<br>
Is this a bug or a known issue as the description of gc_inout says: "and that the vertices can be contained in a hemisphere"?<br>
<br>
<div>Any suggestions how can I work around this issue?<br>
<br>
Looking forward to suggestions!<br>
Cheers,<br>
Andries</div>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" 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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>