/[MITgcm]/MITgcm/pkg/kpp/kpp_check.F
ViewVC logotype

Annotation of /MITgcm/pkg/kpp/kpp_check.F

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


Revision 1.3 - (hide annotations) (download)
Mon Jan 29 20:09:23 2001 UTC (23 years, 4 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint34
Changes since 1.2: +2 -0 lines
Replaced some storage for TAMC by cheap  recomputation.

1 heimbach 1.1 #include "KPP_OPTIONS.h"
2    
3     SUBROUTINE KPP_CHECK( myThid )
4     C /==========================================================\
5     C | SUBROUTINE KPP_CHECK |
6     C | o Validate basic package setup and inter-package |
7     C | dependencies. |
8     C \==========================================================/
9     IMPLICIT NONE
10    
11     C === Global variables ===
12     #include "SIZE.h"
13     #include "EEPARAMS.h"
14     #include "PARAMS.h"
15    
16     C === Routine arguments ===
17     C myThid - Number of this instance of KPP_INIT
18     INTEGER myThid
19    
20     #ifdef ALLOW_KPP
21    
22     C === Local variables ===
23     C msgBuf - Informational/error meesage buffer
24     CHARACTER*(MAX_LEN_MBUF) msgBuf
25    
26     WRITE(msgBuf,'(A)') 'KPP_CHECK: #define ALLOW_KPP'
27     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
28     & SQUEEZE_RIGHT , 1)
29    
30     C KPP needs convection turned off (will be packaged later)
31     IF (cAdjFreq.NE.0. .OR.
32     & ivdc_kappa.NE.0.) THEN
33     WRITE(msgBuf,'(A)') 'Some form of convection has been enabled'
34     CALL PRINT_ERROR( msgBuf , 1)
35     STOP 'ABNORMAL END: S/R KPP_CHECK'
36     ENDIF
37    
38     C KPP needs implicit vertical diffusion and viscosity
39     IF (.NOT.implicitDiffusion ) THEN
40     WRITE(msgBuf,'(A)') 'KPP needs implicitDiffusion to be enabled'
41     CALL PRINT_ERROR( msgBuf , 1)
42     STOP 'ABNORMAL END: S/R KPP_CHECK'
43     ENDIF
44     IF (.NOT.implicitViscosity) THEN
45     WRITE(msgBuf,'(A)') 'KPP needs implicitViscosity to be enabled'
46     CALL PRINT_ERROR( msgBuf , 1)
47     STOP 'ABNORMAL END: S/R KPP_CHECK'
48     ENDIF
49    
50     C Shortwave heating should be defined with KPP
51     #ifndef SHORTWAVE_HEATING
52     WRITE(msgBuf,'(A)') 'KPP needs CPP flag SHORTWAVE_HEATING enabled'
53     CALL PRINT_ERROR( msgBuf , 1)
54     STOP 'ABNORMAL END: S/R KPP_CHECK'
55     #endif /* SHORTWAVE_HEATING */
56    
57 heimbach 1.2 C Check that overlap region is adequate.
58     C When horizontal smoothing is turned on,
59     C KPP_CALC computes vertical viscosity and diffusivity for region
60     C (-2:sNx+3,-2:sNy+3) as required by CALC_DIFFUSIVITY and requires
61     C values of uVel, vVel, SurfaceTendencyU, SurfaceTendencyV in the
62     C region (-2:sNx+4,-2:sNy+4).
63     C Hence overlap region needs to be set OLx=4, OLy=4.
64     C When option FRUGAL_KPP is used, computation in overlap regions
65     C is replaced with exchange calls hence reducing KPP overlap
66     C requirements to OLx=1, OLy=1.
67     #ifndef FRUGAL_KPP
68     # if defined(KPP_SMOOTH_SHSQ) || defined(KPP_SMOOTH_DVSQ)
69     # define KPP_NEEDS_OVERLAP_4
70     # endif
71     # if defined(KPP_SMOOTH_DBLOC) || defined(KPP_SMOOTH_DENS)
72     # define KPP_NEEDS_OVERLAP_4
73     # endif
74     # ifdef KPP_NEEDS_OVERLAP_4
75 heimbach 1.3 #ifdef KPP_REACTIVATE_OL4
76 heimbach 1.2 IF (OLx.LT.4 .OR. OLy.LT.4) THEN
77     WRITE(msgBuf,'(A)') 'KPP horizontal smoothing requires OLx=OLy=4'
78     CALL PRINT_ERROR( msgBuf , 1)
79     WRITE(msgBuf,'(A)') 'or CPP option FRUGAL_KPP to be defined.'
80     CALL PRINT_ERROR( msgBuf , 1)
81     STOP 'ABNORMAL END: S/R KPP_CHECK'
82     ENDIF
83 heimbach 1.3 #endif
84 heimbach 1.2 # endif
85     #endif
86    
87 heimbach 1.1 #endif /* ALLOW_KPP */
88    
89     return
90     end

  ViewVC Help
Powered by ViewVC 1.1.22