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

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

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


Revision 1.2 - (hide annotations) (download)
Thu Sep 20 20:07:06 2001 UTC (22 years, 8 months ago) by adcroft
Branch: MAIN
Changes since 1.1: +23 -7 lines
Added comments in form compatible with "protex".

1 adcroft 1.2 C $Header: /u/gcmpack/models/MITgcmUV/pkg/generic_advdiff/gad_grad_y.F,v 1.1 2001/05/30 19:34:48 adcroft Exp $
2     C $Name: $
3 adcroft 1.1
4     #include "GAD_OPTIONS.h"
5    
6 adcroft 1.2 CBOP
7     C !ROUTINE: GAD_GRAD_Y
8    
9     C !INTERFACE: ==========================================================
10 adcroft 1.1 SUBROUTINE GAD_GRAD_Y(
11     I bi,bj,k,
12     I yA,
13     I tracer,
14     O dTdy,
15     I myThid )
16 adcroft 1.2
17     C !DESCRIPTION:
18     C Calculates the meridional gradient of a tracer: $\partial_y \theta$
19    
20     C !USES: ===============================================================
21 adcroft 1.1 IMPLICIT NONE
22     #include "SIZE.h"
23     #include "GRID.h"
24    
25 adcroft 1.2 C !INPUT PARAMETERS: ===================================================
26     C bi,bj :: tile indices
27     C k :: vertical level
28     C tracer :: tracer field
29     C myThid :: thread number
30 adcroft 1.1 INTEGER bi,bj,k
31     _RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
32     _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
33 adcroft 1.2 INTEGER myThid
34    
35     C !OUTPUT PARAMETERS: ==================================================
36     C dTdy :: meridional gradient
37 adcroft 1.1 _RL dTdy (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
38    
39 adcroft 1.2 C !LOCAL VARIABLES: ====================================================
40     C i,j :: loop indices
41 adcroft 1.1 INTEGER i,j
42 adcroft 1.2 CEOP
43 adcroft 1.1
44     C o Meridional tracer gradient
45     DO i=1-Olx,sNx+Olx
46     dTdy(I,1-Oly)=0.
47     ENDDO
48     DO j=1-Oly+1,sNy+Oly
49     DO i=1-Olx,sNx+Olx
50     dTdy(i,j) = _recip_dyC(i,j,bi,bj)*yA(i,j)
51     & *(tracer(i,j)-tracer(i,j-1))
52     #ifdef ISOTROPIC_COS_SCALING
53     #ifdef COSINEMETH_III
54     & *sqCosFacV(j,bi,bj)
55     #endif
56     #endif
57     ENDDO
58     ENDDO
59    
60     RETURN
61     END

  ViewVC Help
Powered by ViewVC 1.1.22