[ncl-talk] warning:cnConstFEnableFill to enable fill

Kunal Bali kunal.bali9 at gmail.com
Wed Feb 21 04:49:27 MST 2018


  Dear Barry Sir,

  I set the levels via

  res at cnLevelSelectionMode = "ManualLevels"
  res at cnMinLevelValF = 0.0
  res at cnMaxLevelValF = 1
  res at cnLevelSpacingF = 0.005


---
Kunal Bali





On Wed, Feb 21, 2018 at 5:16 PM, Barry Lynn <barry.h.lynn at gmail.com> wrote:

> Hi:
>
> My apologies for asking simple question, but where do you set the levels
> you want to plot?
>
> I see that these two lines are commented out.
>
> ;  res at cnLevelSelectionMode = "ExplicitLevels"   ; set explicit contour
> levels
>
> ;  res at cnLevels  = (/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/)
>
>
> On Wed, Feb 21, 2018 at 1:23 PM, Kunal Bali <kunal.bali9 at gmail.com> wrote:
>
>> Dear NCL users,
>>
>> 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
>>
>> warning:ContourPlotInitialize: scalar field is constant; no contour lines
>> will appear; use cnConstFEnableFill to enable fill
>> if I set
>>
>> res at cnConstFEnableFill = True
>>
>> then the whole field is drawn in a single color as expected it will give
>> only one color.
>>
>>
>>
>> Regarding data
>> 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.
>>
>> 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.
>>
>> But this time I am getting only one value.
>>
>> So could anyone please provide some information on that.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *Copyright (C) 1995-2017 - All Rights Reserved University Corporation for
>> Atmospheric Research NCAR Command Language Version 6.4.0 The use of this
>> software is governed by a License Agreement. See http://www.ncl.ucar.edu/
>> <http://www.ncl.ucar.edu/> for more details.Variable: totcType: doubleTotal
>> Size: 4050173952 <040%205017%203952> bytes            506271744
>> valuesNumber of Dimensions: 3Dimensions and sizes:    [time | 96] x [lat |
>> 2112] x [lon | 2497]Coordinates:             time:
>> [35430.125..104813.7916666667 <079%201666%206667>]            lat:
>> [5.0078125..37.9921875]            lon: [  59..  98]Number Of Attributes:
>> 6  _FillValue :    -28672  long_name :    AOT at 0.55 micron  hdfeos_name
>> :    Optical_Depth_055  projection :    Albers Conical Equal_Area  unit
>> :    None  missing_value :    -28672Variable: totcType: doubleTotal Size:
>> 4050173952 <040%205017%203952> bytes            506271744 valuesNumber of
>> Dimensions: 3Dimensions and sizes:    [time | 96] x [lat | 2112] x [lon |
>> 2497]Coordinates:             time: [35430.125..104813.7916666667
>> <079%201666%206667>]            lat: [5.0078125..37.9921875]
>> lon: [  59..  98]Number Of Attributes: 6  _FillValue :    -28672  long_name
>> :    AOT at 0.55 micron  hdfeos_name :    Optical_Depth_055  projection
>> :    Albers Conical Equal_Area  unit :    None  missing_value :
>> -28672Variable: data_subsetType: doubleTotal Size: 295196160
>> bytes            36899520 valuesNumber of Dimensions: 3Dimensions and
>> sizes:    [time | 96] x [lat | 646] x [lon | 595]Coordinates:
>> time: [35430.125..104813.7916666667 <079%201666%206667>]            lat:
>> [29.5234375..19.4453125]            lon: [91.390625..82.109375]Number Of
>> Attributes: 6  missing_value :    -28672  unit :    None  projection :
>> Albers Conical Equal_Area  hdfeos_name :    Optical_Depth_055  long_name
>> :    AOT at 0.55 micron  _FillValue :    -28672(0)    nearest location:
>> k=0  n=481 m=882  156.836  5297.11(0)    -----(0)    -----Variable:
>> CoD1Type: doubleTotal Size: 295196160 bytes            36899520
>> valuesNumber of Dimensions: 3Dimensions and sizes:    [96] x [646] x
>> [595]Coordinates: Number Of Attributes: 1  _FillValue :    -28672(0)
>> min=1   max=1(0)    ---Variable: CoD2Type: doubleTotal Size: 3074960
>> bytes            384370 valuesNumber of Dimensions: 2Dimensions and
>> sizes:    [646] x [595]Coordinates: Number Of Attributes: 3  long_name :
>> Coef of Divergence  _FillValue :    -28672  average_op_ncl :    dim_avg_n
>> function was applied(0)    Coef of Divergence : min=1   max=1Variable:
>> CoD_finalType: doubleTotal Size: 3074960 bytes            384370
>> valuesNumber of Dimensions: 2Dimensions and sizes:    [646] x
>> [595]Coordinates: Number Of Attributes: 1  _FillValue :    -28672(0)
>> min=1   max=1warning:ContourPlotInitialize: scalar field is constant; no
>> contour lines will appear; use cnConstFEnableFill to enable fill*
>>
>> ---
>> Kunal
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
>
> --
> Barry H. Lynn, Ph.D
> Senior Lecturer,
> The Institute of the Earth Science,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
> C.E.O, Weather It Is, LTD
> Weather and Climate Focus
> http://weather-it-is.com
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
> US 914 432 3108 <091443%2023108>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180221/bde29d0b/attachment.html>


More information about the ncl-talk mailing list