<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>Thank you for your help.</div><div>I'd used ncl scrip which was written by ncl-talk group, to interpolate GPM data to station points, in ASCII format.</div><div>After finishing work, and sending paper to journal, referee wants to know the effect of other interpolating methods. So I decided to use some other methods to interpolate GPM data on station points.</div><div>I've tried <span><span style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">ESMF regridding library</span></span> as you suggested. However I faced the error:</div><div>"<span>ESMF_regrid_gen_weights: 'ESMF_RegridWeightGen' was not successful.</span>"</div><div>Beside that I have to write output file in ASCII format.</div><div>I've attached first script (<span>Interpolating_bilinear.ncl</span>) which works correctly via bilinear method, and second script (<span>Interpolating_ESMF.ncl</span>) which uses ESMF regridding. Also input data are attached (<span>GPM_IMERGV04DE_20160401_20170228 directory and <span>stations_NW.csv file which contains destination lat/lon</span></span>).</div><div>Could I have your help to modify "<span><span style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif; font-size: 16px;">Interpolating_ESMF.ncl</span></span>" to use different interpolating methods (<span>bilinear", "neareststod", "patch"</span>)?</div><div>Also could I have your opinion to answer the referee about using different interpolating methods? Is it necessary to use different interpolating methods and comparing them?</div><div><br></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div>$ ncl -V</div><div>    6.5.0</div><div>$ uname -a</div><div><span>    Linux localhost.localdomain 3.10.0-514.2.2.el7.x86_64 #1 SMP Tue Dec 6 23:06:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux</span></div><div><span>$ <span><span style="color: rgb(51, 51, 51); font-family: verdana, sans-serif; font-size: 13.3333px;">gcc --version</span></span></span></div><div><span><span><span style="color: rgb(51, 51, 51); font-family: verdana, sans-serif; font-size: 13.3333px;">    <span>gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)</span><br></span></span></span></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br></div><div><br></div><div>Sincerely</div><div>Ehsan</div><div><br></div>
        
        </div><div id="yahoo_quoted_2548715756" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Thursday, July 19, 2018, 10:22:38 PM GMT+4:30, Dennis Shea <shea@ucar.edu> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="yiv8603990973"><div><div dir="ltr">Without the printVarSummary() of your 'z' variable, it is hard to tell what the problem might be:<br clear="none"><br clear="none">function dspnt2 (<br clear="none">                x  [*] : numeric,  <br clear="none">                y  [*] : numeric,<br clear="none">                z      : numeric,  <br clear="none">                xo [*] : numeric,  <br clear="none">                yo [*] : numeric<br clear="none">        )<br clear="none"><div><br clear="none"></div><div>This assumes a cartesian grid. Still: lon[*] and lat[*] are commonly input to the function as x[*] and y[*]<br clear="none"><br clear="none"></div><div>=====<br clear="none">However, I am not evne going to deall with the 'dspnt2. Please use the ESMF regridding library.<br clear="none"><br clear="none"><br clear="none">  <a rel="nofollow" shape="rect" target="_blank" href="http://www.ncl.ucar.edu/Applications/ESMF.shtml">http://www.ncl.ucar.edu/ Applications/ESMF.shtml</a><br clear="none"><br clear="none"></div><div>Something like:<br clear="none"><br clear="none"></div><div>    var = f->FOO    <br clear="none"></div><div>    printVarSummary(var)<br clear="none"></div><div>    printMinMax(var,0)<br clear="none"></div><div><br clear="none">    interp_method  = "bilinear"   ; "neareststod", "patch"<br clear="none">    wgt_file_name  = "wgt.ESHAN_"+interp_method+".nc" <pre>  Opt                 = True
  Opt@SrcGridLat      = lat     ; rectilinear lat[*]
  Opt@SrcGridLon      = lon     ;      "      lon[*]<br clear="none">
  Opt@DstGridLat      = ulat    ; unstructured latitudes  
  Opt@DstGridLon      = ulon    ;      "       longitudes<br clear="none"> <br clear="none">  Opt@InterpMethod    = interp_method
<br clear="none">  Opt@WgtFileName     = wgt_file_name<br clear="none"><br clear="none">  <br clear="none">  var_regrid = ESMF_regrid(var,Opt)     ; Do the regridding</pre><div>    printVarSummary(var_regrid))<br clear="none"></div>    printMinMax(var_regrid,0)<br clear="none"><br clear="none"></div><div>PLEASE *CAREFULLY* READ the documentation and examples.<br clear="none"><br clear="none"></div></div><div class="yiv8603990973gmail_extra"><br clear="none"><div class="yiv8603990973gmail_quote">On Thu, Jul 19, 2018 at 2:04 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="yiv8603990973gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv8603990973yqt2701789277" id="yiv8603990973yqt76609"><div><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;">Hi,</div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;">Is there any interpolation method from <span><span style="color:rgb(51,51,51);font-family:verdana, sans-serif;font-size:13.3333px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-color:initial;display:inline!important;float:none;">rectilinear grid to an unstructured grid</span></span> other than <span><span style="color:rgb(51,51,51);font-family:verdana, sans-serif;font-size:13.3333px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-color:initial;display:inline!important;float:none;">bilinear interpolation</span></span> in NCL, like kriging, nearest point, etc? However I found this link (<a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Support/talk_archives/2011/0595.html">https://www.ncl.ucar.edu/ Support/talk_archives/2011/ 0595.html</a>) which states "<span><span style="color:rgb(0,0,0);">There is no kriging interpolation function in NCL</span></span>".</div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;">Beside that could "dspnt2" be used to interpolate <span>from <span><span style="color:rgb(51,51,51);font-family:verdana, sans-serif;font-size:13.3333px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-color:initial;display:inline!important;float:none;">rectilinear grid to an unstructured grid</span></span></span>? However it seems it couldn't and following error is the subject "<span>fatal:dspnt2: the rightmost dimension of z must be the same as the dimension of x and y</span>".</div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><br clear="none"></div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;">I'll be thankful for any help.</div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><br clear="none"></div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;">Sincerely</div><span class="yiv8603990973HOEnZb"><font color="#888888"></font></span><div style="font-family:bookman old style, new york, times, serif;font-size:16px;">Ehsan<br clear="none"></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>