[ncl-talk] Make zero white in colour bar

Mary Haley haley at ucar.edu
Thu Sep 28 09:13:50 MDT 2017


Hi Barry,

I couldn't reproduce your problem using a toy script. What version of NCL
are you using?

Can you upload the wrf output file so I can try running your script?

http://www.ncl.ucar.edu/ftp_files.shtml

Thanks,

--Mary


On Thu, Sep 28, 2017 at 8:21 AM, Barry Lynn <barry.h.lynn at gmail.com> wrote:

> Hi:
>
> I need to follow up.
>
> radar_panel.. plots nc data from the Weather Climate and Tool Kit (anyone
> is welcome to use -- but I am not finished with that part of the program to
> remove attenuation).
>
> The other program plots WRF radar data.
>
> I have attached data from the mapping of radar observations (KOKX) and the
> WRF output.
>
> The radar observations have white space around a 150 km radius because the
> data is undefined.
>
> I tried to do the same for the WRF output following Mary's suggestion.
> However, there are two problems: i) even though I use the same "NCV_jet"
> and ispan values in each, the color bar in the WRF mapping is not the same
> (it needs to be redder on the right hand side).  ii) I would expect white
> coloring in the first (leftmost) part of the colorbar, but this doesn't
> seem to work correctly either. Both problems are probably related.
>
> Thank you,
>
> Barry
>
> On Sun, Aug 6, 2017 at 9:53 AM, Michael Weston <mjweston at masdar.ac.ae>
> wrote:
>
>> Thank you Mary!
>>
>> That is a much better approach :)
>> Regards
>> Michael
>>
>> On 04/08/2017 20:05, Mary Haley wrote:
>>
>> Hi Mike (and Barry),
>>
>> Just an FYI: I don't think you need to use cnFillColors. You can simply
>> read the colormap you want, set the first color to white, and then load
>> this new colormap using cnFillPalette:
>>
>>     cmap = read_colormap_file("BlueYellowRed")
>>     cmap(0,:) = 1.   ; Make first color white
>>
>>     res at cnLevelSelectionMode = "ExplicitLevels"    ; set explicit
>> contour levels
>>     res at cnLevels        = (/0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1/)  ;
>> 10 levels
>>     res at cnFillPalette  = cmap
>>
>> If you want the first color to be transparent rather than white, then use:
>>
>>     cmap(0,3) = 0,0   ; Make first color transparent
>>
>> Cheers,
>>
>>
>> --
>>
>> *Michael* *Weston*
>> Research Engineer
>>
>>
>> *A Part of Khalifa University of Science and Technology*
>>
>> PO Box 54224, Abu Dhabi,
>> United Arab Emirates
>> Office   +971 2 810 9510 <+971%202%20810%209510>
>>
>> Email   mjweston at masdar.ac.ae
>>  http://www.masdar.ac.ae
>>
>>
>> *Please consider the environment before printing this email*
>>
>> This transmission is confidential and intended solely for the person or
>> organization to whom it is addressed. It may contain privileged and
>> confidential information. If you are not the intended recipient, you should
>> not copy, distribute or take any action in reliance on it. If you have
>> received this transmission in error, please notify us immediately by e-mail
>> at *info at masdar.ae <info at masdar.ae>**.*
>>
>
>
>
> --
> 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 <(914)%20432-3108>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170928/a0875463/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: masdarlogo.jpg
Type: image/jpeg
Size: 5411 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170928/a0875463/attachment.jpg>


More information about the ncl-talk mailing list