[MITgcm-devel] Diagnostics package

Ed Hill ed at eh3.com
Wed Jan 25 23:47:07 EST 2006


On Wed, 2006-01-25 at 21:42 -0500, David Ferreira wrote:
> Hi,
> 
> I've got a problem with the Diagnostics package.
> I run the coupled Aquaplanet and get some time-averaged
> outputs with mnc. All of them are fine except the oceanic
> ones from Diagnostics.
> If I read them with rdmnc, these outputs have two times indices (while
> they should only have one). The first field has zeros everywhere
> except in one tile where the field looks normal. The second field
> is ok everywhere except in the tile where the first one was ok.
> 
> I also tried with rdnctiles but I got that:
> B=rdnctiles('DiagOcnExtra*',[50]);
> ??? Error using ==> regexp
> Invalid option for regexp: matc h.
>  
> Error in ==> /u/u2/dfer/Cmatlab/toolMIT/Cube_Sphere/find_files_grid_first.m
> On line 31  ==> m = regexp(fall, 'grid.+', 'match');
>  
> Error in ==> /u/u2/dfer/Cmatlab/toolMIT/Cube_Sphere/rdnctiles.m
> On line 70  ==> fall = find_files_grid_first(fpat);
> 
> Probably not helpful but:
> - the atmospheric ouputs with Diagnostic are fine
> - with useMNC=.FALSE., things look OK.
> 
> Any suggestion ?

Hi David,

OK, the problem here is not in rdmnc.  There was a bug (my fault, I'm
very sorry!) in diagnostics_out() that caused only the first tile to
contain the iter data when *all* tiles should have a copy of it.  And
the missing iter data causes serious problems with both rdmnc() and
rdnctiles().  I've corrected the code in CVS so getting the latest
version will fix it for any future runs.

For your existing data sets, you can copy the 'iter' data from the first
tile to all the other tiles using the NCO "ncks" command such as:

  #####  NOTE: this is bash/sh syntax
  for i in 2 3 4 5 6 ; do
    cp surfDiag.0000000000.t001.nc tmp.nc
    ncks -x -A surfDiag.0000000000.t00${i}.nc tmp.nc > /dev/null 2>&1
    mv tmp.nc surfDiag.0000000000.t00${i}.nc
  done

where the copy before ncks is done to preserve the global metadata.
Note that you might want to make copies of your data files before using
NCO since its easy to accidentally overwrite things.

The NCO tools are installed on all the FC4 authors machines.  For
instance, they're installed on hugo and tolkien.  And if you have any
problems/questions come see me and I'll get it working quickly.

And again, sorry about the bug...

Ed

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