From f64f703fd09b8d296047e3a2167d66d04135b904 Mon Sep 17 00:00:00 2001 From: SarahAlidoost Date: Tue, 19 Apr 2022 13:27:12 +0200 Subject: [PATCH] replace keyboard with fprintf statement --- src/+io/output_verification_csv.m | 2 +- src/CondL_h.m | 9 ++++++--- src/TimestepCHK.m | 3 ++- src/hPARM.m | 30 ++++++++++++++++++++---------- src/hh_Solve.m | 6 ++++-- 5 files changed, 33 insertions(+), 17 deletions(-) diff --git a/src/+io/output_verification_csv.m b/src/+io/output_verification_csv.m index 82040ef1..84b6a799 100644 --- a/src/+io/output_verification_csv.m +++ b/src/+io/output_verification_csv.m @@ -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 diff --git a/src/CondL_h.m b/src/CondL_h.m index 15c0adf9..c020006f 100644 --- a/src/CondL_h.m +++ b/src/CondL_h.m @@ -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 @@ -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 diff --git a/src/TimestepCHK.m b/src/TimestepCHK.m index 278b20e5..5c250f83 100644 --- a/src/TimestepCHK.m +++ b/src/TimestepCHK.m @@ -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 diff --git a/src/hPARM.m b/src/hPARM.m index 024224fb..28d5b1e4 100644 --- a/src/hPARM.m +++ b/src/hPARM.m @@ -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 diff --git a/src/hh_Solve.m b/src/hh_Solve.m index ba42e299..a1944861 100644 --- a/src/hh_Solve.m +++ b/src/hh_Solve.m @@ -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 \ No newline at end of file