<div dir="ltr"><div class="gmail_default" style="font-size:small">Dear Tao,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">It&#39;s a bit difficult to debug a long script like this without the data.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">There are several potential issues with your script.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">[1] You are setting some lambert conformal resources, but then plotting over a cylindrical equidistant map.  I think you need to add this:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">mpres@mpProjection = &quot;LambertConformal&quot;</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">[2] You are setting these five resources:</div><div class="gmail_default"><p class="gmail-m_1701134429563545557gmail-p1" style="font-size:small"><font face="monospace, monospace">  mpres@mpLimitMode                     = &quot;LatLon&quot;<br>  mpres@mpMinLatF                       = 33.5<br>  mpres@mpMaxLatF                       = 38.5<br>  mpres@mpMinLonF                       = 137<br>  mpres@mpMaxLonF                       = 142</font></p><p class="gmail-m_1701134429563545557gmail-p1" style="font-size:small">but generally, when you use a Lambert Conformal projection, you want to define the two corners of the area, and not the min/max lat/lon values. Please see this page for some examples:</p><p class="gmail-m_1701134429563545557gmail-p1"><a href="http://www.ncl.ucar.edu/Applications/lcnative.shtml">http://www.ncl.ucar.edu/Applications/lcnative.shtml</a><br></p><p class="gmail-m_1701134429563545557gmail-p1">[3] You are setting:<br></p></div><div class="gmail_default">







<p class="gmail-m_1701134429563545557gmail-p1" style="font-size:small"><span class="gmail-m_1701134429563545557gmail-s1"><font face="monospace, monospace">  res@tfDoNDCOverlay                    = True</font></span></p>
<p class="gmail-m_1701134429563545557gmail-p2" style="font-size:small"><span class="gmail-m_1701134429563545557gmail-s1">and also:</span></p>
<p class="gmail-m_1701134429563545557gmail-p1" style="font-size:small"><font face="monospace, monospace"><span class="gmail-m_1701134429563545557gmail-s1">  pre_res@sfXArray                      = lon      ; Associates lat/lon locations<br></span>  pre_res@sfYArray                      = lat      ; with data values.</font></p><p class="gmail-m_1701134429563545557gmail-p1" style="font-size:small"><span class="gmail-m_1701134429563545557gmail-s1">which is contradictory. The first one tells NCL you want to plot the data in its native projection, which assumes that you have done all the work of setting the correct map resources (like you did with mpLambert Parallel1/2F, mpMeridianF, etc). However, if you are even slightly off in defining the native map projection, then your data will not be correctly plotted. You only want to set sfXArray/sfYArray if you are NOT plotting data in a native projection.</span></p><p class="gmail-m_1701134429563545557gmail-p1" style="font-size:small">My guess is that you don&#39;t have the native map projection set up correctly, and hence the data is skewed slightly.</p><p class="gmail-m_1701134429563545557gmail-p1" style="font-size:small">To debug this problem, I suggest using your lat/lon arrays to plot the data over a simple cylindrical equidistant map instead of plotting in a native map projection.</p><p class="gmail-m_1701134429563545557gmail-p1" style="font-size:small">I modified your script and attached it here.  Since I can&#39;t run it, there may be some errors, but hopefully you understand what it&#39;s doing.  </p><p class="gmail-m_1701134429563545557gmail-p1" style="font-size:small">If this plot looks correct, then what this tells you that NCL is reading and plotting your data correctly, and that likely in your original script you didn&#39;t have the native map projection resources set correctly.  These are the resources I would then take a closer look at to make sure they are correct:</p><p class="gmail-m_1701134429563545557gmail-p1"><font face="monospace, monospace">  ; zoom in map</font></p><p class="gmail-m_1701134429563545557gmail-p1"><font face="monospace, monospace">  mpres@mpLambertParallel1F             = 30.0         ; two parallels</font></p><p class="gmail-m_1701134429563545557gmail-p1"><font face="monospace, monospace">  mpres@mpLambertParallel2F             = 60.0</font></p><p class="gmail-m_1701134429563545557gmail-p1"><font face="monospace, monospace">  mpres@mpLambertMeridianF              = 136.0        ; central meridian</font></p><p class="gmail-m_1701134429563545557gmail-p1"><font face="monospace, monospace">  mpres@mpLimitMode                     = &quot;LatLon&quot;</font></p><p class="gmail-m_1701134429563545557gmail-p1"><font face="monospace, monospace">  mpres@mpMinLatF                       = 33.5</font></p><p class="gmail-m_1701134429563545557gmail-p1"><font face="monospace, monospace">  mpres@mpMaxLatF                       = 38.5</font></p><p class="gmail-m_1701134429563545557gmail-p1"><font face="monospace, monospace">  mpres@mpMinLonF                       = 137</font></p><p class="gmail-m_1701134429563545557gmail-p1"><font face="monospace, monospace">  mpres@mpMaxLonF                       = 142</font></p><div>--Mary</div><div><br></div>







