From 37328e307bfdedd9ade7070a37e620b1e498bea9 Mon Sep 17 00:00:00 2001 From: "ghg@bas.ac.uk" Date: Wed, 22 Nov 2023 08:04:22 +0000 Subject: [PATCH] Joughin slid --- BasalDrag.m | 9 +++++++-- rCWV0.m | 33 +++++++++++++++------------------ 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/BasalDrag.m b/BasalDrag.m index 8149021f..7780dab2 100755 --- a/BasalDrag.m +++ b/BasalDrag.m @@ -241,15 +241,20 @@ C0=CtrlVar.Czero; u0=CtrlVar.SpeedZero; + [taubxi,taubyi,dtaubxdui,dtaubydvi,dtaubxdvi,dtaubydui,dtaubxdhi,dtaubydhi] = rCWV0(C,C0,V0,He,delta,m,ub,vb,u0) ; + % [taubxiW,taubyiW,dtaubxduiW,dtaubxdviW,dtaubyduiW,dtaubydviW,dtaubxdhiW,dtaubydhiW] = Weertman(CtrlVar,He,delta,ub,vb,beta2i,Dbeta2i) ; + % + % norm(taubxi-taubxiW) + % norm(taubyi-taubyiW) otherwise error("BasalDrag:CaseNotFound","what sliding law?") end - - + + %% Sea ice drag term : ocean if CtrlVar.IncludeMelangeModelPhysics diff --git a/rCWV0.m b/rCWV0.m index 75b30a20..94ceb39c 100755 --- a/rCWV0.m +++ b/rCWV0.m @@ -1,12 +1,9 @@ - - - - -%function [Tauu,Tauv,dTauudu,dTauvdv,dTauudv,dTauvdu,dTauudh,dTauvdh] = rCWV0(C,C0,V0,h,hf,m,u,v,u0) -function [Tauu,Tauv,dTauudu,dTauvdv,dTauudv,dTauvdu,dTauudh,dTauvdh] = rCWV0(C,C0,V0,He,delta,m,u,v,u0) +function [Taux,Tauy,dTauxdu,dTauydv,dTauxdv,dTauydu,dTauxdh,dTauydh] = rCWV0(C,C0,V0,He,delta,m,u,v,u0) %rCWV0 +% [Taux,Tauy,dTauxdu,dTauydv,dTauxdv,dTauydu,dTauxdh,dTauydh] = rCWV0(C,C0,V0,H,HF,M,U,U0,V) + % This function was generated by the Symbolic Math Toolbox version 23.2. -% 21-Nov-2023 16:30:23 +% 21-Nov-2023 19:37:19 t2 = V0.*m; t3 = u.^2; @@ -16,13 +13,13 @@ t7 = -V0; % t8 = -hf; t9 = 1.0./m; -% t10 = h+t8; % h-hf +% t10 = h+t8; t11 = t2.*t4; t12 = -t9; t15 = t9./2.0; t17 = t3+t4+t5; -t13 = delta; % t13 = dirac(t10); -t14 = He; % t14 = heaviside(t10); +t13=delta ; % t13 = dirac(t10); +t14= He ; % t14 = heaviside(t10); t16 = t12-1.0; t18 = t6.^t12; t19 = t15-1.0./2.0; @@ -35,28 +32,28 @@ t24 = t4.*t22; t25 = t2+t7+t22; t26 = t23.^t12; -Tauu = t14.*t18.*t26.*t27.*u; +Taux = t14.*t18.*t26.*t27.*u; if nargout > 1 - Tauv = t14.*t18.*t26.*t27.*v; + Tauy = t14.*t18.*t26.*t27.*v; end if nargout > 2 t29 = t23.^t16; - dTauudu = t9.*t14.*t18.*t28.*t29.*(t11+t24+V0.*t3+t2.*t5+t5.*t22); + dTauxdu = t9.*t14.*t18.*t28.*t29.*(t11+t24+V0.*t3+t2.*t5+t5.*t22); end if nargout > 3 - dTauvdv = t9.*t14.*t18.*t28.*t29.*(t11+t24+V0.*t5+t2.*t3+t3.*t22); + dTauydv = t9.*t14.*t18.*t28.*t29.*(t11+t24+V0.*t5+t2.*t3+t3.*t22); end if nargout > 4 t31 = t12.*t14.*t18.*t25.*t28.*t29.*u.*v; - dTauudv = t31; + dTauxdv = t31; end if nargout > 5 - dTauvdu = t31; + dTauydu = t31; end if nargout > 6 - dTauudh = t13.*t18.*t26.*t27.*u; + dTauxdh = t13.*t18.*t26.*t27.*u; end if nargout > 7 - dTauvdh = t13.*t18.*t26.*t27.*v; + dTauydh = t13.*t18.*t26.*t27.*v; end end