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

Ed Hill ed at eh3.com
Thu Mar 2 15:23:24 EST 2006


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*');
>>
=====


-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Rm 54-1424;  77 Massachusetts Ave.
             Cambridge, MA 02139-4307
emails:  eh3 at mit.edu                ed at eh3.com
URLs:    http://web.mit.edu/eh3/    http://eh3.com/
phone:   617-253-0098
fax:     617-253-4464




More information about the MITgcm-devel mailing list