[ncl-talk] Errors using get_isolines and area_poly_sphere together

Philippe Papin pppapin at gmail.com
Fri Apr 26 15:51:20 MDT 2019


Hi All,

I've been running into an issue from the combined usage of the
"get_isolines" and "area_poly_sphere" functions. First, I'm using
get_isolines to isolate a contour that completes loop around some location
on the globe. Then I want to find the area within that contour.

What I've noticed is that occasionally (not always) the get_isolines
function will find a contour with multiple identical lat,lon pairs for the
given contour. This is problematic for the area_poly_sphere code which
requires unique vertex points as far as I can tell.

Is there anyway to avoid get_isolines from providing identical lat,lon
points for a unique contour? If not, is there a function I could use to
remove non-unique lat,lon pairs?

Here is a print out snippet of the relevant get_isolines output of what I'm
trying to avoid (see index values 212,213).

Variable: x

Type: float

Total Size: 2452 bytes

            613 values

Number of Dimensions: 1

Dimensions and sizes: [points | 613]

Coordinates:

Number Of Attributes: 5

  n_points : ( 4, 613, 29, 7, 21, 41, 38, 45, 29 )

  start_point : ( 0, 4, 617, 646, 653, 674, 715, 753, 798 )

  segment_count : 9

  level : 2

  _FillValue : 9.96921e+36


(211) 17.06323

(212) 16

(213) 16

(214) 14.94309

(215) 13.88631

Variable: y

Type: float

Total Size: 2452 bytes

            613 values

Number of Dimensions: 1

Dimensions and sizes: [points | 613]

Coordinates:

Number Of Attributes: 5

  n_points : ( 4, 613, 29, 7, 21, 41, 38, 45, 29 )

  start_point : ( 0, 4, 617, 646, 653, 674, 715, 753, 798 )

  segment_count : 9

  level : 2

  _FillValue : 9.96921e+36


(211) 69.65783

(212) 69.83716

(213) 69.83716

(214) 70.0269

(215) 70.21735

It seems like the code is outputting an unnecessary extra lat,lon pair at
69.83716 N, 16E. Why does this happen, and how can I avoid this for
accurate spherical area calculations?

Thanks,
Philippe
-- 

-------------------------------------
Philippe P. Papin, Ph.D.
NRC Research Associate
Global Modeling Division
Naval Research Laboratory - Monterey, CA
http://www.atmos.albany.edu/student/ppapin/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190426/c27be837/attachment.html>


More information about the ncl-talk mailing list