/[MITgcm]/MITgcm/pkg/generic_advdiff/gad_os7mp_adv_y.F
ViewVC logotype

Diff of /MITgcm/pkg/generic_advdiff/gad_os7mp_adv_y.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by adcroft, Sat Jan 20 21:20:11 2007 UTC revision 1.2 by mlosch, Sun Jan 21 17:25:31 2007 UTC
# Line 122  C        7th order correction [i+2 i+1 i Line 122  C        7th order correction [i+2 i+1 i
122           Phi = Phi - Msk * Fac * Del           Phi = Phi - Msk * Fac * Del
123    
124           DelIp = ( Qip - Qi ) * MskI           DelIp = ( Qip - Qi ) * MskI
125           Phi = sign(1.,Phi)*sign(1.,DelIp)*abs(Phi+Eps)/abs(DelIp+Eps)           Phi = sign(1. _d 0,Phi)*sign(1. _d 0,DelIp)
126         &        *abs(Phi+Eps)/abs(DelIp+Eps)
127    
128           DelI = ( Qi - Qim ) * MskIm           DelI = ( Qi - Qim ) * MskIm
129           rp1h =sign(1.,DelI)*sign(1.,DelIp)*abs(DelI+Eps)/abs(DelIp+Eps)           rp1h =sign(1. _d 0,DelI)*sign(1. _d 0,DelIp)
130         &        *abs(DelI+Eps)/abs(DelIp+Eps)
131    
132  C        TVD limiter  C        TVD limiter
133  !        Phi = max(0., min( 2./(1-cfl), Phi, 2.*rp1h/cfl ) )  !        Phi = max(0. _d 0, min( 2./(1-cfl), Phi, 2.*rp1h/cfl ) )
134    
135  C        MP limiter  C        MP limiter
136           d2   = ( ( Qip + Qim ) - 2.*Qi  ) * MskI * MskIm           d2   = ( ( Qip + Qim ) - 2.*Qi  ) * MskI * MskIm
# Line 138  C        MP limiter Line 140  C        MP limiter
140           B = 4.*d2p1 - d2           B = 4.*d2p1 - d2
141           C = d2           C = d2
142           D = d2p1;           D = d2p1;
143           dp1h = max(min(A,B,C,D),0.)+min(max(A,B,C,D),0.)           dp1h = max(min(A,B,C,D),0. _d 0)+min(max(A,B,C,D),0. _d 0)
144           A = 4.*d2m1 - d2           A = 4.*d2m1 - d2
145           B = 4.*d2 - d2m1           B = 4.*d2 - d2m1
146           C = d2m1           C = d2m1
147           D = d2;           D = d2;
148           dm1h = max(min(A,B,C,D),0.)+min(max(A,B,C,D),0.)           dm1h = max(min(A,B,C,D),0. _d 0)+min(max(A,B,C,D),0. _d 0)
149           qMD = 0.5*( ( Qi + Qip ) - dp1h )           qMD = 0.5*( ( Qi + Qip ) - dp1h )
150           qUL = Qi + (1.-cfl)/cfl*( Qi-Qim )           qUL = Qi + (1.-cfl)/cfl*( Qi-Qim )
151           qLC = Qi + 0.5*( 1.+dm1h/(Qi-Qim+Eps) )*(qUL-Qi)           qLC = Qi + 0.5*( 1.+dm1h/(Qi-Qim+Eps) )*(qUL-Qi)
152           PhiMD = 2./(1.-cfl)*(qMD-Qi+Eps)/(Qip-Qi+Eps)           PhiMD = 2./(1.-cfl)*(qMD-Qi+Eps)/(Qip-Qi+Eps)
153           PhiLC = 2.*rp1h/cfl*(qLC-Qi+Eps)/(qUL-Qi+Eps)           PhiLC = 2.*rp1h/cfl*(qLC-Qi+Eps)/(qUL-Qi+Eps)
154           PhiMin = max(min(0.,PhiMD),min(0.,2.*rp1h/cfl,PhiLC))           PhiMin = max(min(0. _d 0,PhiMD),
155           PhiMax = min(max(2./(1.-cfl),PhiMD),max(0.,2.*rp1h/cfl,PhiLC))       &        min(0. _d 0,2.*rp1h/cfl,PhiLC))
156             PhiMax = min(max(2. _d 0/(1.-cfl),PhiMD),
157         &        max(0. _d 0,2.*rp1h/cfl,PhiLC))
158           Phi = max(PhiMin,min(Phi,PhiMax))           Phi = max(PhiMin,min(Phi,PhiMax))
159    
160           Psi = Phi * 0.5 * (1. - cfl)           Psi = Phi * 0.5 * (1. - cfl)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22