/[MITgcm]/MITgcm/pkg/cheapaml/gad_diff_2d_x.F
ViewVC logotype

Contents of /MITgcm/pkg/cheapaml/gad_diff_2d_x.F

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


Revision 1.6 - (show annotations) (download)
Mon Aug 27 19:07:55 2012 UTC (11 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63s, checkpoint64, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.5: +6 -7 lines
back to previous version (no unused variables)

1 C $Header: /u/gcmpack/MITgcm/pkg/cheapaml/gad_diff_2d_x.F,v 1.4 2011/12/28 16:50:17 jmc Exp $
2 C $Name: $
3
4 #include "GAD_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: GAD_DIFF_2d_X
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE GAD_DIFF_2d_X(
11 I bi,bj,
12 I diffKh,
13 I tracer,
14 O dfx,
15 I myThid )
16
17 C !DESCRIPTION:
18 C Calculates the area integrated zonal flux due to down-gradient diffusion
19 C of a tracer:
20 C \begin{equation*}
21 C F^x_{diff} = - A^x \kappa_h \frac{1}{\Delta x_c} \delta_i \theta
22 C \end{equation*}
23
24 C !USES: ===============================================================
25 IMPLICIT NONE
26 #include "SIZE.h"
27 #include "GRID.h"
28
29 C !INPUT PARAMETERS: ===================================================
30 C bi,bj :: tile indices
31 C diffKh :: horizontal diffusivity
32 C tracer :: tracer field
33 C myThid :: thread number
34 INTEGER bi,bj
35 _RL diffKh
36 _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
37 INTEGER myThid
38
39 C !OUTPUT PARAMETERS: ==================================================
40 C dfx :: zonal diffusive flux
41 _RL dfx (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
42
43 C !LOCAL VARIABLES: ====================================================
44 C i,j :: loop indices
45 INTEGER i,j
46 CEOP
47
48 DO j=1-Oly,sNy+Oly
49 dfx(1-Olx,j)=0.
50 DO i=1-Olx+1,sNx+Olx
51 dfx(i,j) = -diffKh
52 & *_recip_dxC(i,j,bi,bj)
53 & *(Tracer(i,j)-Tracer(i-1,j))
54 & *CosFacU(j,bi,bj)
55 ENDDO
56 ENDDO
57
58 RETURN
59 END
60

  ViewVC Help
Powered by ViewVC 1.1.22