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

Diff of /MITgcm/model/src/packages_check.F

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

revision 1.24 by heimbach, Fri Oct 8 17:25:37 2004 UTC revision 1.40 by heimbach, Mon Apr 16 22:44:29 2007 UTC
# Line 10  C     !INTERFACE: Line 10  C     !INTERFACE:
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    
# Line 35  C     myThid ::  Number of this instance Line 35  C     myThid ::  Number of this instance
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        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
40  CEOP  CEOP
41    
42    C---  Start with non-standard packages (without or with non standard flag)
43    
44    #ifndef ALLOW_MNC
45          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
81    
82    #ifdef ALLOW_GENERIC_ADVDIFF
83          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
139    
140  #ifdef ALLOW_KPP  #ifdef ALLOW_KPP
141        IF (useKPP) CALL KPP_CHECK( myThid )        IF (useKPP) CALL KPP_CHECK( myThid )
142  #else  #else
# Line 85  CEOP Line 183  CEOP
183        IF (useBulkForce) CALL PACKAGES_CHECK_ERROR('BULK?FORCE',myThid)        IF (useBulkForce) CALL PACKAGES_CHECK_ERROR('BULK?FORCE',myThid)
184  #endif  #endif
185    
186  #ifndef ALLOW_THSICE  #ifdef ALLOW_THSICE
187          IF (useThSIce) CALL THSICE_CHECK( myThid )
188    #else
189        IF (useThSIce) CALL PACKAGES_CHECK_ERROR('THSICE', myThid)        IF (useThSIce) CALL PACKAGES_CHECK_ERROR('THSICE', myThid)
190  #endif  #endif
191    
192    #ifndef ALLOW_ATM2D
193          IF (useATM2D) CALL PACKAGES_CHECK_ERROR('ATM2D', myThid)
194    #endif
195    
196  #ifndef ALLOW_AIM  #ifndef ALLOW_AIM
197        IF (useAIM) CALL PACKAGES_CHECK_ERROR('AIM', myThid)        IF (useAIM) CALL PACKAGES_CHECK_ERROR('AIM', myThid)
198  #endif  #endif
# Line 101  CEOP Line 205  CEOP
205        IF (usePTRACERS) CALL PACKAGES_CHECK_ERROR('PTRACERS', myThid)        IF (usePTRACERS) CALL PACKAGES_CHECK_ERROR('PTRACERS', myThid)
206  #endif  #endif
207    
208    #ifndef ALLOW_MATRIX
209          IF (useMATRIX) CALL PACKAGES_CHECK_ERROR('MATRIX', myThid)
210    #endif
211    
212    #ifdef ALLOW_GCHEM
213          IF (useGCHEM) CALL GCHEM_CHECK( myThid )
214    #else
215          IF (useGCHEM) CALL PACKAGES_CHECK_ERROR('GCHEM', myThid)
216    #endif
217    
218    #ifndef ALLOW_OFFLINE
219          IF (useOffLine) CALL PACKAGES_CHECK_ERROR('OFFLINE', myThid)
220    #endif
221    
222  #ifndef ALLOW_SHAP_FILT  #ifndef ALLOW_SHAP_FILT
223        IF (useSHAP_FILT) CALL PACKAGES_CHECK_ERROR('SHAP_FILT', myThid)        IF (useSHAP_FILT) CALL PACKAGES_CHECK_ERROR('SHAP_FILT', myThid)
224  #endif  #endif
# Line 125  CEOP Line 243  CEOP
243        IF (useSEAICE) CALL PACKAGES_CHECK_ERROR('SEAICE', myThid)        IF (useSEAICE) CALL PACKAGES_CHECK_ERROR('SEAICE', myThid)
244  #endif  #endif
245    
246  #ifndef ALLOW_CD_CODE  #ifdef ALLOW_SHELFICE
247        IF (useCDscheme) CALL PACKAGES_CHECK_ERROR('CD_CODE', myThid)        IF (useShelfIce) CALL SHELFICE_CHECK( myThid )
248    #else
249          IF (useShelfIce) CALL PACKAGES_CHECK_ERROR('SHELFICE', myThid)
250  #endif  #endif
251    
252  #ifdef ALLOW_AUTODIFF  #ifdef ALLOW_AUTODIFF
253        CALL AUTODIFF_CHECK( myThid )        CALL AUTODIFF_CHECK( myThid )
254    #endif
255    
256    #ifdef ALLOW_CTRL
257        CALL CTRL_CHECK( myThid )        CALL CTRL_CHECK( myThid )
258    #endif
259    
260    #ifdef ALLOW_COST
261        CALL COST_CHECK( myThid )        CALL COST_CHECK( myThid )
262  #endif  #endif
263    
264    #ifdef ALLOW_GRDCHK
265          IF (useGRDCHK) CALL GRDCHK_CHECK( myThid )
266    #endif
267    
268    #ifdef ALLOW_DIAGNOSTICS
269          IF (useDiagnostics) CALL DIAGNOSTICS_CHECK( myThid )
270    #else
271          IF (useDiagnostics)
272         &   CALL PACKAGES_CHECK_ERROR('DIAGNOSTICS', myThid )
273    #endif
274    
275    #ifdef ALLOW_REGRID
276          IF (useREGRID) CALL REGRID_CHECK( myThid )
277    #else
278          IF (useREGRID) CALL PACKAGES_CHECK_ERROR('REGRID', myThid)
279    #endif
280    
281    #ifdef ALLOW_MYPACKAGE
282          IF (useMYPACKAGE) CALL MYPACKAGE_CHECK( myThid )
283    #else
284          IF (useMYPACKAGE) CALL PACKAGES_CHECK_ERROR('MYPACKAGE', myThid)
285    #endif
286    
287        RETURN        RETURN
288        END        END

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.22