[MITgcm-support] How to get checkpoint56.
Brainf
brainf at 163.com
Fri Jun 23 11:14:25 EDT 2006
Dear Ed Hill,
I test the verification/internal_wave example,
The differentice is I want to comment out the lines "implicSurfPress" "implicDiv2DFlow", "nonlinFreeSurf" and "exactConserv".
I just put a # in front the lines in file: (input/data)
My data and gendata.m files included this mail in plain text .
But comment out any of them program will aborted with error below: (not comment out them the problem run very fine.)
(PID.TID 0000.0001) S/R INI_PARMS ; starts to read PARM01
namelist read: read unexpected character
....
But everything works fine for legg who use chickpoint56.
I just want to plot the internal_wave figure like manual.(page 20 ,Figure 1.9),but the example can't do this,
I think must change some parameters in file data.
# ############# data file begin ############
# ====================
# | Model parameters |
# ====================
#
# Continuous equation parameters
&PARM01
Tref = 0.04842, 0.0433231, 0.0382263, 0.0331295,
0.0280326, 0.0229358, 0.0178389, 0.0127421,
0.00764526, 0.00254842, -0.00254842, -0.00764526,
-0.0127421, -0.0178389, -0.0229358, -0.0280326,
-0.0331295, -0.0382263, -0.0433231, -0.04842,
sRef= 20*35.,
viscAz=1.E-3,
viscAh=1.0E-2,
no_slip_sides=.TRUE.,
no_slip_bottom=.TRUE.,
viscA4=0.E12,
diffKhT=0,
diffKzT=0,
diffKhS=0,
diffKzS=0,
f0=0.0,
beta=0.E-11,
tAlpha=2.E-4,
sBeta =0.E-4,
gravity=9.81,
gBaro=9.81,
rigidLid=.FALSE.,
implicitFreeSurface=.TRUE.,
eosType='LINEAR',
nonHydrostatic=.TRUE.,
readBinaryPrec=64,
#- not safe to use globalFiles in multi-processors runs
#globalFiles=.TRUE.,
writeBinaryPrec=64,
writeStatePrec=64,
saltStepping=.FALSE.,
hFacMin=0.2,
#implicSurfPress=0.5,
#implicDiv2DFlow=0.5,
#nonlinFreeSurf=3,
#when i comment out them above, it will aborted with error' namelist read: read unexpected character'
hFacInf=0.2,
hFacSup=1.8,
exactConserv=.TRUE.
&
# Elliptic solver parameters
&PARM02
cg2dMaxIters=1000,
cg2dTargetResidual=1.E-13,
cg3dMaxIters=50,
cg3dTargetResidual=1.E-13,
&
# Time stepping parameters
&PARM03
niter0=0,
nTimeSteps=2000,
deltaT=500.,
abEps=0.1,
pChkptFreq=150000,
chkptFreq=0.0,
dumpFreq=50000.,
monitorFreq=50000.,
&
# Gridding parameters
&PARM04
usingCartesianGrid=.TRUE.,
usingSphericalPolarGrid=.FALSE.,
delXfile='delXvar'
delY=5.e3,
delZ=20*10.000000,
&
# Input datasets
&PARM05
hydrogThetaFile='T.init',
bathyFile='topog.slope',
&
#################### data end #######################
%%%%%%%%%%%%%%%%%%%% gendata.m begin %%%%%%%%%%%%%%%%%%%%%
% This is a matlab script that generates the input data
% variable x resolution
prec='real*8';
ieee='b';
% Dimensions of grid
nx=60;
ny=1;
nz=20;
% Nominal depth of model (meters)
H=200.0;
% Size of domain
Lx=13.3e3;
% Horizontal resolution (m)
dx=zeros(nx,1);
for i=1:nx
dx(i) = Lx/(nx+1);
end
dy = Lx/nx
% Stratification
gravity=9.81;
talpha=2.0e-4;
N2=1e-6;
Tz=N2/(gravity*talpha);
dz=H/nz;
sprintf('delZ = %d * %7.6g,',nz,dz)
x=zeros(nx,1);
x(1) = dx(1);
for i=2:nx
x(i)=x(i-1) + dx(i);
end
z=-dz/2:-dz:-H;
%[Y,X]=meshgrid(y,x);
% Temperature profile
Tref=Tz*z-mean(Tz*z);
[sprintf('Tref =') sprintf(' %8.6g,',Tref)]
t=0.0*rand([nx,ny,nz]);
for k=1:nz
t(:,:,k) = t(:,:,k) + Tref(k);
end
fid=fopen('T.init','w',ieee); fwrite(fid,t,prec); fclose(fid);
% Sloping channel
slope=0.03
offset=2.5e3;
dmax=-40.0;
d=0.0*rand([nx,ny]);
for i=1:nx
for j=1:ny
d(i,j) = -H;
d(i,j) = d(i,j) + slope*(x(i) - offset);
if d(i,j) < -H ;
d(i,j) = -H;
end
if d(i,j) > dmax;
d(i,j) = dmax;
end
end
end
d(nx,:)=0.0;
fid=fopen('topog.slope','w',ieee); fwrite(fid,d,prec); fclose(fid);
plot(x,d(:,1))
fid=fopen('delXvar','w',ieee); fwrite(fid,dx,prec); fclose(fid);
%convex slope
nxslope=(dmax + H)/(slope)
d1=zeros(nx,ny);
hamp=(H-dmax)/5.0
pi=4.0*atan(1.0)
for i=1:nx
for j=1:ny
if x(i) < (offset + nxslope)
if x(i) < offset
d1(i,j) = d(i,j);
else
d1(i,j) = -H;
d1(i,j) = d(i,j) + hamp*sin(pi*(x(i)-offset)/nxslope);
if d1(i,j) < -H ;
d1(i,j) = -H;
end
if d1(i,j) > dmax;
d1(i,j) = dmax;
end
end
else
d1(i,j) = d(i,j);
end
end
end
%d1(end-1:end,:)=d1(1:2,:); % debug by aja
fid=fopen('topog.convex','w',ieee); fwrite(fid,d1,prec); fclose(fid);
plot(x,d1(:,1),'g')
%convex slope
d2=zeros(nx,ny);
for i=1:nx
for j=1:ny
if x(i) < (offset + nxslope)
if x(i) < offset
d2(i,j) = d(i,j);
else
d2(i,j) = -H;
d2(i,j) = d(i,j) - hamp*sin(pi*(x(i)-offset)/nxslope);
if d2(i,j) < -H ;
d2(i,j) = -H;
end
if d2(i,j) > dmax;
d2(i,j) = dmax;
end
end
else
d2(i,j) = d(i,j);
end
end
end
%d2(end-1:end,:)=d2(1:2,:); % debug by aja
fid=fopen('topog.concave','w',ieee); fwrite(fid,d2,prec); fclose(fid);
hold on
plot(x,d2(:,1),'r')
hold off
fid=fopen('delXvar','w',ieee); fwrite(fid,dx,prec); fclose(fid);
%%%%%%%%%%%%%%%%%%%%%%%% end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>Hi "brainf",
>
>The above error indicates that you used improper namelist syntax and
>*no* version of MITgcm (current or past) is going to fix that problem --
>its very likely your fault. You need to be careful with the namelist
>syntax. Have you made certain that all your comment characters ('#')
>are in the very first position of each line? Thats a likely problem but
>there are many other ways that you can violate Fortran namelist syntax.
>
>Ed
>
>--
>Edward H. Hill III, PhD
>office: MIT Dept. of EAPS 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
>
>
>_______________________________________________
>MITgcm-support mailing list
>MITgcm-support at mitgcm.org
>http://mitgcm.org/mailman/listinfo/mitgcm-support
>
= = = = = = = = = = = = = = = = = = = =
Best regards.
Brainf
brainf at 163.com
2006-06-23
More information about the MITgcm-support
mailing list