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

Annotation of /MITgcm/pkg/generic_advdiff/gad_c2_adv_x.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: +28 -7 lines
Added comments in form compatible with "protex".

1 adcroft 1.2 C $Header: /u/gcmpack/models/MITgcmUV/pkg/generic_advdiff/gad_c2_adv_x.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_C2_ADV_X
8    
9     C !INTERFACE: ==========================================================
10 adcroft 1.1 SUBROUTINE GAD_C2_ADV_X(
11     I bi,bj,k,
12     I uTrans,
13     I tracer,
14     O uT,
15     I myThid )
16 adcroft 1.2
17     C !DESCRIPTION:
18     C Calculates the zonal flux due to advection of a tracer using
19     C centered second-order interpolation:
20     C \begin{equation*}
21     C F^x_{adv} = u \theta
22     C \end{equation*}
23    
24     C !USES: ===============================================================
25 adcroft 1.1 IMPLICIT NONE
26     #include "SIZE.h"
27     #include "GRID.h"
28    
29 adcroft 1.2 C !INPUT PARAMETERS: ===================================================
30     C bi,bj :: tile indices
31     C k :: vertical level
32     C uTrans :: zonal volume transport
33     C tracer :: tracer field
34     C myThid :: thread number
35 adcroft 1.1 INTEGER bi,bj,k
36     _RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
37     _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
38 adcroft 1.2 INTEGER myThid
39    
40     C !OUTPUT PARAMETERS: ==================================================
41     C uT :: zonal advective flux
42 adcroft 1.1 _RL uT (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43    
44 adcroft 1.2 C !LOCAL VARIABLES: ====================================================
45     C i,j :: loop indices
46 adcroft 1.1 INTEGER i,j
47 adcroft 1.2 CEOP
48 adcroft 1.1
49     DO j=1-Oly,sNy+Oly
50     uT(1-Olx,j)=0.
51     DO i=1-Olx+1,sNx+Olx
52     uT(i,j) =
53     & uTrans(i,j)*(Tracer(i,j)+Tracer(i-1,j))*0.5 _d 0
54     ENDDO
55     ENDDO
56    
57     RETURN
58     END

  ViewVC Help
Powered by ViewVC 1.1.22