/[MITgcm]/MITgcm/pkg/diagnostics/diagstats_set_pointers.F
ViewVC logotype

Diff of /MITgcm/pkg/diagnostics/diagstats_set_pointers.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2 by jmc, Sun Jun 26 16:51:49 2005 UTC revision 1.3 by jmc, Mon Jan 23 22:28:57 2006 UTC
# Line 23  C     == Global variables === Line 23  C     == Global variables ===
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 ==
# Line 36  C     == Local variables == Line 37  C     == Local variables ==
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    
# Line 139  C-       add this fields to the active l Line 140  C-       add this fields to the active l
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,

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22