</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 28, 2016 at 1:44 AM, Tao Lu <span dir="ltr">&lt;<a href="mailto:hakufu.asano@gmail.com" target="_blank">hakufu.asano@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Mary<div><br></div><div>Thank you for your helps.</div><div><br></div><div>About the image:</div><div>First is <img src="cid:ii_1580a3b79eb6379b" alt="Inline image 1" width="339" height="368" style="margin-right:0px"></div><div>This image is the graph other people put graph to google earth.</div><div><br></div><div>Then I get the grids data, here is my image.</div><div><img src="cid:ii_1580a3d22221b94f" alt="Inline image 2" width="400" height="403"><br></div><div><br></div><div>It is obvious that the rain band in my graph drifts from the above one.</div><div><br></div><div>Also I will attach my ncl script. The data is from composite radar rain data.</div><div><br></div><div>Thank you for taking time to check it for me. <br></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Tue, Oct 25, 2016 at 12:59 AM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Tao,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">There&#39;s not enough information to go on here.  Could you include the NCL image, and what you expect the correct image to be?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Also, where is the data coming from and how are you plotting it? It would help if we could see an NCL script.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 23, 2016 at 8:06 AM, Tao Lu <span dir="ltr">&lt;<a href="mailto:hakufu.asano@gmail.com" target="_blank">hakufu.asano@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear ncl-talk<div><br></div><div>I am plotting rain density data using ncl.</div><div>The location of heavy rain is different from the graph created by others.</div><div><br></div><div>I did not include projection in visualization and want to know whether projection affects location of plotted data?</div><div><br></div><div>Thank you very much.</div><span class="m_-1905701490387024810m_4668212737646075270HOEnZb"><font color="#888888"><div><br></div><div>Tao</div><div><div><br></div>
</div></font></span></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>
</blockquote></div><br><br clear="all"><div><br></div></div></div>-- <br><div class="m_-1905701490387024810gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">******************************<wbr>************************</span><br></div><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">盧 涛 (ル タオ) </span><span style="font-family:arial,helvetica,sans-serif;font-size:small">修士課程2年</span><br style="font-size:12.8000001907349px"><p style="font-size:12.8000001907349px;margin:0px"><font size="2" face="arial, helvetica, sans-serif">〒<span lang="EN-US">112-8551 </span>東京都文京区春日<span lang="EN-US">1-13-27</span></font></p><p style="font-size:12.8000001907349px;margin:0px"><font size="2" face="arial, helvetica, sans-serif">中央大学理工学研究科都市環境学専攻</font></p><p style="font-size:12.8000001907349px;margin:0px"><font size="2" face="arial, helvetica, sans-serif">河川・水文<span lang="EN-US"><span lang="EN-US"><span lang="EN-US">研究</span></span><span lang="EN-US"><span lang="EN-US">室</span></span></span></font><span style="font-family:arial,helvetica,sans-serif;font-size:small">(山田正教授)</span></p></div><div style="font-size:12.8000001907349px"><p style="font-size:12.8000001907349px;margin:0px"><font size="2" face="arial, helvetica, sans-serif"><span lang="EN-US"><br></span></font></p><p style="font-size:12.8000001907349px;margin:0px"><font size="2" face="arial, helvetica, sans-serif"><span lang="EN-US">TEL: 03-3817-3406;   </span></font><span style="font-family:arial,helvetica,sans-serif;font-size:small">Phone: 070-2188-7509</span></p>Email1: <a href="mailto:mail%3Amet.yamos@gmail.com" style="color:rgb(17,85,204);font-size:12.8000001907349px" target="_blank">hakufu.asano@gmail.com</a><br style="font-size:12.8000001907349px">Email2: <a href="mailto:mail%3Ayamoto@civil.chuo-u.ac.jp" style="color:rgb(17,85,204);font-size:12.8000001907349px" target="_blank">lutao@civil.chuo-u.ac.<wbr>jp</a><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">******************************<wbr>*************************</span></div><div style="font-size:12.8000001907349px"><span style="font-size:small;font-family:arial">******************************</span><span style="font-size:small;font-family:arial"><wbr>************************</span><br></div><div><span style="font-size:small;font-family:arial">Tao Lu    (M. Eng)</span></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:12.8px">Laboratory of River Engineering and Hydrology,</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">Dept. of Civil and Environmental Engineering,</span><br style="font-family:arial;font-size:small"><span style="font-family:arial,helvetica,sans-serif;font-size:12.8px">Graduate School of Science and Engineering,</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">Chuo University</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial"> </span><br style="font-family:arial;font-size:small">1-13-27<span style="font-size:small;font-family:arial">,Kasuga,Bunkyo-ku,Tokyo</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">112-8551, Japan</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">TEL: </span>03-3817-1805<font size="2" face="arial, helvetica, sans-serif"><span lang="EN-US">;   </span></font><span style="font-family:arial,helvetica,sans-serif;font-size:small">Phone: 070-2188-7509</span><br style="font-family:arial;font-size:small"><span style="font-size:12.8px">Email1: </span><a href="mailto:mail%3Amet.yamos@gmail.com" style="font-size:12.8px;color:rgb(17,85,204)" target="_blank">hakufu.asano@gmail.com</a><br style="font-size:12.8px"><span style="font-size:12.8px">Email2: </span><a href="mailto:mail%3Ayamoto@civil.chuo-u.ac.jp" style="font-size:12.8px;color:rgb(17,85,204)" target="_blank">lutao@civil.chuo-u.ac.<wbr>jp</a><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">******************************</span><span style="font-size:small;font-family:arial"><wbr>***********************</span><span style="font-size:12.8px"><br></span></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>
</blockquote></div><br></div>