Skip to content

Commit

Permalink
replace keyboard with fprintf statement
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahAlidoost committed Apr 19, 2022
1 parent afb7d3b commit f64f703
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/+io/output_verification_csv.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function output_verification_csv(Output_dir, verification_dir)
D0 = dlmread([path0_ info0(i).name],',',1,0);
D1 = dlmread([path1_ info1(j).name],',',1,0);
end
if length(D0) ~= length(D1), keyboard, end
if length(D0) ~= length(D1), fprintf('\n Warning: FIX_ME: replace keyboard \r'), end
if (sum(sum(D0-D1).^2))>1E-9
fprintf(['\nWarning: data in the output file ' info0(i).name ' are different from the verification output \r '])
h0 = textread([path0_ info0(i).name],'%s','bufsize', 1E9); %#ok<DTXTRD>
Expand Down
9 changes: 6 additions & 3 deletions src/CondL_h.m
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@
Se(ML,ND)=0;
end
if isnan(Se(ML,ND))==1
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
Theta_II(ML,ND)=(Theta_UU(ML,ND)-Theta_LL(ML,ND))*RHOL/RHOI; % ice water content
if Theta_UU(ML,ND)~=0
Expand Down Expand Up @@ -340,10 +341,12 @@
end
if isnan(KL_h(ML,ND))==1
KL_h(ML,ND)=0;
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
if ~isreal(KL_h(ML,ND))
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
KfL_T(ML,ND)=helpers.heaviside1(TT_CRIT(MN)-(TT(MN)+T0))*L_f*1e4/(g*(T0)); % thermal consider for freezing soil
else
Expand Down
3 changes: 2 additions & 1 deletion src/TimestepCHK.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
function [KT,TIME,Delt_t,tS,NBChh,IRPT1,IRPT2]=TimestepCHK(NBCh,BCh,NBChh,DSTOR,DSTOR0,EXCESS,QMT,Precip,Evap,hh,IRPT1,NN,SAVEhh,TT_CRIT,T0,TT,T,EPCT,h,T_CRIT,xERR,hERR,TERR,Theta_LL,Theta_L,Theta_UU,Theta_U,KT,TIME,Delt_t,NL,Thmrlefc,NBChB,NBCT,NBCTB,tS,uERR)

if Delt_t<1.0e-10
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
% testing this function %%%
if NBCh==1
Expand Down
30 changes: 20 additions & 10 deletions src/hPARM.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,34 +59,44 @@
VvT(ML,ND)=0;
end
if isnan(Chh(ML,ND))
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
if isnan(Khh(ML,ND))==1
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
if isnan(Chg(ML,ND))
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
if isnan(ChT(ML,ND))
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
if isnan(KhT(ML,ND))
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
if ~isreal(Chh(ML,ND))
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
if ~isreal(Khh(ML,ND))==1
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
if ~isreal(Chg(ML,ND))
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
if ~isreal(ChT(ML,ND))
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
if ~isreal(KhT(ML,ND))
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
end
end
Expand Down
6 changes: 4 additions & 2 deletions src/hh_Solve.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
end

if isnan(SAVEhh)==1
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end
if ~isreal(SAVEhh)
keyboard
%%keyboard
fprintf('\n Warning: FIX_ME: replace keyboard \r')
end

0 comments on commit f64f703

Please sign in to comment.