/[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.50 by mlosch, Sat Sep 25 23:09:55 2010 UTC revision 1.58 by jmc, Mon Apr 2 21:30:02 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
95    
96  #ifdef ALLOW_GENERIC_ADVDIFF  #ifndef ALLOW_GENERIC_ADVDIFF
       IF (useGAD) CALL GAD_CHECK( myThid )  
 #else  
97        IF ( tempStepping .OR. saltStepping ) THEN        IF ( tempStepping .OR. saltStepping ) THEN
98          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
99       &  'PACKAGES_CHECK: cannot step forward Temp or Salt',       &  'PACKAGES_CHECK: cannot step forward Temp or Salt',
# Line 98  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 115  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 168  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
185        IF (useOBCS) CALL PACKAGES_ERROR_MSG('OBCS',' ',myThid)        IF (useOBCS) CALL PACKAGES_ERROR_MSG('OBCS',' ',myThid)
186  #endif  #endif
187    
188  #ifndef ALLOW_EXF  #ifdef ALLOW_EXF
189          IF (useEXF) CALL EXF_CHECK( myThid )
190    #else
191        IF (useEXF) CALL PACKAGES_ERROR_MSG('EXF',' ',myThid)        IF (useEXF) CALL PACKAGES_ERROR_MSG('EXF',' ',myThid)
192  #endif  #endif
193    
# 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 277  C---  Continue with standard packages (w Line 294  C---  Continue with standard packages (w
294        IF (useShelfIce) CALL PACKAGES_ERROR_MSG('ShelfIce',' ',myThid)        IF (useShelfIce) CALL PACKAGES_ERROR_MSG('ShelfIce',' ',myThid)
295  #endif  #endif
296    
297    #ifdef ALLOW_STREAMICE
298          IF (useStreamIce) CALL STREAMICE_CHECK( myThid )
299    #else
300          IF (useStreamIce) CALL PACKAGES_ERROR_MSG('StreamIce',' ',myThid)
301    #endif
302    
303  #ifdef ALLOW_ICEFRONT  #ifdef ALLOW_ICEFRONT
304        IF (useICEFRONT) CALL ICEFRONT_CHECK( myThid )        IF (useICEFRONT) CALL ICEFRONT_CHECK( myThid )
305  #else  #else
# Line 336  C---  Continue with standard packages (w Line 359  C---  Continue with standard packages (w
359       & 'NEST_PARENT',' ',myThid)       & 'NEST_PARENT',' ',myThid)
360  #endif  #endif
361    
362    #ifdef ALLOW_OASIS
363          IF (useOASIS) CALL OASIS_CHECK( myThid )
364    #else
365          IF (useOASIS) CALL PACKAGES_ERROR_MSG('OASIS',' ',myThid)
366    #endif
367    
368    #ifdef ALLOW_ECCO
369          CALL ECCO_CHECK( myThid )
370    #endif
371    
372  #ifndef ALLOW_EMBED_FILES  #ifndef ALLOW_EMBED_FILES
373        IF (useEMBED_FILES) CALL PACKAGES_ERROR_MSG(        IF (useEMBED_FILES) CALL PACKAGES_ERROR_MSG(
374       &                                  'EMBED_FILES',' ',myThid)       &                                  'EMBED_FILES',' ',myThid)
# Line 347  C---  Continue with standard packages (w Line 380  C---  Continue with standard packages (w
380        IF (useMYPACKAGE) CALL PACKAGES_ERROR_MSG('MYPACKAGE',' ',myThid)        IF (useMYPACKAGE) CALL PACKAGES_ERROR_MSG('MYPACKAGE',' ',myThid)
381  #endif  #endif
382    
383  #ifdef ALLOW_OASIS  #ifdef ALLOW_GENERIC_ADVDIFF
384        IF (useOASIS) CALL OASIS_CHECK( myThid )  C-    Check generic AdvDiff setting and related overlap minimum size:
385  #else  C     for this reason, called after other ${pkg}_check S/R
386        IF (useOASIS) CALL PACKAGES_ERROR_MSG('OASIS',' ',myThid)        IF (useGAD) CALL GAD_CHECK( myThid )
 #endif  
   
 #ifdef ALLOW_ECCO  
       CALL ECCO_CHECK( myThid )  
387  #endif  #endif
388    
389  C---  Exclusive packages (which cannot be used together):  C---  Exclusive packages (which cannot be used together):
# Line 365  C---  Exclusive packages (which cannot b Line 394  C---  Exclusive packages (which cannot b
394          WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ',          WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ',
395       &  ' but cannot be used together => need to select only one.'       &  ' but cannot be used together => need to select only one.'
396          CALL PRINT_ERROR( msgBuf , myThid )          CALL PRINT_ERROR( msgBuf , myThid )
397            CALL ALL_PROC_DIE( myThid )
398            STOP 'ABNORMAL END: S/R PACKAGES_CHECK'
399          ENDIF
400    
401    C---  Exclusive packages (which cannot be used together):
402          IF ( useDOWN_SLOPE .AND. useBBL ) THEN
403            WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ',
404         &  'both useDOWN_SLOPE and useBBL are set'
405            CALL PRINT_ERROR( msgBuf , myThid )
406            WRITE(msgBuf,'(2A)') 'PACKAGES_CHECK: ',
407         &  ' but cannot be used together => need to select only one.'
408            CALL PRINT_ERROR( msgBuf , myThid )
409            CALL ALL_PROC_DIE( myThid )
410          STOP 'ABNORMAL END: S/R PACKAGES_CHECK'          STOP 'ABNORMAL END: S/R PACKAGES_CHECK'
411        ENDIF        ENDIF
412    

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.58

  ViewVC Help
Powered by ViewVC 1.1.22