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

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

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


Revision 1.2.2.1 - (show annotations) (download)
Tue Feb 26 16:04:49 2002 UTC (22 years, 4 months ago) by adcroft
Branch: release1
CVS Tags: release1_p13_pre, release1_p13, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, release1_chkpt44d_post, release1_p11, release1_p12, release1_p10, release1_p16, release1_p17, release1_p14, release1_p15, release1_p12_pre
Branch point for: release1_50yr
Changes since 1.2: +4 -4 lines
Merging changes on MAIN between checkpoint43 and checkpoint43a-release1mods
Command: cvs -q update -jcheckpoint43 -jcheckpoint43a-release1mods -d -P

These changes are most of the changes between c43 and c44 except those
that occured after "12:45 11 Jan 2002". As far as I can tell it is
checkpoint43 with the following mods:

  o fix bug in mom_vi_del2uv
  o select when filters are applied ; add options to zonal_filter (data.zonfilt)  o gmredi: fix Pb in the adiabatic form ; add options (.e.g. Bolus advection)
  o update AIM experiments (NCEP input files)
  o improve and extend diagnostics (Monitor, TimeAve with NonLin-FrSurf)
  o added some stuff for AD
  o Jamar wet-points

This update does not contain the following mods that are in checkpoint44

  o bug fix in pkg/generic_advdiff/
    - thread related bug, bi,bj arguments in vertical advection routines
  o some changes to pkg/autodiff, pkg/cost, pkg/exf, pkg/ecco,
    verification/carbon and model/src/ related to adjoint
  o some new Matlab scripts for diagnosing model density
    - utils/matlab/dens_poly3.m and ini_poly3.m

The list of exclusions is accurate based on a "cvs diff". The list of
inclusions is based on the record in doc/tag-index which may not be complete.

