<div dir="ltr"><div><div>One more thing I would like to add.<br><br></div>As I mentioned in the earlier mail that I run the same script for both AOD and PM, which having same grid structure. In the script, I add the coordinated so that I can get the CoD values around that grid point. <br>such as latz = (/28.545/)<br>              lonz = (/77.192/) <br><br>But if you see the attached figure, right side showing CoD summary of AOD which extracting the required coordinated <br><br>BUT<br><br>the left side showing the CoD of PM which is extracting some other coordinated, not as mentioned in the script and like AOD.<br></div><div>SO<br><br></div><div>I got confused because both files have the same grid structure then the script should run the same way. Why the script is not running the same way in both cases.  <br><br></div><div>please provide some information on that. <br></div><div><br><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_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><div dir="ltr"><div><div dir="ltr"><div>---<br></div><div><font size="2"><span>Kunal Bali<br></span></font></div><br><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Feb 22, 2018 at 12:03 PM, Kunal Bali <span dir="ltr"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>></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><div><div>Hello Ma'am,<br><br></div>I have one doubt regarding your question. <br><br></div>I run this script for both AOD and PM2.5 variable. The script is giving CoD values between 0 to 1 for AOD but not for PM2.5. If I assume that there is something wrong with the code then it should give some error in AOD data as well. <br><br></div><div>Both files have the same grid structure<br><br></div><div>for AOD<br><br>#<br># gridID 1<br>#<br>gridtype  = lonlat<br>gridsize  = 5273664<br>xsize     = 2497<br>ysize     = 2112<br>xname     = lon<br>xlongname = "longitude"<br>xunits    = "degrees_east"<br>yname     = lat<br>ylongname = "latitude"<br>yunits    = "degrees_north"<br>xfirst    = 59<br>xinc      = 0.015625<br>yfirst    = 5.0078125<br>yinc      = 0.015625<br><br><br></div><div>for PM<br><br><br>#<br># gridID 1<br>#<br>gridtype  = lonlat<br>gridsize  = 5273664<br>xsize     = 2497<br>ysize     = 2112<br>xname     = lon<br>xlongname = "longitude"<br>xunits    = "degrees_east"<br>yname     = lat<br>ylongname = "latitude"<br>yunits    = "degrees_north"<br>xfirst    = 59<br>xinc      = 0.015625<br>yfirst    = 5.0078125<br>yinc      = 0.015625<br><br><br></div><div><br><div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_309505090900135107gmail_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><div dir="ltr"><div><div dir="ltr"><div>---<br></div><div><font size="2"><span>Kunal Bali<br></span></font></div><br><div><b><br></b></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="h5">
<br><div class="gmail_quote">On Wed, Feb 21, 2018 at 10:26 PM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></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 style="font-size:small">Kunal,</div><div style="font-size:small"><br></div><div style="font-size:small">The issue is obviously coming somewhere from the calculations, and you are going to have to debug this code to figure out where the problem is.</div><div style="font-size:small"><br></div><div style="font-size:small">As you can see from the printMinMax output, The CoD1 variable has a min/max of 1, so taking the average of this is also going to give you a min/max of 1 (CoD2), and then doing a sqrt on this is also going to give you a min/max of 1 (CoD_final).</div><div style="font-size:small"><br></div><div style="font-size:small">You need to go back to the data_single, data_subset, and DATA_SINGLE_3D and make sure these are being calculated correctly. You should also print the min/max of these arrays to further pinpoint the problem.</div><span class="m_309505090900135107HOEnZb"><font color="#888888"><div style="font-size:small"><br></div><div style="font-size:small">--Mary</div><div style="font-size:small"><br></div></font></span></div><div class="m_309505090900135107HOEnZb"><div class="m_309505090900135107h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 21, 2018 at 4:49 AM, Kunal Bali <span dir="ltr"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>></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 Barry Sir,<br><br>  I set the levels via<br><br>  res@cnLevelSelectionMode = "ManualLevels"<br>  res@cnMinLevelValF = 0.0<br>  res@cnMaxLevelValF = 1<br>  res@cnLevelSpacingF = 0.005 <br><br><div class="gmail_extra"><br clear="all"><div><div class="m_309505090900135107m_3237832714223406308m_-1115773463538384089gmail_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><div dir="ltr"><div><div dir="ltr"><div>---<br></div><div><font size="2"><span>Kunal Bali<br></span></font></div><br><div><b><br></b></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="m_309505090900135107m_3237832714223406308h5">
<br><div class="gmail_quote">On Wed, Feb 21, 2018 at 5:16 PM, Barry Lynn <span dir="ltr"><<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi:<div><br></div><div>My apologies for asking simple question, but where do you set the levels you want to plot?</div><div><br></div><div>I see that these two lines are commented out.</div><div><br></div><div>




