/[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.2 by heimbach, Mon Sep 11 20:42:57 2000 UTC revision 1.14 by jmc, Thu Jun 12 18:21:34 2003 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    CBOP
7    C     !ROUTINE: PACKAGES_CHECK
8    C     !INTERFACE:
9        SUBROUTINE PACKAGES_CHECK( myThid )        SUBROUTINE PACKAGES_CHECK( myThid )
10  C     /==========================================================\  C     !DESCRIPTION: \bv
11  C     | SUBROUTINE PACKAGES_CHECK                                |  C     *==========================================================*
12  C     | o Check dependances between selected packages            |  C     | SUBROUTINE PACKAGES_CHECK                                
13  C     |==========================================================|  C     | o Check runtime activated packages have been built in.    
14  C     \==========================================================/  C     *==========================================================*
15        IMPLICIT NONE  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 (useKPP) THEN        IF (useGMRedi) CALL GMREDI_CHECK( myThid )
        WRITE(msgBuf,'(A)') '#define ALLOW_KPP to use useKPP'  
        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)
       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &  SQUEEZE_RIGHT , 1)  
 C     KPP needs convection turned off (will be packaged later)  
       IF (useKPP) THEN  
        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  
        IF (.NOT.implicitViscosity) THEN  
         WRITE(msgBuf,'(A)') 'KPP needs implicitViscosity to be enabled'  
         CALL PRINT_ERROR( msgBuf , 1)  
         STOP 'ABNORMAL END: S/R PACKAGE_CHECK'  
        ENDIF  
       ENDIF  
51  #endif  #endif
52    
53  #ifndef ALLOW_GMREDI  #ifdef ALLOW_OBCS
54        IF (useGMRedi) CALL PACKAGES_CHECK_ERROR('GMREDI')        IF (useOBCS) CALL OBCS_CHECK( myThid )
55  #else  #else
56        IF (useGMRedi) CALL GMREDI_CHECK( myThid )        IF (useOBCS) CALL PACKAGES_CHECK_ERROR('OBCS', myThid)
57    #endif
58    
59    #ifndef ALLOW_AIM
60          IF (useAIM) CALL PACKAGES_CHECK_ERROR('AIM', myThid)
61    #endif
62    
63    #ifndef ALLOW_LAND
64          IF (useLand) CALL PACKAGES_CHECK_ERROR('LAND', myThid)
65    #endif
66    
67    #ifndef ALLOW_PTRACERS
68          IF (usePTRACERS) CALL PACKAGES_CHECK_ERROR('PTRACERS', myThid)
69    #endif
70    
71    #ifndef ALLOW_SHAP_FILT
72          IF (useSHAP_FILT) CALL PACKAGES_CHECK_ERROR('SHAP_FILT', myThid)
73    #endif
74    
75    #ifndef ALLOW_ZONAL_FILT
76          IF (useZONAL_FILT) CALL PACKAGES_CHECK_ERROR('ZONAL_FILT',myThid)
77    #endif
78    
79    #ifndef ALLOW_FLT
80          IF (useFLT) CALL PACKAGES_CHECK_ERROR('FLT', myThid)
81    #endif
82    
83    #ifdef ALLOW_SBO
84          IF (useSBO) CALL SBO_CHECK( myThid )
85    #else
86          IF (useSBO) CALL PACKAGES_CHECK_ERROR('SBO', myThid)
87    #endif
88    
89    #ifdef ALLOW_SEAICE
90          IF (useSEAICE) CALL SEAICE_CHECK( myThid )
91    #else
92          IF (useSEAICE) CALL PACKAGES_CHECK_ERROR('SEAICE', myThid)
93  #endif  #endif
94    
95        return        RETURN
96        end        END

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.22