1 |
C $Header: /u/gcmpack/MITgcm_contrib/darwin/pkg/darwin/darwin_check.F,v 1.2 2009/02/27 19:04:26 jahn Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "CPP_OPTIONS.h" |
5 |
#include "PTRACERS_OPTIONS.h" |
6 |
#include "DARWIN_OPTIONS.h" |
7 |
|
8 |
#ifdef ALLOW_PTRACERS |
9 |
#ifdef ALLOW_DARWIN |
10 |
#ifdef ALLOW_QUOTA |
11 |
|
12 |
SUBROUTINE QUOTA_CHECK( myThid ) |
13 |
C /==========================================================\ |
14 |
C | SUBROUTINE QOUTA_CHECK | |
15 |
C | o Check dependences with other packages: | |
16 |
C | Print darwin indices (iPO4,...) and ptracer names | |
17 |
C | to allow for manual check | |
18 |
C \==========================================================/ |
19 |
IMPLICIT NONE |
20 |
|
21 |
C === Global variables === |
22 |
#include "SIZE.h" |
23 |
#include "EEPARAMS.h" |
24 |
#include "PARAMS.h" |
25 |
#include "PTRACERS_SIZE.h" |
26 |
#include "PTRACERS_PARAMS.h" |
27 |
#include "GCHEM.h" |
28 |
#include "QUOTA_SIZE.h" |
29 |
#include "QUOTA.h" |
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 |
INTEGER i,j,bi,bj,ii,io,jp,ko |
39 |
INTEGER place |
40 |
|
41 |
WRITE(msgBuf,'(A)') 'QUOTA_CHECK: #define ALLOW_DARWIN' |
42 |
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
43 |
& SQUEEZE_RIGHT,myThid) |
44 |
|
45 |
if ( nDarwin .GT. PTRACERS_num ) THEN |
46 |
WRITE(msgBuf,'(A,I5,A,I5)') |
47 |
& 'QUOTA_CHECK: ERROR: nDarwin > PTRACERS_num: ', |
48 |
& nDarwin,' vs ',PTRACERS_num |
49 |
CALL PRINT_ERROR( msgBuf , 1) |
50 |
STOP 'ABNORMAL END: S/R QUOTA_CHECK' |
51 |
ENDIF |
52 |
WRITE(msgBuf,'(A)') 'QUOTA_CHECK: iPtr darwin PTRACERS_names' |
53 |
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
54 |
& SQUEEZE_RIGHT,myThid) |
55 |
WRITE(msgBuf,'(A)') |
56 |
& '// =======================================================' |
57 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
58 |
& SQUEEZE_RIGHT, myThid ) |
59 |
c quota tracers |
60 |
place = 0 |
61 |
c inorganic nutrient tracers |
62 |
DO ii=1,iimax |
63 |
place = place + 1 |
64 |
WRITE(msgBuf,'(A,I4,X,A,I4,A,A32)') 'QUOTA_CHECK: ', |
65 |
& place,'inoganic nutrient (',ii,') - ',PTRACERS_names(place) |
66 |
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
67 |
& SQUEEZE_RIGHT,myThid) |
68 |
ENDDO |
69 |
WRITE(msgBuf,'(A)') |
70 |
& '// =======================================================' |
71 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
72 |
& SQUEEZE_RIGHT, myThid ) |
73 |
c biomass tracers |
74 |
DO io=1,iomax |
75 |
DO jp=1,min(npmax,99) |
76 |
if (io.ne.iSili) then |
77 |
place = place + 1 |
78 |
WRITE(msgBuf,'(A,I4,X,A,I1,A,I2,A,A32)') 'QUOTA_CHECK: ', |
79 |
& place,'biomass (',io,',',jp,') - ', PTRACERS_names(place) |
80 |
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
81 |
& SQUEEZE_RIGHT,myThid) |
82 |
endif |
83 |
ENDDO |
84 |
ENDDO |
85 |
WRITE(msgBuf,'(A)') |
86 |
& '// =======================================================' |
87 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
88 |
& SQUEEZE_RIGHT, myThid ) |
89 |
c organic matter tracers |
90 |
DO io=1,iomax-iChl |
91 |
DO ko=1,min(komax,99) |
92 |
if (io.ne.iSili.or.ko.ne.1) then |
93 |
place = place + 1 |
94 |
WRITE(msgBuf,'(A,I4,X,A,I1,A,I2,A,A32)') 'QUOTA_CHECK: ', |
95 |
& place,'orgmat(',io,',',ko,') - ',PTRACERS_names(place) |
96 |
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
97 |
& SQUEEZE_RIGHT,myThid) |
98 |
endif |
99 |
ENDDO |
100 |
ENDDO |
101 |
|
102 |
|
103 |
RETURN |
104 |
END |
105 |
|
106 |
#endif /* ALLOW_QUOTA */ |
107 |
#endif /* ALLOW_DARWIN */ |
108 |
#endif /* ALLOW_PTRACERS */ |
109 |
|