<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: "Franklin Gothic Book", "Avenir Next Condensed", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Rick,</div>
<div style="font-family: "Franklin Gothic Book", "Avenir Next Condensed", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: "Franklin Gothic Book", "Avenir Next Condensed", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Yes, this is exactly my situation.  I am using a version installed from conda.  I managed to create a copy of the shapefile_utils.ncl function and swapped out all the x, y calls.  So far, this appears to have worked.  Though, I do not know why this version
 is different than the non-conda-installed version.  </div>
<div style="font-family: "Franklin Gothic Book", "Avenir Next Condensed", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: "Franklin Gothic Book", "Avenir Next Condensed", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Thank you for replying.</div>
<div>
<div style="font-family: "Franklin Gothic Book", "Avenir Next Condensed", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div></div>
<div></div>
<div></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt">Katie Holman, PhD</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-size:11pt"></span><span style="font-size:12pt"></span><span style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt">Meteorologist</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-size:11pt"></span><span style="font-size:12pt"></span><span style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt"></span><span style="color:rgb(0,0,0); font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt">Technical
 Service Center</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-size:11pt"></span><span style="font-size:12pt"></span><span style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt"></span><span style="color:rgb(0,0,0); font-family:"franklin gothic book","avenir next condensed",sans-serif; font-size:11pt; background-color:rgba(0,0,0,0)">Bureau
 of Reclamation</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-size:11pt"></span><span style="font-size:12pt"></span><span style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt">303-445-2571</span></div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Rick Brownrigg <brownrig@ucar.edu><br>
<b>Sent:</b> Monday, January 25, 2021 3:53 PM<br>
<b>To:</b> Holman, Kathleen D <kholman@usbr.gov><br>
<b>Cc:</b> ncl-talk@mailman.ucar.edu <ncl-talk@mailman.ucar.edu><br>
<b>Subject:</b> [EXTERNAL] Re: [ncl-talk] Swapped x, y coordinates of shapefile?</font>
<div> </div>
</div>
<div>
<p> </p>
<div>
<table border="2" cellspacing="4" cellpadding="0" style="border-color:black; background-color:yellow; margin-left:auto; margin-right:auto">
<tbody>
<tr>
<td>
<p style="text-align:center"><strong> This email has been received from outside of DOI - Use caution before clicking on links, opening attachments, or responding.  </strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<p><br>
<br>
</p>
<div>
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>Yes, there have been reports of this with NCL v6.6.2 as distributed via conda (does that describe your circumstances?)  I don't know the root cause nor am I in a position to investigate. However, as a kludge, you can certainly swap the shapefile's x/y
 coordinates in any of a number of ways, perhaps something like:</div>
<div>     myShpFile = addfile(....)</div>
<div>     ...<br>
</div>
<div>     theActualXCoord = myShpFile->y   ; Swap X/Y to fix known bug...<br>
</div>
<div>     theActualYCoord = myShpFile->x   <br>
</div>
<div><br>
</div>
<div>Hope that helps...</div>
<div>Rick</div>
<div><br>
</div>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Mon, Jan 25, 2021 at 3:30 PM Holman, Kathleen D via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt; color:rgb(0,0,0)">
Hello,</div>
<div style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt; color:rgb(0,0,0)">
I am trying to use the shapefile_mask_data() function to mask precipitation data (time, lat, lon) using boundaries defined in a shapefile, subs_buff_mod.shp.  When I plot the shapefile in ArcGIS, the spatial extent appears correct (see screenshot).  This basin
 is in Colorado, so the latitude extent should be between 40 and 40.5 north, while the longitude extent should be between -106 and -105 east.  Unfortunately, the mask function continues to produce missing values, and I *think* the reason for this is because
 the x and y coordinates of the shapefile are getting swapped when I import the shapefile into NCL.  Here is a snippet of text from the print_shapefile_info() command.  The latitude and longitude ranges are swapped from what they should be for Colorado, but
 again, the shapefile properly plots in ArcGIS.  Can I swap the coordinates somehow?  Any idea where this happening or <span style="background-color:rgb(255,255,255); display:inline">how to remedy this?</span></div>
<div style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt; color:rgb(0,0,0)">
(0)     ======================================================================
<div>(0)     Filename: "../GIS/subs_buff_mod.shp"</div>
<div>(0)        Geometry type: polygon</div>
<div>(0)        # of features: 8</div>
<div><b>(0)        Min/max lat:   -105.82/-105.45</b></div>
<div><b>(0)        Min/max lon:     40.23/  40.50</b></div>
<div>(0)        Variable names and their types:</div>
<div>(0)            geometry : integer</div>
<div>(0)            segments : integer</div>
<div>(0)            x : double</div>
<div>(0)            y : double</div>
<div>(0)            Shape_Leng : double</div>
<div>(0)            Shape_Area : double</div>
<div>(0)            HydroID : int64</div>
<div>(0)            Name : string</div>
<div>(0)            BUFF_DIST : double</div>
<div>(0)            ORIG_FID : int64</div>
<div>(0)     ======================================================================</div>
<div style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
Here are the min/max values of the latitude and longitude coordinates associated with the precipitation data.  </div>
<div style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt; color:rgb(0,0,0)">
(0)     latitude (degrees_north) : min=36.532672   max=50.232124
<div>(0)</div>
<div>(0)     longitude (degrees_east) : min=-114.7339440000123   max=-90.00160000003234</div>
<br>
<br>
<img size="655381" width="403" height="221" style="max-width:100%; width:403px; height:221px" data-outlook-trace="F:1|T:1" src="cid:1773bbb6f2dcb971f161"><br>
</div>
<div>
<div style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt; color:rgb(0,0,0)">
Thank you,</div>
<div style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_m_-774946358143092086gmail-m_5464985544382545069Signature">
<div>
<div></div>
<div></div>
<div></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt">Katie Holman, PhD</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-size:11pt"></span><span style="font-size:12pt"></span><span style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt">Meteorologist</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-size:11pt"></span><span style="font-size:12pt"></span><span style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt"></span><span style="color:rgb(0,0,0); font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt">Technical
 Service Center</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-size:11pt"></span><span style="font-size:12pt"></span><span style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt"></span><span style="color:rgb(0,0,0); font-family:"franklin gothic book","avenir next condensed",sans-serif; font-size:11pt; background-color:rgba(0,0,0,0)">Bureau
 of Reclamation</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-size:11pt"></span><span style="font-size:12pt"></span><span style="font-family:"Franklin Gothic Book","Avenir Next Condensed",sans-serif; font-size:11pt">303-445-2571</span></div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.ucar.edu%2Fmailman%2Flistinfo%2Fncl-talk&data=04%7C01%7Ckholman%40usbr.gov%7C1ac3f783cb524e930b3e08d8c1841af1%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C637472120426520274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=76%2FW6jsZ3aRfALllRUb9nSJjaN%2BA8N3zDnU6dioVYbk%3D&reserved=0" originalsrc="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" shash="uw+AbtEcQlliqhEidzxs5gX4EYKIEEWaHyEu0+eo6Z7Lu4WnRHzct5pDYpc92Gl+dWHT4U1rh30dkgs3dM8njjrJl9j3EmlsoRL9DcMHcbb9Km6h1R/hCD1zF2f5Znjn3cbZB6fAS4KEgZQPHCyt34zsmPNyZQ8OBHFFKxr566Q=" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote>
</div>
</div>
</div>
</div>
</body>
</html>