/[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.1 by adcroft, Wed Jun 21 19:25:06 2000 UTC revision 1.11 by adcroft, Mon Mar 4 17:26:41 2002 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2    C $Name$
3    
4  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
5    
6        SUBROUTINE PACKAGE_CHECK( myThid )  CBOP
7  C     /==========================================================\  C     !ROUTINE: PACKAGES_CHECK
8  C     | SUBROUTINE PACKAGE_CHECK                                 |  C     !INTERFACE:
9  C     | o Check dependances between selected packages            |        SUBROUTINE PACKAGES_CHECK( myThid )
10  C     |==========================================================|  C     !DESCRIPTION: \bv
11  C     \==========================================================/  C     *==========================================================*
12        IMPLICIT NONE  C     | SUBROUTINE PACKAGES_CHECK                                
13    C     | o Check runtime activated packages have been built in.    
14    C     *==========================================================*
15    C     | All packages can be selected/deselected at build time    
16    C     | ( when code is compiled ) and activated/deactivated at    
17    C     | runtime. This routine does a quick check to trap packages
18    C     | that were activated at runtime but that were not compiled
19    C     | in at build time.                                        
20    C     *==========================================================*
21    C     \ev
22    
23    C     !USES:
24          IMPLICIT NONE
25  C     === Global variables ===  C     === Global variables ===
26  #include "SIZE.h"  #include "SIZE.h"
27  #include "EEPARAMS.h"  #include "EEPARAMS.h"
28  #include "PARAMS.h"  #include "PARAMS.h"
29    
30    C     !INPUT/OUTPUT PARAMETERS:
31  C     === Routine arguments ===  C     === Routine arguments ===
32  C     myThid -  Number of this instances  C     myThid ::  Number of this instances
33        INTEGER myThid        INTEGER myThid
34    
35    C     !LOCAL VARIABLES:
36  C     === Local variables ===  C     === Local variables ===
37  C     msgBuf      - Informational/error meesage buffer  C     msgBuf      :: Informational/error meesage buffer
38        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
39    CEOP
40    
41    #ifdef ALLOW_KPP
42          IF (useKPP) CALL KPP_CHECK( myThid )
43    #else
44          IF (useKPP) CALL PACKAGES_CHECK_ERROR('KPP', myThid)
45    #endif
46    
47  #ifndef ALLOW_KPP  #ifdef ALLOW_GMREDI
48        IF (use_KPPmixing) THEN        IF (useGMRedi) CALL GMREDI_CHECK( myThid )
        WRITE(msgBuf,'(A)') '#define ALLOW_KPP to use use_KPPmixing'  
        CALL PRINT_ERROR( msgBuf , 1)  
        STOP 'ABNORMAL END: S/R PACKAGE_CHECK'  
       ENDIF  
49  #else  #else
50        WRITE(msgBuf,'(A)') 'PACKAGE_CHECK: #define ALLOW_KPP'        IF (useGMRedi) CALL PACKAGES_CHECK_ERROR('GMREDI', myThid)
51        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  #endif
52       &  SQUEEZE_RIGHT , 1)  
53  C     KPP needs convection turned off (will be packaged later)  #ifdef ALLOW_OBCS
54        IF (use_KPPmixing) THEN        IF (useOBCS) CALL OBCS_CHECK( myThid )
        IF (cAdjFreq.NE.0.  .OR.  
      &     ivdc_kappa.NE.0.) THEN  
         WRITE(msgBuf,'(A)') 'Some form of convection has been enabled'  
         CALL PRINT_ERROR( msgBuf , 1)  
         STOP 'ABNORMAL END: S/R PACKAGE_CHECK'  
        ENDIF  
        IF (.NOT.implicitDiffusion) THEN  
         WRITE(msgBuf,'(A)') 'KPP needs implicitDiffusion to be enabled'  
         CALL PRINT_ERROR( msgBuf , 1)  
         STOP 'ABNORMAL END: S/R PACKAGE_CHECK'  
        ENDIF  
       ENDIF  
 #endif  
   
 #ifndef ALLOW_GMREDI  
       IF (use_GMRedi) THEN  
        WRITE(msgBuf,'(A)') '#define ALLOW_GMREDI to use use_GMRedi'  
        CALL PRINT_ERROR( msgBuf , 1)  
        STOP 'ABNORMAL END: S/R PACKAGE_CHECK'  
       ENDIF  
55  #else  #else
56        WRITE(msgBuf,'(A)') 'PACKAGE_CHECK: #define GMREDI'        IF (useOBCS) CALL PACKAGES_CHECK_ERROR('OBCS', myThid)
57  C     GM/Redi needs implicit diffusion (will be packaged later)  #endif
58        IF (use_GMRedi) THEN  
59         IF (.NOT.implicitDiffusion) THEN  #ifndef ALLOW_AIM
60          WRITE(msgBuf,'(A)') 'GM/Redi needs implicitDiffusion=.true.'        IF (useAIM) CALL PACKAGES_CHECK_ERROR('AIM', myThid)
         CALL PRINT_ERROR( msgBuf , 1)  
 cTemp   STOP 'ABNORMAL END: S/R PACKAGE_CHECK'  
        ENDIF  
       ENDIF  
61  #endif  #endif
62    
63    #ifndef ALLOW_PTRACERS
64          IF (usePTRACERS) CALL PACKAGES_CHECK_ERROR('PTRACERS', myThid)
65    #endif
66    
67    #ifndef ALLOW_SHAP_FILT
68          IF (useSHAP_FILT) CALL PACKAGES_CHECK_ERROR('SHAP_FILT', myThid)
69    #endif
70    
71    #ifndef ALLOW_ZONAL_FILT
72          IF (useZONAL_FILT) CALL PACKAGES_CHECK_ERROR('ZONAL_FILT',myThid)
73    #endif
74    
75    #ifndef ALLOW_FLT
76          IF (useFLT) CALL PACKAGES_CHECK_ERROR('FLT', myThid)
77    #endif
78    
79        return        RETURN
80        end        END

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.22