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

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

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


Revision 1.6 - (show annotations) (download)
Thu Apr 19 04:51:59 2007 UTC (17 years, 1 month ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint59, checkpoint59e, checkpoint59d, checkpoint59a, checkpoint59c, checkpoint59b
Changes since 1.5: +8 -15 lines
FRUGAL_KPP option removed due to popular undemand

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

  ViewVC Help
Powered by ViewVC 1.1.22