<div dir="ltr"><div>[1]<br>re:  &quot;Or any command can return the area of certain grid directly?&quot;<br><br>There is no explicit function. <br><br></div><div>[2] <br>Your formula:<br></div><div>      area(i,j)=rr*(lat(i+1)-lat(i))<wbr>*rr*(lon(j+1)-lon(j))*cos(rad*<wbr>lat(i))<br></div><div>is more appropriate  for area *between* lat(i+1) and lat(i) .. so i=1.5 so to speak<br><br>Maybe ... <br>      area(i,j)=rr*(0.5*(lat(i+1)-lat(i-1)))<wbr>*rr*(0.5*((j+1)-lon(j-1)))*cos(rad*<wbr>lat(i))<br>      area(i,j)=0.25*rr^2 *(lat(i+1)-lat(i-1)*(lon(j+1)-lon(j-1))*cos(rad*<wbr>lat(i))</div><div><br>[3]<br>The following a the &#39;correct&#39; formulation<br>       <a href="http://mathforum.org/library/drmath/view/63767.html">http://mathforum.org/library/drmath/view/63767.html</a><br><br></div><div>Good luck<br></div><div><br></div><div><br><br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 5, 2017 at 9:33 AM, 王梓元 <span dir="ltr">&lt;<a href="mailto:ziyuanwang@pku.edu.cn" target="_blank">ziyuanwang@pku.edu.cn</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Shea<div>Thank you for sharing scripts, it&#39;s really helpful. One more question, if I want to calculate the meission amount x(i,j) into emission intensity, should I calculate area manually, as this scipts:</div><div><div>rad    = tofloat(4.0*atan(1.0)/180.0)</div><div>  re     = 6.3712200E+03</div><div>  rr     = tofloat(re*rad)</div></div><div>  area(i,j)=rr*(lat(i+1)-lat(i))<wbr>*rr*(lon(j+1)-lon(j))*cos(rad*<wbr>lat(i))</div><div>Or any command can return the area of certain grid directly?</div><div>Thank you</div><div><br></div><div>Ziyuan</div><div><br><br><br><blockquote name="replyContent" class="m_-459715484696398151ReferenceQuote" style="padding-left:5px;margin-left:5px;border-left:#b6b6b6 2px solid;margin-right:0">-----原始邮件-----<br>
<b>发件人:</b><span id="m_-459715484696398151rc_from">&quot;Dennis Shea&quot; &lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span><br>
<b>发送时间:</b><span id="m_-459715484696398151rc_senttime">2017-03-05 00:09:00 (星期日)</span><br>
<b>收件人:</b> &quot;Ziyuan Wang&quot; &lt;<a href="mailto:1301111586@pku.edu.cn" target="_blank">1301111586@pku.edu.cn</a>&gt;<br>
<b>抄送:</b> &quot;<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>&quot; &lt;<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>&gt;<br>
<b>主题:</b> Re: [ncl-talk] Question about regrid 1) different commands get different results; 2)input emission amount or emission intensity<div><div class="h5"><br><br><div dir="ltr"><div><div><div><div><div><div>I have nor run your script.<br><br>I am not sure what you mean &quot;results are different.&quot; The three methods are different. <br><br>(a) linint2 takes the 4 nearest source grid locations and does a bilinear interpolation. <br></div>(b) does some form of &#39;global&#39; area conservation<br></div>(c) does a local area average<br><br></div>Hence, I am not surprised that they return different results.<br><br>===<br></div>Attached is a script that uses ESMF regridding via bilinear, patch and conserve methods.<br><br></div> If you run the script you will also get a nc fil with the interpolated grids<br><br></div>Good Luck<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 3, 2017 at 2:18 PM, Ziyuan Wang <span dir="ltr">&lt;<a href="mailto:1301111586@pku.edu.cn" target="_blank">1301111586@pku.edu.cn</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="#0563C1" vlink="#954F72" lang="ZH-CN"><div class="m_-459715484696398151m_-1248244829172655769WordSection1"><p class="MsoNormal"><span lang="EN-US">Hi ncl-talk members<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Now I have an emission amount inventory (lat 33:73, lon -12:45), with resolution 0.1*0.1, the emission variable E_HFC_1234 is the emission amount of each grid with unit Mg, as &#39;HFC.nc&#39; show. I want to interpolate to lower resolution 1*1.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">1. I tried 3 different commands: &quot;</span><span style="font-size:10.0pt;font-family:Courier" lang="EN-US">linint2&quot;, &quot;</span><strong><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#852d85" lang="EN-US"><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/area_conserve_remap_Wrap.shtml" target="_blank"><span style="color:#852d85">area_conserve_remap_Wrap</span></a>&quot;, and &quot;</span></strong><span lang="EN-US">area_hi2lores_Wrap&quot; But three return results are different (try in regrid.ncl)<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">2) The input &quot;fi&quot; of each command should be the emission amout? or the emission intensity of each grid? Do I need to calculate E_HFC_1234 into emission intensity, by dividing the area of each grid? If so, which command can I use to calculate area?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Thanks<br><br>Best<span class="m_-459715484696398151HOEnZb"><font color="#888888"><u></u><u></u></font></span></span></p><span class="m_-459715484696398151HOEnZb"><font color="#888888"><p class="MsoNormal"><span lang="EN-US">Ziyuan<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:等线" lang="EN-US"><u></u> <u></u></span></p></font></span></div></div><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" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote><br><span><br><p class="MsoNormal" style="font-family:arial,helvetica,clean,sans-serif;font-size:13px;margin:0cm 0cm 0pt;line-height:19px"><font style="font-size:12px;font-family:verdana"><span lang="EN-US">王梓元(WANG Ziyuan)</span></font></p><p class="MsoNormal" style="font-family:arial,helvetica,clean,sans-serif;font-size:13px;margin:0cm 0cm 0pt;line-height:19px"><span class="m_-459715484696398151yui-tag-span m_-459715484696398151yui-tag" style="font-size:12px;font-family:verdana">中国北京大学环境科学与工程学院<span lang="EN-US"><br>  College of Environmental Science and Engineering <br>  Peking University, China<br></span>● 中国北京海淀区颐和园路<span lang="EN-US">5</span>号 邮编:<span lang="EN-US">100871<br>  No.5, Yiheyuan Road, Haidian Dist. <br>  Beijing 100871, P.R. China <br></span>● 手机<span lang="EN-US"> Cell</span>:<span lang="EN-US"> <a href="tel:+86%20132%206999%202003" value="+8613269992003" target="_blank">(+86)132-6999-2003</a></span></span></p><p class="MsoNormal" style="font-family:arial,helvetica,clean,sans-serif;font-size:13px;margin:0cm 0cm 0pt;line-height:19px"><font style="font-size:12px;font-family:verdana">● 电子邮件<span lang="EN-US"> Email</span>:<a href="mailto:wangziyuan91@163.com" target="_blank">wangziyuan91@163.<wbr>com</a>, <a href="mailto:ziyuanwang@oku.edu.cn" target="_blank">ziyuanwang@pku.edu.cn</a></font></p></span></div></blockquote></div><br></div>