<div dir="ltr"><div><div><div><div><div>Sometimes the oldest debug tools (eg: print) can be used to check an issue:<br><br>         out1   = roms_3d_interp(his1,grid,variable,rec,depth)<br>         printVarSummary(out1)<br>         printMinMax(out1,1)<br><br>         print(out1(52:65,85:105))    ; print values in region with &#39;blank<br><br>Variable: OUT1<br>Type: float<br>Total Size: 32292 bytes<br>            8073 values<br>Number of Dimensions: 2<br>Dimensions and sizes:   [69] x [117]<br>Coordinates: <br>Number Of Attributes: 1<br>  _FillValue :  1e+37<br>(0)      <br>(0)     min=19.8764   max=26.2272<br><br><br>Variable: OUT1 (subsection)<br>Type: float<br>Total Size: 1176 bytes<br>            294 values<br>Number of Dimensions: 2<br>Dimensions and sizes:   [14] x [21]<br>Coordinates: <br>Number Of Attributes: 1<br>  _FillValue :  1e+37<br>(0,0)   25.70767<br>(0,1)   25.75091<br>(0,2)   25.79064<br>(0,3)   25.85184<br></div>[snip]<br>(2,5)   25.95704<br>(2,6)   25.99549<br>(2,7)   26.03482<br>(2,8)   1e+37          &lt;=====<br>(2,9)   1e+37<br>(2,10)  1e+37<br>(2,11)  1e+37<br>(2,12)  26.1619<br>(2,13)  26.16949<br>(2,14)  26.16148<br></div>[snip]<br>3,4)   25.89764<br>(3,5)   25.95115<br>(3,6)   1e+37<br>(3,7)   1e+37<br>(3,8)   1e+37<br>(3,9)   1e+37<br>(3,10)  1e+37<br>(3,11)  1e+37<br>(3,12)  1e+37<br>(3,13)  1e+37<br>(3,14)  1e+37<br>(3,15)  1e+37<br>(3,16)  1e+37<br>(3,17)  26.16814<br>(3,18)  26.16628<br>(3,19)  26.1693<br>(3,20)  26.16752<br>(4,0)   25.71928<br>(4,1)   25.74613<br>(4,2)   25.78636<br>(4,3)   25.83197<br>(4,4)   25.89648<br>(4,5)   1e+37<br>(4,6)   1e+37<br>(4,7)   1e+37<br>(4,8)   1e+37<br>(4,9)   1e+37<br>(4,10)  1e+37<br>(4,11)  1e+37<br>(4,12)  1e+37<br>(4,13)  1e+37<br>(4,14)  1e+37<br>(4,15)  1e+37<br>(4,16)  1e+37<br>(4,17)  1e+37<br>(4,18)  1e+37<br>(4,19)  26.17847<br>(4,20)  26.19264<br>(5,0)   25.70962<br>(5,1)   25.73441<br>(5,2)   25.76884<br>(5,3)   25.8217<br>(5,4)   25.87821<br>(5,5)   1e+37<br>(5,6)   1e+37<br>(5,7)   1e+37<br></div>[SNIP]<br><br><span><span>re: &quot;I can</span> <span>usually</span> <span>plot</span> <span>in other</span> <span>languages (</span><span>matlab,</span> <span>for example)...&quot;<br><br></span></span></div><span><span>If that region is being plotted, then Matlab is filling the region.<br><br></span></span></div><span><span>Good luck<br></span></span><div><div><div><div><br><div><br><br><br><br><br><br></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 3, 2016 at 6:16 AM,  <span dir="ltr">&lt;<a href="mailto:leilane.passos@inpe.br" target="_blank">leilane.passos@inpe.br</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
<p>Hi,</p>
<p><span><span> </span></span><span><span>I&#39;m</span> <span>plotting</span> <span>sea </span><span>surface temperature</span> <span>from</span> <span>an output of the</span> <span>ROMS</span><span>, but a</span> <span>plot</span> <span>region</span> <span>is completely</span> <span>white</span><span>.</span> <span>I checked the</span> <span>file and it</span> <span>is correct</span><span>, I can</span> <span>usually</span> <span>plot</span> <span>in other</span> <span>languages (</span><span>matlab,</span> <span>for example), the problem occurs after calling the script Roms_utils.ncl (<a href="https://www.ncl.ucar.edu/Applications/Scripts/ROMS_utils.ncl" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/Scripts/ROMS_<wbr>utils.ncl</a>).</span><br></span></p>
<p><span><span>I had to make 2 modifications to be able to use this script:<br></span></span></p>
<p><span><span>1 - comment some lines: 5-133 - <span><span>I do not know</span> <span>why, but</span> <span>the script</span> <span>does not run</span> <span>if these</span> <span>lines are</span> <span>uncommented</span><span>.</span></span><br></span></span></p>
<p><span><span>2 - add another parameter to call function roms_3d_interp: in my case the variable h (Final bathymetry at RHO-points) and the variable that will be interpolated (temp: time-averaged potential temperature) don&#39;t be in the same file. h is in </span></span>my <strong>grid file</strong> and temp is in the <strong>output model file</strong>. So, <span><span>I added</span> <span>a new parameter</span> <span>when I calling</span> <span>the function -  the file_grid</span></span>:</p>
<p><span style="color:#808080">137</span>  <span style="color:#ff0000">function</span> roms_3d_interp( file_handle, <strong>file_grid</strong>, var:string, \<br><span style="color:#808080">138</span>  rec:integer, z:numeric )</p>
<p>and I changed the lines 166-176 and 208: <span><span>to call</span> <span>the file</span> <span>that contains the variable h</span></span></p>
<p><span><span><span style="color:#808080">166  </span>if(typeof(file_grid).eq.&quot;file&quot;<wbr>) then<br><span style="color:#808080">167  </span>    ISFILE = True<br><span style="color:#808080">168  </span>    nc_grid = file_grid<br><span><span><span style="color:#808080">169  </span></span></span>  else if(typeof(file_grid).eq.&quot;list&quot;<wbr>) then<br><span><span><span style="color:#808080">170</span></span></span>      ISFILE = False<br><span><span><span style="color:#808080">171  </span></span></span>    nc_grid = file_grid[0]<br><span><span><span style="color:#808080">172</span></span></span>    else<br><span><span><span style="color:#808080">173  </span></span></span>    print(&quot;roms_interp_3d: error: the first argument must be a file or a list of files opened with addfile or addfiles&quot;)<br><span><span><span style="color:#808080">174</span></span></span>      return<br><span><span><span style="color:#808080">175</span></span></span>    end if<br><span><span><span style="color:#808080">176</span></span></span>  end if</span></span></p>
<p><span><span>...<br></span></span></p>
<p><span style="color:#808080">208</span>   if(isfilevar(<strong>nc_grid</strong>,&quot;h&quot;))</p>
<p> </p>
<p>After this function a region with constant temperature is interpolated with missing values. The figures and the scripts are attached.  The files: nested_avg_19811216_LEILANE.nc and mesh_donor_grd_004nested_</p>
<div>LEILANE.nc are in the FTP server. My NCL version is 6.3.0.</div>
<div> </div>
<div><span><span>I&#39;m new in NCL and I</span><span>&#39;ll appreciate</span> <span>any help</span></span>.</div>
<div> </div>
<div> </div>
<div>Best regards.</div>
<div> </div>
<div>Leilane</div>
<p> </p>
<p><span><span> </span></span></p>
<p><span><span> </span></span></p>
<div> </div>
</div>
<br>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>