<p dir="ltr">Looking at the man page for ncview I see they require space separated columns. Elsewhere it seems to be a free for all on format. <br>
In retrospect, I'm happy for this to not be included if a space separated file is the preferred input and the inclusion of comma and spaces may cause issues down the line. Easy enough to get rid of the commas. </p>
<div class="gmail_quote">On 16 Sep 2015 5:11 p.m., "David Brown" <<a href="mailto:dbrown@ucar.edu">dbrown@ucar.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The original colormap reader for NCL was built to be reasonably<br>
permissive in the format of the file. It ignores lines that start with<br>
non-numeric characters, allows any amount of whitespace and/or a comma<br>
in between numbers, and figures out from the range of the numbers<br>
encountered whether the rgb components are represented as 8 bit or 16<br>
bit integers or as 0-1 floating point values. Also it doesn't care<br>
whether there are 1 or 3 or N components to a line. It will stop<br>
reading the file once it has encountered 3 * 256 valid numbers.<br>
The code was tested using files containing native NCL format floating<br>
point rgb triplets in the 0-1 range, as well as .gp files from the<br>
GIST plotting package, and .ncmap files from ncview.<br>
-dave<br>
<br>
<br>
On Wed, Sep 16, 2015 at 1:09 PM, Rick Brownrigg <<a href="mailto:brownrig@ucar.edu">brownrig@ucar.edu</a>> wrote:<br>
> Hi Alan,<br>
><br>
> That's a good suggestion, and I'll make sure it gets into 6.3.1.<br>
><br>
> FWIW, I don't know of any formal spec for these file; the current version of<br>
> read_colormap_file() was written to accommodate all the variations we had at<br>
> the time.<br>
><br>
> Thanks for the suggestion!<br>
> Rick<br>
><br>
><br>
> On Wed, Sep 16, 2015 at 12:49 PM, Alan Brammer <<a href="mailto:abrammer@albany.edu">abrammer@albany.edu</a>> wrote:<br>
>><br>
>> line 199 $NCARG_ROOT/lib/ncarg/nclscripts/utilities.ncl (v6.3.0)<br>
>><br>
>> tokens = str_split(lines(i), " ")<br>
>><br>
>> This only allows for space separated rgb files. I can't find any true<br>
>> specifications on rgb file format but I have csv rgb files that work with<br>
>> the other NCL functions but not read_colormap_file().<br>
>><br>
>> If the above line is edited to the below it allows both space and comma<br>
>> delimiters.<br>
>><br>
>> tokens = str_split(lines(i), " ,")<br>
>><br>
>> Side note, there's no documentation that str_split accepts multiple<br>
>> delimiters.<br>
>><br>
>> Thanks,<br>
>> Alan.<br>
>><br>
>> _______________________________________________<br>
>> ncl-talk mailing list<br>
>> <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
>> List instructions, subscriber options, unsubscribe:<br>
>> <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> ncl-talk mailing list<br>
> <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
> List instructions, subscriber options, unsubscribe:<br>
> <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
><br>
</blockquote></div>