[MITgcm-support] How does MITgcm readin grid from tile001.mitgrid file

陈忱 chen636489 at gmail.com
Mon Apr 25 21:06:38 EDT 2016


Hi All:

I want the model to read grid from tiles file instead of specifying delX
delY in input/data. However I did't find where to trigger this reading
process. Here is what I have done so far:

Taking the experiment from verification/internal_wave:

(1) In compile time, I didn't change anything in code directory.

(2) generate tile001.mitgrid file and drop it into internal_wave/input/:

xc =rdmds('XC');
yc =rdmds('YC');
%dxf=rdmds('DXF');
%dyf=rdmds('DYF');
rac=rdmds('RAC');
xg =rdmds('XG');
yg =rdmds('YG');
%dxv=rdmds('DXV');
%dyu=rdmds('DYU');
raz=rdmds('RAZ');
dxc=rdmds('DXC');
dyc=rdmds('DYC');
raw=rdmds('RAW');
ras=rdmds('RAS');
dxg=rdmds('DXG');
dyg=rdmds('DYG');
dxf=zeros(60,1);dyf=zeros(60,1);dxv=zeros(60,1);dyu=zeros(60,1);

n=1;
fid=fopen( sprintf('tile%3.3i.mitgrid',n), 'w',ieee );
fwrite(fid,xc(:,:,n),dtype);
fwrite(fid,yc(:,:,n),dtype);
fwrite(fid,dxf(:,:,n),dtype);
fwrite(fid,dyf(:,:,n),dtype);
fwrite(fid,rac(:,:,n),dtype);
fwrite(fid,xg(:,:,n),dtype);
fwrite(fid,yg(:,:,n),dtype);
fwrite(fid,dxv(:,:,n),dtype);
fwrite(fid,dyu(:,:,n),dtype);
fwrite(fid,raz(:,:,n),dtype);
fwrite(fid,dxc(:,:,n),dtype);
fwrite(fid,dyc(:,:,n),dtype);
fwrite(fid,raw(:,:,n),dtype);
fwrite(fid,ras(:,:,n),dtype);
fwrite(fid,dxg(:,:,n),dtype);
fwrite(fid,dyg(:,:,n),dtype);
fclose(fid);

Noting that, XC, YC ,RAW.etc which rdmds read, is from an initial run0. I
did everything in README, and it will return me the grid info in
internal_wave/run/ directory in the format of data/meta.

try(3a) internal_wave/input/data:

making changes in data:

# Gridding parameters

 &PARM04
 usingCartesianGrid=.TRUE.,
 horizGridFile='tile001.mitgrid',
 delZ=20*10.,
 &

=== didn't work so far======

try(3b) internal_wave/input/data:

making changes in data:

# Gridding parameters
#hoping that the model could detect mitgrid itself.

 &PARM04
 usingCartesianGrid=.TRUE.,
 delZ=20*10.,
 &

=== didn't work either======

(4) cd verfication/aim_51_cs/input:

It contains tile001~006.mitgrid files. But it's not specify in input/data
&PARAM5.

(5) vim verfication/aim_51_cs/results/output.txt:

(PID.TID 0000.0001) SET_PARMS: done
(PID.TID 0000.0001) Enter INI_VERTICAL_GRID: setInterFDr=    T ;
setCenterDr=    F
(PID.TID 0000.0001) tile:   1 ; Read from file tile001.mitgrid
(PID.TID 0000.0001)   => xC yC dxF dyF rA xG yG dxV dyU rAz dxC dyC rAw rAs
dxG dyG
(PID.TID 0000.0001) tile:   2 ; Read from file tile002.mitgrid
(PID.TID 0000.0001)   => xC yC dxF dyF rA xG yG dxV dyU rAz dxC dyC rAw rAs
dxG dyG
(PID.TID 0000.0001) tile:   3 ; Read from file tile003.mitgrid
(PID.TID 0000.0001)   => xC yC dxF dyF rA xG yG dxV dyU rAz dxC dyC rAw rAs
dxG dyG
(PID.TID 0000.0001) tile:   4 ; Read from file tile004.mitgrid
(PID.TID 0000.0001)   => xC yC dxF dyF rA xG yG dxV dyU rAz dxC dyC rAw rAs
dxG dyG
(PID.TID 0000.0001) tile:   5 ; Read from file tile005.mitgrid
(PID.TID 0000.0001)   => xC yC dxF dyF rA xG yG dxV dyU rAz dxC dyC rAw rAs
dxG dyG
(PID.TID 0000.0001) tile:   6 ; Read from file tile006.mitgrid
(PID.TID 0000.0001)   => xC yC dxF dyF rA xG yG dxV dyU rAz dxC dyC rAw rAs
dxG dyG

(PID.TID 0000.0001) %MON XC_max                       =
1.7854351589505E+02
(PID.TID 0000.0001) %MON XC_min                       =
 -1.7854351589505E+02
(PID.TID 0000.0001) %MON XC_mean                      =
 -4.6999441375798E-15
(PID.TID 0000.0001) %MON XC_sd                        =
1.0355545336287E+02


===========================================================================================
I attached the STDOUT.0000 STDERR.0000 for step(3)(4).

It seems mitgcm first of all didn't notice the grid should be imported from
tile001.mitgrid.

I also have download tile001.mitgrid file online and replaced it with mine.
The same error appear here again.

I also dig into ini_cartesian_grid & load_grid_spacing, didn't find where
to read mitgrid.

In all, the main question here will be,* where and how does mitgcm read
.mitgrid file during run time.*


Thank you in advance for your attention!
-- 
Chen CHEN
Graduate Student in ICES&EM
The University of Texas at Austin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20160425/84fb259a/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: STDERR.0000
Type: application/octet-stream
Size: 5307 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20160425/84fb259a/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: STDOUT.0000
Type: application/octet-stream
Size: 12595 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20160425/84fb259a/attachment-0003.obj>


More information about the MITgcm-support mailing list