[MITgcm-support] tsearch

Yuan Lian lian at ashimaresearch.com
Thu Jul 11 13:20:52 EDT 2013


Hi Martin,

Your solution looks much better. Thanks.

Best,
Yuan


On 7/11/13 5:43 AM, Martin Losch wrote:
> Hi Yuan,
>
> thanks, I just checked in a new version, I prefer to not use your solution with verLessThan, because that function hasn't been around forever either, instead I look for DelaunayTri and use it if available (assuming that if it is not available, your matlab is so old that it still has tsearch).
>
> Martin
>
> On Jul 9, 2013, at 8:38 PM, Yuan Lian <lian at ashimaresearch.com> wrote:
>
>> Hi Martin,
>>
>> Here is the version that may be checked into the repository. I also added a version check in case someone is using a older version of matlab. Please note that I assumed version 7.14 or later removed tsearch.
>>
>> Best,
>> Yuan
>>
>>
>> On 7/9/13 12:20 AM, Martin Losch wrote:
>>> Hi Angela,
>>>
>>> could you send me a working version of the matlab-script (preferably with the not-working code lines commented out followed by the new code lines)? I could then check this into the repository.
>>>
>>> Martin
>>>
>>> On Jul 9, 2013, at 2:11 AM, Angela Zalucha <azalucha at seti.org> wrote:
>>>
>>>> Thanks, that did work.
>>>>
>>>>   Angela
>>>>
>>>> _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>>>> Angela Zalucha, Ph.D.
>>>> Research Scientist
>>>> Search for Extraterrestrial Intelligence (SETI) Institute
>>>>
>>>>
>>>> Office located at Southwest Research Institute
>>>> 1050 Walnut Street, Suite 300
>>>> Boulder, CO 80302
>>>> USA
>>>> (720) 208-7211
>>>>
>>>>
>>>> http://www.seti.org/users/azalucha
>>>> _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>>>>
>>>> On Mon, 8 Jul 2013, Yuan Lian wrote:
>>>>
>>>>> Hi Angela,
>>>>>
>>>>> You can replace tsearch line with the following:
>>>>>
>>>>> %%%%%% the following only works for matlab version 2012 or later.
>>>>> % Triangularize the data
>>>>> tri=DelaunayTri(x,y);
>>>>> if isempty(tri),
>>>>> warning('Data cannot be triangulated.');
>>>>> return
>>>>> end
>>>>>
>>>>> % Find the nearest triangle (t)
>>>>> [t, bcs] = pointLocation(tri, xi, yi);
>>>>>
>>>>> %%%%%%
>>>>>
>>>>> Hope this helps.
>>>>>
>>>>> Best,
>>>>> Yuan
>>>>>
>>>>>
>>>>> On 7/8/13 3:12 PM, Angela Zalucha wrote:
>>>>>> Yes, I have found this page:
>>>>>> http://www.mathworks.com/matlabcentral/fileexchange/authors/251793
>>>>>> But I don't know what "p" corresponds to in griddata_preprocess.m, as it is a black box to me.
>>>>>>
>>>>>>   Angela
>>>>>> _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>>>>>> Angela Zalucha, Ph.D.
>>>>>> Research Scientist
>>>>>> Search for Extraterrestrial Intelligence (SETI) Institute
>>>>>> Office located at Southwest Research Institute
>>>>>> 1050 Walnut Street, Suite 300
>>>>>> Boulder, CO 80302
>>>>>> USA
>>>>>> (720) 208-7211
>>>>>> http://www.seti.org/users/azalucha
>>>>>> _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>>>>>> On Mon, 8 Jul 2013, Menemenlis, Dimitris (3248) wrote:
>>>>>>> Angela you are right, tsearch has been replaced by DelaunayTri function in recent matlab.
>>>>>>> You could try replacing tsearch with DelaunayTri function in griddata_preprocess.m
>>>>>>> But this routine is not needed for reading MITgcm files.
>>>>>>> It is used for computing interpolation weights.
>>>>>>> Dimitris Menemenlis
>>>>>>> On Jul 8, 2013, at 5:50 PM, Angela Zalucha wrote:
>>>>>>>> Hi,
>>>>>>>> I am running Matlab 2013a and I am unable to read in any files due to a Matlab function that is no longer supported, tsearch.  This function is called in the mitgcm-provided script griddata_preprocess.m.  I checked the repository and there is no update there.  Has anyone fixed this problem?
>>>>>>>>
>>>>>>>> Angela
>>>>>>> _______________________________________________
>>>>>>> MITgcm-support mailing list
>>>>>>> MITgcm-support at mitgcm.org
>>>>>>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>>>>>> _______________________________________________
>>>>>> MITgcm-support mailing list
>>>>>> MITgcm-support at mitgcm.org
>>>>>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>>>>> _______________________________________________
>>>>> MITgcm-support mailing list
>>>>> MITgcm-support at mitgcm.org
>>>>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>>>>>
>>>> _______________________________________________
>>>> MITgcm-support mailing list
>>>> MITgcm-support at mitgcm.org
>>>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>>> _______________________________________________
>>> MITgcm-support mailing list
>>> MITgcm-support at mitgcm.org
>>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>> <griddata_preprocess.m>_______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list