/[MITgcm]/MITgcm/pkg/seaice/seaice_write_pickup.F
ViewVC logotype

Diff of /MITgcm/pkg/seaice/seaice_write_pickup.F

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

revision 1.10 by heimbach, Mon Sep 26 22:05:49 2011 UTC revision 1.11 by heimbach, Tue Sep 27 00:08:03 2011 UTC
# Line 63  C     msgBuf      :: Informational/error Line 63  C     msgBuf      :: Informational/error
63        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
64  #if (defined (SEAICE_AGE) || defined (ALLOW_SITRACER))  #if (defined (SEAICE_AGE) || defined (ALLOW_SITRACER))
65        CHARACTER*(8) fldName        CHARACTER*(8) fldName
       CHARACTER*(8) wrFldListTrac(listDim)  
       CHARACTER*(MAX_LEN_FNAM) fnTrac  
66        INTEGER iTrac        INTEGER iTrac
       INTEGER jtrac, njtrac  
       INTEGER listDimTrac, nWrFldsTrac  
       PARAMETER( listDimTrac = 20 )  
67  #endif  #endif
68  CEOP  CEOP
69    
70  C--   Write model fields  C--   Write model fields
71        WRITE(fn,'(A,A)') 'pickup_seaice.',suff        WRITE(fn,'(A,A)') 'pickup_seaice.',suff
 #if (defined (SEAICE_AGE) || defined (ALLOW_SITRACER))  
       WRITE(fnTrac,'(A,A)') 'pickup_seaice_tracer.',suff  
 #endif  
72    
73  c     IF ( seaice_pickup_write_mdsio ) THEN  c     IF ( seaice_pickup_write_mdsio ) THEN
74    
# Line 134  C---  continue to write 2-D fields: Line 126  C---  continue to write 2-D fields:
126           ENDDO           ENDDO
127  #endif  #endif
128  #ifdef ALLOW_SITRACER  #ifdef ALLOW_SITRACER
          jtrac = 0  
          njtrac = 0  
129           DO iTrac = 1, SItrMaxNum           DO iTrac = 1, SItrMaxNum
130            WRITE(fldName,'(A6,I2.2)') 'siTrac', iTrac            WRITE(fldName,'(A6,I2.2)') 'siTrac', iTrac
131            jtrac = jtrac + 1            j = j + 1
132            njtrac = njtrac-1            nj = nj-1
133            CALL WRITE_REC_3D_RL( fnTrac, fp,  1,            CALL WRITE_REC_3D_RL( fn, fp,  1,
134       &         SItracer(1-Olx,1-Oly,1,1,iTrac),       &         SItracer(1-Olx,1-Oly,1,1,iTrac),
135       &         njTrac, myIter, myThid )       &         nj, myIter, myThid )
136            IF (jtrac.LE.listDimTrac) wrFldListTrac(jtrac) = fldName            IF (j.LE.listDim) wrFldList(j) = fldName
137           ENDDO           ENDDO
138  #endif  #endif
139         ENDIF         ENDIF
# Line 191  C--    write Sea-Ice Dynamics variables Line 181  C--    write Sea-Ice Dynamics variables
181           CALL PRINT_ERROR( msgBuf, myThid )           CALL PRINT_ERROR( msgBuf, myThid )
182           STOP 'ABNORMAL END: S/R WRITE_SEAICE_PICKUP (list-size Pb)'           STOP 'ABNORMAL END: S/R WRITE_SEAICE_PICKUP (list-size Pb)'
183         ENDIF         ENDIF
 #ifdef ALLOW_SITRACER  
        nWrFldsTrac = jTrac  
        IF ( nWrFldsTrac.GT.listDimTrac ) THEN  
          WRITE(msgBuf,'(2A,I5,A)') 'WRITE_SEAICE_PICKUP_TRACER: ',  
      &     'trying to write ',nWrFldsTrac,' fields'  
          CALL PRINT_ERROR( msgBuf, myThid )  
          WRITE(msgBuf,'(2A,I5,A)') 'WRITE_SEAICE_PICKUP_TRACER: ',  
      &     'field-list dim. (listDimTrac=',listDimTrac,') too small'  
          CALL PRINT_ERROR( msgBuf, myThid )  
          STOP  
      &    'ABNORMAL END: S/R WRITE_SEAICE_PICKUP_TRACER (list-size Pb)'  
        ENDIF  
 #endif  
184    
185  #ifdef ALLOW_MDSIO  #ifdef ALLOW_MDSIO
186  C     uses this specific S/R to write (with more informations) only meta files  C     uses this specific S/R to write (with more informations) only meta files
# Line 216  C     uses this specific S/R to write (w Line 193  C     uses this specific S/R to write (w
193       &                         1, timList,       &                         1, timList,
194       &                         nj, myIter, myThid )       &                         nj, myIter, myThid )
195  C  C
 # ifdef ALLOW_SITRACER  
        njtrac = ABS(njtrac)  
        CALL MDS_WR_METAFILES( fnTrac, fp, glf, .FALSE.,  
      &                         0, 0, 1, ' ',  
      &                         nWrFldsTrac, wrFldListTrac,  
      &                         1, timList,  
      &                         njTrac, myIter, myThid )  
 # endif /* ALLOW_SITRACER */  
 C  
196  #endif /* ALLOW_MDSIO */  #endif /* ALLOW_MDSIO */
197  C--------------------------  C--------------------------
198  c     ENDIF  c     ENDIF

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

  ViewVC Help
Powered by ViewVC 1.1.22