<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Christian,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I was able to run your script with just some minor changes to the directory paths, and it works with NCL V6.3.0 and NCL V6.4.0. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I believe if you upgrade NCL, you should be able to run this script without any changes. See the attached image.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Just for something different, I changed the contour levels and set cnFillPalette to a color map that starts with white:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">;;    res@cnLevelSelectionMode = &quot;ManualLevels&quot;       </font></div><div class="gmail_default"><font face="monospace, monospace">;;    res@cnMinLevelValF       = 0.    </font></div><div class="gmail_default"><font face="monospace, monospace">;;    res@cnMaxLevelValF       = 1E-10    </font></div><div class="gmail_default"><font face="monospace, monospace">;;    res@cnLevelSpacingF      = 1E-11/2.                                                                                                              </font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">    res@cnLevelSelectionMode  = &quot;ExplicitLevels&quot;</font></div><div class="gmail_default"><font face="monospace, monospace">    res@cnLevels              = ispan(1,100,5) * 1.e-12</font></div><div class="gmail_default"><font face="monospace, monospace">    res@cnFillPalette         = &quot;WhViBlGrYeOrRe&quot;        ; &quot;WhiteBlueGreenYellowRed&quot;    </font>  </div><div class="gmail_default"><br></div><div class="gmail_default">I attached the second image as well.</div><div class="gmail_default"><br></div><div class="gmail_default">--Mary</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 13, 2017 at 8:31 AM, Hogrefe, Christian <span dir="ltr">&lt;<a href="mailto:Hogrefe.Christian@epa.gov" target="_blank">Hogrefe.Christian@epa.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div class="m_-2004168925409012095WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:black">Mary,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:black">Thank you very much for looking into this.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:black">I uploaded the two NetCDF file to the ftp server last weekend. The two files are “<a href="http://edgar_HTAP_NOx_emi_TRANSPORT_2010.0.1x0.1.nc" target="_blank">edgar_HTAP_NOx_emi_TRANSPORT_<wbr>2010.0.1x0.1.nc</a>” containing the data to be interpolated
 and the existing MPAS input file “<a href="http://static.90-25.usgs.nc" target="_blank">static.90-25.usgs.nc</a>” containing the DstGridLat and DstGridLon values. Please let me know if they are not there and I’ll upload them again.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:black">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:black">Christian<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> Mary Haley [mailto:<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>]
<br>
<b>Sent:</b> Thursday, April 13, 2017 10:28 AM<br>
<b>To:</b> Hogrefe, Christian &lt;<a href="mailto:Hogrefe.Christian@epa.gov" target="_blank">Hogrefe.Christian@epa.gov</a>&gt;<br>
<b>Cc:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
<b>Subject:</b> Re: [ncl-talk] Using ESMF_Regrid to Interpolate lat/lon to Unstructured MPAS<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Christian,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Sorry for the delay. I think the issue you are having might have been fixed in a later release of NCL.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I could try to verify this for you if you provide me with the two NetCDF files?  We have an ftp you can use, as long as the files are not too large.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP" target="_blank">http://www.ncl.ucar.edu/<wbr>report_bug.shtml#HowToFTP</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">--Mary<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Sat, Apr 8, 2017 at 7:35 PM, Hogrefe, Christian &lt;<a href="mailto:Hogrefe.Christian@epa.gov" target="_blank">Hogrefe.Christian@epa.gov</a>&gt; wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div id="m_-2004168925409012095m_-7381292007470150456divtagdefaultwrapper">
<p style="margin-right:0in;margin-bottom:12.0pt;margin-left:0in">
<span style="font-size:10.0pt;color:black">Using NCL version 6.2.1, I am trying to use ESMF_regrid to interpolate data from a regular lat/lon (0.1 x 0.1 degree) grid to an unstructured MPAS grid. I am working off of the ESMF_rect_to_unstruct.ncl template.</span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin-right:0in;margin-bottom:12.0pt;margin-left:0in">
<span style="font-size:10.0pt;color:black">I am providing the DstGridLat and DstGridLon values from an existing MPAS input file. This MPAS mesh has nCells = 163842 cells and I am passing the double latCell(nCells) and double lonCell(nCells) variables to DstGridLat
 and DstGridLon.</span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin-right:0in;margin-bottom:12.0pt;margin-left:0in">
<span style="font-size:10.0pt;color:black">Once the script starts processing the destination grid, the following screen output appears:</span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black">(0)           get_dst_grid_info: destination lat dims = (163842)</span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black">(0)           get_dst_grid_info: destination lon dims = (163842)</span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black">(0)           unstructured_to_ESMF: triangulating the data ... this can be slow</span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black">(0)           min/max ElementVertices = 0/163841</span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black">(0)           unstructured_to_ESMF: total number of elements created: 327680</span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black"> </span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black">After that, the weights are being generated and the input data is interpolated . However, the dimension of that interpolated output is 327680 (i.e. the number of “elements”),
 not 163842 (i.e. the number of destination lat/lon points specified). When I write out the interpolated data, it has 327680 values. That number of  “elements” matches the number of “Vertices” in my existing MPAS input file from which the DstGridLat and DstGridLon
 values were pulled.</span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black"> </span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black">I am sure I am missing something very basic, but I am stuck figuring out why the interpolated data has more elements than I am expecting.</span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black"> </span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black">I am attaching the script, screen output, header of the destination lat/lon grid description file provided to the script, and the headers of the SrcFileName, DstFileName,
 and ncf file containing the interpolated data that are created by the script.</span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black"> </span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black">I have also uploaded the files required to run the script (i.e. the
<a href="http://edgar_HTAP_NOx_emi_TRANSPORT_2010.0.1x0.1.nc" target="_blank">edgar_HTAP_NOx_emi_TRANSPORT_<wbr>2010.0.1x0.1.nc</a> file containing the data to be interpolated and the existing MPAS input file
<a href="http://static.90-25.usgs.nc" target="_blank">static.90-25.usgs.nc</a> containing the DstGridLat and DstGridLon values) to the anonymous ftp server.</span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black"> </span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black">Thank you very much for your help,</span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:black"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:#888888"> </span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:#888888"><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:#888888">Christian</span><span style="font-family:&quot;Calibri&quot;,sans-serif;color:#888888"><u></u><u></u></span></p>
<p><span style="font-family:&quot;Calibri&quot;,sans-serif;color:#888888"><u></u> <u></u></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>

</blockquote></div><br></div>