/[MITgcm]/MITgcm/pkg/mom_vecinv/mom_vi_hdissip.F
ViewVC logotype

Diff of /MITgcm/pkg/mom_vecinv/mom_vi_hdissip.F

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

revision 1.20 by adcroft, Wed Mar 23 18:21:06 2005 UTC revision 1.21 by baylor, Thu Mar 24 14:32:46 2005 UTC
# Line 111  c (and differs by as much as 4X) Line 111  c (and differs by as much as 4X)
111             grdVrt=max(grdVrt,             grdVrt=max(grdVrt,
112       &      abs((vort3(i+1,j+1)-vort3(i+1,j))*recip_DYG(i+1,j,bi,bj)))       &      abs((vort3(i+1,j+1)-vort3(i+1,j))*recip_DYG(i+1,j,bi,bj)))
113    
114             Alth2=viscC2leith*grdVrt*L3             grdDiv=abs((hDiv(i+1,j)-hDiv(i,j))*recip_DXG(i,j,bi,bj))
115             Alth4=viscC4leith*grdVrt*L5             grdDiv=max(grdDiv,
116         &      abs((hDiv(i,j+1)-hDiv(i,j))*recip_DYG(i,j,bi,bj)))
117               grdDiv=max(grdDiv,
118         &      abs((hDiv(i-1,j)-hDiv(i,j))*recip_DXG(i-1,j,bi,bj)))
119               grdDiv=max(grdDiv,
120         &      abs((hDiv(i,j-1)-hDiv(i,j))*recip_DYG(i,j-1,bi,bj)))
121    
122    C This if statement is just to prevent bitwise changes when leithd=0
123               IF ((viscC2leithd.eq.0).and.(viscc4leithd.eq.0)) THEN
124                Alth2=viscC2leith*grdVrt*L3
125                Alth4=viscC4leith*grdVrt*L5
126               ELSE
127                Alth2=sqrt(viscC2leith**2*grdVrt+viscC2leithD**2*grdDiv)*L3
128                Alth4=sqrt(viscC4leith**2*grdVrt+viscC4leithD**2*grdDiv)*L5
129               ENDIF
130           ENDIF           ENDIF
131    
132  C  Harmonic Modified Leith on Div.u points  C  Harmonic Modified Leith on Div.u points
# Line 168  C but this approximation will work on cu Line 182  C but this approximation will work on cu
182             grdVrt=max(grdVrt,             grdVrt=max(grdVrt,
183       &       abs((vort3(i,j-1)-vort3(i,j))*recip_DYG(i,j-1,bi,bj)))       &       abs((vort3(i,j-1)-vort3(i,j))*recip_DYG(i,j-1,bi,bj)))
184    
185             Alth2=viscC2leith*grdVrt*L3             grdDiv=abs((hDiv(i+1,j)-hDiv(i,j))*recip_DXG(i,j,bi,bj))
186             Alth4=viscC4leith*grdVrt*L5             grdDiv=max(grdDiv,
187         &      abs((hDiv(i,j+1)-hDiv(i,j))*recip_DYG(i,j,bi,bj)))
188               grdDiv=max(grdDiv,
189         &      abs((hDiv(i+1,j+1)-hDiv(i,j+1))*recip_DXG(i-1,j,bi,bj)))
190               grdDiv=max(grdDiv,
191         &      abs((hDiv(i+1,j+1)-hDiv(i+1,j))*recip_DYG(i,j-1,bi,bj)))
192    
193    C This if statement is just to prevent bitwise changes when leithd=0
194               IF ((viscC2leithd.eq.0).and.(viscc4leithd.eq.0)) THEN
195                Alth2=viscC2leith*grdVrt*L3
196                Alth4=viscC4leith*grdVrt*L5
197               ELSE
198                Alth2=sqrt(viscC2leith**2*grdVrt+viscC2leithD**2*grdDiv)*L3
199                Alth4=sqrt(viscC4leith**2*grdVrt+viscC4leithD**2*grdDiv)*L5
200               ENDIF
201           ENDIF           ENDIF
202    
203  C  Harmonic Modified Leith on Zeta points  C  Harmonic Modified Leith on Zeta points

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.22