<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:black;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Mary,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Thank you very much for looking into this.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">I uploaded the two NetCDF file to the ftp server last weekend. The two files are “edgar_HTAP_NOx_emi_TRANSPORT_2010.0.1x0.1.nc” containing the data to be interpolated
and the existing MPAS input file “static.90-25.usgs.nc” containing the DstGridLat and DstGridLon values. Please let me know if they are not there and I’ll upload them again.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Christian<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Mary Haley [mailto:haley@ucar.edu]
<br>
<b>Sent:</b> Thursday, April 13, 2017 10:28 AM<br>
<b>To:</b> Hogrefe, Christian <Hogrefe.Christian@epa.gov><br>
<b>Cc:</b> ncl-talk@ucar.edu<br>
<b>Subject:</b> Re: [ncl-talk] Using ESMF_Regrid to Interpolate lat/lon to Unstructured MPAS<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Christian,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP">http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">--Mary<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Sat, Apr 8, 2017 at 7:35 PM, Hogrefe, Christian <<a href="mailto:Hogrefe.Christian@epa.gov" target="_blank">Hogrefe.Christian@epa.gov</a>> wrote:<o:p></o:p></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_-7381292007470150456divtagdefaultwrapper">
<p style="mso-margin-top-alt:0in;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:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;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:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;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:"Calibri",sans-serif;color:black"><o:p></o:p></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:"Calibri",sans-serif;color:black"><o:p></o:p></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:"Calibri",sans-serif;color:black"><o:p></o:p></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:"Calibri",sans-serif;color:black"><o:p></o:p></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:"Calibri",sans-serif;color:black"><o:p></o:p></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:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black"> </span><span style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></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:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black"> </span><span style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></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:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black"> </span><span style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></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:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black"> </span><span style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></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_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:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:black"> </span><span style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></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:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:#888888"> </span><span style="font-family:"Calibri",sans-serif;color:#888888"><o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:#888888">Christian</span><span style="font-family:"Calibri",sans-serif;color:#888888"><o:p></o:p></span></p>
<p><span style="font-family:"Calibri",sans-serif;color:#888888"><o:p> </o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/mailman/listinfo/ncl-talk</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>