/[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.1 - (hide annotations) (download)
Wed May 30 19:34:48 2001 UTC (22 years, 11 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint40pre3, checkpoint40pre1, checkpoint40pre7, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, checkpoint40pre2, checkpoint40pre4, checkpoint40pre5, checkpoint40
Added "gad" package. Needs generalizing to allow selection
of advection schemes at run-time and different schemes for
each tracer.

1 adcroft 1.1 C $Header: $
2     C $Name: $
3    
4     #include "GAD_OPTIONS.h"
5    
6     SUBROUTINE GAD_DIFF_R(
7     I bi,bj,k,
8     I KappaR,
9     I tracer,
10     O dfr,
11     I myThid )
12     IMPLICIT NONE
13    
14     C == GLobal variables ==
15     #include "SIZE.h"
16     #include "GRID.h"
17     #include "EEPARAMS.h"
18     #include "PARAMS.h"
19    
20     C == Routine arguments ==
21     INTEGER bi,bj,k
22     _RL KappaR(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
23     _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
24     _RL dfr (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
25     INTEGER myThid
26    
27     C == Local variables ==
28     INTEGER i,j,km1
29     LOGICAL TOP_LAYER
30    
31     km1=max(1,k-1)
32    
33     IF (k.eq.1 .OR. k.gt.Nr) THEN
34     DO j=1-Oly,sNy+Oly
35     DO i=1-Olx,sNx+Olx
36     dfr(i,j) = 0.
37     ENDDO
38     ENDDO
39     ELSE
40     DO j=1-Oly,sNy+Oly
41     DO i=1-Olx,sNx+Olx
42     dfr(i,j) =
43     & -_rA(i,j,bi,bj)
44     & *KappaR(i,j,k)*recip_drC(k)
45     & *(Tracer(i,j,km1,bi,bj)-Tracer(i,j,k,bi,bj))*rkFac
46     ENDDO
47     ENDDO
48     ENDIF
49    
50     RETURN
51     END

  ViewVC Help
Powered by ViewVC 1.1.22