23 |
#include "SIZE.h" |
#include "SIZE.h" |
24 |
#include "DIAGNOSTICS_SIZE.h" |
#include "DIAGNOSTICS_SIZE.h" |
25 |
#include "DIAGNOSTICS.h" |
#include "DIAGNOSTICS.h" |
26 |
|
#include "DIAGSTATS_REGIONS.h" |
27 |
|
|
28 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
29 |
C == Routine arguments == |
C == Routine arguments == |
37 |
INTEGER md,ld,nd |
INTEGER md,ld,nd |
38 |
INTEGER mm, mate, nActiveMax |
INTEGER mm, mate, nActiveMax |
39 |
INTEGER j, k, l |
INTEGER j, k, l |
40 |
LOGICAL found, addMate2List, inList |
LOGICAL found, addMate2List, inList, regListPb |
41 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
42 |
|
|
43 |
|
|
140 |
|
|
141 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
142 |
C-- Set list of regions to write |
C-- Set list of regions to write |
143 |
C- Need to check that all selected regions are actually defined |
C- check that all selected regions are actually defined |
144 |
|
regListPb = .FALSE. |
145 |
|
DO l=1,diagSt_nbLists |
146 |
|
DO j=1,nRegions |
147 |
|
IF ( diagSt_region(j,l).NE.0 ) THEN |
148 |
|
IF ( diagSt_kRegMsk(j).LT.1 .OR. |
149 |
|
& diagSt_kRegMsk(j).GT.nLevRegMask ) THEN |
150 |
|
WRITE(msgBuf,'(A,3(A,I3))') 'DIAGSTATS_SET_POINTERS:', |
151 |
|
& ' region', j, ' undefined (k=', diagSt_kRegMsk(j), |
152 |
|
& ') in list l=', l |
153 |
|
CALL PRINT_ERROR( msgBuf , myThid ) |
154 |
|
regListPb = .TRUE. |
155 |
|
ENDIF |
156 |
|
ENDIF |
157 |
|
ENDDO |
158 |
|
ENDDO |
159 |
|
IF ( regListPb ) THEN |
160 |
|
WRITE(msgBuf,'(2A)') 'DIAGSTATS_SET_POINTERS:', |
161 |
|
& ' Cannot select undefined regions' |
162 |
|
CALL PRINT_ERROR( msgBuf , myThid ) |
163 |
|
STOP 'ABNORMAL END: S/R DIAGSTATS_SET_POINTERS' |
164 |
|
ENDIF |
165 |
|
|
166 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
167 |
|
|
168 |
WRITE(msgBuf,'(A)') 'DIAGSTATS_SET_POINTERS: done' |
WRITE(msgBuf,'(A)') 'DIAGSTATS_SET_POINTERS: done' |
169 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |