Re: linint2_Wrap Regriding

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Jun 29 2012 - 15:32:25 MDT

Ping,

When you say that the sub-grid is contained in the coarse grid, do you mean that the sub-grid has some of the exact same lat/lon grid values as the coarse grid?
Or do you mean that the sub-grid is just contained within the same lat/lon area as the coarse grid?

If you mean the 1st case, then what Seth suggested should work fine. You would need to loop across the sub-grid lat/lon values, and find the i,j, location of where they match the coarse grid, and set the data(i,j) for that location.

If you mean the 2nd case, then this will involve an interpolation. You can use ESMF regridding, which allows you to specify what kind of Gaussian grid to go to. See example "ESMF_cnd_1.ncl"
at:

http://www.ncl.ucar.edu/Applications/ESMF.shtml

This uses a rectilinear grid instead of a Gaussian grid, but you can change this by setting:

    Opt@DstGridType = "G64" ; G128, etc

You'll probably want to remove these lines:

    Opt@DstLLCorner = (/ -60.d, 0.d/)
    Opt@DstURCorner = (/ 60.d, 355.d/)

--Mary

On Jun 29, 2012, at 1:43 PM, Ping Yang wrote:

> Dear Adam and NCL users,
>
> I am here to ask if I want to do a very simple interpolation from a coarse resolution to a higher resolution, just want to assign the same value of the coarse grid to all the sub-grid(which contained in the coarser grid) at the high resolution, Is there a function to do this(or which one is already there)?
>
> I got an answer from Seth that he suggested me using a loop to assign the value to eacb grid cells in the lat/lon grid, however I am using an gaussian grid so I am asking if there is another method to accomplish this task.
>
> Looking forward to hearing from you.
>
> Regards,
>
> Ping
>
>
>
> On Tue, Jun 12, 2012 at 4:24 PM, Adam Phillips <asphilli@ucar.edu> wrote:
> Hi Ping,
> I think you are looking at the linint2_points documentation. On the linint2_Wrap and linint2 pages here:
> http://www.ncl.ucar.edu/Document/Functions/Built-in/linint2.shtml
> http://www.ncl.ucar.edu/Document/Functions/Contributed/linint2_Wrap.shtml
>
> "linint2 uses bilinear interpolation to interpolate from one rectilinear grid to another."
>
> So going from a gaussian grid to a fixed lat/lon grid is fine.
>
> Both the gaussian and fixed 1D lat/lon grids are considered rectilinear according to the documentation here:
> http://www.ncl.ucar.edu/Document/glossary.shtml#RectilinearGrid
> Adam
>
>
> On 06/12/2012 02:20 PM, Ping Yang wrote:
>> Dear Adam/or regriding expert here,
>>
>> One quick question for the linint2_Wrap function in NCL.
>>
>> I am wondering the interpolation from Gaussian grid to a fixed grid lon/lat using linint2_wrap is correct or not?
>>
>> from the NCL function instructions(Interpolates from a rectilinear grid to an unstructured grid using bilinear interpolation, and retains metadata.)
>>
>> Am I right for using this function or there is another function for this regriding?
>>
>> Looking forward to hearing from you.
>>
>> Thanks,
>>
>> Ping
>
> --
> ______________________________________________________________
> Adam Phillips
> asphilli@ucar.edu
>
> NCAR/Climate and Global Dynamics Division
> (303) 497-1726
>
> P.O. Box 3000
> Boulder, CO 80307-3000
> http://www.cgd.ucar.edu/cas/asphilli
>
>
>
>
>
> --
> Ping Yang, Ph.D.
> CUNY Environmental Crossroads Initiative
> Marshak Science Building - Suite 925
> The City College of New York - CUNY
> 160 Convent Avenue, New York NY 10031
> Phone: 212-650-5769
> Fax: 212-650-7064
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jun 29 15:32:37 2012

This archive was generated by hypermail 2.1.8 : Fri Jun 29 2012 - 15:46:13 MDT