[ncl-talk] convert colormap from GrADs

Debasish Hazra debasish.hazra5 at gmail.com
Tue Jan 11 20:52:35 MST 2022


I created a new colorbar
following $NCARG_ROOT/lib/ncarg/colormaps/grads_default.rgb and named them
as I need them from GrADS :
ncolors = 8
# r   g   b
 240  240  240
 220  220  255
 165  165  255
 255  105  180
  40   40   40
  80   80   80
 120  120  120
 160  160  160

copied to as $NCARG_ROOT/lib/ncarg/colormaps/grads_defaultprecip.rgb and in
NCL programm calling it as  gsn_define_colormap(wks,"grads_defaultprecip"),
but I am getting all shades of gray. instead of green and yellow produced
in Grads. Do I need to convert GrADS rgb values for ncl ? Attached is two
color pictures. Any suggestions.
Thanks
Deba


On Tue, Jan 11, 2022 at 6:35 PM Dennis Shea <shea at ucar.edu> wrote:

>
> *https://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml#GrADS*
> <https://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml#GrADS>
>
> On Tue, Jan 11, 2022 at 3:11 PM Buzan, Jonathan via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Hello Debasish,
>>
>> There’s a whole section on creating color tables:
>> https://www.ncl.ucar.edu/Document/Graphics/create_color_table.shtml
>>
>> Cheers,
>> -Jonathan
>>
>>
>>
>> On Jan 11, 2022, at 10:56 PM, Debasish Hazra via ncl-talk <
>> ncl-talk at mailman.ucar.edu> wrote:
>>
>> Hello,
>> How do I convert GrADS rgb colorbar to NCL colormap. I have the following
>> in GrADS:
>>
>> 'set rgb 79 240 240 240'
>> 'set rgb 20 220 220 255'
>> 'set rgb 19 165 165 255'
>> 'set rgb 98 255 105 180'
>> 'set rgb 33  40  40  40'
>> 'set rgb 44  80  80  80'
>> 'set rgb 55 120 120 120'
>> 'set rgb 66 160 160 160'
>>
>> Any help ?
>> Thanks
>> Debasish
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220111/c3e78054/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gradsone.jpg
Type: image/jpeg
Size: 3612 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220111/c3e78054/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ncl_cbfromgrads.jpg
Type: image/jpeg
Size: 19514 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220111/c3e78054/attachment-0001.jpg>


More information about the ncl-talk mailing list