/[MITgcm]/MITgcm/pkg/ptracers/ptracers_readparms.F
ViewVC logotype

Diff of /MITgcm/pkg/ptracers/ptracers_readparms.F

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

revision 1.8 by edhill, Sun Oct 10 06:08:50 2004 UTC revision 1.13 by mlosch, Sun Nov 28 23:50:59 2004 UTC
# Line 28  CEOP Line 28  CEOP
28  #ifdef ALLOW_PTRACERS  #ifdef ALLOW_PTRACERS
29    
30  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
31  C     iTracer    :: loop indices  C     k,iTracer  :: loop indices
32  C     iUnit      :: unit number for I/O  C     iUnit      :: unit number for I/O
33  C     msgBuf     :: message buffer  C     msgBuf     :: message buffer
34        INTEGER iTracer        INTEGER k, iTracer
35        INTEGER iUnit        INTEGER iUnit
36        INTEGER ic        INTEGER ic
37        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
38          _RL PTRACERS_diffKr(PTRACERS_num)
39    
40  C     PTRACERS_taveFreq :: Frequency with which time-averaged PTRACERS  C     PTRACERS_taveFreq :: Frequency with which time-averaged PTRACERS
41  C                          are written to post-processing files.  C                          are written to post-processing files.
42        NAMELIST /PTRACERS_PARM01/        NAMELIST /PTRACERS_PARM01/
43       &     PTRACERS_taveFreq,       &     PTRACERS_taveFreq,
44         &     PTRACERS_monitorFreq,
45       &     PTRACERS_advScheme,       &     PTRACERS_advScheme,
46       &     PTRACERS_diffKh,       &     PTRACERS_diffKh,
47       &     PTRACERS_diffK4,       &     PTRACERS_diffK4,
48       &     PTRACERS_diffKr,       &     PTRACERS_diffKr,
49         &     PTRACERS_diffKrNr,
50       &     PTRACERS_useGMRedi,       &     PTRACERS_useGMRedi,
51       &     PTRACERS_useKPP,       &     PTRACERS_useKPP,
52       &     PTRACERS_numInUse,       &     PTRACERS_numInUse,
# Line 52  C                          are written t Line 55  C                          are written t
55       &     PTRACERS_names,       &     PTRACERS_names,
56       &     PTRACERS_long_names,       &     PTRACERS_long_names,
57       &     PTRACERS_units,       &     PTRACERS_units,
      &     PTRACERS_write_ioinc,  
58       &     PTRACERS_read_mnc,       &     PTRACERS_read_mnc,
59       &     PTRACERS_write_mnc       &     PTRACERS_write_mnc
60    
# Line 61  C     internal flag to indicate we are i Line 63  C     internal flag to indicate we are i
63        PTRACERSisON=.TRUE.        PTRACERSisON=.TRUE.
64    
65  C     Set defaults values for parameters in PTRACERS.h  C     Set defaults values for parameters in PTRACERS.h
66        PTRACERS_taveFreq=taveFreq        PTRACERS_taveFreq    = taveFreq
67          PTRACERS_monitorFreq = monitorFreq
68        PTRACERS_numInUse=-1        PTRACERS_numInUse=-1
69        DO iTracer=1,PTRACERS_num        DO iTracer=1,PTRACERS_num
70          PTRACERS_advScheme(iTracer)=saltAdvScheme          PTRACERS_advScheme(iTracer)=saltAdvScheme
71          PTRACERS_diffKh(iTracer)=diffKhS          PTRACERS_diffKh(iTracer)=diffKhS
72          PTRACERS_diffK4(iTracer)=diffK4S          PTRACERS_diffK4(iTracer)=diffK4S
73          PTRACERS_diffKr(iTracer)=diffKrS          PTRACERS_diffKr(iTracer)=UNSET_RL
74            DO k=1,Nr
75              PTRACERS_diffKrNr(k,iTracer)=diffKrNrS(k)
76            ENDDO
77          PTRACERS_useGMRedi(iTracer)=useGMRedi          PTRACERS_useGMRedi(iTracer)=useGMRedi
78          PTRACERS_useKPP(iTracer)=useKPP          PTRACERS_useKPP(iTracer)=useKPP
79          PTRACERS_initialFile(iTracer)=' '          PTRACERS_initialFile(iTracer)=' '
# Line 82  C     Set defaults values for parameters Line 88  C     Set defaults values for parameters
88        PTRACERS_read_mnc    = .FALSE.        PTRACERS_read_mnc    = .FALSE.
89        PTRACERS_write_mdsio = .TRUE.        PTRACERS_write_mdsio = .TRUE.
90        PTRACERS_write_mnc   = .FALSE.        PTRACERS_write_mnc   = .FALSE.
       PTRACERS_write_ioinc = .FALSE.  
