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

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

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


Revision 1.3 - (hide annotations) (download)
Fri Sep 24 16:55:44 2004 UTC (19 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint57g_pre, checkpoint57s_post, checkpoint58b_post, checkpoint57b_post, checkpoint57g_post, checkpoint56b_post, checkpoint57y_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint58, checkpoint57, checkpoint56, checkpoint58f_post, checkpoint57n_post, checkpoint58d_post, checkpoint58a_post, checkpoint57z_post, checkpoint55i_post, checkpoint58m_post, checkpoint57l_post, checkpoint57t_post, checkpoint57v_post, checkpoint57f_post, checkpoint57a_post, checkpoint57h_pre, checkpoint57h_post, checkpoint57y_pre, checkpoint55g_post, checkpoint58o_post, checkpoint57c_post, checkpoint58p_post, checkpoint58q_post, checkpoint55d_post, checkpoint58e_post, checkpoint55d_pre, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint55h_post, checkpoint58n_post, checkpoint57e_post, checkpoint55f_post, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, eckpoint57e_pre, checkpoint58k_post, checkpoint56a_post, checkpoint58l_post, checkpoint57h_done, checkpoint57j_post, checkpoint57f_pre, checkpoint58g_post, checkpoint58h_post, checkpoint56c_post, checkpoint58j_post, checkpoint57a_pre, checkpoint57o_post, checkpoint57k_post, checkpoint57w_post, checkpoint58i_post, checkpoint57x_post, checkpoint58c_post, checkpoint55e_post
Changes since 1.2: +11 -10 lines
make calculation more symetric in X & Y dir (truncation error Pb)

1 jmc 1.3 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/gad_del2.F,v 1.2 2001/09/20 20:07:06 adcroft Exp $
2 adcroft 1.2 C $Name: $
3 adcroft 1.1
4     #include "GAD_OPTIONS.h"
5    
6 adcroft 1.2 CBOP
7     C !ROUTINE: GAD_DEL2
8    
9     C !INTERFACE: ==========================================================
10 adcroft 1.1 SUBROUTINE GAD_DEL2(
11     I bi,bj,k,
12     I dTdx,dTdy,
13     O del2,
14     I myThid )
15 adcroft 1.2
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 adcroft 1.1 IMPLICIT NONE
24     #include "SIZE.h"
25     #include "GRID.h"
26    
27 adcroft 1.2 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 adcroft 1.1 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 adcroft 1.2 INTEGER myThid
37    
38     C !OUTPUT PARAMETERS: ==================================================
39     C del2 :: Laplacian of tracer
40 adcroft 1.1 _RL del2(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
41    
42 adcroft 1.2 C !LOCAL VARIABLES: ====================================================
43     C i,j :: loop indices
44 adcroft 1.1 INTEGER i,j
45 jmc 1.3 c _RL dfx(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
46     c _RL dfy(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
47 adcroft 1.2 CEOP
48 adcroft 1.1
49 jmc 1.3 C-- Initialise to zero.
50 adcroft 1.1 DO j=1-Oly,sNy+Oly
51 jmc 1.3 DO i=1-Olx,sNx+Olx
52     del2(i,j)= 0. _d 0
53 adcroft 1.1 ENDDO
54     ENDDO
55    
56 jmc 1.3 C Difference of zonal fluxes & meridional fluxes
57     C and divide by grid-cell volume
58 adcroft 1.1 DO j=1-Oly,sNy+Oly-1
59 jmc 1.3 DO i=1-Olx,sNx+Olx-1
60 adcroft 1.1 del2(i,j)=recip_rA(i,j,bi,bj)
61     & *recip_drF(k)
62     & *_recip_hFacC(i,j,k,bi,bj)
63 jmc 1.3 & *( ( dTdx(i+1,j)-dTdx(i,j) )
64     & +( dTdy(i,j+1)-dTdy(i,j) )
65 adcroft 1.1 & )
66     ENDDO
67     ENDDO
68    
69     RETURN
70     END

  ViewVC Help
Powered by ViewVC 1.1.22