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

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

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


Revision 1.1 - (show 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 C $Header: $
2 C $Name: $
3
4 #include "GAD_OPTIONS.h"
5
6 SUBROUTINE GAD_DEL2(
7 I bi,bj,k,
8 I dTdx,dTdy,
9 O del2,
10 I myThid )
11 IMPLICIT NONE
12
13 C == GLobal variables ==
14 #include "SIZE.h"
15 #include "GRID.h"
16
17 C == Routine arguments ==
18 INTEGER bi,bj,k
19 _RL dTdx(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
20 _RL dTdy(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
21 _RL del2(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
22 INTEGER myThid
23
24 C == Local variables ==
25 INTEGER i,j
26
27 C Difference of zonal fluxes ...
28 DO j=1-Oly,sNy+Oly
29 DO i=1-Olx,sNx+Olx-1
30 del2(i,j)=dTdx(i+1,j)-dTdx(i,j)
31 ENDDO
32 del2(sNx+Olx,j)=0.
33 ENDDO
34
35 C ... add difference of meridional fluxes and divide by volume
36 DO j=1-Oly,sNy+Oly-1
37 DO i=1-Olx,sNx+Olx
38 del2(i,j)=recip_rA(i,j,bi,bj)
39 & *recip_drF(k)
40 & *_recip_hFacC(i,j,k,bi,bj)
41 & *(
42 & del2(i,j)
43 & +( dTdy(i,j+1)-dTdy(i,j) )
44 & )
45 ENDDO
46 ENDDO
47
48 RETURN
49 END

  ViewVC Help
Powered by ViewVC 1.1.22