/[MITgcm]/MITgcm/pkg/mom_common/mom_calc_hdiv.F
ViewVC logotype

Contents of /MITgcm/pkg/mom_common/mom_calc_hdiv.F

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


Revision 1.3 - (show annotations) (download)
Wed Jun 7 01:55:14 2006 UTC (18 years ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint58l_post, mitgcm_mapl_00, checkpoint58u_post, checkpoint58w_post, checkpoint60, checkpoint61, checkpoint62, 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, 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.2: +2 -2 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/mom_common/mom_calc_hdiv.F,v 1.2 2005/09/23 19:16:25 jmc Exp $
2 C $Name: $
3
4 #include "MOM_COMMON_OPTIONS.h"
5
6 SUBROUTINE MOM_CALC_HDIV(
7 I bi,bj,k, hDivScheme,
8 I uFld, vFld,
9 O hDiv,
10 I myThid)
11 IMPLICIT NONE
12 C /==========================================================\
13 C | S/R MOM_CALC_HDIV |
14 C |==========================================================|
15 C \==========================================================/
16
17 C == Global variables ==
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "PARAMS.h"
21 #include "GRID.h"
22 C == Routine arguments ==
23 C myThid - Instance number for this innvocation of CALC_MOM_RHS
24 INTEGER bi,bj,k,hDivScheme
25 _RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
26 _RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
27 _RL hDiv(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
28 INTEGER myThid
29
30 C == Local variables ==
31 INTEGER i,j
32
33 IF (hDivScheme.EQ.1) THEN
34 DO J=1-Oly,sNy+Oly-1
35 DO I=1-Olx,sNx+Olx-1
36 C This discretization is the straight forward horizontal divergence
37 C that only considers the horizontal grid variations.
38 hDiv(I,J)=(
39 & uFld(i+1, j )*dyg(i+1, j ,bi,bj)
40 & -uFld( i , j )*dyg( i , j ,bi,bj)
41 & +vFld( i ,j+1)*dxg( i ,j+1,bi,bj)
42 & -vFld( i , j )*dxg( i , j ,bi,bj)
43 & )*recip_rA(I,J,bi,bj)
44 ENDDO
45 ENDDO
46
47 ELSEIF (hDivScheme.EQ.2) THEN
48 DO J=1-Oly,sNy+Oly-1
49 DO I=1-Olx,sNx+Olx-1
50 C This discretization takes into account the fractional areas
51 C due to the lopping. Whether we should do this is not clear!
52 hDiv(I,J)=
53 & ( ( uFld(i+1, j )*dyg(i+1, j ,bi,bj)*hFacW(i+1, j ,K,bi,bj)
54 & -uFld( i , j )*dyg( i , j ,bi,bj)*hFacW( i , j ,K,bi,bj) )
55 & +( vFld( i ,j+1)*dxg( i ,j+1,bi,bj)*hFacS( i ,j+1,K,bi,bj)
56 & -vFld( i , j )*dxg( i , j ,bi,bj)*hFacS( i , j ,K,bi,bj) )
57 & )*recip_rA(I,J,bi,bj)
58 & *_recip_hFacC(i,j,k,bi,bj)
59 ENDDO
60 ENDDO
61
62 ELSE
63 STOP 'S/R MOM_CALC_HDIV: We should never reach this point!'
64 ENDIF
65
66 RETURN
67 END

  ViewVC Help
Powered by ViewVC 1.1.22