/[MITgcm]/MITgcm/model/src/calc_diffusivity.F
ViewVC logotype

Contents of /MITgcm/model/src/calc_diffusivity.F

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


Revision 1.16 - (show annotations) (download)
Wed Sep 26 18:09:13 2001 UTC (22 years, 8 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint44e_post, checkpoint43a-release1mods, checkpoint44g_post, chkpt44d_post, release1_p1, checkpoint44e_pre, release1_b1, checkpoint43, release1_chkpt44d_post, release1-branch_tutorials, chkpt44a_post, checkpoint44h_pre, chkpt44c_pre, checkpoint45a_post, ecco_c44_e19, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, release1-branch-end, release1_final_v1, checkpoint44f_post, checkpoint44b_post, checkpoint44h_post, ecco_c44_e22, chkpt44a_pre, ecco_c44_e20, ecco_c44_e21, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5, release1_beta1, checkpoint44b_pre, checkpoint42, checkpoint41, checkpoint44, checkpoint45, chkpt44c_post, checkpoint44f_pre, release1-branch_branchpoint
Branch point for: release1_coupled, release1_final, release1-branch, release1, ecco-branch
Changes since 1.15: +29 -14 lines
Bringing comments up to data and formatting for document extraction.

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/calc_diffusivity.F,v 1.15 2001/08/13 18:05:26 heimbach Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: CALC_DIFFUSIVITY
8 C !INTERFACE:
9 SUBROUTINE CALC_DIFFUSIVITY(
10 I bi,bj,iMin,iMax,jMin,jMax,K,
11 I maskUp,
12 O KappaRT,KappaRS,
13 I myThid)
14
15 C !DESCRIPTION: \bv
16 C *==========================================================*
17 C | SUBROUTINE CALC_DIFFUSIVITY
18 C | o Calculate net vertical diffusivity
19 C *==========================================================*
20 C | Combines spatially varying diffusion coefficients from
21 C | KPP and/or GM and/or convective stability test.
22 C *==========================================================*
23 C \ev
24
25 C !USES:
26 IMPLICIT NONE
27 C == GLobal variables ==
28 #include "SIZE.h"
29 #include "EEPARAMS.h"
30 #include "PARAMS.h"
31 #include "DYNVARS.h"
32 #include "GRID.h"
33
34 C !INPUT/OUTPUT PARAMETERS:
35 C == Routine arguments ==
36 C bi, bj, :: Range of points for which calculation
37 C iMin, is performed.
38 C iMax,
39 C jMin,
40 C jMax
41 C maskUp :: land/water mask for Wvel points (above tracer level)
42 C myThid :: Instance number for this innvocation of CALC_DIFFUSIVITY
43 C KappaRT :: Net diffusivity for temperature
44 C KappaRS :: Net diffusivity for salinity
45 INTEGER bi,bj,iMin,iMax,jMin,jMax,K
46 _RS maskUp(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
47 _RL KappaRT(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
48 _RL KappaRS(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
49 INTEGER myThid
50
51 C !LOCAL VARIABLES:
52 C == Local variables ==
53 C I, J :: Loop counters
54 INTEGER i,j
55 CEOP
56
57 DO j=jMin,jMax
58 DO i=iMin,iMax
59 KappaRT(i,j,k) = maskUp(i,j)*
60 & (
61 & KappaRT(i,j,k)
62 #if (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL))
63 & + diffKr(i,j,k,bi,bj)
64 #else
65 & + diffKrT
66 #endif
67 & )
68 ENDDO
69 ENDDO
70
71 DO j=jMin,jMax
72 DO i=iMin,iMax
73 KappaRS(i,j,k) = maskUp(i,j)*
74 & (
75 & KappaRS(i,j,k)
76 #if (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL))
77 & + diffKr(i,j,k,bi,bj)
78 #else
79 & + diffKrS
80 #endif
81 & )
82 ENDDO
83 ENDDO
84
85 #ifdef ALLOW_GMREDI
86 IF (useGMRedi) CALL GMREDI_CALC_DIFF(
87 I bi,bj,iMin,iMax,jMin,jMax,K,
88 I maskUp,
89 O KappaRT,KappaRS,
90 I myThid)
91 #endif
92
93 #ifdef ALLOW_KPP
94 IF (useKPP) CALL KPP_CALC_DIFF(
95 I bi,bj,iMin+1,iMax,jMin+1,jMax,K,
96 I maskUp,
97 O KappaRT,KappaRS,
98 I myThid)
99 #endif
100
101
102 RETURN
103 END

  ViewVC Help
Powered by ViewVC 1.1.22