<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Tabish:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">When I use ESMF_regrid, I usually specify the longitudes and latitudes of the source (1800x3600) and destination <span style="font-family:"trebuchet ms",sans-serif">(96x144 grid points) f</span>iles. So instead of using </div><div class="gmail_default" style="font-size:small"><i style="font-family:"trebuchet ms",sans-serif"><font color="#444444"><br></font></i></div><div class="gmail_default" style="font-size:small"><i style="font-family:"trebuchet ms",sans-serif"><font color="#444444"> Opt@DstGridType = "1.9x2.5"<br> Opt@DstURCorner = (/ 90, 357.5/) <br> Opt@DstLLCorner = (/ -90, 0/)<br></font></i></div><div class="gmail_default" style="font-size:small"><i style="font-family:"trebuchet ms",sans-serif"><font color="#444444"><br></font></i></div><div class="gmail_default" style="font-size:small"><span style="font-family:"trebuchet ms",sans-serif"><font color="#444444" style="">I use:</font></span></div><div class="gmail_default" style="font-size:small"><i style="font-family:"trebuchet ms",sans-serif"><font color="#444444"><br></font></i></div><div class="gmail_default" style="font-size:small">
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Courier;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>opt@SrcGridLon<span class="gmail-Apple-converted-space"> </span>= lonCellSrc ; source grid longitude input.</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Courier;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>opt@SrcGridLat<span class="gmail-Apple-converted-space"> </span>= latCellSrc ; source grid latitude input.</span></p><p class="gmail-p1" style="margin:0px;font:13px Courier;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"><br></span></span></p><p class="gmail-p1" style="margin:0px;font:13px Courier;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>opt@DstGridLon<span class="gmail-Apple-converted-space"> </span>= lonDst ; destination grid longitude input.</span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Courier;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">
</span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Courier;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>opt@DstGridLat<span class="gmail-Apple-converted-space"> </span>= latDst ; destination grid latitude input.</span></p></div><div class="gmail_default" style="font-size:small"><i style="font-family:"trebuchet ms",sans-serif"><font color="#444444"><br></font></i></div><div class="gmail_default" style="font-size:small"><span style="font-family:"trebuchet ms",sans-serif"><font color="#444444" style="">If this does not work, you can also try the default InterpMethod instead of using "conserve". Just a couple of suggestions.</font></span></div><div class="gmail_default" style="font-size:small"><span style="font-family:"trebuchet ms",sans-serif"><font color="#444444" style=""><br></font></span></div><div class="gmail_default" style="font-size:small"><span style="font-family:"trebuchet ms",sans-serif"><font color="#444444" style="">Hope this will help,</font></span></div><div class="gmail_default" style="font-size:small"><span style="font-family:"trebuchet ms",sans-serif"><font color="#444444" style="">Laura</font></span></div><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 14, 2022 at 10:12 AM Tabish Ansari 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:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">Hi</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">I have two global emissions datasets: one at a lower resolution of 1.9x2.5 degrees (96x144 grid points) and another at a higher resolution of 0.1x0.1 degrees (1800x3600 grid points).</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">I want to regrid the second dataset to the coarse resolution of the first one. I generated a weights file and followed the recommended procedure using the ESMF regridding function within NCL to achieve the desired output:</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><i><font color="#444444">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"<br><br>begin<br> sfile = addfile("/data/sync/modelinput/HTAPv3-Emissions-tan/edgar_HTAPv3_2018_NOx.nc","r")<br> nox = sfile->HTAPv3_1_International_Shipping(0,:,:)<br> printVarSummary(nox)<br><br> Opt = True<br> Opt@ForceOverwrite = True<br> Opt@InterpMethod = "conserve"<br> Opt@DstGridType = "1.9x2.5"<br> Opt@DstURCorner = (/ 90, 357.5/) <br> Opt@DstLLCorner = (/ -90, 0/)<br><br> nox_regrid = ESMF_regrid(nox,Opt)<br> printVarSummary(nox_regrid)<br>end</font><br></i></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">This leads to a resulting variable with <b>95x144</b> grid points, however the first dataset has <b>96x144</b> grid points. I have supplied all the information of the first grid through the grid type and corner options here. Still, the resultant grid has one less latitude band. Please let me know if something is obviously wrong here. Perhaps something to do with grid staggering?</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">Thanks a lot.</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">with best regards,</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">Tabish</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div><div dir="ltr"><div dir="ltr"><div><font face="trebuchet ms, sans-serif" color="#666666">-------------------------------<br><span style="background-color:rgb(255,255,255)">Dr Tabish Ansari</span></font></div><div><font face="trebuchet ms, sans-serif" color="#666666">Research Associate </font></div><div><font face="trebuchet ms, sans-serif" color="#666666">Air Quality Modelling Group</font></div><div><span style="background-color:rgb(255,255,255)"><span style="font-weight:normal"><font face="trebuchet ms, sans-serif" color="#666666">IASS-Potsdam </font></span></span></div><div><font face="trebuchet ms, sans-serif" color="#666666">Germany</font></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://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">!-------------------------------------------------------------------------------------------------------------</font><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">Laura D. Fowler </font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">Mesoscale and Microscale Meteorology Division (MMM) </font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">National Center for Atmospheric Research<br></font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">P.O. Box 3000, Boulder CO 80307-3000</font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)"><br></font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">e-mail: <a href="mailto:laura@ucar.edu" target="_blank">laura@ucar.edu</a></font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">phone: 303-497-1628</font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)"><br></font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">!-------------------------------------------------------------------------------------------------------------</font><br></div></div></div>