/[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.53 by jmc, Tue Jan 25 22:39:06 2011 UTC revision 1.59 by jmc, Wed Apr 18 22:06:56 2012 UTC
# Line 30  C     === Global variables === Line 30  C     === Global variables ===
30    
31  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
32  C     === Routine arguments ===  C     === Routine arguments ===
33  C     myThid ::  Number of this instances  C     myThid :: my Thread Id number
34        INTEGER myThid        INTEGER myThid
35    
36  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
# Line 39  C     msgBuf :: Informational/error mess Line 39  C     msgBuf :: Informational/error mess
39        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
40  CEOP  CEOP
41    
42          _BEGIN_MASTER(myThid)
43        WRITE(msgBuf,'(A)')        WRITE(msgBuf,'(A)')
44       &'== Packages configuration : Check & print summary =='       &'== Packages configuration : Check & print summary =='
45        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
# Line 46  CEOP Line 47  CEOP
47        WRITE(msgBuf,'(A)') ' '        WRITE(msgBuf,'(A)') ' '
48        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
49       &                    SQUEEZE_RIGHT, myThid )       &                    SQUEEZE_RIGHT, myThid )
50          _END_MASTER(myThid)
51    
52  C---  Start with non-standard packages (without or with non standard flag)  C---  Start with non-standard packages (without or with non standard flag)
53    
54  #ifndef ALLOW_MNC  #ifndef ALLOW_MNC
55        IF (useMNC) THEN        IF (useMNC) THEN
56          WRITE(msgBuf,'(2A)') '***WARNING***',          _BEGIN_MASTER(myThid)
57            WRITE(msgBuf,'(2A)') '** WARNING **',
58       &   ' PACKAGES_CHECK: useMNC is TRUE'       &   ' PACKAGES_CHECK: useMNC is TRUE'
59          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
60       &       SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
61          WRITE(msgBuf,'(2A)') '***WARNING***',          WRITE(msgBuf,'(2A)') '** WARNING **',
62       &   ' but pkg/mnc has not been compiled (#undef ALLOW_MNC)'       &   ' but pkg/mnc has not been compiled (#undef ALLOW_MNC)'
63          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
64       &       SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
65            _END_MASTER(myThid)
66        ENDIF        ENDIF
67  #endif  #endif
68    
# Line 71  C---  Start with non-standard packages ( Line 75  C---  Start with non-standard packages (
75          WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ',          WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ',
76       &   'Re-compile with pkg "mom_vecinv" in packages.conf'       &   'Re-compile with pkg "mom_vecinv" in packages.conf'
77          CALL PRINT_ERROR( msgBuf , myThid )          CALL PRINT_ERROR( msgBuf , myThid )
78            CALL ALL_PROC_DIE( myThid )
79          STOP 'ABNORMAL END: S/R PACKAGES_CHECK'          STOP 'ABNORMAL END: S/R PACKAGES_CHECK'
80        ENDIF        ENDIF
81  #endif  #endif
# Line 83  C---  Start with non-standard packages ( Line 88  C---  Start with non-standard packages (
88          WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ',          WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ',
89       &   'Re-compile with pkg "mom_fluxform" in packages.conf'       &   'Re-compile with pkg "mom_fluxform" in packages.conf'
90          CALL PRINT_ERROR( msgBuf , myThid )          CALL PRINT_ERROR( msgBuf , myThid )
91            CALL ALL_PROC_DIE( myThid )
92          STOP 'ABNORMAL END: S/R PACKAGES_CHECK'          STOP 'ABNORMAL END: S/R PACKAGES_CHECK'
93        ENDIF        ENDIF
94  #endif  #endif
# Line 96  C---  Start with non-standard packages ( Line 102  C---  Start with non-standard packages (
102          WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ',          WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ',
103       &  'Re-compile with pkg "generic_advdiff" in packages.conf'       &  'Re-compile with pkg "generic_advdiff" in packages.conf'
104          CALL PRINT_ERROR( msgBuf , myThid )          CALL PRINT_ERROR( msgBuf , myThid )
105            CALL ALL_PROC_DIE( myThid )
106          STOP 'ABNORMAL END: S/R PACKAGES_CHECK'          STOP 'ABNORMAL END: S/R PACKAGES_CHECK'
107        ENDIF        ENDIF
108  #endif  #endif
# Line 113  C     If taveFreq is finite, make sure t Line 120  C     If taveFreq is finite, make sure t
120  #endif  #endif
121    
122  #ifndef ALLOW_CD_CODE  #ifndef ALLOW_CD_CODE
123        IF (useCDscheme) CALL PACKAGES_ERROR_MSG(         IF (useCDscheme) CALL PACKAGES_ERROR_MSG(
124       &                  'CD_CODE', 'useCDscheme=.T.', myThid )       &                  'CD_CODE', 'useCDscheme=.T.', myThid )
125  #endif  #endif
126    
# Line 166  C---  Continue with standard packages (w Line 173  C---  Continue with standard packages (w
173       &            CALL PACKAGES_ERROR_MSG('DOWN_SLOPE',' ',myThid)       &            CALL PACKAGES_ERROR_MSG('DOWN_SLOPE',' ',myThid)
174  #endif  #endif
175    
176    #ifdef ALLOW_BBL
177          IF (useBBL) CALL BBL_CHECK( myThid )
178    #else
179          IF (useBBL) CALL PACKAGES_ERROR_MSG('BBL',' ',myThid)
180    #endif
181    
182  #ifdef ALLOW_OBCS  #ifdef ALLOW_OBCS
183        IF (useOBCS) CALL OBCS_CHECK( myThid )        IF (useOBCS) CALL OBCS_CHECK( myThid )
184  #else  #else
# Line 191  C---  Continue with standard packages (w Line 204  C---  Continue with standard packages (w
204        IF (useCheapAML) CALL PACKAGES_ERROR_MSG('CheapAML',' ',myThid)        IF (useCheapAML) CALL PACKAGES_ERROR_MSG('CheapAML',' ',myThid)
205  #endif  #endif
206    
207    #ifndef ALLOW_FRAZIL
208          IF (useFRAZIL) CALL PACKAGES_ERROR_MSG('FRAZIL',' ',myThid)
209    #endif
210    
211  #ifdef ALLOW_THSICE  #ifdef ALLOW_THSICE
212        IF (useThSIce) CALL THSICE_CHECK( myThid )        IF (useThSIce) CALL THSICE_CHECK( myThid )
213  #else  #else
# Line 217  C---  Continue with standard packages (w Line 234  C---  Continue with standard packages (w
234        IF (useGridAlt) CALL PACKAGES_ERROR_MSG('GridAlt',' ',myThid)        IF (useGridAlt) CALL PACKAGES_ERROR_MSG('GridAlt',' ',myThid)
235  #endif  #endif
236    
237  #ifndef ALLOW_PTRACERS  #ifdef ALLOW_PTRACERS
238          IF (usePTRACERS) CALL PTRACERS_CHECK( myThid )
239    #else
240        IF (usePTRACERS) CALL PACKAGES_ERROR_MSG('PTRACERS',' ',myThid)        IF (usePTRACERS) CALL PACKAGES_ERROR_MSG('PTRACERS',' ',myThid)
241  #endif  #endif
242    
# Line 277  C---  Continue with standard packages (w Line 296  C---  Continue with standard packages (w
296        IF (useShelfIce) CALL PACKAGES_ERROR_MSG('ShelfIce',' ',myThid)        IF (useShelfIce) CALL PACKAGES_ERROR_MSG('ShelfIce',' ',myThid)
297  #endif  #endif
298    
299    #ifdef ALLOW_STREAMICE
300          IF (useStreamIce) CALL STREAMICE_CHECK( myThid )
301    #else
302          IF (useStreamIce) CALL PACKAGES_ERROR_MSG('StreamIce',' ',myThid)
303    #endif
304    
305  #ifdef ALLOW_ICEFRONT  #ifdef ALLOW_ICEFRONT
306        IF (useICEFRONT) CALL ICEFRONT_CHECK( myThid )        IF (useICEFRONT) CALL ICEFRONT_CHECK( myThid )
307  #else  #else
# Line 371  C---  Exclusive packages (which cannot b Line 396  C---  Exclusive packages (which cannot b
396          WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ',          WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ',
397       &  ' but cannot be used together => need to select only one.'       &  ' but cannot be used together => need to select only one.'
398          CALL PRINT_ERROR( msgBuf , myThid )          CALL PRINT_ERROR( msgBuf , myThid )
399            CALL ALL_PROC_DIE( myThid )
400          STOP 'ABNORMAL END: S/R PACKAGES_CHECK'          STOP 'ABNORMAL END: S/R PACKAGES_CHECK'
401        ENDIF        ENDIF
402    
403  #ifdef ALLOW_AUTODIFF  C---  Exclusive packages (which cannot be used together):
404  C--   Here INI_MASK_ETC will be called a 2nd time by INITIALISE_VARIA.        IF ( useDOWN_SLOPE .AND. useBBL ) THEN
405  C     This hack prevents a 2nd printing when default debugLevel is used.          WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ',
406        _BARRIER       &  'both useDOWN_SLOPE and useBBL are set'
407        _BEGIN_MASTER( myThid )          CALL PRINT_ERROR( msgBuf , myThid )
408        IF ( debugLevel.LE.debLevA ) printDomain = .FALSE.          WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ',
409        _END_MASTER( myThid )       &  ' but cannot be used together => need to select only one.'
410        _BARRIER          CALL PRINT_ERROR( msgBuf , myThid )
411  #endif          CALL ALL_PROC_DIE( myThid )
412            STOP 'ABNORMAL END: S/R PACKAGES_CHECK'
413          ENDIF
414    
415        RETURN        RETURN
416        END        END

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.59

  ViewVC Help
Powered by ViewVC 1.1.22