Re: Regrid lat/lon to lat/lon

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Apr 09 2012 - 14:38:52 MDT

The attached will not work with categorical data.
However, it will work with other data. The ESMF regrid
will be in 6.1.0-beta

Hopefully, NCL 6.1.0-beta will be released in the 'ear' future.
It can be used to quickly regrid one curvilinear grid to another
curvilinear grid.

The attached script can be simplified. Basically,
     [1] Generate a description of the input grid
     [2] Generate a description of the output grid.
     [3] Generate weights
     [4] apply weights to a selected variable

The generated weights can be saved and used subsequently for
other variable/files.

A sample output
http://www.cgd.ucar.edu/~shea/ESMF_c2c_bilinear.png

Cheers

On 04/06/2012 12:32 PM, Jakob Tendel wrote:
> Hello Dennis,
>
> thanks so much for taking the time. I was afraid that I might have
> missed something obvious, so thanks for the sanity check! :-) Since I
> have some fields with categorical data (satellite products: 1=liquid,
> 2=ice, etc.) instead of continuous, I am working on a straight nearest
> neighbor resample script. I will use this to build a mapping LUT from
> the one grid to the other that I can then re-use for such data. But for
> the other continuous data fields, a more advanced resample method would
> be very useful. I am looking forward to the next ncl version with some
> of those included.
>
> Regards,
>
> Jakob
>
> -------
> Dipl.-Met. Jakob Tendel
> Institut für Meteorologie und Klimatologie
> Leibniz Universität Hannover
> Herrenhäuser Str. 2
> D-30419 Hannover
> Germany
>
> tendel@muk.uni-hannover.de <mailto:tendel@muk.uni-hannover.de>
> Tel.: 0511 762 4101
>
> On Apr 6, 2012, at 7:14 PM, Dennis Shea wrote:
>
>> I ran your script on one of our processing machines.
>> It took 2830 seconds. Obviously, too slow for practical
>> use. As I previously noted, the function was not designed
>> for interpolation of a large number of points to a high grid
>> resolution. That would require a rather sophisticated
>> searching algorithm.
>>
>> I will try one of our newer interpolation methods designed
>> for interpolating high resolution curvilinear grids
>>
>> Cheers
>>
>> Hi Jakob
>> On 04/03/2012 10:30 AM, Jakob Tendel wrote:
>>> Hi Dennis,
>>>
>>> I just caught one mistake in my script that I introduced when
>>> simplifying it. The workstation wks1 definition is missing the quotes
>>> around "png".
>>>
>>> Cheers, Jakob
>>>
>>> On 04/03/2012 04:46 PM, Dennis Shea wrote:
>>>> offline
>>>>
>>>> triple2grid is not particularly efficient it but should not be
>>>> as slow as you indicate.
>>>>
>>>> [1] please ftp a sample data file and a *clean* script that
>>>> illustrates the issue.
>>>>
>>>> [2] FYI: The next release of NCL
>>>> http://www.ncl.ucar.edu/future_release.shtml
>>>> will contain the ESMF regridding functions. A sample Example URL is
>>>> http://www.ncl.ucar.edu/Applications/ESMF.shtml
>>>> This will have many more examples. Curvilineat-to-curvilinear
>>>> will be a common application.
>>>>
>>>> [3] Also,see
>>>> http://climatedataguide.ucar.edu/
>>>> Click "Processing", then select "Regridding Overview"
>>>>
>>>> ==================================================
>>>> ftp ftp.cgd.ucar.edu <http://ftp.cgd.ucar.edu>
>>>> anonymous
>>>> <use your email address for the password>
>>>> cd incoming
>>>> put ...
>>>> put ...
>>>> quit
>>>>
>>>> Send email with the following information:
>>>>
>>>> The names of the files after you have successfully completed the
>>>> transfer.
>>>> We cannot look at the ftp/incoming directory for security reasons.
>>>>
>>>> The version of NCL you are running (ncl -V).
>>>> The type of system you are on (uname -a).
>>>>
>>>> On 4/3/12 8:09 AM, Jakob Tendel wrote:
>>>>> Hello nclers,
>>>>>
>>>>> I'm having some trouble regridding 2D data fields from one lat/lon grid
>>>>> to another. I have lat2D/lon2D fields for both grids. Since the grids
>>>>> are roughly the same horizontal resolution, a nearest neighbor regrid
>>>>> would be adequate. I tried "triple2grid" and it's still happily heating
>>>>> the room an hour later. My feeling is that regridding via a recilinear
>>>>> interim grid would not be a good idea.
>>>>>
>>>>> Any thoughts?
>>>>>
>>>>> Jakob
>>>>>
>>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Mon Apr 9 14:39:02 2012

This archive was generated by hypermail 2.1.8 : Fri Apr 13 2012 - 13:37:52 MDT