[MITgcm-support] Error while implementing OBCS
Kevin Ha
kevin.ha.pro at gmail.com
Wed Jun 26 11:37:00 EDT 2019
ah now it's working perfectly (the mistake was that East OBCS was not
activated on the OBCS_OPTIONS.h). My last question would be, regarding the
answer of Martin : do we need to necesarily set an externForcingPeriod ? In
fact my boundary condition at x=0 is a steady flow (U = cst) so is it
possible to define a ny*nz file instead of a ny*nz*mytime file to specify
my OBCS on the left side of my domain? Below my data file and gendata.m .
Thank you in advance
My current data file :
# ====================
# | Model parameters |
# ====================
#
# Continuous equation parameters
&PARM01
tRef = 350*0.,
sRef = 350*35.,
no_slip_sides = .TRUE.,
no_slip_bottom = .TRUE.,
viscAh = 2.E-3,
viscAz = 2.E-3,
diffKhT = 1.E-4,
diffKzT = 1.E-4,
f0 = 0.53E-4,
beta = 0.E-11,
tAlpha = 2.E-4,
sBeta = 0.E-4,
gravity = 9.81,
gBaro = 9.81,
rigidLid = .FALSE.,
implicitFreeSurface=.TRUE.,
exactConserv = .TRUE.
nonHydrostatic = .TRUE.,
useSingleCpuIO = .TRUE.,
readBinaryPrec = 64,
writeBinaryPrec = 64,
writeStatePrec = 64,
staggerTimeStep=.TRUE.
saltStepping = .FALSE.,
tempAdvScheme = 7, !7th Order One Step method with Monotonicity Preserving
Limiter ???? GAD.h
hFacMin=0.1,
&
# Elliptic solver parameters
&PARM02
cg2dMaxIters = 10000,
cg2dTargetResidual = 1.E-14,
cg3dMaxIters = 400,
cg3dTargetResidual = 1.E-14,
&
# Time stepping parameters
&PARM03
niter0 = 0,
nTimeSteps = 28800, ! 10j avec deltaT=30
deltaT = 30.,
dumpFreq = 1800.,
monitorFreq = 43200.,
abEps = 0.1,
pChkptFreq = 86400.,
chkptFreq = 0.0,
&
# Gridding parameters
&PARM04
usingCartesianGrid=.TRUE.,
usingSphericalPolarGrid=.FALSE.,
delY = 1*30.,
delRFile = 'delZ.init',
delX = 2000*30., ! 2000 pts * 30m =60km = L
&
# Input datasets
&PARM05
uVelInitFile = 'U.init',
vVelInitFile = 'V.init',
hydrogThetaFile = 'T.init',
bathyFile = 'topog.init',
&
My current gendata.m :
clear
%--------
nx = 2000;
ny = 1;
nz = 350;
dx = 30;
dz = 10;
dz = dz * ones(nz,1);
dz(251:350) = dz(250) * 1.02.^(1:100);
%--------
%--------
Lx = nx*dx;
Hz = sum(dz);
x = (dx/2:dx:Lx-dx/2);
z = - Hz + cumsum(dz) - dz/2;
[x,z] = meshgrid(x,z);
%--------
%--------
xbot = x(1,:);
%Hbot = 110*(sin(2*pi*5/(60*10^3).*xbot(1:end))+1)- Hz;
Hbot = [110*(zeros(1,577))- Hz 110*(sin(10^(-3).*xbot(578:1413))+1)- Hz
110*(zeros(1,2000-1413))- Hz];
%--------
%--------
U = zeros(nz,nx);
V = zeros(nz,nx);
T = (1e-3)^2 *(z+Hz) /9.81/2e-4;
R = T(:,1);
%--------
%--------
U = flipud(U)';
V = flipud(V)';
T = flipud(T)';
R = flipud(R);
dz = flipud(dz);
fid = fopen('U.init','w','b');
fwrite(fid,U,'real*8');
fclose(fid);
fid = fopen('V.init','w','b');
fwrite(fid,V,'real*8');
fclose(fid);
fid = fopen('T.init','w','b');
fwrite(fid,T,'real*8');
fclose(fid);
save('R.init','R','-ascii');
fid = fopen('topog.init','w','b');
fwrite(fid,Hbot(1,:)','real*8');
fclose(fid);
fid=fopen('delZ.init','w','b');
fwrite(fid,dz,'real*8');
fclose(fid);
U = flipud(U');
V = flipud(V');
T = flipud(T');
R = flipud(R);
dz = flipud(dz);
%--------
%--------OBCS
Uobcs = 0.01*ones(nz,ny);
Uobcsref = flipud(Uobcs');
Uobcsnew = flipud(Uobcs');
%tfin = 28800*30/21600;
tfin=1000;
for i=1:tfin
Uobcsnew=cat(3,Uobcsref,Uobcsnew);
end
Uobcs = Uobcsnew ;
Vobcs = Uobcs * 0.53e-4/1.4e-4 ;
Wobcs = zeros(ny,nz,tfin+1) ;
fid = fopen('u.box','w','b');
fwrite(fid,Uobcs,'real*8');
fclose(fid);
fid = fopen('v.box','w','b');
fwrite(fid,Vobcs,'real*8');
fclose(fid);
fid = fopen('w.box','w','b');
fwrite(fid,Wobcs,'real*8');
fclose(fid);
Le mar. 25 juin 2019 à 19:29, Matthew Mazloff <mmazloff at ucsd.edu> a écrit :
> You have something set wrong. But this is not enough information for me to
> determine what. Look in other outputs (e.g. STDOUT) to see if any other
> information is given.
>
> Matt
>
>
>
> On Jun 25, 2019, at 4:44 AM, Kevin Ha <kevin.ha.pro at gmail.com> wrote:
>
> Ok so now after putting a [(nx * ny) * nTimeSteps *
> deltaT/externForcingPeriod]+1, I got this message (see below). Can someone
> explain ?
>
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
> STOP ABNORMAL END: S/R OBCS_CHECK
>
> Le mar. 25 juin 2019 à 10:51, Martin Losch <Martin.Losch at awi.de> a écrit :
>
>> Hi Kevin,
>>
>> for 2D forcing you need to have [(nx * ny) * nTimeSteps *
>> deltaT/externForcingPeriod]+1, if you use externForcingPeriod in data.
>> Check out some of the examples, e.g. global_ocean.90x40x15, exp4,
>> tutorial_global_oce_latlon ...
>>
>> If you are using pkg/exf to read the forcing, you do something similar:
>> based on your ${var}period and your number of timesteps (i.e. model
>> integration time span nTimeSteps * deltaT) you determine how many times you
>> need to read data. In exf it is slightly more complicated, because the time
>> for which the forcing is meant, can be specified explicitly. Compare
>> example global_with_exf to global_ocean.90x40x15. They do the same, one
>> with exf, one without.
>>
>> Another common mistake is to prepare real*4 data and try to read it as
>> real*8. Then you'll have only half the records that you need (plus they are
>> completely garbled).
>>
>> M.
>>
>> > On 25. Jun 2019, at 09:05, Kevin Ha <kevin.ha.pro at gmail.com> wrote:
>> >
>> > Hello Matt,
>> >
>> > Thank you for your quick reply. My time parameters are the following
>> (see below). I have 480 time records in my u.box file. How many should I
>> have ?
>> >
>> > # Time stepping parameters
>> > &PARM03
>> >
>> > niter0 = 0,
>> >
>> > nTimeSteps = 28800, ! 10j avec deltaT=30
>> > deltaT = 30.,
>> > dumpFreq = 1800.,
>> > monitorFreq = 43200.,
>> >
>> > abEps = 0.1,
>> > pChkptFreq = 86400.,
>> > chkptFreq = 0.0,
>> > &
>> >
>> > Le lun. 24 juin 2019 à 20:32, Matthew Mazloff <mmazloff at ucsd.edu> a
>> écrit :
>> > Hi Kevin
>> >
>> > You don’t have enough time records in your u.box file. The model wants
>> more.
>> >
>> > If you think that you do have enough time records, then I would need
>> more info to diagnose the issue.
>> >
>> > Matt
>> >
>> >
>> > > On Jun 24, 2019, at 7:38 AM, Kevin Ha <kevin.ha.pro at gmail.com> wrote:
>> > >
>> > > Dear community,
>> > >
>> > > I am having an error message when implementing obcs package to my
>> configuration. After the run I get the message written below. Can someone
>> explain what is wrong ? The u.box file is my specified boundary condition
>> for velocity u at the north face of the domain (the file is generated using
>> matlab code and has dimension Ny*Nz*Nt).
>> > >
>> > > Thank you in advance
>> > >
>> > > Best
>> > >
>> > > Kevin
>> > >
>> > > Fortran runtime error: Non-existing record number
>> > >
>> > > Error termination. Backtrace:
>> > > At line 1873 of file mdsio_read_section.f (unit = 9, file = 'u.box')
>> > > At line 1873 of file mdsio_read_section.f (unit = 9, file = 'u.box')
>> > > Fortran runtime error: Non-existing record number
>> > >
>> > > Error termination. Backtrace:
>> > > Fortran runtime error: Non-existing record number
>> > >
>> > > Error termination. Backtrace:
>> > > #0 0x7fb72c0b7607 in ???
>> > > #1 0x7fb72c0b8115 in ???
>> > > #2 0x7fb72c0b8869 in ???
>> > > #3 0x7fb72c17edc9 in ???
>> > > #0 0x7ff59cbfc607 in ???
>> > > #1 0x7ff59cbfd115 in ???
>> > > #2 0x7ff59cbfd869 in ???
>> > > #3 0x7ff59ccc3dc9 in ???
>> > > #4 0x43d946 in ???
>> > > #5 0x4b76f4 in ???
>> > > #6 0x4a1086 in ???
>> > > #7 0x49a19e in ???
>> > > #8 0x4a60a5 in ???
>> > > #9 0x5bdbb7 in ???
>> > > #10 0x5b0924 in ???
>> > > #11 0x5db6fe in ???
>> > > #12 0x5db8c4 in ???
>> > > #13 0x511c35 in ???
>> > > #14 0x402366 in ???
>> > > #15 0x7ff59bee9724 in ???
>> > > #16 0x402398 in ???
>> > > at ../sysdeps/x86_64/start.S:118
>> > > #17 0xffffffffffffffff in ???
>> > > #4 0x43d946 in ???
>> > > #5 0x4b76f4 in ???
>> > > #6 0x4a1086 in ???
>> > > #7 0x49a19e in ???
>> > > #8 0x4a60a5 in ???
>> > > #9 0x5bdbb7 in ???
>> > > #10 0x5b0924 in ???
>> > > #11 0x5db6fe in ???
>> > > -------------------------------------------------------
>> > > Primary job terminated normally, but 1 process returned
>> > > a non-zero exit code.. Per user-direction, the job has been aborted.
>> > > -------------------------------------------------------
>> > >
>> --------------------------------------------------------------------------
>> > > mpirun detected that one or more processes exited with non-zero
>> status, thus causing
>> > > the job to be terminated. The first process to do so was:
>> > >
>> > > Process name: [[9039,1],27]
>> > > Exit code: 2
>> > >
>> --------------------------------------------------------------------------
>> > > _______________________________________________
>> > > MITgcm-support mailing list
>> > > MITgcm-support at mitgcm.org
>> > > http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>> >
>> > _______________________________________________
>> > MITgcm-support mailing list
>> > MITgcm-support at mitgcm.org
>> > http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>> > _______________________________________________
>> > MITgcm-support mailing list
>> > MITgcm-support at mitgcm.org
>> > http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>>
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20190626/0d1f4f45/attachment-0001.html>
More information about the MITgcm-support
mailing list