<div dir="ltr"><div dir="ltr"><div>KMZ is a shape format, but it is different than the official ESRI shapefile format.  The official format has <b>.shp</b> suffix, not <b>.kmz</b>, and the shapefile also has at least two companion files with alternate suffixes.  Please see the introduction at the top of NCL's shapefile page:</div><div><br></div><div>    <a href="https://www.ncl.ucar.edu/Applications/shapefiles.shtml">https://www.ncl.ucar.edu/Applications/shapefiles.shtml</a><br></div><div><br></div><div>KMZ can be handled by NCL with quite a lot of tricky programming.  Your easiest solution would be to go back to <a href="http://gadm.org">gadm.org</a> or some other source, and download shapefile format, not KMZ.  I hope this helps.</div><div><br></div><div>If anyone else has a KMZ or KML reader function for NCL, please mention it.  This would be a good addition to NCL.</div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 25, 2021 at 10:49 AM G.Monte--- via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Dear NCL users,<br>
<br>
I would like to import a shapefile into my NCL code, in order to have the<br>
regional (and possibly provincial) suddivision of Italy.<br>
<br>
First, I tried with the KMZ level-2 "gadm36_ITA_2.kmz" available in<br>
<a href="http://www.gadm.org" rel="noreferrer" target="_blank">www.gadm.org</a>. Once I imported this file into my code, set lnres=True with<br>
its options and typed:<br>
<br>
id = gsn_add_shapefile_polylines(wks,map,"gadm36_ITA_2.kmz",lnres)<br>
<br>
I get this error message:<br>
<br>
warning:_NclOpenFile: Can not open file <gadm36_ITA_2.kmz>; file format<br>
not supported or file is corrupted<br>
warning:isfilevar: undefined file returning missing value<br>
<br>
What does it mean properly? It's the first time I have ever tried this, so<br>
I could get wrong easily.<br>
<br>
Thanks in advance,<br>
Giulio Monte<br>
</blockquote></div></div></div>