[MITgcm-support] to prepare horizGridFilefor the curvilinear coordinates
Yi-Chih Huang
dscpln at gmail.com
Mon Oct 1 05:46:15 EDT 2018
Hello MITgcm Support experts,
I work on idealized simulation on the curvilinear coordinates in
MITgcm. I am trying to prepare the horizGridFile for the curvilinear
coordinates. By trial and error I completed a matlab script below to
generate horizGridFile for the curvilinear coordinates. Do you think this
file grid.bin as the attachment satisfies the need of 10N-90N for the
curvilinear coordinates in MITgcm?
I used grid.bin in data in execution of MITgcm and got almost the same
temperature field as giving delX=320*0.25, and delY=320*0.25 in the data
file. In fact, I got almost the same temperature field with the same
horizGridFile in the following two conditions of f0 and ygOrigin after
750000 sec intergration. Although I work on idealized simulations, I can't
help but ask do I need to prepare different horizGridFile for 0N-80N and
10N-90N? How to let MITgcm know the domain is 10N-90N instead of 1N-9N?
f0=2.531787E-5,,
ygOrigin=10.,
f0=0.,
ygOrigin=0.
Thanks much,
Yi-Chih
####################################################
addpath('C:\Users\huang\Documents\MITgcm\Matlab_scripts')
cd C:\Users\huang\Documents\MITgcm\vel_out\run_n_320_253t;
xc = rdmds('XC');
yc = rdmds('YC');
lon = 10.25:0.25:90;
lat = 10.25:0.25:90;
% 2d field fld2d on lon-lat grid:
% fld = interp2(lon,lat,fld2d,xc(:),yc(:),method); % method =
'linear','cubic', etc see help interp2
A=rdmds('T.0000000000.001.001');
size(A);
fld = interp2(lon,lat,A(:,:,1),xc(:),yc(:),'spline');
fld = reshape(fld,size(xc));
writebin('grid.bin', fld, 1, 'real*4');
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20181001/90ec93a0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grid_10N_90N.bin
Type: application/octet-stream
Size: 409600 bytes
Desc: not available
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20181001/90ec93a0/attachment-0001.bin>
More information about the MITgcm-support
mailing list