1 |
C $Header$ |
C $Header$ |
2 |
|
C $Name$ |
3 |
|
|
4 |
#include "CPP_OPTIONS.h" |
#include "CPP_OPTIONS.h" |
5 |
|
|
6 |
SUBROUTINE PACKAGES_CHECK( myThid ) |
SUBROUTINE PACKAGES_CHECK( myThid ) |
7 |
C /==========================================================\ |
C /==========================================================\ |
8 |
C | SUBROUTINE PACKAGES_CHECK | |
C | SUBROUTINE PACKAGES_CHECK | |
9 |
C | o Check dependances between selected packages | |
C | o Check runtime activated packages have been built in. | |
10 |
C |==========================================================| |
C |==========================================================| |
11 |
|
C | All packages can be selected/deselected at build time | |
12 |
|
C | ( when code is compiled ) and activated/deactivated at | |
13 |
|
C | runtime. This routine does a quick check to trap packages| |
14 |
|
C | that were activated at runtime but that were not compiled| |
15 |
|
C | in at build time. | |
16 |
C \==========================================================/ |
C \==========================================================/ |
17 |
IMPLICIT NONE |
IMPLICIT NONE |
18 |
|
|
29 |
C msgBuf - Informational/error meesage buffer |
C msgBuf - Informational/error meesage buffer |
30 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
31 |
|
|
32 |
|
#ifdef ALLOW_KPP |
33 |
|
IF (useKPP) CALL KPP_CHECK( myThid ) |
34 |
|
#else |
35 |
|
IF (useKPP) CALL PACKAGES_CHECK_ERROR('KPP', myThid) |
36 |
|
#endif |
37 |
|
|
38 |
#ifndef ALLOW_KPP |
#ifdef ALLOW_GMREDI |
39 |
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 |
|
40 |
#else |
#else |
41 |
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 |
|
42 |
#endif |
#endif |
43 |
|
|
44 |
#ifndef ALLOW_GMREDI |
#ifdef ALLOW_OBCS |
45 |
IF (useGMRedi) CALL PACKAGES_CHECK_ERROR('GMREDI') |
IF (useOBCS) CALL OBCS_CHECK( myThid ) |
46 |
#else |
#else |
47 |
IF (useGMRedi) CALL GMREDI_CHECK( myThid ) |
IF (useOBCS) CALL PACKAGES_CHECK_ERROR('OBCS', myThid) |
48 |
|
#endif |
49 |
|
|
50 |
|
#ifndef ALLOW_AIM |
51 |
|
IF (useAIM) CALL PACKAGES_CHECK_ERROR('AIM', myThid) |
52 |
#endif |
#endif |
53 |
|
|
54 |
return |
RETURN |
55 |
end |
END |