/[MITgcm]/MITgcm_contrib/natl_12/code/gad_diff_y.F
ViewVC logotype

Annotation of /MITgcm_contrib/natl_12/code/gad_diff_y.F

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


Revision 1.1 - (hide annotations) (download)
Thu Aug 7 13:38:07 2003 UTC (21 years, 1 month ago) by cnh
Branch: MAIN
CVS Tags: HEAD
Mods to scale diffKh with grid spacing

1 cnh 1.1 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/gad_diff_y.F,v 1.3 2001/09/21 13:11:43 adcroft Exp $
2     C $Name: checkpoint51c_post $
3    
4     #include "GAD_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: GAD_DIFF_Y
8    
9     C !INTERFACE: ==========================================================
10     SUBROUTINE GAD_DIFF_Y(
11     I bi,bj,k,
12     I yA, diffKh,
13     I tracer,
14     O dfy,
15     I myThid )
16    
17     C !DESCRIPTION:
18     C Calculates the area integrated meridional flux due to down-gradient
19     C diffusion of a tracer:
20     C \begin{equation*}
21     C F^y_{diff} = - A^y \kappa_h \frac{1}{\Delta y_c} \delta_j \theta
22     C \end{equation*}
23    
24     C !USES: ===============================================================
25     IMPLICIT NONE
26     #include "SIZE.h"
27     #include "GRID.h"
28    
29     C !INPUT PARAMETERS: ===================================================
30     C bi,bj :: tile indices
31     C k :: vertical level
32     C yA :: area of face at V points
33     C diffKh :: horizontal diffusivity
34     C tracer :: tracer field
35     C myThid :: thread number
36     INTEGER bi,bj,k
37     _RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
38     _RL diffKh
39     _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
40     INTEGER myThid
41    
42     C !OUTPUT PARAMETERS: ==================================================
43     C dfx :: meridional diffusive flux
44     _RL dfy (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45    
46     C !LOCAL VARIABLES: ====================================================
47     C i,j :: loop indices
48     INTEGER i,j
49     _RS gridScalingAh
50     CEOP
51    
52     DO i=1-Olx,sNx+Olx
53     dfy(i,1-Oly)=0.
54     ENDDO
55     DO j=1-Oly+1,sNy+Oly
56     DO i=1-Olx,sNx+Olx
57     gridScalingAh = (_dyC(i,j,bi,bj)**2)/(5000.**2)
58     dfy(i,j) = -diffKh*yA(i,j)
59     & *_recip_dyC(i,j,bi,bj)
60     & *(Tracer(i,j)-Tracer(i,j-1))
61     & *gridScalingAh
62     #ifdef ISOTROPIC_COS_SCALING
63     & *CosFacV(j,bi,bj)
64     #endif
65     ENDDO
66     ENDDO
67    
68     RETURN
69     END

  ViewVC Help
Powered by ViewVC 1.1.22