1 |
C $Header: /u/gcmpack/MITgcm/pkg/ecco/ecco_check.F,v 1.8 2012/07/31 16:07:32 heimbach Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "ECCO_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE ECCO_CHECK( myThid ) |
7 |
C /==========================================================\ |
8 |
C | SUBROUTINE ECCO_CHECK | |
9 |
C | o Check runtime activated packages have been built in. | |
10 |
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 \==========================================================/ |
17 |
IMPLICIT NONE |
18 |
|
19 |
C === Global variables === |
20 |
#include "SIZE.h" |
21 |
#include "EEPARAMS.h" |
22 |
#include "PARAMS.h" |
23 |
#include "DYNVARS.h" |
24 |
#include "ecco_cost.h" |
25 |
#include "ctrl.h" |
26 |
#include "optim.h" |
27 |
#ifdef ALLOW_PROFILES |
28 |
#include "profiles.h" |
29 |
#endif |
30 |
|
31 |
C === Routine arguments === |
32 |
C myThid - Number of this instances |
33 |
INTEGER myThid |
34 |
|
35 |
C === Local variables === |
36 |
C msgBuf - Informational/error meesage buffer |
37 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
38 |
|
39 |
_BEGIN_MASTER(myThid) |
40 |
|
41 |
IF ( ndaysrec .GT. maxNumDays ) THEN |
42 |
WRITE(msgBuf,'(2A,2I10)') |
43 |
& 'ECCO_CHECK: for ALLOW_TRANSPORT_COST_CONTRIBUTION: ', |
44 |
& 'ndaysrec > maxNumDays in ecco_cost.h ', |
45 |
& ndaysrec, maxNumDays |
46 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
47 |
& SQUEEZE_RIGHT , myThid ) |
48 |
CALL PRINT_ERROR( msgBuf , myThid ) |
49 |
STOP 'ABNORMAL END: S/R ECCO_CHECK' |
50 |
ENDIF |
51 |
|
52 |
#ifdef ALLOW_PROFILES_CONTRIBUTION |
53 |
IF ( .NOT.usePROFILES ) THEN |
54 |
WRITE(msgBuf,'(2A)') |
55 |
& 'ECCO_CHECK: for ALLOW_PROFILES_CONTRIBUTION ', |
56 |
& 'requires usePROFILES to be .true.' |
57 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
58 |
& SQUEEZE_RIGHT , myThid ) |
59 |
CALL PRINT_ERROR( msgBuf , myThid ) |
60 |
STOP 'ABNORMAL END: S/R ECCO_CHECK' |
61 |
ENDIF |
62 |
#endif |
63 |
|
64 |
_END_MASTER(myThid) |
65 |
|
66 |
RETURN |
67 |
END |