/[MITgcm]/MITgcm_contrib/natl_12/code/gad_diff_x.F
ViewVC logotype

Contents of /MITgcm_contrib/natl_12/code/gad_diff_x.F

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


Revision 1.1 - (show annotations) (download)
Thu Aug 7 13:38:07 2003 UTC (20 years, 9 months ago) by cnh
Branch: MAIN
CVS Tags: HEAD
Mods to scale diffKh with grid spacing

1 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/gad_diff_x.F,v 1.3 2001/09/21 13:11:43 adcroft Exp $
2 C $Name: checkpoint51c_post $
3
4 #include "GAD_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: GAD_DIFF_X
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE GAD_DIFF_X(
11 I bi,bj,k,
12 I xA, 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 k :: vertical level
32 C xA :: area of face at U points
33 C diffKh :: horizontal diffusivity
34 C tracer :: tracer field
35 C myThid :: thread number
36 INTEGER bi,bj,k
37 _RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
38 _RL diffKh
39 _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
40 INTEGER myThid
41
42 C !OUTPUT PARAMETERS: ==================================================
43 C dfx :: zonal diffusive flux
44 _RL dfx (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45
46 C !LOCAL VARIABLES: ====================================================
47 C i,j :: loop indices
48 INTEGER i,j
49 _RS gridScalingAh
50 CEOP
51
52 DO j=1-Oly,sNy+Oly
53 dfx(1-Olx,j)=0.
54 DO i=1-Olx+1,sNx+Olx
55 gridScalingAh = (_dxC(i,j,bi,bj)**2)/(5000.**2)
56 dfx(i,j) = -diffKh*xA(i,j)
57 & *_recip_dxC(i,j,bi,bj)
58 & *(Tracer(i,j)-Tracer(i-1,j))
59 & *CosFacU(j,bi,bj)
60 ENDDO
61 ENDDO
62
63 RETURN
64 END

  ViewVC Help
Powered by ViewVC 1.1.22