<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="gmail-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="gmail-s1" style="font-variant-ligatures:no-common-ligatures">;<span class="gmail-Apple-converted-space"> </span>res@cnLevelSelectionMode = "ExplicitLevels" <span class="gmail-Apple-converted-space"> </span>; set explicit contour levels</span></p>
<p class="gmail-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="gmail-s1" style="font-variant-ligatures:no-common-ligatures">;<span class="gmail-Apple-converted-space"> </span>res@cnLevels<span class="gmail-Apple-converted-space"> </span>= (/0.04,0.06,0.08,0.1,0.12,0.14,0.16,0.18,0.2,0.24,0.26,0.28,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">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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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: 4050173952 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.7916666667]<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: 4050173952 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.7916666667]<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.7916666667]<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_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>______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_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 914 432 3108<br></div></div></div>
</div>