<span></span>





<p class="m_309505090900135107m_3237832714223406308m_-1115773463538384089m_242817823053086196gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_309505090900135107m_3237832714223406308m_-1115773463538384089m_242817823053086196gmail-s1" style="font-variant-ligatures:no-common-ligatures">;<span class="m_309505090900135107m_3237832714223406308m_-1115773463538384089m_242817823053086196gmail-Apple-converted-space">  </span>res@cnLevelSelectionMode = "ExplicitLevels" <span class="m_309505090900135107m_3237832714223406308m_-1115773463538384089m_242817823053086196gmail-Apple-converted-space">  </span>; set explicit contour levels</span></p>
<p class="m_309505090900135107m_3237832714223406308m_-1115773463538384089m_242817823053086196gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_309505090900135107m_3237832714223406308m_-1115773463538384089m_242817823053086196gmail-s1" style="font-variant-ligatures:no-common-ligatures">;<span class="m_309505090900135107m_3237832714223406308m_-1115773463538384089m_242817823053086196gmail-Apple-converted-space">  </span>res@cnLevels<span class="m_309505090900135107m_3237832714223406308m_-1115773463538384089m_242817823053086196gmail-Apple-converted-space">  </span>= (/0.04,0.06,0.08,0.1,0.12,0.14<wbr>,0.16,0.18,0.2,0.24,0.26,0.28,<wbr>0.3,0.32,0.34,0.36,0.38,0.4/)</span></p>


