<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Guido,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for providing your script and data offline.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The first thing to note is that cnMissingValFillColor will not be effective in this case, because your data doesn't have any missing values.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The reason why you are not getting any transparency with raster fill is due to a quirk with raster fill that I never knew about until Dave Brown helped me look over your script today.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The simple fix is to replace this line:</div><div class="gmail_default" style="font-size:small"><p class="gmail-p1"><span class="gmail-s1"> cmap_r(0,3)=0.0</span></p></div><div class="gmail_default">







<p class="gmail-p1" style="font-size:small"><span class="gmail-s1">with this line, which is setting the first color to black, but then making it transparent:</span></p><p class="gmail-p1" style="font-size:small"><span class="gmail-s1"> cmap_r(0,:)=0.0</span></p>
<p class="gmail-p1" style="font-size:small">Also, you can remove or comment this line, as it has no effect:</p>







<p class="gmail-p1">ResC@cnMissingValFillColor=0</p><p class="gmail-p1">Dave said he would look into why this quirk is necessary for raster fill and maybe he'll post back here with an explanation.</p><p class="gmail-p1">Meanwhile, I'm going to update some of our examples to mention this so hopefully the next user won't run into this.</p><p class="gmail-p1">Your ICON example is very nice by the way!  Would you be willing to let me include it on our ICON examples page? If so, I may clean it up a little to add some comments and to remove the "do" loop since this is only one file.  I won't redistribute the data file. You can email me offline about this if desired.</p><p class="gmail-p1">--Mary</p><p class="gmail-p1"><br></p><p class="gmail-p1"><br></p><p class="gmail-p1" style="font-size:small"><br></p><p class="gmail-p1" style="font-size:small"><br></p>
<p class="gmail-p1" style="font-size:small"><br></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 2, 2017 at 9:44 AM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">I admit, I don't know what "the larger value" means in this case.  Dave would know, but I think he's out of the office for a few days. Did setting cnGridBoundFillColor fix anything?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If not, is it possible for you to provide the script/data? You can do this offline if necessary. I don't think we have any unstructured examples like this that have missing data.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 29, 2017 at 9:47 AM, Karin Meier-Fleischer <span dir="ltr"><<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    cnMissingValFillColor:<br>
    <br>
    ...<br>
    Also note that the
    triangular mesh contouring algorithm does not distinguish between
    missing value areas and areas outside the grid boundary. Therefore
    if <a href="http://ncl.ucar.edu/Document/HLUs/Classes/ContourPlot.shtml" target="_blank"><strong>ContourPlot</strong></a>
    is given non-rectangular data or <a href="http://ncl.ucar.edu/Document/Graphics/Resources/tr.shtml#trGridType" target="_blank"><em>trGridType</em></a>
    is explicitly set to <code>TriangularMesh</code>,
    the color index used will be the larger value of those assigned to
    the resources <a href="http://ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnMissingValFillColor" target="_blank"><em>cnMissingValFillColor</em></a>
    and
    <a href="http://ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnGridBoundFillColor" target="_blank"><em>cnGridBoundFillColor</em></a>.
    <br>
    <br>
    Maybe Mary, Dave or Rick can say somthing more about it.<br>
    <br>
    -Karin<br>
    <br>
    <div class="m_402152832625899825m_-8173734807525222472moz-cite-prefix">Am 29.09.17 um 17:23 schrieb Guido
      Cioni:<br>
    </div><div><div class="m_402152832625899825h5">
    <blockquote type="cite">
      
      Yep, and I still get the same behaviour :( 
      <div><br>
        <div>I also thought that was the case but then I read
          that "Transparent" is the default option for <span style="color:rgb(51,51,255)">cnMissingValFillColor</span>.</div>
        <div><br>
        </div>
        <div>Maybe it has something to do with the unstructured
          grid that I'm using? <br>
          <div><br>
            <div>
              <blockquote type="cite">
                <div>On 29. Sep 2017, at 17:14, Karin
                  Meier-Fleischer <<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>>
                  wrote:</div>
                <br class="m_402152832625899825m_-8173734807525222472Apple-interchange-newline">
                <div>
                  
                  <div text="#000000" bgcolor="#FFFFFF"> Hi
                    Guido, <span class="m_402152832625899825m_-8173734807525222472moz-smiley-s1"><span>:-)</span></span><br>
                    <br>
                    have you tried the cnMissingValFillColor resource to
                    set the color for missing value?<br>
                    <strong></strong><strong><br>
                      <font color="#3333ff"><tt> </tt></font></strong><font color="#3333ff"><tt>
                        ResC@cnFillPalette         = cmap_r<br>
                      </tt><tt>  ResC@cnMissingValFillColor = 0</tt></font><br>
                    <br>
                    Bye,<br>
                    Karin<br>
                    <strong><strong><br>
                      </strong></strong>
                    <div class="m_402152832625899825m_-8173734807525222472moz-cite-prefix">Am 29.09.17 um 16:55
                      schrieb Guido Cioni:<br>
                    </div>
                    <blockquote type="cite">
                      
                      Hi,
                      <div>I'm trying to plot filled contour of
                        wind speed overlaid on a map. In order to mask
                        small values of winds I've both masked the
                        original data and set the first color of the
                        color palette as transparent, i.e. </div>
                      <div><br>
                      </div>
                      <div>
                        <div><font face="Menlo">cmap_r=read_colormap_file("win<wbr>d_17lev")</font></div>
                        <div><font face="Menlo">cmap_r(0,3)=0.0</font></div>
                        <div><font face="Menlo">ResC@cnFillPalette=
                            cmap_r</font></div>
                      </div>
                      <div><br>
                      </div>
                      <div>However, when drawing with
                        ResC@cnFillMode = "RasterFill", this causes the
                        Missing Values to be coloured with white instead
                        that being transparent, as you can see in the
                        attached picture. </div>
                      <div><br>
                      </div>
                      <br>
                      <fieldset class="m_402152832625899825m_-8173734807525222472mimeAttachmentHeader"></fieldset>
                      <br>
                      
                      <div>Going back to old discussion this
                        seems to be an old problem that was fixed in
                        6.2.0. Am I wrong? </div>
                      <div><br>
                      </div>
                      <div>I'm attaching the script that I'm
                        using, although it is not 100% clean.</div>
                      <div>Cheers </div>
                      <br>
                      <fieldset class="m_402152832625899825m_-8173734807525222472mimeAttachmentHeader"></fieldset>
                      <br>
                      
                      <div>
                        <div>
                          <div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class="m_402152832625899825m_-8173734807525222472Apple-interchange-newline">
                            Guido Cioni</div>
                          <div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://guidocioni.altervista/" target="_blank">http://guidocioni.altervista</a>.o<wbr>rg</div>
                        </div>
                        <br>
                      </div>
                      <br>
                      <fieldset class="m_402152832625899825m_-8173734807525222472mimeAttachmentHeader"></fieldset>
                      <br>
                      <pre>______________________________<wbr>_________________
ncl-talk mailing list
<a class="m_402152832625899825m_-8173734807525222472moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a class="m_402152832625899825m_-8173734807525222472moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a>
</pre>
                    </blockquote>
                    <br>
                  </div>
                  ______________________________<wbr>_________________<br>
                  ncl-talk mailing list<br>
                  <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
                  List instructions, subscriber options, unsubscribe:<br>
                  <a class="m_402152832625899825m_-8173734807525222472moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
                </div>
              </blockquote>
            </div>
            <br>
            <div>
              <div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class="m_402152832625899825m_-8173734807525222472Apple-interchange-newline">
                Guido Cioni</div>
              <div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://guidocioni.altervista" target="_blank">http://guidocioni.altervista</a>.o<wbr>rg</div>
            </div>
            <br>
          </div>
        </div>
      </div>
    </blockquote>
  </div></div></div>

<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>