1 |
C $Header$ |
C $Header$ |
2 |
|
C $Name$ |
3 |
|
|
4 |
#include "CPP_OPTIONS.h" |
#include "CPP_OPTIONS.h" |
5 |
|
|
6 |
SUBROUTINE PACKAGE_CHECK( myThid ) |
SUBROUTINE PACKAGES_CHECK( myThid ) |
7 |
C /==========================================================\ |
C /==========================================================\ |
8 |
C | SUBROUTINE PACKAGE_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 |
#ifndef ALLOW_KPP |
IF (useKPP) CALL KPP_CHECK( myThid ) |
|
IF (use_KPPmixing) THEN |
|
|
WRITE(msgBuf,'(A)') '#define ALLOW_KPP to use use_KPPmixing' |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
|
|
STOP 'ABNORMAL END: S/R PACKAGE_CHECK' |
|
|
ENDIF |
|
34 |
#else |
#else |
35 |
WRITE(msgBuf,'(A)') 'PACKAGE_CHECK: #define ALLOW_KPP' |
IF (useKPP) CALL PACKAGES_CHECK_ERROR('KPP', myThid) |
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , 1) |
|
|
C KPP needs convection turned off (will be packaged later) |
|
|
IF (use_KPPmixing) 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 |
|
|
ENDIF |
|
36 |
#endif |
#endif |
37 |
|
|
38 |
#ifndef ALLOW_GMREDI |
#ifdef ALLOW_GMREDI |
39 |
IF (use_GMRedi) THEN |
IF (useGMRedi) CALL GMREDI_CHECK( myThid ) |
|
WRITE(msgBuf,'(A)') '#define ALLOW_GMREDI to use use_GMRedi' |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
|
|
STOP 'ABNORMAL END: S/R PACKAGE_CHECK' |
|
|
ENDIF |
|
40 |
#else |
#else |
41 |
WRITE(msgBuf,'(A)') 'PACKAGE_CHECK: #define GMREDI' |
IF (useGMRedi) CALL PACKAGES_CHECK_ERROR('GMREDI', myThid) |
|
C GM/Redi needs implicit diffusion (will be packaged later) |
|
|
IF (use_GMRedi) THEN |
|
|
IF (.NOT.implicitDiffusion) THEN |
|
|
WRITE(msgBuf,'(A)') 'GM/Redi needs implicitDiffusion=.true.' |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
|
|
cTemp STOP 'ABNORMAL END: S/R PACKAGE_CHECK' |
|
|
ENDIF |
|
|
ENDIF |
|
42 |
#endif |
#endif |
43 |
|
|
44 |
|
#ifdef ALLOW_OBCS |
45 |
|
IF (useOBCS) CALL OBCS_CHECK( myThid ) |
46 |
|
#else |
47 |
|
IF (useOBCS) CALL PACKAGES_CHECK_ERROR('OBCS', myThid) |
48 |
|
#endif |
49 |
|
|
50 |
return |
RETURN |
51 |
end |
END |