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

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

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

revision 1.10 by jmc, Sun Jan 27 19:35:42 2008 UTC revision 1.11 by jahn, Thu May 8 19:50:09 2008 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4    #include "GAD_OPTIONS.h"
5  #include "PTRACERS_OPTIONS.h"  #include "PTRACERS_OPTIONS.h"
6    
7  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
# Line 14  C     !DESCRIPTION: Line 15  C     !DESCRIPTION:
15  C     Reads current state of passive tracers from a pickup file  C     Reads current state of passive tracers from a pickup file
16    
17  C     !USES:  C     !USES:
18    #include "PTRACERS_MOD.h"
19        IMPLICIT NONE        IMPLICIT NONE
20  #include "SIZE.h"  #include "SIZE.h"
21  #include "EEPARAMS.h"  #include "EEPARAMS.h"
22  #include "PARAMS.h"  #include "PARAMS.h"
23    #include "GAD.h"
24  #include "PTRACERS_SIZE.h"  #include "PTRACERS_SIZE.h"
25  #include "PTRACERS_PARAMS.h"  #include "PTRACERS_PARAMS.h"
26  #include "PTRACERS_RESTART.h"  #include "PTRACERS_RESTART.h"
# Line 46  C     j           :: loop index Line 49  C     j           :: loop index
49  C     nj          :: record number  C     nj          :: record number
50  C     ioUnit      :: temp for writing msg unit  C     ioUnit      :: temp for writing msg unit
51  C     msgBuf      :: Informational/error message buffer  C     msgBuf      :: Informational/error message buffer
52        INTEGER iTracer, iRec, prec        INTEGER iTracer, iRec, prec, n
53        INTEGER filePrec, nbFields        INTEGER filePrec, nbFields
54        INTEGER missFldDim, nMissing        INTEGER missFldDim, nMissing
55        INTEGER nj, ioUnit        INTEGER nj, ioUnit
# Line 79  C       Read variables from the pickup f Line 82  C       Read variables from the pickup f
82       &                     Nr, myThid )       &                     Nr, myThid )
83          ENDDO          ENDDO
84        ENDIF        ENDIF
85    #ifdef GAD_ALLOW_SOM_ADVECT
86          IF ( useMNC .AND. PTRACERS_pickup_read_mnc ) THEN
87           DO iTracer = 1, PTRACERS_numInUse
88            IF ( PTRACERS_SOM_Advection(iTracer) ) THEN
89             WRITE(msgBuf,'(3A)')'PTRACERS_READ_PICKUP: MNC not yet coded',
90         &                       ' for SOM advection',
91         &                       ' => read bin file instead'
92             CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
93         &                       SQUEEZE_RIGHT, myThid)
94            ENDIF
95           ENDDO
96          ENDIF
97    #endif /*  GAD_ALLOW_SOM_ADVECT  */
98  #endif /*  ALLOW_MNC  */  #endif /*  ALLOW_MNC  */
99    
100        IF ( PTRACERS_pickup_read_mdsio ) THEN        IF ( PTRACERS_pickup_read_mdsio ) THEN
# Line 239  C--    Check for missing fields: Line 255  C--    Check for missing fields:
255       I                     missFldList,       I                     missFldList,
256       I                     nMissing, nbFields,       I                     nMissing, nbFields,
257       I                     myIter, myThid )       I                     myIter, myThid )
258    
259    #if defined(GAD_ALLOW_SOM_ADVECT) && defined(PTRACERS_ALLOW_DYN_STATE)
260    C--   Read pickup file with 2nd.Order moment fields
261           DO iTracer = 1, PTRACERS_numInUse
262            IF ( PTRACERS_SOM_Advection(iTracer) ) THEN
263    
264             IF (pickupSuff .EQ. ' ') THEN
265               WRITE(fn,'(3A,I10.10)') 'pickup_somTRAC',
266         &                     PTRACERS_ioLabel(iTracer),'.', myIter
267             ELSE
268               WRITE(fn,'(3A,A10)') 'pickup_somTRAC',
269         &                     PTRACERS_ioLabel(iTracer),'.', pickupSuff
270             ENDIF
271             WRITE(msgBuf,'(A,I3,A)')'PTRACERS_READ_PICKUP: iTracer = ',
272         &                      iTracer,
273         &                      ' : reading 2nd-order moments from file '
274             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
275         &                      SQUEEZE_RIGHT, myThid)
276             CALL PRINT_MESSAGE( fn, standardMessageUnit,
277         &                      SQUEEZE_RIGHT, myThid)
278             prec = precFloat64
279    C        Read 2nd Order moments as consecutive records
280             DO n=1,nSOM
281               iRec = n
282               CALL READ_REC_3D_RL( fn, prec, Nr,
283         O               _Ptracers_som(1-Olx,1-Oly,1,1,1,n,iTracer),
284         I               iRec, myIter, myThid )
285             ENDDO
286             CALL GAD_EXCH_SOM( _Ptracers_som(1-Olx,1-Oly,1,1,1,1,iTracer),
287         &                      Nr, myThid )
288            ENDIF
289           ENDDO
290    #endif /* GAD_ALLOW_SOM_ADVECT && PTRACERS_ALLOW_DYN_STATE */
291         _BARRIER         _BARRIER
292    
293  C--   end: pickup_read_mdsio  C--   end: pickup_read_mdsio

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.22