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

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

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


Revision 1.10 - (show annotations) (download)
Tue Mar 29 15:53:45 2011 UTC (13 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint63g, checkpoint64, checkpoint65, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint65o, 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, HEAD
Changes since 1.9: +4 -1 lines
use maksInW & maskInS in biharmonic diffusion calculation:
 => assume that zero gradient outside the OB region.

1 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/gad_grad_y.F,v 1.9 2008/10/22 00:28:47 jmc Exp $
2 C $Name: $
3
4 #include "GAD_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: GAD_GRAD_Y
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE GAD_GRAD_Y(
11 I bi,bj,k,
12 I yA,
13 U tracer,
14 O dTdy,
15 I myThid )
16
17 C !DESCRIPTION:
18 C Calculates the meridional gradient of a tracer: $\partial_y \theta
19 C = \frac{1}{\Delta y_c} \delta_j \theta$
20 C and multiplies by the area.
21
22 C !USES: ===============================================================
23 IMPLICIT NONE
24 #include "SIZE.h"
25 #include "EEPARAMS.h"
26 #include "GRID.h"
27
28 C !INPUT PARAMETERS: ===================================================
29 C bi,bj :: tile indices
30 C k :: vertical level
31 C myThid :: thread number
32 INTEGER bi,bj,k
33 _RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
34 INTEGER myThid
35
36 C !UPDATED PARAMETERS: =================================================
37 C tracer :: tracer field
38 C (NOTE: only udate the corner-halo region when using CS-grid)
39 _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
40
41 C !OUTPUT PARAMETERS: ==================================================
42 C dTdy :: meridional gradient (units= [Tr_units]*[r_units])
43 _RL dTdy (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
44
45 C !LOCAL VARIABLES: ====================================================
46 C i,j :: loop indices
47 INTEGER i,j
48 CEOP
49
50 cph-exch2#ifndef ALLOW_AUTODIFF_TAMC
51 C-- Internal exchange for calculations in Y
52 IF (useCubedSphereExchange) THEN
53 CALL FILL_CS_CORNER_TR_RL( 2, .FALSE.,
54 & tracer, bi,bj, myThid )
55 ENDIF
56 cph-exch2#endif
57
58 C o Meridional tracer gradient
59 DO i=1-Olx,sNx+Olx
60 dTdy(I,1-Oly)=0.
61 ENDDO
62 DO j=1-Oly+1,sNy+Oly
63 DO i=1-Olx,sNx+Olx
64 dTdy(i,j) = yA(i,j)
65 & *_recip_dyC(i,j,bi,bj)*recip_deepFacC(k)
66 & *(tracer(i,j)-tracer(i,j-1))
67 #ifdef ISOTROPIC_COS_SCALING
68 #ifdef COSINEMETH_III
69 & *sqCosFacV(j,bi,bj)
70 #endif
71 #endif
72 #ifdef ALLOW_OBCS
73 & *maskInS(i,j,bi,bj)
74 #endif
75 ENDDO
76 ENDDO
77
78 RETURN
79 END

  ViewVC Help
Powered by ViewVC 1.1.22