Re: NCL function "linint2_points_Wrap"

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri May 20 2011 - 09:33:03 MDT

Your ordering

  tintpre = linint2_points_Wrap(tdpre&longitude, tdpre&latitude, tdpre, \
                                True, ti@lat2d, ti@lon2d, 0)

is wrong. It should be

  tintpre = linint2_points_Wrap(tdpre&longitude, tdpre&latitude, tdpre, \
                                True, ti@lon2d, ti@lat2d, 0)

On 05/20/2011 07:34 AM, Sha Feng wrote:
> Hi Dennis,
>
> The URL:
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20110519/0aa135c8/attachment.txt
> links to the output of all the "print" function in the code.
>
> [1] You can find that both @lon2D & @lat2D are 1D arrays, although they
> look like 2D.
>
> [2] I noted that and did rearrange. But your code is more efficient than
> mine about the rearrange.
>
> Hence, the problem is still there.
>
> S.
>
>
> On May 19, 2011, at 7:05 PM, Dennis Shea wrote:
>
>> [1]
>> I am surprised there was no error message.
>> The linint2_points_Wrap is prototyped as follows
>>
>> function linint2_points_Wrap (
>> xi : numeric,
>> yi : numeric,
>> fi : numeric,
>> fiCyclicX [1] : logical,
>> xo [*] : numeric,
>> yo [*] : numeric,
>> Option [1] : integer
>> )
>>
>> the 'xo' and 'yo' must be one dimensional.
>>
>> Your code indicates otherwise
>>
>> tintpre = linint2_points_Wrap(tdpre&longitude, tdpre&latitude, tdpre,\
>> True, ti@lat2d, ti@lon2d, 0)
>>
>> Perhaps, the 2D attributes of a variable are passed as
>> one dimemsional [*] ?
>>
>> ===
>> [2]
>> Do the ti@lon2d range from -180 to +180 ?
>> If so, that is the problem because the NCEP data are 0-360
>>
>> ti@lon2d = where (ti@lon2d.lt.0, ti@lon2d + 360, ti@lon2d)
>>
>>
>>
>>
>>
>> On 5/19/11 1:49 PM, Sha Feng wrote:
>>>> Hi everyone,
>>>>
>>>> I try to use the NCL function "linint2_points_Wrap" to match two
>>>> datasets.
>>>>
>>>> One is from NCEP with dimension like (ntime, nz, nlat, nlon). Another is
>>>> CPR from CloudSat with dimension like (nbin, nray)and with attributes of
>>>> @lat2d and @lon2d. Now I need to interpolate the NCEP data to the CPR's
>>>> dimension in a selected region. Horizontally, I try to use
>>>> linint2_points_Wrap to accomplish this purpose. The output array,
>>>> however,
>>>> are all missing value.
>>>>
>>>> I checked all the inputs and no one is full of missing value. Could
>>>> anyone
>>>> help me to figure out it, or give me some suggestions how to
>>>> accomplish my
>>>> purpose?
>>>>
>>>> The code is as follows, and attached is the output of all the "print".
>>>>
>>>> print(tdpre&longitude)
>>>> print("-------------------------------------------")
>>>> print(tdpre&latitude)
>>>> print("-------------------------------------------")
>>>> print(tdpre(1,:,:))
>>>> print("-------------------------------------------")
>>>> print(ti@lat2d)
>>>> print("-------------------------------------------")
>>>> print(ti@lon2d)
>>>>
>>>> tintpre = linint2_points_Wrap(tdpre&longitude, tdpre&latitude, tdpre,
>>>> True, ti@lat2d, ti@lon2d, 0)
>>>> print(tintpre)
>>>>
>>>> Thanks and regards,
>>>>
>>>> S.
>>>>
>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate & Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri May 20 09:33:12 2011

This archive was generated by hypermail 2.1.8 : Wed May 25 2011 - 09:35:33 MDT