[ncl-talk] gc_inout; problem with polygons over equator & zonal extent > 180 degr

Mary Haley haley at ucar.edu
Thu Dec 15 09:01:08 MST 2016


Andries,

Sorry for the delay in response. We are working on getting a new release
out and have a tight deadline.

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:

lon = where(lon.lt.0,lon+360,lon)

If this doesn't help, can you send us a clean script that shows the issue?

--Mary

On Mon, Dec 12, 2016 at 2:41 PM, Devries, Andries <a.devries at mpic.de> wrote:

> Dear NCL users/developers,
>
> 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.
>
> I attached 2 simple idealized plots that demonstrate the issue; all
> gridpoints should be identified within the boxes:
> plot1) box lon-100:100, lat 10:30; everything fine
> plot2) box lon-100:100, lat -10:10; gridpoints on both edges are missing
>
> 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"?
>
> Any suggestions how can I work around this issue?
>
> Looking forward to suggestions!
> Cheers,
> Andries
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161215/3578df29/attachment.html 


More information about the ncl-talk mailing list