[ncl-talk] Triangular mesh interpolation routine

Yu, Hao-Cheng danishyo at gmail.com
Mon Mar 27 00:37:32 MDT 2017


Hi Mary & Dennis

Thanks for all your info.
I will try with ESMF routine.

Best regards, Dan

2017-03-25 2:15 GMT+08:00 Dennis Shea <shea at ucar.edu>:

> The following suggests an approach to achieve your objective.
>
> A user wanted to interpolate curvilinear (NARR) data to specific
> locations. The user also needed to vertically interpolate to specific
> pressure levels prior to interpolating to the locations.
>
> Look at: http://www.ncl.ucar.edu/Applications/narr.shtml
> Example 7
>
> Several steps were used:
>
>  [1] A previously generated ESMF weight file was used to regrid
> (interpolate) the NARR curvilinear grid to a high resolution rectilinear
> grid.
>
>  [2] The linint2_points function then used the generated rectilinear grid
> as the input to linint2_points_Wrap
>
> ===
> There are several ESMF examples the interpolate 'spectral element'
> (triangular mesh) to rectilinear grids.
> ESMF 10, 11, 17-19
>
> [1] Using one of the examples as a base, generate a weight file (say):
>      Opt at WgtFileName="Trimesh_to_RecLin.nc"
>
> [2]
> Based upon the function  'narr_to_points' in the above Example 7, you
> should create a (say) 'trimesh_to_points' function. If not appropriate,
> delete the vertical interpolation portion of the function. This function
> could be reused for other interpolations.
>
>
> Good luck
>
>
> On Fri, Mar 24, 2017 at 9:10 AM, Mary Haley <haley at ucar.edu> wrote:
>
>> Dan,
>>
>> You might want to check out the ESMF regridding examples page:
>>
>> http://www.ncl.ucar.edu/Applications/ESMF.shtml
>>
>> Example #14 regrids a triangular mesh to a 5 degree grid:
>>
>> http://www.ncl.ucar.edu/Applications/ESMF.shtml#ex14
>>
>> There are also a couple of examples associated with the NCL User Guide:
>>
>> http://www.ncl.ucar.edu/Applications/NUG.shtml
>>
>> Search for "triangular". You can actually download the data files for
>> these examples and run them yourselves.  The data file link is at the top
>> of the page.
>>
>> --Mary
>>
>>
>> On Wed, Mar 22, 2017 at 1:41 AM, Yu, Hao-Cheng <danishyo at gmail.com>
>> wrote:
>>
>>> Hi everyone
>>>
>>> From website, I know there're lot of routines to do triangular plot and
>>> regriding.
>>> Since plot can be made by predefined FE mesh by specified sfYArray,
>>> sfXArray & sfElementNodes.
>>> I will assume there must be some interpolation routine for FE mesh, but
>>> I can't find this on website.
>>>
>>> Is there any 2D interpolation routine we can use directly by specifying
>>> above 3 vars with desired output XY points?
>>> For example, assume this routine called "tri_interp".
>>> Pre-defined FE mesh var are X,Y,ele, field to interpolate is ZZ, output
>>> points are outX, outY.
>>> Then we can get output points value by out_interp=tri_interp(X,Y,ele,
>>> ZZ,outX,outY)
>>>
>>> For regular grid, like linint2_points can provide similar function and
>>> efficient.
>>> Just wonder, is there any similar function for uninstructed grid except
>>> Natgrid package (which will be quite time consuming if FE mesh is large)?
>>>
>>> Dan
>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>> _______________________________________________
>> 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/20170327/be46d9c1/attachment.html 


More information about the ncl-talk mailing list