<div dir="ltr"><div>Dear NCL users,</div><div>I use the function &quot;int2p&quot; to interpolate data to the specified pressure levels.</div><div>I expect that there is no missing value in my output.</div><div><br></div><div>But I found something strange:</div><div>[1] There are 3 or 4 missing outputs but they all have values before interpolate.</div><div>[2] Some output become missing when I change the range of interpolation. (new pressure level set 237.5)</div><div><br></div><div><br></div><div>This is data:</div><div>pressure (FillValue 9999): </div><div>(0)<span class="" style="white-space:pre">        </span>1008</div><div>(1)<span class="" style="white-space:pre">        </span>1002.5</div><div>[SNIP]</div><div>(524)<span class="" style="white-space:pre">        </span>48.1</div><div>(525)<span class="" style="white-space:pre">        </span>47.8</div><div><br></div><div>altitude (FillValue 99999):</div><div>(0)<span class="" style="white-space:pre">        </span> 4</div><div>(1)<span class="" style="white-space:pre">        </span>52.5</div><div>[SNIP]</div><div>(524)<span class="" style="white-space:pre">        </span>20839.2</div><div>(525)<span class="" style="white-space:pre">        </span>20884.3</div><div><br></div><div><br></div><div>This is my script:</div><div>begin</div><div>;--- load data ---;</div><div>iFil = addfile(&quot;<a href="http://sounding_zc081041.nc">sounding_zc081041.nc</a>&quot;,&quot;r&quot;)</div><div>p_in = iFil-&gt;pressure</div><div>a_in = iFil-&gt;altitude</div><div><br></div><div>;--- new pressure levels ---;</div><div>p_out1 = fspan(87.5,987.5,37)</div><div>p_out2 = fspan(112.5,987.5,36)</div><div><br></div><div>;--- interpolate to new pressure levels ---;</div><div>a_out1= int2p(p_in,a_in,p_out1,2)</div><div>a_out2= int2p(p_in,a_in,p_out2,2)</div><div><br></div><div>;-- results ---;</div><div>print(&quot;Result: 1&quot;)</div><div>print(p_out1+&quot; &quot;+a_out1)</div><div>print(&quot; &quot;)</div><div>print(&quot;Result: 2&quot;)</div><div>print(p_out2+&quot; &quot;+a_out2)</div><div>end</div><div>;---end of the script ---;</div><div><br></div><div>This is the output.</div><div>Most of the outputs looks well.</div><div>I use the brackets to highlight strange outputs.</div><div><br></div><div>(0)<span class="" style="white-space:pre">        </span>Result: 1</div><div>(0)<span class="" style="white-space:pre">        </span>87.5 17311.2</div><div>(1)<span class="" style="white-space:pre">        </span>112.5 15936.5</div><div>[SNIP]</div><div>(5)<span class="" style="white-space:pre">        </span>212.5 12072.7</div><div>(6)<span class="" style="white-space:pre">        </span>237.5 99999 &lt;=== [1,2]</div><div>(7)<span class="" style="white-space:pre">        </span>262.5 10648.4</div><div>(8)<span class="" style="white-space:pre">        </span>287.5 10014.1</div><div>(9)<span class="" style="white-space:pre">        </span>312.5 9419.78</div><div>(10) 337.5 99999 &lt;=== [1]</div><div>(11) 362.5 8336.37</div><div>(12) 387.5 99999 &lt;=== [1]</div><div>(13) 412.5 7364.7</div><div>[SNIP]</div><div>(24) 687.5 3296.85</div><div>(25) 712.5 99999 &lt;=== [1]</div><div>(26) 737.5 2708.44</div><div>[SNIP]</div><div>(35) 962.5 414.551</div><div>(36) 987.5 187.77</div><div>(0)</div><div>(0)<span class="" style="white-space:pre">        </span>Result: 2</div><div>(0)<span class="" style="white-space:pre">        </span>112.5 15936.5</div><div>(1)<span class="" style="white-space:pre">        </span>137.5 14779.8</div><div>[SNIP]</div><div>(4)<span class="" style="white-space:pre">        </span>212.5 12072.7</div><div>(5)<span class="" style="white-space:pre">        </span>237.5 11330 &lt;=== [2]</div><div>(6)<span class="" style="white-space:pre">        </span>262.5 10648.4</div><div>(7)<span class="" style="white-space:pre">        </span>287.5 10014.1</div><div>(8)<span class="" style="white-space:pre">        </span>312.5 9419.78</div><div>(9)<span class="" style="white-space:pre">        </span>337.5 99999 &lt;=== [1]</div><div>(10) 362.5 8336.37</div><div>(11) 387.5 99999 &lt;=== [1]</div><div>(12) 412.5 7364.7</div><div>[SNIP]</div><div>(23) 687.5 3296.85</div><div>(24) 712.5 99999 &lt;=== [1]</div><div>(25) 737.5 2708.44</div><div>[SNIP]</div><div>(34) 962.5 414.551</div><div>(35) 987.5 187.77</div><div><br></div><div>And I checked the source data.</div><div>The source data looks well.</div><div><br></div><div>$ ncl</div><div> NCAR Command Language Version 6.3.0 </div><div>ncl 0&gt; f=addfile(&quot;<a href="http://sounding_zc081041.nc">sounding_zc081041.nc</a>&quot;,&quot;r&quot;)</div><div>ncl 1&gt; p=f-&gt;pressure</div><div>ncl 2&gt; a=f-&gt;altitude</div><div>ncl 3&gt; print(p+&quot; &quot;+a)</div><div>(0)<span class="" style="white-space:pre">        </span>1008 4</div><div>(1)<span class="" style="white-space:pre">        </span>1002.5 52.5</div><div>[SNIP]</div><div>(82)<span class="" style="white-space:pre">        </span>715.4 2964</div><div>(83)<span class="" style="white-space:pre">        </span>712.5 2998.3 &lt;===</div><div>(84)<span class="" style="white-space:pre">        </span>709.5 3034.1</div><div>[SNIP]</div><div>(219)<span class="" style="white-space:pre">        </span>389.2 7804.3</div><div>(220)<span class="" style="white-space:pre">        </span>387.5 7839 &lt;===</div><div>(221)<span class="" style="white-space:pre">        </span>385.6 7875.7</div><div>[SNIP]</div><div>(245)<span class="" style="white-space:pre">        </span>339.4 8821.9</div><div>(246)<span class="" style="white-space:pre">        </span>337.5 8863.1 &lt;===</div><div>(247)<span class="" style="white-space:pre">        </span>335.4 8908.6</div><div>[SNIP]</div><div>(305)<span class="" style="white-space:pre">        </span>239.1 11286.2</div><div>(306)<span class="" style="white-space:pre">        </span>237.5 11330 &lt;===</div><div>(307)<span class="" style="white-space:pre">        </span>236 11375</div><div>[SNIP]</div><div>(524)<span class="" style="white-space:pre">        </span>48.1 20839.2</div><div>(525)<span class="" style="white-space:pre">        </span>47.8 20884.3</div><div><br></div><div>I uploaded my data to <a href="http://ftp.cgd.ucar.edu">ftp.cgd.ucar.edu</a>.</div><div>File name is &quot;<a href="http://sounding_zc081041.nc">sounding_zc081041.nc</a>&quot;.</div><div><br></div><div>I also put same data on the dropbox.</div><div><a href="https://www.dropbox.com/s/lj3l1lj70r2n95w/sounding_zc081041.nc?dl=0">https://www.dropbox.com/s/lj3l1lj70r2n95w/sounding_zc081041.nc?dl=0</a></div><div><br></div><div>Thank you for any suggestion.</div><div><br></div><div>best regards,</div><div>Wei-Jen</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">







<p></p><p style="font-family:arial;font-size:small">Wei-Jen Tseng</p><p style="font-family:arial;font-size:small">Department of Atmosphere Sciences, National Taiwan University</p><p style="font-family:arial;font-size:small">Email: <a href="mailto:tseng.weijen@gmail.com" style="color:rgb(17,85,204)" target="_blank">tseng.weijen@gmail.com</a></p><p></p></div></div>
</div>