<div dir="ltr">Without the printVarSummary() of your 'z' variable, it is hard to tell what the problem might be:<br><br>function dspnt2 (<br> x [*] : numeric, <br> y [*] : numeric,<br> z : numeric, <br> xo [*] : numeric, <br> yo [*] : numeric<br> )<br><div><br></div><div>This assumes a cartesian grid. Still: lon[*] and lat[*] are commonly input to the function as x[*] and y[*]<br><br></div><div>=====<br>However, I am not evne going to deall with the 'dspnt2. Please use the ESMF regridding library.<br><br><br> <a href="http://www.ncl.ucar.edu/Applications/ESMF.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/ESMF.shtml</a><br><br></div><div>Something like:<br><br></div><div> var = f->FOO <br></div><div> printVarSummary(var)<br></div><div> printMinMax(var,0)<br></div><div><br> interp_method = "bilinear" ; "neareststod", "patch"<br> wgt_file_name = "wgt.ESHAN_"+interp_method+".nc" <pre> Opt = True
Opt@SrcGridLat = lat ; rectilinear lat[*]
Opt@SrcGridLon = lon ; " lon[*]<br>
Opt@DstGridLat = ulat ; unstructured latitudes
Opt@DstGridLon = ulon ; " longitudes<br> <br> Opt@InterpMethod = interp_method
<br> Opt@WgtFileName = wgt_file_name<br><br> <br> var_regrid = ESMF_regrid(var,Opt) ; Do the regridding</pre><div> printVarSummary(var_regrid))<br></div> printMinMax(var_regrid,0)<br><br></div><div>PLEASE *CAREFULLY* READ the documentation and examples.<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 19, 2018 at 2:04 AM, Ehsan Taghizadeh <span dir="ltr"><<a href="mailto:ehsantaghizadeh@yahoo.com" target="_blank">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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-style:initial;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-style:initial;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 href="https://www.ncl.ucar.edu/Support/talk_archives/2011/0595.html" rel="nofollow" target="_blank">https://www.ncl.ucar.edu/<wbr>Support/talk_archives/2011/<wbr>0595.html</a>) which states "<span><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline!important;float:none">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-style:initial;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></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></div><div style="font-family:bookman old style,new york,times,serif;font-size:16px">Sincerely</div><span class="HOEnZb"><font color="#888888"><div style="font-family:bookman old style,new york,times,serif;font-size:16px">Ehsan<br></div></font></span></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>