[MITgcm-support] read/write pickup integer variables?

Angela Zalucha azalucha at seti.org
Wed Aug 28 00:32:39 EDT 2013


Hello,

I wish to write out a variable like etaN in write_pickup.F:

271 	j = j + 1
272 	nj = -( n3D*(Nr-1) + j )
273 	CALL WRITE_REC_3D_RL( fn, fp, 1 , etaN, nj, myIter, myThid )
274 	IF (j.LE.listDim) wrFldList(j) = 'EtaN '

But with the variable being an integer instead of real.  Is there a 
function that does this (and a corresponding read function)?

Thanks,
     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
>



More information about the MITgcm-support mailing list