[MITgcm-devel] Re: [Fwd: (no subject)]

Daniel Enderton enderton at MIT.EDU
Thu Mar 2 16:41:03 EST 2006


The bug that was fixed in rdmnc.m a couple days ago had to do with 
reading in singleton dimensions that come out in the diagnostics 
package output (e.g. data that is given as 10x10x1 rather than 10x10 
in the netcdf files).  Hopefully tonight I can get to checking with 
the actual case that Ed found that failed (Ed - could send me a 
pointer to the data?).

Moreover, if there is interest in funneling everyone to rdnctiles.m, 
I would be more than happy to move rdmnc.m to some place out of the 
way (e.g. /utils/matlab/Graphix/GraphixUtilities).

Daniel

>Ed Hill wrote:
>
>>On Thu, 2006-03-02 at 12:16 -0500, David Ferreira wrote:
>>
>>>Ed Hill wrote:
>>>   
>>>
>>>>On Thu, 2006-03-02 at 11:25 -0500, David Ferreira wrote:
>>>>
>>>>     
>>>>
>>>>>I tried the rdnctiles.m and it works.
>>>>>However, I noticed it runs about 2 times slower than rdmnc.m.
>>>>>       
>>>>>
>>>I use typically:
>>>Ocn  = rdmnc([dirnam,'DiagOcnTave.*']);
>>>or
>>>Ocnb = rdnctiles([dirnam,'DiagOcnTave.*']);
>>>   
>>>
>>
>>
>>Hi David,
>>
>>How, exactly, are you arriving at this "2 times slower" figure?
>>
>>I've run a handful of tests such as:
>>
>>  frac = [];
>>  for i = 1:5
>>    clear a; o0=now;
>>    a = rdmnc('mnc_test_20060302_0001/grid*'); o1=now;
>>    clear a; n0=now;
>>    a = rdnctiles('mnc_test_20060302_0001/grid*'); n1=now;
>>    dsn = datevec([ o0 o1 n0 n1 ]);
>>    numer = (60*(ds(3,5)-ds(4,5)) + ds(3,6) - ds(4,6));
>>    denom = (60*(ds(1,5)-ds(2,5)) + ds(1,6) - ds(2,6));
>>    frac = [ frac ; numer/denom ];
>>  end
>>  max(frac)
>>
>>  ans =  1.08145819581599
>>
>>and the results are a consistent and pretty damn paltry 8.1%.  Nothing
>>even close to your supposed factor of two.
>>
>>Ed
>>
>>ps - And rdmnc() *still* dies for me on some data sets.  Reading 
>>the "state" variables generated within a typical run of exp0, 
>>it just gave me this lovely answer:
>>
>>=====
>>
>>>>a = rdmnc('mnc_test_20060302_0001/state*');
>>>>     
>>>>
>>??? Error using ==> eval
>>Subscripted assignment dimension mismatch.
>>
>>Error in ==> rdmnc>rdmnc_local at 197
>>        eval(['S.(cvar)(',Sstr(1:end-1),')=tmpdata;'])
>>
>>Error in ==> rdmnc at 98
>>    S=rdmnc_local(nc,varlist,iters,S);
>>
>>
>>=====
>>
>>     However, on the *exact* same files, rdnctiles gives the 
>>correct result without dying:
>>
>>=====
>>
>>>>clear a; a = rdnctiles('mnc_test_20060302_0001/state*');
>>>>
>>>>     
>>>>
>>=====
>>
>Hi Ed,
>
>I did that:
>
>t=cputime;
>Ocn  = rdmnc([dirnam,'DiagOcnTave.*']);
>cputime-t
>ans =
>
>   14.9600
>
>t=cputime;
>Ocnb = rdnctiles([dirnam,'DiagOcnTave.*']);
>cputime-t
>ans =
>
>   27.9600
>
>
>And for the rdmnc bug, you might want to get the new version because
>Daniel fixed some bug a couple days ago and I don't have problems with
>rdmnc.
>
>cheers,
>david
>
>
>
>--
>
>Ferreira David               Tel : 617 253 7967 EAPS Room 54-1515,
>Massachusetts Institute of Technology,
>77 Massachusetts Avenue
>Cambridge, MA, 02139
>
>_______________________________________________
>MITgcm-devel mailing list
>MITgcm-devel at mitgcm.org
>http://mitgcm.org/mailman/listinfo/mitgcm-devel




More information about the MITgcm-devel mailing list