1 C $Header: /u/gcmpack/MITgcm/pkg/mom_vecinv/mom_vi_hdissip.F,v 1.3 2001/10/30 23:11:51 jmc Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 SUBROUTINE MOM_VI_HDISSIP(
7 I bi,bj,k,
8 I hDiv,vort3,hFacZ,dStar,zStar,
9 O uDissip,vDissip,
10 I myThid)
11 IMPLICIT NONE
12 C
13 C Calculate horizontal dissipation terms
14 C [del^2 - del^4] (u,v)
15 C
16
17 C == Global variables ==
18 #include "SIZE.h"
19 #include "GRID.h"
20 #include "EEPARAMS.h"
21 #include "PARAMS.h"
22
23 C == Routine arguments ==
24 INTEGER bi,bj,k
25 _RL hDiv(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
26 _RL vort3(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
27 _RS hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
28 _RL dStar(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
29 _RL zStar(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
30 _RL uDissip(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
31 _RL vDissip(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
32 INTEGER myThid
33
34 C == Local variables ==
35 INTEGER I,J
36 _RL Zip,Zij,Zpj,Dim,Dij,Dmj,uD2,vD2,uD4,vD4
37
38 C - Laplacian and bi-harmonic terms
39 DO j=2-Oly,sNy+Oly-1
40 DO i=2-Olx,sNx+Olx-1
41
42 c Dim=dyF( i ,j-1,bi,bj)*hFacC( i ,j-1,k,bi,bj)*hDiv( i ,j-1)
43 c Dij=dyF( i , j ,bi,bj)*hFacC( i , j ,k,bi,bj)*hDiv( i , j )
44 c Dmj=dyF(i-1, j ,bi,bj)*hFacC(i-1, j ,k,bi,bj)*hDiv(i-1, j )
45 c Dim=dyF( i ,j-1,bi,bj)* hDiv( i ,j-1)
46 c Dij=dyF( i , j ,bi,bj)* hDiv( i , j )
47 c Dmj=dyF(i-1, j ,bi,bj)* hDiv(i-1, j )
48 Dim= hDiv( i ,j-1)
49 Dij= hDiv( i , j )
50 Dmj= hDiv(i-1, j )
51
52 c Zip=dxV( i ,j+1,bi,bj)*hFacZ( i ,j+1)*vort3( i ,j+1)
53 c Zij=dxV( i , j ,bi,bj)*hFacZ( i , j )*vort3( i , j )
54 c Zpj=dxV(i+1, j ,bi,bj)*hFacZ(i+1, j )*vort3(i+1, j )
55 Zip= hFacZ( i ,j+1)*vort3( i ,j+1)
56 Zij= hFacZ( i , j )*vort3( i , j )
57 Zpj= hFacZ(i+1, j )*vort3(i+1, j )
58
59 c uD2 = recip_rAw(i,j,bi,bj)*(
60 c & recip_hFacW(i,j,k,bi,bj)*viscAh*( (Dij-Dmj)*cosFacU(j,bi,bj) )
61 c & -recip_hFacW(i,j,k,bi,bj)*viscAh*( Zip-Zij ) )
62 c uD2 = recip_rAw(i,j,bi,bj)*(
63 c & viscAh*( (Dij-Dmj)*cosFacU(j,bi,bj) )
64 c & -recip_hFacW(i,j,k,bi,bj)*viscAh*( Zip-Zij ) )
65 uD2 = viscAh*(
66 & cosFacU(j,bi,bj)*( Dij-Dmj )*recip_DXC(i,j,bi,bj)
67 & -recip_hFacW(i,j,k,bi,bj)*( Zip-Zij )*recip_DYG(i,j,bi,bj) )
68
69 c vD2 = recip_rAs(i,j,bi,bj)*(
70 c & recip_hFacS(i,j,k,bi,bj)*viscAh*( (Zpj-Zij)*cosFacV(j,bi,bj) )
71 c & +recip_hFacS(i,j,k,bi,bj)*viscAh*( Dij-Dim ) )
72 c vD2 = recip_rAs(i,j,bi,bj)*(
73 c & recip_hFacS(i,j,k,bi,bj)*viscAh*( (Zpj-Zij)*cosFacV(j,bi,bj) )
74 c & + viscAh*( Dij-Dim ) )
75 vD2 = viscAh*(
76 & recip_hFacS(i,j,k,bi,bj)*( Zpj-Zij )*recip_DXG(i,j,bi,bj)
77 & *cosFacV(j,bi,bj)
78 & +( Dij-Dim )*recip_DYC(i,j,bi,bj) )
79
80 c Dim=dyF( i ,j-1,bi,bj)*hFacC( i ,j-1,k,bi,bj)*dStar( i ,j-1)
81 c Dij=dyF( i , j ,bi,bj)*hFacC( i , j ,k,bi,bj)*dStar( i , j )
82 c Dmj=dyF(i-1, j ,bi,bj)*hFacC(i-1, j ,k,bi,bj)*dStar(i-1, j )
83 Dim=dyF( i ,j-1,bi,bj)* dStar( i ,j-1)
84 Dij=dyF( i , j ,bi,bj)* dStar( i , j )
85 Dmj=dyF(i-1, j ,bi,bj)* dStar(i-1, j )
86
87 Zip=dxV( i ,j+1,bi,bj)*hFacZ( i ,j+1)*zStar( i ,j+1)
88 Zij=dxV( i , j ,bi,bj)*hFacZ( i , j )*zStar( i , j )
89 Zpj=dxV(i+1, j ,bi,bj)*hFacZ(i+1, j )*zStar(i+1, j )
90
91 c uD4 = recip_rAw(i,j,bi,bj)*(
92 c & recip_hFacW(i,j,k,bi,bj)*viscA4*( (Dij-Dmj)*cosFacU(j,bi,bj) )
93 c & -recip_hFacW(i,j,k,bi,bj)*viscA4*( Zip-Zij ) )
94 uD4 = recip_rAw(i,j,bi,bj)*(
95 & viscA4*( (Dij-Dmj)*cosFacU(j,bi,bj) )
96 & -recip_hFacW(i,j,k,bi,bj)*viscA4*( Zip-Zij ) )
97
98 c vD4 = recip_rAs(i,j,bi,bj)*(
99 c & recip_hFacS(i,j,k,bi,bj)*viscA4*( (Zpj-Zij)*cosFacV(j,bi,bj) )
100 c & +recip_hFacS(i,j,k,bi,bj)*viscA4*( Dij-Dim ) )
101 vD4 = recip_rAs(i,j,bi,bj)*(
102 & recip_hFacS(i,j,k,bi,bj)*viscA4*( (Zpj-Zij)*cosFacV(j,bi,bj) )
103 & + viscA4*( Dij-Dim ) )
104
105 uDissip(i,j) = uD2 - uD4
106 vDissip(i,j) = vD2 - vD4
107
108 ENDDO
109 ENDDO
110
111 RETURN
112 END

  ViewVC Help
Powered by ViewVC 1.1.22