10 |
SUBROUTINE PACKAGES_CHECK( myThid ) |
SUBROUTINE PACKAGES_CHECK( myThid ) |
11 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
12 |
C *==========================================================* |
C *==========================================================* |
13 |
C | SUBROUTINE PACKAGES_CHECK |
C | SUBROUTINE PACKAGES_CHECK |
14 |
C | o Check runtime activated packages have been built in. |
C | o Check runtime activated packages have been built in. |
15 |
C *==========================================================* |
C *==========================================================* |
16 |
C | All packages can be selected/deselected at build time |
C | All packages can be selected/deselected at build time |
17 |
C | ( when code is compiled ) and activated/deactivated at |
C | ( when code is compiled ) and activated/deactivated at |
18 |
C | runtime. This routine does a quick check to trap packages |
C | runtime. This routine does a quick check to trap packages |
19 |
C | that were activated at runtime but that were not compiled |
C | that were activated at runtime but that were not compiled |
20 |
C | in at build time. |
C | in at build time. |
21 |
C *==========================================================* |
C *==========================================================* |
22 |
C \ev |
C \ev |
23 |
|
|
35 |
|
|
36 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
37 |
C === Local variables === |
C === Local variables === |
38 |
C msgBuf :: Informational/error meesage buffer |
C msgBuf :: Informational/error meesage buffer |
39 |
c CHARACTER*(MAX_LEN_MBUF) msgBuf |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
40 |
CEOP |
CEOP |
41 |
|
|
42 |
#ifdef ALLOW_RUNCLOCK |
C--- Start with non-standard packages (without or with non standard flag) |
43 |
IF (useRunClock) CALL RUNCLOCK_CHECK( myThid ) |
|
44 |
#else |
#ifndef ALLOW_MNC |
45 |
IF (useRunClock) CALL PACKAGES_CHECK_ERROR('RUNCLOCK', myThid) |
IF (useMNC) THEN |
46 |
|
WRITE(msgBuf,'(2A)') '***WARNING***', |
47 |
|
& ' PACKAGES_CHECK: useMNC is TRUE' |
48 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
49 |
|
& SQUEEZE_RIGHT , myThid) |
50 |
|
WRITE(msgBuf,'(2A)') '***WARNING***', |
51 |
|
& ' but pkg/mnc has not been compiled (#undef ALLOW_MNC)' |
52 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
53 |
|
& SQUEEZE_RIGHT , myThid) |
54 |
|
ENDIF |
55 |
|
#endif |
56 |
|
|
57 |
|
#ifndef ALLOW_MOM_VECINV |
58 |
|
IF ( momStepping .AND. vectorInvariantMomentum ) THEN |
59 |
|
WRITE(msgBuf,'(2A)') |
60 |
|
& 'PACKAGES_CHECK: cannot step forward Momentum', |
61 |
|
& ' without pkg/mom_vecinv' |
62 |
|
CALL PRINT_ERROR( msgBuf , 1) |
63 |
|
WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ', |
64 |
|
& 'Re-compile with pkg "mom_vecinv" in packages.conf' |
65 |
|
CALL PRINT_ERROR( msgBuf , 1) |
66 |
|
STOP 'ABNORMAL END: S/R PACKAGES_CHECK' |
67 |
|
ENDIF |
68 |
|
#endif |
69 |
|
#ifndef ALLOW_MOM_FLUXFORM |
70 |
|
IF ( momStepping .AND. .NOT.vectorInvariantMomentum ) THEN |
71 |
|
WRITE(msgBuf,'(2A)') |
72 |
|
& 'PACKAGES_CHECK: cannot step forward Momentum', |
73 |
|
& ' without pkg/mom_fluxform' |
74 |
|
CALL PRINT_ERROR( msgBuf , 1) |
75 |
|
WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ', |
76 |
|
& 'Re-compile with pkg "mom_fluxform" in packages.conf' |
77 |
|
CALL PRINT_ERROR( msgBuf , 1) |
78 |
|
STOP 'ABNORMAL END: S/R PACKAGES_CHECK' |
79 |
|
ENDIF |
80 |
#endif |
#endif |
81 |
|
|
82 |
#ifdef ALLOW_GENERIC_ADVDIFF |
#ifdef ALLOW_GENERIC_ADVDIFF |
83 |
IF (useGAD) CALL GAD_CHECK( myThid ) |
IF (useGAD) CALL GAD_CHECK( myThid ) |
84 |
|
#else |
85 |
|
IF ( tempStepping .OR. saltStepping ) THEN |
86 |
|
WRITE(msgBuf,'(2A)') |
87 |
|
& 'PACKAGES_CHECK: cannot step forward Temp or Salt', |
88 |
|
& ' without pkg/generic_advdiff' |
89 |
|
CALL PRINT_ERROR( msgBuf , 1) |
90 |
|
WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ', |
91 |
|
& 'Re-compile with pkg "generic_advdiff" in packages.conf' |
92 |
|
CALL PRINT_ERROR( msgBuf , 1) |
93 |
|
STOP 'ABNORMAL END: S/R PACKAGES_CHECK' |
94 |
|
ENDIF |
95 |
|
#endif |
96 |
|
|
97 |
|
#ifndef ALLOW_CD_CODE |
98 |
|
IF (useCDscheme) THEN |
99 |
|
WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ', |
100 |
|
& 'useCDscheme is TRUE but pkg/cd_code has not been compiled' |
101 |
|
CALL PRINT_ERROR( msgBuf , myThid) |
102 |
|
STOP 'ABNORMAL END: S/R PACKAGES_CHECK' |
103 |
|
ENDIF |
104 |
|
#endif |
105 |
|
|
106 |
|
#ifndef ALLOW_MONITOR |
107 |
|
C If monitorFreq is finite, make sure the pkg/monitor is being compiled |
108 |
|
IF (monitorFreq.NE.0.) THEN |
109 |
|
WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ', |
110 |
|
& 'monitorFreq <> 0 but pkg/monitor has not been compiled' |
111 |
|
CALL PRINT_ERROR( msgBuf , 1) |
112 |
|
WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ', |
113 |
|
& 'Re-compile with pkg "monitor" in packages.conf' |
114 |
|
CALL PRINT_ERROR( msgBuf , 1) |
115 |
|
STOP 'ABNORMAL END: S/R PACKAGES_CHECK' |
116 |
|
ENDIF |
117 |
|
#endif |
118 |
|
|
119 |
|
#ifndef ALLOW_TIMEAVE |
120 |
|
C If taveFreq is finite, make sure the pkg/timeave is being compiled |
121 |
|
IF (taveFreq.NE.0.) THEN |
122 |
|
WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ', |
123 |
|
& 'taveFreq <> 0 but pkg/timeave has been not compiled' |
124 |
|
CALL PRINT_ERROR( msgBuf , 1) |
125 |
|
WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ', |
126 |
|
& 'Re-compile with pkg "timeave" in packages.conf' |
127 |
|
CALL PRINT_ERROR( msgBuf , 1) |
128 |
|
STOP 'ABNORMAL END: S/R PACKAGES_CHECK' |
129 |
|
ENDIF |
130 |
|
#endif |
131 |
|
|
132 |
|
C--- Continue with standard packages (with standard usePKG flag) |
133 |
|
|
134 |
|
#ifdef ALLOW_RUNCLOCK |
135 |
|
IF (useRunClock) CALL RUNCLOCK_CHECK( myThid ) |
136 |
|
#else |
137 |
|
IF (useRunClock) CALL PACKAGES_CHECK_ERROR('RUNCLOCK', myThid) |
138 |
#endif |
#endif |
139 |
|
|
140 |
#ifdef ALLOW_KPP |
#ifdef ALLOW_KPP |
247 |
IF (useShelfIce) CALL PACKAGES_CHECK_ERROR('SHELFICE', myThid) |
IF (useShelfIce) CALL PACKAGES_CHECK_ERROR('SHELFICE', myThid) |
248 |
#endif |
#endif |
249 |
|
|
|
#ifndef ALLOW_CD_CODE |
|
|
IF (useCDscheme) CALL PACKAGES_CHECK_ERROR('CD_CODE', myThid) |
|
|
#endif |
|
|
|
|
250 |
#ifdef ALLOW_AUTODIFF |
#ifdef ALLOW_AUTODIFF |
251 |
CALL AUTODIFF_CHECK( myThid ) |
CALL AUTODIFF_CHECK( myThid ) |
252 |
#endif |
#endif |