91    
92  C     Open and read the data.ptracers file  C     Open and read the data.ptracers file
93        _BEGIN_MASTER(myThid)        _BEGIN_MASTER(myThid)
# Line 134  C     Check that enough parameters were Line 139  C     Check that enough parameters were
139            STOP 'ABNORMAL END: S/R PTRACERS_READPARMS'            STOP 'ABNORMAL END: S/R PTRACERS_READPARMS'
140          ENDIF          ENDIF
141        ENDDO        ENDDO
142          DO iTracer=1,PTRACERS_numInUse
143            PTRACERS_useGMRedi(iTracer) = PTRACERS_useGMRedi(iTracer)
144         &                           .AND.useGMRedi
145            PTRACERS_useKPP(iTracer) = PTRACERS_useKPP(iTracer)
146         &                        .AND.useKPP
147            IF ( PTRACERS_diffKr(iTracer).NE.UNSET_RL ) THEN
148             DO k=1,Nr
149              PTRACERS_diffKrNr(k,iTracer)=PTRACERS_diffKr(iTracer)
150             ENDDO
151            ENDIF
152          ENDDO
153    
154  #ifdef ALLOW_MNC  #ifdef ALLOW_MNC
155        IF (useMNC) THEN        IF (useMNC) THEN
156  C       Set the default I/O Types  C       Set the default I/O Types
157          IF (PTRACERS_read_mnc) PTRACERS_read_mdsio = .FALSE.          IF (PTRACERS_read_mnc) PTRACERS_read_mdsio = .FALSE.
158          IF ( (.NOT. PTRACERS_write_ioinc)          IF ( (.NOT. outputTypesInclusive)
159       &       .AND. PTRACERS_write_mnc ) pickup_write_mdsio = .FALSE.       &       .AND. PTRACERS_write_mnc ) pickup_write_mdsio = .FALSE.
160            IF ( (.NOT. outputTypesInclusive)
161         &       .AND. PTRACERS_write_mnc ) PTRACERS_write_mdsio = .FALSE.
162                    
163  C       Initialize the MNC variable types for PTRACERS  C       Initialize the MNC variable types for PTRACERS
164          CALL PTRACERS_MNC_INIT( myThid )          CALL PTRACERS_MNC_INIT( myThid )
165        ENDIF        ENDIF
166  #endif /*  ALLOW_MNC  */  #endif /*  ALLOW_MNC  */
167                
168    C--   Print a summary of pTracer parameter values:
169          iUnit = standardMessageUnit
170          WRITE(msgBuf,'(A)') '// ==================================='
171          CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1)
172          WRITE(msgBuf,'(A)') '// PTRACERS parameters '
173          CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1)
174          WRITE(msgBuf,'(A)') '// ==================================='
175          CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1)
176          CALL WRITE_0D_I( PTRACERS_numInUse, INDEX_NONE,
177         &   'PTRACERS_numInUse =',
178         &   ' /* number of tracers */')
179          CALL WRITE_0D_R8(PTRACERS_taveFreq, INDEX_NONE,
180         &   'PTRACERS_taveFreq =',
181         &   ' /* Frequency^-1 for time-Aver. output (s) */')
182          CALL WRITE_0D_L( PTRACERS_useRecords, INDEX_NONE,
183         &   'PTRACERS_useRecords =', ' /* all tracers in 1 file */')
184          CALL WRITE_0D_L( PTRACERS_write_mdsio, INDEX_NONE,
185         &   'PTRACERS_write_mdsio =', ' /* write mdsio files */')
186          CALL WRITE_0D_L( PTRACERS_write_mnc, INDEX_NONE,
187         &   'PTRACERS_write_mnc =', ' /* write mnc files */')
188    
189          DO iTracer=1,PTRACERS_numInUse
190            WRITE(msgBuf,'(A)') ' -----------------------------------'
191            CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1)
192            WRITE(msgBuf,'(A,I4)') ' tracer number : ',iTracer
193            CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1)
194            CALL WRITE_0D_I( PTRACERS_advScheme(iTracer), INDEX_NONE,
195         &     'PTRACERS_advScheme =', ' /* Advection Scheme */')
196            CALL WRITE_0D_R8( PTRACERS_diffKh(iTracer), INDEX_NONE,
197         &     'PTRACERS_diffKh =', ' /* Laplacian Diffusivity */')
198            CALL WRITE_0D_R8( PTRACERS_diffK4(iTracer), INDEX_NONE,
199         &     'PTRACERS_diffK4 =', ' /* Biharmonic Diffusivity */')
200            CALL WRITE_1D_R8( PTRACERS_diffKrNr(1,iTracer), Nr, INDEX_K,
201         &     'PTRACERS_diffKrNr =', ' /* Vertical Diffusivity */')
202            CALL WRITE_0D_L( PTRACERS_useGMRedi(iTracer), INDEX_NONE,
203         &     'PTRACERS_useGMRedi =', ' /* apply GM-Redi */')
204            CALL WRITE_0D_L( PTRACERS_useKPP(iTracer), INDEX_NONE,
205         &     'PTRACERS_useKPP =', ' /* apply KPP scheme */')
206    
207          ENDDO
208            WRITE(msgBuf,'(A)') ' -----------------------------------'
209            CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1)
210  #endif /* ALLOW_PTRACERS */  #endif /* ALLOW_PTRACERS */
211    
212        RETURN        RETURN

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

  ViewVC Help
Powered by ViewVC 1.1.22