[ncl-talk] interpolation
Dennis Shea
shea at ucar.edu
Thu Jul 19 11:52:36 MDT 2018
Without the printVarSummary() of your 'z' variable, it is hard to tell what
the problem might be:
function dspnt2 (
x [*] : numeric,
y [*] : numeric,
z : numeric,
xo [*] : numeric,
yo [*] : numeric
)
This assumes a cartesian grid. Still: lon[*] and lat[*] are commonly input
to the function as x[*] and y[*]
=====
However, I am not evne going to deall with the 'dspnt2. Please use the ESMF
regridding library.
http://www.ncl.ucar.edu/Applications/ESMF.shtml
Something like:
var = f->FOO
printVarSummary(var)
printMinMax(var,0)
interp_method = "bilinear" ; "neareststod", "patch"
wgt_file_name = "wgt.ESHAN_"+interp_method+".nc"
Opt = True
Opt at SrcGridLat = lat ; rectilinear lat[*]
Opt at SrcGridLon = lon ; " lon[*]
Opt at DstGridLat = ulat ; unstructured latitudes
Opt at DstGridLon = ulon ; " longitudes
Opt at InterpMethod = interp_method
Opt at WgtFileName = wgt_file_name
var_regrid = ESMF_regrid(var,Opt) ; Do the regridding
printVarSummary(var_regrid))
printMinMax(var_regrid,0)
PLEASE *CAREFULLY* READ the documentation and examples.
On Thu, Jul 19, 2018 at 2:04 AM, Ehsan Taghizadeh <ehsantaghizadeh at yahoo.com
> wrote:
> Hi,
> Is there any interpolation method from rectilinear grid to an
> unstructured grid other than bilinear interpolation in NCL, like kriging,
> nearest point, etc? However I found this link (https://www.ncl.ucar.edu/
> Support/talk_archives/2011/0595.html) which states "There is no kriging
> interpolation function in NCL".
> Beside that could "dspnt2" be used to interpolate from rectilinear grid
> to an unstructured grid? However it seems it couldn't and following error
> is the subject "fatal:dspnt2: the rightmost dimension of z must be the
> same as the dimension of x and y".
>
> I'll be thankful for any help.
>
> Sincerely
> Ehsan
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180719/8ae4cd23/attachment.html>
More information about the ncl-talk
mailing list