Skip to content

Commit

Permalink
Joughin slid
Browse files Browse the repository at this point in the history
  • Loading branch information
GHilmarG committed Nov 22, 2023
1 parent 01cbc01 commit 37328e3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
9 changes: 7 additions & 2 deletions BasalDrag.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 15 additions & 18 deletions rCWV0.m
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand All @@ -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

0 comments on commit 37328e3

Please sign in to comment.