/[MITgcm]/MITgcm/pkg/gmredi/gmredi_calc_diff.F
ViewVC logotype

Annotation of /MITgcm/pkg/gmredi/gmredi_calc_diff.F

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


Revision 1.6 - (hide annotations) (download)
Fri Nov 15 02:57:47 2002 UTC (21 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint47e_post, checkpoint47c_post, checkpoint47d_pre, checkpoint47a_post, checkpoint47d_post, branch-exfmods-tag, checkpoint47b_post, checkpoint47f_post, checkpoint47
Branch point for: branch-exfmods-curt
Changes since 1.5: +4 -4 lines
o * "clean" adjoint code (in terms of extensive recomputations)
    can now be obtained for all GMREDI options (i.e. for
    - GM_VISBECK_VARIABLE_K
    - GM_NON_UNITY_DIAGONAL
    - GM_EXTRA_DIAGONAL
    - GM_BOLUS_ADVEC )
  * However, wrong gradient check problem remains unsolved.
  * New CPP options have been introduced for different
    tapering schemes

1 heimbach 1.6 C $Header: /u/gcmpack/MITgcm/pkg/gmredi/gmredi_calc_diff.F,v 1.5 2002/11/14 22:43:49 heimbach Exp $
2     C $Name: $
3 adcroft 1.1
4     #include "GMREDI_OPTIONS.h"
5    
6     SUBROUTINE GMREDI_CALC_DIFF(
7     I bi,bj,iMin,iMax,jMin,jMax,K,
8     I maskUp,
9 heimbach 1.2 U KappaRT,KappaRS,
10 adcroft 1.1 I myThid)
11    
12     C /==========================================================\
13     C | SUBROUTINE GMREDI_CALC_DIFF |
14     C | o Add contrubution to net diffusivity from GM/Redi |
15     C \==========================================================/
16     IMPLICIT NONE
17    
18     C == GLobal variables ==
19     #include "SIZE.h"
20     #include "EEPARAMS.h"
21     #include "PARAMS.h"
22     #include "GRID.h"
23    
24     C == Routine arguments ==
25     C bi, bj, iMin, iMax, jMin, jMax - Range of points for which calculation
26     C maskUp - land/water mask for Wvel points (above tracer level)
27     C myThid - Instance number for this innvocation of CALC_COMMON_FACTORS
28     C
29     INTEGER bi,bj,iMin,iMax,jMin,jMax,K
30     _RS maskUp(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
31     _RL KappaRT(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
32     _RL KappaRS(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
33     INTEGER myThid
34    
35     #ifdef ALLOW_GMREDI
36     #include "GMREDI.h"
37    
38     C == Local variables ==
39 jmc 1.4 C I, J - Loop counters
40 adcroft 1.1 INTEGER i,j
41    
42     DO j=jMin,jMax
43     DO i=iMin,iMax
44 jmc 1.4 KappaRT(i,j,k) = KappaRT(i,j,k)+maskUp(i,j)*Kwz(i,j,k,bi,bj)
45 heimbach 1.6 cph & *GM_adjointRescale*GM_adjointRescale
46 adcroft 1.1 ENDDO
47     ENDDO
48    
49     DO j=jMin,jMax
50     DO i=iMin,iMax
51 jmc 1.4 KappaRS(i,j,k) = KappaRS(i,j,k)+maskUp(i,j)*Kwz(i,j,k,bi,bj)
52 heimbach 1.6 cph & *GM_adjointRescale*GM_adjointRescale
53 adcroft 1.1 ENDDO
54     ENDDO
55    
56     #endif /* ALLOW_GMREDI */
57    
58     RETURN
59     END

  ViewVC Help
Powered by ViewVC 1.1.22