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

Contents of /MITgcm/pkg/generic_advdiff/gad_c2_impl_r.F

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


Revision 1.5 - (show annotations) (download)
Wed Jun 7 01:55:14 2006 UTC (17 years, 10 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint58l_post, mitgcm_mapl_00, checkpoint58u_post, checkpoint58w_post, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint58r_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58h_post, checkpoint58q_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint59, checkpoint58i_post, checkpoint58o_post, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y, checkpoint58m_post
Changes since 1.4: +5 -5 lines
Modifications for bottom topography control
o replace hFacC by _hFacC at various places
o replace ALLOW_HFACC_CONTROL by ALLOW_DEPTH_CONTROL
o add non-self-adjoint cg2d_nsa
o update autodiff support routines
o re-initialise hfac after ctrl_depth_ini
o works for 5x5 box, doesnt work for global_ocean.90x40x15

1 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/gad_c2_impl_r.F,v 1.4 2005/06/22 00:27:47 jmc Exp $
2 C $Name: $
3
4 #include "GAD_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: GAD_C2_IMPL_R
8 C !INTERFACE:
9 SUBROUTINE GAD_C2_IMPL_R(
10 I bi,bj,k, iMin,iMax,jMin,jMax,
11 I deltaTarg, rTrans,
12 O a3d, b3d, c3d,
13 I myThid )
14
15 C !DESCRIPTION:
16 C Compute matrix element to solve vertical advection implicitly
17 C using centered second-order scheme The contribution of vertical
18 C transport at interface k is added to matrix lines k and k-1.
19
20 C !USES:
21 IMPLICIT NONE
22
23 C == Global variables ===
24 #include "SIZE.h"
25 #include "GRID.h"
26 #include "EEPARAMS.h"
27 #include "PARAMS.h"
28
29 C !INPUT/OUTPUT PARAMETERS:
30 C == Routine Arguments ==
31 C bi,bj :: tile indices
32 C k :: vertical level
33 C iMin,iMax :: computation domain
34 C jMin,jMax :: computation domain
35 C deltaTarg :: time step
36 C rTrans :: vertical volume transport
37 C a3d :: lower diagonal of the tridiagonal matrix
38 C b3d :: main diagonal of the tridiagonal matrix
39 C c3d :: upper diagonal of the tridiagonal matrix
40 C myThid :: thread number
41 INTEGER bi,bj,k
42 INTEGER iMin,iMax,jMin,jMax
43 _RL deltaTarg(Nr)
44 _RL rTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45 _RL a3d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
46 _RL b3d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
47 _RL c3d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
48 INTEGER myThid
49
50 C == Local Variables ==
51 C i,j :: loop indices
52 C rCenter :: centered contribution
53 INTEGER i,j
54 _RL rCenter
55 CEOP
56
57 C-- process interior interface only:
58 IF ( k.GT.1 .AND. k.LE.Nr ) THEN
59
60 C-- Add centered contribution
61 DO j=jMin,jMax
62 DO i=iMin,iMax
63 rCenter = 0.5 _d 0 *rTrans(i,j)*recip_rA(i,j,bi,bj)*rkSign
64 a3d(i,j,k) = a3d(i,j,k)
65 & - rCenter*deltaTarg(k)
66 & *_recip_hFacC(i,j,k,bi,bj)*recip_drF(k)
67 b3d(i,j,k) = b3d(i,j,k)
68 & - rCenter*deltaTarg(k)
69 & *_recip_hFacC(i,j,k,bi,bj)*recip_drF(k)
70 b3d(i,j,k-1) = b3d(i,j,k-1)
71 & + rCenter*deltaTarg(k-1)
72 & *_recip_hFacC(i,j,k-1,bi,bj)*recip_drF(k-1)
73 c3d(i,j,k-1) = c3d(i,j,k-1)
74 & + rCenter*deltaTarg(k-1)
75 & *_recip_hFacC(i,j,k-1,bi,bj)*recip_drF(k-1)
76 ENDDO
77 ENDDO
78
79 C-- process interior interface only: end
80 ENDIF
81
82 RETURN
83 END

  ViewVC Help
Powered by ViewVC 1.1.22