[ncl-talk] convert colormap from GrADs
Buzan, Jonathan
jbuzan at purdue.edu
Wed Jan 12 04:05:03 MST 2022
Hi Deba,
When Red=Green=Blue, one is left with something between black and white, dependent on the saturation. 255 255 255 = white; 0 0 0 = black. The last 4 colors in your custom file are all R=G=B, so they will be some shade of grey.
Cheers,
-Jonathan
On Jan 12, 2022, at 4:52 AM, Debasish Hazra <debasish.hazra5 at gmail.com<mailto:debasish.hazra5 at gmail.com>> wrote:
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<mailto:shea at ucar.edu>> wrote:
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<mailto: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<mailto: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<mailto: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<mailto:ncl-talk at mailman.ucar.edu>
List instructions, subscriber options, unsubscribe:
https://mailman.ucar.edu/mailman/listinfo/ncl-talk
<gradsone.jpg><ncl_cbfromgrads.jpg>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220112/c50eb16f/attachment.html>
More information about the ncl-talk
mailing list