[MITgcm-support] tile size oddity? (2nd attempt)
Martin Losch
Martin.Losch at awi.de
Fri Oct 31 10:38:09 EDT 2008
Michael,
rdmds read AND combines the tiles into one field based on the
information in *.meta. What you do, probably makes rdmds pad part of
the domain with 0 (have a look), the correct way to use it would be
xg = rdmds('XG');
to read individual tiles try this:
fid=fopen('XG.001.001.data','r','b'); xg11=fread(fid,[54
30],'real*4/8'); fclose(fid);
etc and you'll should have the same size for all tiles.
Martin
On 31 Oct 2008, at 14:44, m. r. schaferkotter wrote:
> greetings;
>
> for some testing i/ve got a small 4-processor MPI job that seems to
> produce tiles of unequal size.
>
> relevant setup informations:
>
> from run/data
>
> globalFiles=.FALSE.,
> useSingleCpuIO=.FALSE.,
>
> from code/SIZE.h
> PARAMETER (
> & sNx = 54,
> & sNy = 30,
> & OLx = 3,
> & OLy = 3,
> & nSx = 1,
> & nSy = 1,
> & nPx = 2,
> & nPy = 2,
>
> 2 processors in each direction. i expect all tiles to be the same
> size.
>
> [me at mach run]$ ls XG*
> XG.001.001.data XG.001.002.data XG.002.001.data XG.002.002.data
> XG.001.001.meta XG.001.002.meta XG.002.001.meta XG.002.002.meta
>
> there are four tiles (files) of geographical coordinates.
>
> in matlab, each of the tiles are read in:
>
> xg11 = rdmds('XG.001.001');
> xg21 = rdmds('XG.002.001');
> xg12 = rdmds('XG.001.002');
> xg22 = rdmds('XG.002.002');
>
>
> now here/s where i/m surprised:
>
> >> size(xg11)
>
> ans = 54 30
>
> >> size(xg21)
>
> ans = 108 30
>
> >> size(xg12)
>
> ans = 54 60
>
> >> size(xg22)
>
> ans = 108 60
>
> i didn/t expect that.
>
> now from the shell, all of the *.data files are the same size:
>
> [me at mach run]$ ls -l XG*.data
> -rw-r--r-- 1 me group 12960 Oct 30 20:59 XG.001.001.data
> -rw-r--r-- 1 me group 12960 Oct 30 20:59 XG.001.002.data
> -rw-r--r-- 1 me group 12960 Oct 30 20:59 XG.002.001.data
> -rw-r--r-- 1 me group 12960 Oct 30 20:59 XG.002.002.data
>
> can someone explain this to me?
>
> michael
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
More information about the MITgcm-support
mailing list