/[MITgcm]/MITgcm/pkg/layers/layers_readparms.F
ViewVC logotype

Diff of /MITgcm/pkg/layers/layers_readparms.F

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

revision 1.7 by dfer, Mon Jan 7 02:07:55 2013 UTC revision 1.8 by jmc, Wed Jan 9 00:03:08 2013 UTC
# Line 27  C     INPUT PARAMETERS: Line 27  C     INPUT PARAMETERS:
27       &       layers_name, layers_bounds, layers_krho       &       layers_name, layers_bounds, layers_krho
28    
29  C     === Local variables ===  C     === Local variables ===
30  C     msgBuf      - Informational/error meesage buffer  C     msgBuf      - Informational/error message buffer
31  C     iUnit       - Work variable for IO unit number  C     iUnit       - Work variable for IO unit number
32  C     k           - index  C     k           - index
33        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
# Line 45  C     The MNC stuff is not working yet Line 45  C     The MNC stuff is not working yet
45          layers_name(iLa) = ' '          layers_name(iLa) = ' '
46          layers_num(iLa) = 0          layers_num(iLa) = 0
47          layers_krho(iLa)= 1          layers_krho(iLa)= 1
48          layers_bolus(iLa) = .TRUE.          layers_bolus(iLa) = useGMRedi
49          DO k=1,Nlayers+1          DO k=1,Nlayers+1
50            layers_bounds(k,iLa) = UNSET_RL            layers_bounds(k,iLa) = UNSET_RL
51          ENDDO          ENDDO
52        ENDDO        ENDDO
53          
54        DO k=1,Nlayers+1        DO k=1,Nlayers+1
55          layers_G(k) = UNSET_RL          layers_G(k) = UNSET_RL
56        ENDDO        ENDDO
# Line 58  C     The MNC stuff is not working yet Line 58  C     The MNC stuff is not working yet
58        layers_diagFreq = dumpFreq        layers_diagFreq = dumpFreq
59        LAYER_nb = 0        LAYER_nb = 0
60        layers_kref = 1        layers_kref = 1
61        useBOLUS = .TRUE.        useBOLUS = useGMRedi
62    
63        WRITE(msgBuf,'(A)') 'LAYERS_READPARMS: opening data.layers'        WRITE(msgBuf,'(A)') 'LAYERS_READPARMS: opening data.layers'
64        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
# Line 79  C     Close the open data file Line 79  C     Close the open data file
79        CLOSE(iUnit)        CLOSE(iUnit)
80    
81  c revert to old approach  c revert to old approach
82  c (unless I simply retore the old ways, I need a  c (unless I simply retore the old ways, I need a
83  c  print statement or two as I override the new way)  c  print statement or two as I override the new way)
84        IF ( LAYER_nb.NE.0 ) THEN        IF ( LAYER_nb.NE.0 ) THEN
85          layers_num(1) = LAYER_nb          layers_num(1) = LAYER_nb
# Line 92  c  print statement or two as I override Line 92  c  print statement or two as I override
92            layers_num(iLa) = 0            layers_num(iLa) = 0
93            layers_name(iLa) = ' '            layers_name(iLa) = ' '
94            layers_krho(iLa) = 1            layers_krho(iLa) = 1
95            layers_bolus(iLa) = .TRUE.            layers_bolus(iLa) = useGMRedi
96            DO k=1,Nlayers+1            DO k=1,Nlayers+1
97              layers_bounds(k,iLa) = UNSET_RL              layers_bounds(k,iLa) = UNSET_RL
98            ENDDO            ENDDO
# Line 116  C--   ensure layers_name/layers_num setu Line 116  C--   ensure layers_name/layers_num setu
116          ELSE          ELSE
117            layers_name(iLa)=' '            layers_name(iLa)=' '
118            layers_num(iLa)=0            layers_num(iLa)=0
119          ENDIF            ENDIF
120    C--   bolus contribution only available if using GMRedi
121            layers_bolus(iLa) = layers_bolus(iLa) .AND. useGMRedi
122        ENDDO        ENDDO
123          
124  C--   Make sure the layers_bounds we just read is big enough  C--   Make sure the layers_bounds we just read is big enough
125        DO iLa=1,layers_maxNum        DO iLa=1,layers_maxNum
126        IF ( layers_num(iLa).NE.0 ) THEN         IF ( layers_num(iLa).NE.0 ) THEN
127        DO k=1,Nlayers+1          DO k=1,Nlayers+1
128          IF ( layers_bounds(k,iLa) .EQ. UNSET_RL ) THEN           IF ( layers_bounds(k,iLa) .EQ. UNSET_RL ) THEN
129            WRITE(msgBuf,'(2A,I4)')            WRITE(msgBuf,'(2A,I4)')
130       &        'S/R LAYERS_READPARMS: ',       &        'S/R LAYERS_READPARMS: ',
131       &        'No value for layers_bounds at k =', k       &        'No value for layers_bounds at k =', k
132            CALL PRINT_ERROR( msgBuf, myThid )            CALL PRINT_ERROR( msgBuf, myThid )
133            STOP 'ABNORMAL END: S/R LAYERS_READPARMS'            STOP 'ABNORMAL END: S/R LAYERS_READPARMS'
134          ELSE IF ( k .EQ. 1 ) THEN           ELSEIF ( k .EQ. 1 ) THEN
135  C         Do nothing  C         Do nothing
136          ELSE IF ( layers_bounds(k,iLa) .LE.           ELSEIF ( layers_bounds(k,iLa) .LE.
137       &            layers_bounds(k-1,iLa) ) THEN       &            layers_bounds(k-1,iLa) ) THEN
138  C         Check to make sure layers_bounds is increasing  C         Check to make sure layers_bounds is increasing
139            WRITE(msgBuf,'(2A,I4)')            WRITE(msgBuf,'(2A,I4)')
# Line 139  C         Check to make sure layers_boun Line 141  C         Check to make sure layers_boun
141       &      'layers_bounds is not increasing at k =', k       &      'layers_bounds is not increasing at k =', k
142            CALL PRINT_ERROR( msgBuf, myThid )            CALL PRINT_ERROR( msgBuf, myThid )
143            STOP 'ABNORMAL END: S/R LAYERS_READPARMS'            STOP 'ABNORMAL END: S/R LAYERS_READPARMS'
144          ENDIF           ENDIF
145        ENDDO          ENDDO
146        ENDIF         ENDIF
147        ENDDO        ENDDO
148    
149  C--   Make sure that we locally honor the global MNC on/off flag  C--   Make sure that we locally honor the global MNC on/off flag

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22