<html><head></head><body><div class="ydp3bcb7642yahoo-style-wrap" style="font-family: bookman old style, new york, times, serif; font-size: 16px;"><div><div dir="ltr" data-setdir="false" style="font-size: 16px;">Dear Dave,</div><div dir="ltr" data-setdir="false" style="font-size: 16px;"><span>Thank you for your helpful reply.</span><br></div><div dir="ltr" data-setdir="false" style="font-size: 16px;"><span><br></span></div><div dir="ltr" data-setdir="false"><div><div style="font-size: 16px;">First, I should mention the GDAL version on our server:</div><div style="font-size: 16px;"><br></div><div><i><font size="2">$ ogrinfo –version</font></i></div><div><i><font size="2">GDAL 3.9.2, released 2024/08/13</font></i></div></div><div style="font-size: 16px;"><br></div><div style="font-size: 16px;" dir="ltr" data-setdir="false">Additionally, the NCL version installed by Conda on our server appears to be "h7cb714c_54". I tried to find the versions h8482486_9, h9ce15c7_1, or h7290063_6 mentioned as working well in issue <a href="https://github.com/cedadev/ceda-jaspy-envs/issues/56"><u>#56</u></a>, but I couldn't locate them in the <a href="https://anaconda.org/conda-forge/ncl/files"><u>build details from conda-forge</u></a>.<br></div><div style="font-size: 16px;" dir="ltr" data-setdir="false"><br></div><div style="font-size: 16px;" dir="ltr" data-setdir="false">It seems some shapefiles work well with the default NCL version from Conda. For instance, <a href="https://geodata.ucdavis.edu/gadm/gadm4.1/shp/gadm41_CAN_shp.zip">gadm41_CAN_shp</a> falls into this category. However, some shapefiles do not work with the default NCL in Conda. For example, "englandshp" (attached file) does not work well with the default NCL in Conda.<br></div><div style="font-size: 16px;" dir="ltr" data-setdir="false"><br></div><div style="font-size: 16px;" dir="ltr" data-setdir="false">When I replaced $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl with the one mentioned in issue <a href="https://github.com/NCAR/ncl/issues/176">#176</a>, the situation changed. The "englandshp" worked well with the new gsn_code, but for <a href="https://geodata.ucdavis.edu/gadm/gadm4.1/shp/gadm41_CAN_shp.zip">gadm41_CAN_shp</a>, the following error was displayed:<br></div><div style="font-size: 16px;" dir="ltr" data-setdir="false"><br></div><div style="" dir="ltr" data-setdir="false"><div style=""><div><i><font size="2">(0) shapefile_order_lat_lon: Error: Cannot parse.</font></i></div><div style=""><i><font size="2">(0) Unexpected output from 'ogrinfo -al $shapefile'.</font></i></div><div style=""><i><font size="2">...</font></i></div><div style=""><i><font size="2">(0) Assume order of coordinates = lon/lat.</font></i></div><div style=""><i><font size="2">(0)</font></i></div><div style=""><i><font size="2">(0) Diagnostics 1 for 'ogrinfo':</font></i></div><div style=""><i><font size="2">GDAL 3.9.2, released 2024/08/13</font></i></div><div style=""><i><font size="2">(0)</font></i></div><div style=""><i><font size="2">(0) Diagnostics 2 for 'ogrinfo':</font></i></div><div style=""><i><font size="2">...</font></i></div><div style=""><i><font size="2">(0) Diagnostics 3 for 'ogrinfo':</font></i></div><div style=""><i><font size="2">(0) Parse results = False missing False False False False</font></i></div><div style=""><i><font size="2">(0) Number of lines in result = 1</font></i></div><div style=""><i><font size="2">(0) missing</font></i></div><div style=""><i><font size="2">(0) ----------------------------</font></i></div><div style=""><i><font size="2">(0) Assume order of coordinates = lon/lat.</font></i></div><div style=""><i><font size="2">(0) --- Working on time 2019020106 ---</font></i></div><div style=""><i><font size="2">(0) shapefile_order_lat_lon: Error: Cannot parse.</font></i></div><div style=""><i><font size="2">(0) Unexpected output from 'ogrinfo -al $shapefile'.</font></i></div></div><br></div><div style="font-size: 16px;" dir="ltr" data-setdir="false"><span>However, when I tried to run the simple NCL script from the NCL website to plot them, nothing was displayed for both shapefiles with the new gsn_code.</span><br></div><div style="font-size: 16px;" dir="ltr" data-setdir="false"><span><br></span></div><div style="font-size: 16px;" dir="ltr" data-setdir="false"><div dir="ltr" data-setdir="false"><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; color: rgb(0, 0, 0);">load "./shapefile_utils.ncl"
sname = "your_shapefile.shp"
print_shapefile_info(sname)
plot_shapefile(sname)</pre></div></div></div><div style="font-size: 16px;"><br></div><div dir="ltr" data-setdir="false"><div><div dir="ltr" data-setdir="false" style="font-size: 16px;">For the <span>"englandshp"</span>, nothing was displayed. For the CAN shapefile, nothing was displayed, and the following error occurred:</div><div style="font-size: 16px;"><br></div><div><i><font size="2">(0) Diagnostics 3 for 'ogrinfo':</font></i></div><div><i><font size="2">(0) Parse results = False missing False False False False</font></i></div><div><i><font size="2">(0) Number of lines in result = 1</font></i></div><div><i><font size="2">(0) missing</font></i></div><div><i><font size="2">(0) ----------------------------</font></i></div><div><i><font size="2">(0) Assume order of coordinates = lon/lat.</font></i></div></div><br></div><div style="font-size: 16px;" dir="ltr" data-setdir="false"><span>In summary, it seems that for some shape files, we should use the default gsn_code.ncl, while for others, we should use your gsn_code.ncl. This is my understanding. I would appreciate your thoughts on this.</span><br></div><div style="font-size: 16px;" dir="ltr" data-setdir="false"><span><br></span></div><div class="ydp3bcb7642signature" style="font-size: 16px;"><div dir="ltr" style="font-family:old times, serif;font-size:16px;"><div><div dir="ltr" style="color:rgb(0, 0, 0);font-family:old times, serif;font-size:16px;"><i><font size="2">-----------------------------------------------------------------------------</font></i></div><div dir="ltr" style="color:rgb(0, 0, 0);font-family:old times, serif;font-size:16px;"> <div><div style="color:rgb(0, 0, 0);font-family:serif;font-size:16px;"><div dir="ltr"><i><font size="2">Best regards,</font></i></div><div dir="ltr"><i><font size="2">Ehsan Taghizade</font></i></div></div></div></div></div></div></div></div>
<div style="font-size: 16px;"><br></div><div style="font-size: 16px;"><br></div>
<div id="ydp3bcb7642yahoo_quoted_6290751194" class="ydp3bcb7642yahoo_quoted" style="font-size: 16px;">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
<div>
On Sunday, December 29, 2024 at 02:17:40 PM PST, Dave Allured - NOAA Affiliate <dave.allured@noaa.gov> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="ydp3bcb7642yiv5578351561"><div><div dir="ltr"><div>Ehsan, this is a known issue with recent NCL versions. The lat and lon coordinates are swapped in some shape files, causing missing images, or mirror images along a 45 degree fold line. That is what I see in your plots.</div><div><br clear="none"></div><div>This is discussed in Github issues <a shape="rect" href="https://github.com/NCAR/ncl/issues/151" rel="nofollow" target="_blank">#151</a> and <a shape="rect" href="http://#176" rel="nofollow" target="_blank">#176</a>. In #176 I show a diagnostic method to determine swapped coordinates. I also provide a modified NCL library file that should render plots correctly for any shape file. Please give these suggestions a try, and let us know the results.</div><div dir="ltr"><br clear="none"></div><br clear="none"><div id="ydp3bcb7642yiv5578351561yqt29943" class="ydp3bcb7642yiv5578351561yqt7767717304"><div class="ydp3bcb7642yiv5578351561gmail_quote ydp3bcb7642yiv5578351561gmail_quote_container"><div dir="ltr" class="ydp3bcb7642yiv5578351561gmail_attr">On Wed, Dec 25, 2024 at 7:23 AM Ehsan Taghizadeh via ncl-install <<a shape="rect" href="mailto:ncl-install@mailman.ucar.edu" rel="nofollow" target="_blank">ncl-install@mailman.ucar.edu</a>> wrote:<br clear="none"></div><blockquote 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;" class="ydp3bcb7642yiv5578351561gmail_quote"><div><div style="font-family:old times, serif;font-size:16px;"><div dir="ltr"><div><div dir="ltr">Hello everyone,</div><div><br clear="none"></div><div>I am trying to add a shapefile to my plot, but the location of the shapefile is incorrect as it appears to be rotated 90 degrees clockwise. Previously, I had an issue with NCL installed via Conda. I attempted to install NCL using a precompiled version, but encountered the following error: “ncl: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory.” Since I do not have root access, I cannot install libssl.so.10.</div><div><span><br clear="none"></span></div><div dir="ltr"><span>Attached are the incorrect and correct output maps. <span>The desired shapefile is shown in tan. </span>The correct version is the output from running NCL on another Linux version (Rocky), which I do not have access to. The code I used to plot these maps is quite long and may not be helpful for this issue, but I can provide a shorter version if necessary.</span></div><div><br clear="none"></div><div>As I am unsure if this issue is directly related to the NCL installation, I am sending this to both emails. Apologies for any inconvenience caused.</div><div dir="ltr"><span><br clear="none"></span></div><div dir="ltr"><span>The output of the command "<span>conda list -n ncl_stable</span>" is attached (<span>condalist.txt</span>). Some additional information is provided below:</span></div><div dir="ltr">$ <span>conda --version</span></div><div dir="ltr"><span> <span><i>conda 24.11.2</i></span></span></div><div dir="ltr">$ <span>which ncl</span></div><div dir="ltr"><span> <span><i>~/miniconda3/envs/ncl_stable/bin/ncl</i></span></span></div><div dir="ltr"><span>$ <span>ncl -V</span></span></div><div dir="ltr"><span> <i>6.6.2</i><br clear="none"></span></div><div dir="ltr">$ <span>env | grep NCARG</span></div><div dir="ltr"><span> <span><i>NCARG_ROOT=/home/taghizade/miniconda3/envs/ncl_stable</i></span></span></div><div><br clear="none"></div><div>Any help would be appreciated. Happy holidays!</div></div></div><div><div dir="ltr" style="font-family:serif;font-size:16px;"><div><div dir="ltr" style="color:rgb(0,0,0);font-family:serif;font-size:16px;"><i><font size="2">-----------------------------------------------------------------------------</font></i></div><div dir="ltr" style="color:rgb(0,0,0);font-family:serif;font-size:16px;"> <div><div style="color:rgb(0,0,0);font-family:serif;font-size:16px;"><div dir="ltr"><i><font size="2">Best regards,</font></i></div><div dir="ltr"><i><font size="2">Ehsan Taghizade</font></i></div></div></div></div></div></div></div></div></div>
</blockquote></div></div></div>
</div></div></div>
</div>
</div></div></body></html>