<br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_309505090900135107m_3237832714223406308m_-1115773463538384089h5">On Wed, Feb 21, 2018 at 1:23 PM, Kunal Bali <span dir="ltr"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_309505090900135107m_3237832714223406308m_-1115773463538384089h5"><div dir="ltr"><div><div><div>Dear NCL users,<br><br></div><div>I am trying to calculate the coefficient of divergence using the attached script. The script is running successfully but I am getting only one value i.e. 1 as a minimum and maximum value which should come in between 0 to 1. And because of that I am also receiving the warning such as <br></div><br><span style="color:rgb(255,0,0)">warning:ContourPlotInitialize: scalar field is constant; no contour lines will appear; use cnConstFEnableFill to enable fill</span><br>if I set<br><pre>res@cnConstFEnableFill = True</pre>then the whole field is drawn in a single color as expected it will give only one color. <br><pre><br></pre><br></div><div>Regarding data<br></div><div>The data is in different 5 grid structure covering different Indian region so I merged them and got one single file which cover whole Indian region and then runs the attached script. <br><br></div><div>Before merging the data, I used the same script for different grid structures separately and it was giving the correct values between 0 to 1. <br><br>But this time I am getting only one value.<br><br></div><div>So could anyone please provide some information on that. <br></div><br></div> <br> <b>Copyright (C) 1995-2017 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language Version 6.4.0<br> The use of this software is governed by a License Agreement.<br> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br><br>Variable: totc<br>Type: double<br>Total Size: <a href="tel:040%205017%203952" value="+914050173952" target="_blank">4050173952</a> bytes<br>            506271744 values<br>Number of Dimensions: 3<br>Dimensions and sizes:    [time | 96] x [lat | 2112] x [lon | 2497]<br>Coordinates: <br>            time: [35430.125..104813.<a href="tel:079%201666%206667" value="+917916666667" target="_blank">7916666667</a>]<br>            lat: [5.0078125..37.9921875]<br>            lon: [  59..  98]<br>Number Of Attributes: 6<br>  _FillValue :    -28672<br>  long_name :    AOT at 0.55 micron<br>  hdfeos_name :    Optical_Depth_055<br>  projection :    Albers Conical Equal_Area<br>  unit :    None<br>  missing_value :    -28672<br><br>Variable: totc<br>Type: double<br>Total Size: <a href="tel:040%205017%203952" value="+914050173952" target="_blank">4050173952</a> bytes<br>            506271744 values<br>Number of Dimensions: 3<br>Dimensions and sizes:    [time | 96] x [lat | 2112] x [lon | 2497]<br>Coordinates: <br>            time: [35430.125..104813.<a href="tel:079%201666%206667" value="+917916666667" target="_blank">7916666667</a>]<br>            lat: [5.0078125..37.9921875]<br>            lon: [  59..  98]<br>Number Of Attributes: 6<br>  _FillValue :    -28672<br>  long_name :    AOT at 0.55 micron<br>  hdfeos_name :    Optical_Depth_055<br>  projection :    Albers Conical Equal_Area<br>  unit :    None<br>  missing_value :    -28672<br><br>Variable: data_subset<br>Type: double<br>Total Size: 295196160 bytes<br>            36899520 values<br>Number of Dimensions: 3<br>Dimensions and sizes:    [time | 96] x [lat | 646] x [lon | 595]<br>Coordinates: <br>            time: [35430.125..104813.<a href="tel:079%201666%206667" value="+917916666667" target="_blank">7916666667</a>]<br>            lat: [29.5234375..19.4453125]<br>            lon: [91.390625..82.109375]<br>Number Of Attributes: 6<br>  missing_value :    -28672<br>  unit :    None<br>  projection :    Albers Conical Equal_Area<br>  hdfeos_name :    Optical_Depth_055<br>  long_name :    AOT at 0.55 micron<br>  _FillValue :    -28672<br>(0)    nearest location: k=0  n=481 m=882  156.836  5297.11<br>(0)    -----<br>(0)    -----<br><br>Variable: CoD1<br>Type: double<br>Total Size: 295196160 bytes<br>            36899520 values<br>Number of Dimensions: 3<br>Dimensions and sizes:    [96] x [646] x [595]<br>Coordinates: <br>Number Of Attributes: 1<br>  _FillValue :    -28672<br>(0)    min=1   max=1<br>(0)    ---<br><br>Variable: CoD2<br>Type: double<br>Total Size: 3074960 bytes<br>            384370 values<br>Number of Dimensions: 2<br>Dimensions and sizes:    [646] x [595]<br>Coordinates: <br>Number Of Attributes: 3<br>  long_name :    Coef of Divergence<br>  _FillValue :    -28672<br>  average_op_ncl :    dim_avg_n function was applied<br>(0)    Coef of Divergence : min=1   max=1<br><br>Variable: CoD_final<br>Type: double<br>Total Size: 3074960 bytes<br>            384370 values<br>Number of Dimensions: 2<br>Dimensions and sizes:    [646] x [595]<br>Coordinates: <br>Number Of Attributes: 1<br>  _FillValue :    -28672<br>(0)    min=1   max=1<br>warning:ContourPlotInitialize: scalar field is constant; no contour lines will appear; use cnConstFEnableFill to enable fill</b><br><div><div><br clear="all"><div><div><div><div><div class="m_309505090900135107m_3237832714223406308m_-1115773463538384089m_242817823053086196m_705430012755601724gmail-m_-4399236670033728621gmail_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><div dir="ltr"><div><div dir="ltr"><div>---<br></div><div><font size="2"><span>Kunal<br></span></font></div><br><div><br></div><div><p style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div></div></div></div></div>
<br></div></div>______________________________<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><br clear="all"><div><br></div>-- <br><div class="m_309505090900135107m_3237832714223406308m_-1115773463538384089m_242817823053086196gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:091443%2023108" value="+919144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div>
</blockquote></div><br></div></div></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></div><br></div></div></div></div>
</blockquote></div><br></div></div>