<html><head></head><body><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
        <div><span><div style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif; font-size: 16px;"><div><span style="color: rgb(38, 40, 42);">Hi,</span></div><div><span style="color: rgb(38, 40, 42);">Again Thank you so much for your helpful comments.</span><br></div></div><div id="ydp68cf5210yahoo_quoted_7529853277" class="ydp68cf5210yahoo_quoted" style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif; font-size: 16px;"><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; color: rgb(38, 40, 42);"><div id="ydp68cf5210yiv7470115850"><div style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;"><div>Unfortunately after a few days I still have problem with interpolating data on station points. In spite of using "poisson_grid_fill" and "linmsg" to avoid getting Fill_Value on unstructured points, these don't work; all values for all dates and all points are Fill_value (-0.099900) (attached file: 20_SMOPS_Interp.txt). Could I have any suggestion to get interpolated values other than "-0.099900". I've used this script for some data set and it helps me a lot. But for some data set, like SMOPS data, it gives me just Fill_Value.</div><div>I know using "knnsearch" in matlab gives values except "-0.099900", however I want to interpolate with ncl.</div><div>I've attached the script (20_SMOPS_Interp.ncl) and also station points (2_stations.dat) and output file (20_SMOPS_Interp.txt). I've also put zipped input data (SMOPS_Data.tgz) on ftp.</div><div><br clear="none"></div><div>I'll be thankful for any help.</div><div><br clear="none"></div><div>Sincerely</div><div>Ehsan</div></div></div></div></div></span><br></div><div><br></div>
        
        </div><div id="yahoo_quoted_7180615196" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Friday, September 7, 2018, 8:25:16 PM GMT+4:30, Dennis Shea <shea@ucar.edu> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="yiv2670303291"><div><div dir="ltr"><div>[1] No</div><div>[2] Yes<br clear="none"></div><div><br clear="none"></div><div><pre>      nlat = 720<br clear="none">      latitude = <b>fspan</b>(-49.875, 49.875, nlat)<br clear="none">      latitude@units = "<b>degrees_north</b>"<br clear="none">      latitude@long_name = "latitude"<br clear="none">      latitude!0        = "latitude"<br clear="none">      latitude&latitude =  latitude<br clear="none"></pre><pre>      printVarSummary(latitude)<br clear="none">      printMinMax(latitude,0)<br clear="none"><br clear="none"></pre><pre>      mlon = 1440
      longitude  = <a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/lonGlobeFo.shtml"><b>lonGlobeFo</b></a>(mlon, "longitude", "longitude", "degrees_east")  ; 0->360<br clear="none">      longitude  = (/ longitude - 180. /)  ; subtract 180 from all values 
      longitude&longitude = longitude            ; update coordinates       printVarSummary(lon)<br clear="none">   <br clear="none">      printVarSummary(longitude)<br clear="none">      printMinMax(longitude,0)<br clear="none"><br clear="none"></pre><pre>      f = <b>addfile</b>("NPR_SMOPS_CMAP_D20170<a rel="nofollow" shape="rect" target="_blank" href="http://410.nc"> 410.nc</a>","r")<br clear="none">      x = <a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml"><b>short2flt</b></a>( f->Blended_SM )<br clear="none"></pre><pre>      x&latitude = latitude<br clear="none">      x&longitude = longitude <br clear="none"></pre><pre>      printVarSummary(x)<br clear="none"><br clear="none">[3]/[4]<br clear="none"></pre><pre>      xo = .... longitudes of land points...<br clear="none"></pre><pre>      yo = ... latitudes ....<br clear="none"></pre><pre>      xpts = <strong>linint2_points</strong>(x&longitude,x&latitude,x, False, xo,yo, 0)<br clear="none"></pre><pre>      printVarSummary(xpts)<br clear="none"></pre><pre>      printMinMax(xpts,0)<br clear="none"></pre><br clear="none"></div></div><div class="yiv2670303291gmail_extra"><br clear="none"><div class="yiv2670303291gmail_quote">On Tue, Sep 4, 2018 at 5:50 AM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"><blockquote class="yiv2670303291gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv2670303291yqt7914602477" id="yiv2670303291yqt43162"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div style="font-size:16px;"><div style="font-size:16px;"><div id="yiv2670303291m_-7665546919046516254ydp2d0caccyiv1638557123"><div style="font-size:16px;"><div style="font-size:16px;"><div id="yiv2670303291m_-7665546919046516254ydp2d0caccyiv1638557123ydp541e2203yiv1133628391"><div><div style=""><span style="">Thank you so much for your nice reply, as always.</span><br clear="none"></div><div style=""><font size="3" face="times new roman, new york, times, serif">I did your comments, however I encountered some difficulties and I'll be thankful if I could have any help about them, too.</font></div><div style=""><font size="3" face="times new roman, new york, times, serif"><br clear="none"></font></div><div style=""><font size="3" face="times new roman, new york, times, serif">1. Should I change</font></div><span class="yiv2670303291"></span><div style=""><font size="3" face="courier new, courier, monaco, monospace, sans-serif"><span style="background-color:rgb(253,248,105);"></span></font><pre style="white-space:pre-wrap;color:rgb(0,0,0);"><font style="background-color:rgb(253,248,105);" size="3" face="courier new, courier, monaco, monospace, sans-serif">latitude = <b>fspan</b>(-49.875, 49.875, nlat)</font></pre></div><div><font size="3" face="times new roman, new york, times, serif">to</font></div><div><font style="" size="2" face="times new roman, new york, times, serif"><span></span></font><pre style=""><font style="background-color:rgb(253,248,105);" size="3" face="courier new, courier, monaco, monospace, sans-serif">latitude = <b>fspan</b>(-89.875, 89.875, nlat)</font></pre><div><font size="3" face="times new roman, new york, times, serif">or like longitude, use</font></div><div style=""><span></span><pre style="margin-top:0px;margin-bottom:0px;padding:0px;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;color:rgb(0,0,0);"><span style="background-color:rgb(253,248,105);"><font size="3">lat  = <strong style="margin:0px;padding:0px;">latGlobeFo</strong>(nlat, "lat", "latitude", "degrees_north")</font></span></pre><br clear="none"></div><font size="3" face="times new roman, new york, times, serif">2. Should I change</font></div><div style="font-size:16px;"><font style="" size="2" face="times new roman, new york, times, serif"><span style="background-color:rgb(253,248,105);"></span></font><pre style=""><font style="background-color:rgb(253,248,105);" face="courier new, courier, monaco, monospace, sans-serif">latitude@units = "degrees_east"</font></pre><span style="background-color:rgb(255,255,255);"><font face="times new roman, new york, times, serif">to</font></span></div><div style=""><font size="2" face="times new roman, new york, times, serif"><span></span></font><pre style="white-space:pre-wrap;"><font style="background-color:rgb(253,248,105);" face="courier new, courier, monaco, monospace, sans-serif">latitude@units = "degrees_north"</font></pre><br clear="none"></div><div><font size="3" face="times new roman, new york, times, serif"><span></span></font><div><font size="3" face="times new roman, new york, times, serif">3. How should I control FillValue (-999s), because after running ncl script, it writes -0.1 for Nan value of the data, both in grided and interpolated output files.</font></div><div><font size="3" face="times new roman, new york, times, serif">4. However the most difficulty is the interpolating part, because all interpolated values for all station points got -0.1, means Nan. There is no value except -0.1 for any station points. Could anybody help me about this?</font></div><div><font size="3" face="times new roman, new york, times, serif">I've attached the output of interpolated file. I'll be thankful for any help.</font></div><div><font size="3" face="times new roman, new york, times, serif"><br clear="none"></font></div><div><font face="times new roman, new york, times, serif">Sincerely<br clear="none"></font></div></div><div><font size="3" face="times new roman, new york, times, serif">Ehsan</font></div><div style=""><br clear="none"></div></div><div class="yiv2670303291m_-7665546919046516254ydp2d0caccyiv1638557123ydp541e2203yiv1133628391yahoo_quoted" id="yiv2670303291m_-7665546919046516254ydp2d0caccyiv1638557123ydp541e2203yiv1133628391yahoo_quoted_6583562785" style="">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                </div></div></div></div><div class="yiv2670303291m_-7665546919046516254ydp2d0caccyiv1638557123yqt3572844941" id="yiv2670303291m_-7665546919046516254ydp2d0caccyiv1638557123yqtfd53451" style=""></div></div></div></div></div><div class="yiv2670303291m_-7665546919046516254yiv1638557123yqt8965435499" id="yiv2670303291m_-7665546919046516254yiv1638557123yqtfd57951"><div><div class="yiv2670303291h5"><div>
                    On Friday, August 31, 2018, 6:14:53 PM GMT+4:30, Dennis Shea <<a rel="nofollow" shape="rect" ymailto="mailto:shea@ucar.edu" target="_blank" href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:
                </div>
                <div><br clear="none"></div>
                <div><br clear="none"></div>
                </div></div><div><div id="yiv2670303291m_-7665546919046516254yiv1638557123"><div><div><div class="yiv2670303291h5"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Sometimes, you have to read documentation associated with the file(s)<br clear="none"><span class="yiv2670303291m_-7665546919046516254yiv1638557123gmail-st"><em>Soil Moisture</em> Operational Products System (<b><em>SMOPS</em></b>)</span><br clear="none"><br clear="none">The file has:<br clear="none"><br clear="none">netcdf NPR_SMOPS_CMAP_D20170410 {<br clear="none">dimensions:<br clear="none"><b>        Longitude = 1440 ;<br clear="none">        Latitude = 720 ;</b><br clear="none">variables:<br clear="none">        <b>short</b> Blended_SM(<b>Latitude, Longitude</b>) ;<br clear="none">                Blended_SM:long_name = "Blended Soil Moisture" ;<br clear="none">                Blended_SM:units = "m^3/m^3" ;<br clear="none">                Blended_SM:FillValue = -999s ;<br clear="none">                Blended_SM:valid_range = 0s, 10000s ;<br clear="none">                Blended_SM:<b>scale_factor </b>= 0.0001f ;<br clear="none">                Blended_SM:<b>add_offset</b> = 0.f ;<br clear="none"><br clear="none"></div><div>[SNIP]<br clear="none">                :Product_Resolution = "0.25 degree" ;<br clear="none">                :Date_Start = "20170410" ;<br clear="none">                :Date_End = "20170410" ;<br clear="none"></div><div>[SNIP]<br clear="none"></div><div> ====<br clear="none"></div><div>It does not have Latitude[*] and Longitude[*] coordinates. However, <b>*you*</b> can create them. Then, use ESMF or (say)<a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/linint2_Wrap.shtml"><b> linint2_Wrap </b></a>or <a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/linint2_points_Wrap.shtml"><b>linint2_points_Wrap</b></a> to perform the interpolation.<br clear="none"><br clear="none">====<br clear="none"><pre>      nlat = 720<br clear="none">      latitude = <b>fspan</b>(-49.875, 49.875, nlat)<br clear="none">      latitude@units = "degrees_east"<br clear="none">      latitude@long_name = "latitude"<br clear="none">      latitude!0        = "latitude"<br clear="none">      latitude&latitude =  latitude<br clear="none"></pre><pre>      printVarSummary(latitude)<br clear="none">      printMinMax(latitude,0)<br clear="none"><br clear="none"></pre><pre>      mlon = 1440
      longitude  = <a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/lonGlobeFo.shtml"><b>lonGlobeFo</b></a>(mlon, "longitude", "longitude", "degrees_east")  ; 0->360<br clear="none">      longitude  = (/ longitude - 180. /)  ; subtract 180 from all values 
      longitude&longitude = longitude            ; update coordinates       printVarSummary(lon)<br clear="none">   <br clear="none">      printVarSummary(longitude)<br clear="none">      printMinMax(longitude,0)<br clear="none"><br clear="none"></pre><pre>      f = <b>addfile</b>("NPR_SMOPS_CMAP_D20170<a rel="nofollow" shape="rect" target="_blank" href="http://410.nc"> 410.nc</a>","r")<br clear="none">      x = <a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml"><b>short2flt</b></a>( f->Blended_SM )<br clear="none"></pre><pre>      x&latitude = latitude<br clear="none">      x&longitude = longitude <br clear="none"></pre><pre>      printVarSummary(x)<br clear="none"></pre><pre>    <br clear="none"></pre></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div class="yiv2670303291m_-7665546919046516254yiv1638557123gmail_extra"><br clear="none"><div class="yiv2670303291m_-7665546919046516254yiv1638557123gmail_quote"><div><div class="yiv2670303291h5">On Fri, Aug 31, 2018 at 5:45 AM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"></div></div><blockquote class="yiv2670303291m_-7665546919046516254yiv1638557123gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv2670303291m_-7665546919046516254yiv1638557123yqt7432983737" id="yiv2670303291m_-7665546919046516254yiv1638557123yqt23358"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div>Hi,</div><div>Until now I've asked some questions related to interpolating some dataset on some unstructured points (synoptic stations). Now I have a new data set which I'm not sure about appropriate method to interpolating. I put one of my data (<span>NPR_SMOPS_CMAP_D20170410.nc</span>) in <span style="font-family:courier;font-size:13.3333px;white-space:pre-wrap;"><a rel="nofollow" shape="rect" target="_blank" href="http://ftp.cgd.ucar.edu">ftp.cgd.ucar.edu</a>. <span><span style="color:rgb(0,0,0);">I'll be thankful if some one could refer me to correct script, like on (</span></span></span><a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Applications/ESMF.shtml">https://www.ncl.ucar.edu/ Applications/ESMF.shtml</a><span style="font-family:courier;font-size:13.3333px;white-space:pre-wrap;"><span><span style="color:rgb(0,0,0);">) or (</span></span></span><a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Applications/regrid.shtml">https://www.ncl.ucar.edu/ Applications/regrid.shtml</a><span style="font-family:courier;font-size:13.3333px;white-space:pre-wrap;"><span><span style="color:rgb(0,0,0);">), which interpolates my data on some special unstructured points.</span></span></span></div><span class="yiv2670303291"></span><div><span style="font-family:courier;font-size:13.3333px;white-space:pre-wrap;"><span><span style="color:rgb(0,0,0);">However the printVarSummary(<span>Blended_SM</span>) result is as below:</span></span></span></div><div><span style="font-family:courier;font-size:13.3333px;white-space:pre-wrap;"><span><span style="color:rgb(0,0,0);"><br clear="none"></span></span></span></div><div><span style="font-size:13.3333px;white-space:pre-wrap;"><span style="color:rgb(0,0,0);font-size:16px;"></span></span><div><font face="times new roman, new york, times, serif">Variable: <span style="color:rgb(0,0,0);font-size:16px;white-space:pre-wrap;">Blended_SM</span></font></div><div><font face="times new roman, new york, times, serif">Type: float</font></div><div><font face="times new roman, new york, times, serif">Total Size: 4147200 bytes</font></div><div><font face="times new roman, new york, times, serif">            1036800 values</font></div><div><font face="times new roman, new york, times, serif">Number of Dimensions: 2</font></div><div><font face="times new roman, new york, times, serif">Dimensions and sizes:   [Latitude | 720] x [Longitude | 1440]</font></div><div><font face="times new roman, new york, times, serif">Coordinates:</font></div><div><font face="times new roman, new york, times, serif">Number Of Attributes: 5</font></div><div><font face="times new roman, new york, times, serif">  _FillValue :  1e+20</font></div><div><font face="times new roman, new york, times, serif">  long_name :   Blended Soil Moisture</font></div><div><font face="times new roman, new york, times, serif">  units :       m^3/m^3</font></div><div><font face="times new roman, new york, times, serif">  FillValue :   -999</font></div><div><font face="times new roman, new york, times, serif">  valid_range : (  0,  1 )</font></div><div><br clear="none"></div><br clear="none"></div><div><span style="white-space:pre-wrap;">Sincerely</span><span class="yiv2670303291m_-7665546919046516254yiv1638557123HOEnZb"><font color="#888888"><br clear="none"></font></span></div><span class="yiv2670303291m_-7665546919046516254yiv1638557123HOEnZb"><font color="#888888"></font></span><div><span style="font-family:courier;font-size:13.3333px;white-space:pre-wrap;"><span><span style="color:rgb(0,0,0);">Ehsan</span></span></span></div></div></div></div><span class="yiv2670303291"><br clear="none">______________________________ _________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/ mailman/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></span></blockquote></div><br clear="none"></div></div></div></div>
            </div><div class="yiv2670303291m_-7665546919046516254yiv1638557123yqt8965435499" id="yiv2670303291m_-7665546919046516254yiv1638557123yqtfd12555"><div class="yiv2670303291m_-7665546919046516254yiv1638557123yqt3572844941" id="yiv2670303291m_-7665546919046516254yiv1638557123yqtfd22236">
        </div></div></div></div></div><br clear="none">______________________________ _________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/ mailman/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div></div>
            </div>
        </div></div></body></html>