add-colorbar not working in geo2grid

Post Reply
ovens@uw.edu
Posts: 1
Joined: Tue Oct 08, 2019 11:07 pm

add-colorbar not working in geo2grid

Post by ovens@uw.edu »

The add_coastlines.sh options for adding a colorbar are not working for me. At first it complained about not have pydecorate. After running
bin/python -m pip install pydecorate
I still get the following error:

File "/home/frosty/ovens/geo2grid_v_1_0_0/lib/python3.6/site-packages/polar2grid/add_coastlines.py", line 286, in main
raise ValueError("Can't add colorbar to RGB/RGBA image")
ValueError: Can't add colorbar to RGB/RGBA image

Does anyone know how to fix this?

David Ovens
U of Washington, Dept of Atm. Sciences
davidh
Posts: 116
Joined: Tue Jun 04, 2013 11:19 am

Re: add-colorbar not working in geo2grid

Post by davidh »

Hi David,

To answer your email that you sent: I will have to make a new release for the next version of Geo2Grid and make sure these dependencies are included. We just switched to a new build process and missed a few things being installed.

As for the error message mentioned here. What inputs are you providing to the script? A colorbar is meant to show what single band input value maps to some color in the image. Based on the error message it seems you are providing an image that already has color (is RGB) and so there is no way for 'add_coastlines.sh` to easily know what single value to put on the colorbar (ex. this temperature maps to this color). If this doesn't seem like it applies to your situation let me know and we'll see what we can do.

Dave
davidh
Posts: 116
Joined: Tue Jun 04, 2013 11:19 am

Re: add-colorbar not working in geo2grid

Post by davidh »

David,

I've built a new alpha tarball for Geo2Grid that should have all of the dependencies that were missing before. If you want to try it and let me know if things work a little better for you that would be great. Adding a colorbar to an RGB still won't work as I mentioned in my last message.

ftp://ftp.ssec.wisc.edu/pub/davidh/geo2 ... 1a2.tar.gz

Dave
Post Reply