<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 so much for your help.</div><div>The script works now, correctly.</div><div>1- However could I ask what the main reason(s) for the difference between "<span>linint2_points</span>" and "<span>bilinear</span>" in "<span>ESMF_regrid</span>"<span><span style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif; font-size: 16px;"> is(are)</span></span>? I mean why the outputs of these two methods are different?</div><div>I took a glance on these pages: "<a href="http://www.ncl.ucar.edu/Applications/ESMF.shtml" rel="nofollow" target="_blank">http://www.ncl.ucar.edu/Applications/ESMF.shtml</a>", "<a href="http://earthsystemmodeling.org/esmf_releases/non_public/ESMF_6_1_1/ESMF_refdoc/node5.html#SECTION05012600000000000000" rel="nofollow" target="_blank">http://earthsystemmodeling.org/esmf_releases/non_public/ESMF_6_1_1/ESMF_refdoc/node5.html#SECTION05012600000000000000</a>", "<a href="http://earthsystemmodeling.org/esmf_releases/non_public/ESMF_6_1_1/ESMF_refdoc/node5.html#SECTION05012600000000000000" rel="nofollow" target="_blank">http://earthsystemmodeling.org/esmf_releases/non_public/ESMF_6_1_1/ESMF_refdoc/node5.html#SECTION05012600000000000000</a>" and they help me a lot.</div><div><br></div><div>2- Beside that why the following two lines have to be commented?</div><div>"<span><div>;    setfileoption("nc", "FileStructure", "Advanced")</div><div>;    setfileoption("nc", "Format",  "NetCDF4Classic")<br></div><div>"<br></div></span></div><div>Albeit there isn't setfileoption in examples like this "<a href="http://www.ncl.ucar.edu/Applications/Scripts/ESMF_regrid_13.ncl" rel="nofollow" target="_blank">http://www.ncl.ucar.edu/Applications/Scripts/ESMF_regrid_13.ncl</a>".</div><div><br></div><div>Sincerely</div><div>Ehsan</div>
        
        </div><div id="yahoo_quoted_3214971481" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Tuesday, July 24, 2018, 4:27:49 AM GMT+4:30, Dennis Shea <shea@ucar.edu> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="yiv0242421613"><div><div dir="ltr"><div><div>I modified your script.<br clear="none"><br clear="none"></div>Use only "bilinear" and/or "nearest neighbor' . <br clear="none"><br clear="none">"patch" is *NOT* appropriate. I was/is for highly accurate derivatives. as needed for say ocean curl.<br clear="none"><br clear="none"></div>Please read all ESMF documentation.<br clear="none"></div><div class="yiv0242421613gmail_extra"><br clear="none"><div class="yiv0242421613gmail_quote">On Sat, Jul 21, 2018 at 5:43 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="yiv0242421613gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv0242421613yqt8101412663" id="yiv0242421613yqt97189"><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;"><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="">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);">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 clear="none"></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 clear="none"></span></span></span></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br clear="none"></div><div><br clear="none"></div><div>Sincerely</div><div>Ehsan</div><div><br clear="none"></div>
        
        </div><div class="yiv0242421613m_8573083758030373642yahoo_quoted" id="yiv0242421613m_8573083758030373642yahoo_quoted_2548715756">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><div><div class="yiv0242421613h5">
                
                <div>
                    On Thursday, July 19, 2018, 10:22:38 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="yiv0242421613m_8573083758030373642yiv8603990973"><div><div><div class="yiv0242421613h5"><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></div><div class="yiv0242421613m_8573083758030373642yiv8603990973gmail_extra"><br clear="none"><div class="yiv0242421613m_8573083758030373642yiv8603990973gmail_quote"><div><div class="yiv0242421613h5">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"></div></div><blockquote class="yiv0242421613m_8573083758030373642yiv8603990973gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv0242421613m_8573083758030373642yiv8603990973yqt2701789277" id="yiv0242421613m_8573083758030373642yiv8603990973yqt76609"><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><span class="yiv0242421613"></span><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="yiv0242421613m_8573083758030373642yiv8603990973HOEnZb"><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><span class="yiv0242421613"><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></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>