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

Annotation of /MITgcm/pkg/generic_advdiff/gad_diff_r.F

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


Revision 1.6 - (hide annotations) (download)
Tue Dec 5 05:26:46 2006 UTC (17 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint65b, checkpoint65a, checkpoint62c, checkpoint59, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint58t_post, checkpoint63g, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint58w_post, mitgcm_mapl_00, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint62b, checkpoint58v_post, 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, checkpoint61f, checkpoint58x_post, checkpoint61n, checkpoint59j, checkpoint61q, checkpoint61e, checkpoint58u_post, checkpoint58s_post, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.5: +8 -8 lines
start to implement deep-atmosphere and/or anelastic formulation

1 jmc 1.6 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/gad_diff_r.F,v 1.5 2005/06/22 00:27:47 jmc Exp $
2 adcroft 1.2 C $Name: $
3 adcroft 1.1
4     #include "GAD_OPTIONS.h"
5    
6 adcroft 1.2 CBOP
7     C !ROUTINE: GAD_DIFF_R
8    
9     C !INTERFACE: ==========================================================
10 jmc 1.6 SUBROUTINE GAD_DIFF_R(
11 adcroft 1.1 I bi,bj,k,
12     I KappaR,
13     I tracer,
14     O dfr,
15     I myThid )
16 adcroft 1.2
17     C !DESCRIPTION:
18 adcroft 1.3 C Calculates the area integrated vertical flux due to down-gradient
19     C diffusion of a tracer:
20 adcroft 1.2 C \begin{equation*}
21 adcroft 1.3 C F^r_{diff} = - A^r \kappa_r \frac{1}{\Delta r_c} \delta_k \theta
22 adcroft 1.2 C \end{equation*}
23    
24     C !USES: ===============================================================
25 adcroft 1.1 IMPLICIT NONE
26     #include "SIZE.h"
27     #include "GRID.h"
28     #include "EEPARAMS.h"
29     #include "PARAMS.h"
30    
31 adcroft 1.2 C !INPUT PARAMETERS: ===================================================
32     C bi,bj :: tile indices
33     C k :: vertical level
34     C KappaR :: vertical diffusivity
35     C tracer :: tracer field
36     C myThid :: thread number
37 adcroft 1.1 INTEGER bi,bj,k
38 jmc 1.4 _RL KappaR(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
39 adcroft 1.1 _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
40 adcroft 1.2 INTEGER myThid
41    
42     C !OUTPUT PARAMETERS: ==================================================
43     C dfr :: vertical diffusive flux
44 adcroft 1.1 _RL dfr (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45    
46 adcroft 1.2 C !LOCAL VARIABLES: ====================================================
47     C i,j :: loop indices
48     C km1 :: =k+1 for k<Nr, =Nr for k>-Nr
49 adcroft 1.1 INTEGER i,j,km1
50 adcroft 1.3 CEOP
51 adcroft 1.1
52 jmc 1.6 km1=MAX(1,k-1)
53 adcroft 1.1
54 jmc 1.6 IF (k.EQ.1 .OR. k.GT.Nr) THEN
55 adcroft 1.1 DO j=1-Oly,sNy+Oly
56     DO i=1-Olx,sNx+Olx
57     dfr(i,j) = 0.
58     ENDDO
59     ENDDO
60     ELSE
61     DO j=1-Oly,sNy+Oly
62     DO i=1-Olx,sNx+Olx
63 jmc 1.6 dfr(i,j) = -KappaR(i,j)
64     & *_rA(i,j,bi,bj)*deepFac2F(k)*rhoFacF(k)
65     & *recip_drC(k)
66     & *(tracer(i,j,k,bi,bj)-tracer(i,j,km1,bi,bj))*rkSign
67 adcroft 1.1 ENDDO
68     ENDDO
69     ENDIF
70    
71     RETURN
72     END

  ViewVC Help
Powered by ViewVC 1.1.22