/[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.4 - (show annotations) (download)
Tue Dec 5 05:26:46 2006 UTC (17 years, 6 months ago) by jmc
Branch: MAIN
Changes since 1.3: +4 -7 lines
start to implement deep-atmosphere and/or anelastic formulation

1 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/gad_del2.F,v 1.3 2004/09/24 16:55:44 jmc Exp $
2 C $Name: $
3
4 #include "GAD_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: GAD_DEL2
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE GAD_DEL2(
11 I bi,bj,k,
12 I dTdx,dTdy,
13 O del2,
14 I myThid )
15
16 C !DESCRIPTION:
17 C Calculates the horizontal Laplacian of a tracer:
18 C \begin{equation*}
19 C \nabla^2 \theta = \partial_{xx} \theta + \partial_{yy} \theta
20 C \end{equation*}
21
22 C !USES: ===============================================================
23 IMPLICIT NONE
24 #include "SIZE.h"
25 #include "GRID.h"
26
27 C !INPUT PARAMETERS: ===================================================
28 C bi,bj :: tile indices
29 C k :: vertical level
30 C dTx :: zonal tracer gradient
31 C dTy :: meridional tracer gradient
32 C myThid :: thread number
33 INTEGER bi,bj,k
34 _RL dTdx(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
35 _RL dTdy(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
36 INTEGER myThid
37
38 C !OUTPUT PARAMETERS: ==================================================
39 C del2 :: Laplacian of tracer
40 _RL del2(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
41
42 C !LOCAL VARIABLES: ====================================================
43 C i,j :: loop indices
44 INTEGER i,j
45 CEOP
46
47 C-- Initialise to zero.
48 DO j=1-Oly,sNy+Oly
49 DO i=1-Olx,sNx+Olx
50 del2(i,j)= 0. _d 0
51 ENDDO
52 ENDDO
53
54 C Difference of zonal fluxes & meridional fluxes
55 C and divide by grid-cell volume
56 DO j=1-Oly,sNy+Oly-1
57 DO i=1-Olx,sNx+Olx-1
58 del2(i,j)=recip_rA(i,j,bi,bj)*recip_deepFacC(k)
59 & *recip_drF(k)*_recip_hFacC(i,j,k,bi,bj)
60 & *( ( dTdx(i+1,j)-dTdx(i,j) )
61 & +( dTdy(i,j+1)-dTdy(i,j) )
62 & )
63 ENDDO
64 ENDDO
65
66 RETURN
67 END

  ViewVC Help
Powered by ViewVC 1.1.22