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

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

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

revision 1.3 by edhill, Wed Jul 6 19:51:29 2005 UTC revision 1.4 by jmc, Thu Jul 14 00:11:13 2005 UTC
# Line 238  C       guarantee uniqueness within each Line 238  C       guarantee uniqueness within each
238            DO i = 1,MAX_LEN_FNAM            DO i = 1,MAX_LEN_FNAM
239              tnam(i:i) = ' '              tnam(i:i) = ' '
240            ENDDO            ENDDO
           ilen = ILNBLNK(cdiag(ndId))  
           WRITE(tnam,'(a,a4,a3)')  
      &         cdiag(ndId)(1:ilen),'_lv_',stat_typ(ist+1)  
             
           CALL MNC_CW_ADD_VNAME(tnam, d_cw_gname,  
      &         0,0, myThid)  
           CALL MNC_CW_ADD_VATTR_TEXT(tnam,'description',  
      &         tdiag(ndId),myThid)  
           CALL MNC_CW_ADD_VATTR_TEXT(tnam,'units',  
      &         udiag(ndId),myThid)  
             
 C         Copy the data into a temporary with the necessary shape  
           DO j = 0,nRegions  
             DO k = 1,kdiag(ndId)  
               stmp(k,j+1) = statGlob(ist,k,j)  
             ENDDO  
           ENDDO  
             
           IF ((fflags(listId)(1:1) .EQ. ' ')  
      &         .OR. (fflags(listId)(1:1) .EQ. 'R')) THEN  
               
             CALL MNC_CW_RL_W('R',diag_mnc_bn,0,0,  
      &           tnam, stmp, myThid)  
               
           ELSEIF (fflags(listId)(1:1) .EQ. 'D') THEN  
               
             CALL MNC_CW_RL_W('D',diag_mnc_bn,0,0,  
      &           tnam, stmp, myThid)  
               
           ENDIF  
241    
242            CALL MNC_CW_DEL_VNAME(tnam, myThid)  c         IF ( kdiag(ndId) .GT. 1 ) THEN
             
           IF ( kdiag(ndId) .GT. 1 ) THEN  
243                            
244              ilen = ILNBLNK(cdiag(ndId))              ilen = ILNBLNK(cdiag(ndId))
245              WRITE(tnam,'(a,a4,a3)')              WRITE(tnam,'(a,a1,a3)')
246       &           cdiag(ndId)(1:ilen),'_vi_',stat_typ(ist+1)       &           cdiag(ndId)(1:ilen),'_',stat_typ(ist+1)
247                            
248              CALL MNC_CW_ADD_VNAME(tnam, d_cw_gname0,              CALL MNC_CW_ADD_VNAME(tnam, d_cw_gname0,
249       &           0,0, myThid)       &           0,0, myThid)
# Line 304  C           Copy the data into a tempora Line 272  C           Copy the data into a tempora
272                            
273              CALL MNC_CW_DEL_VNAME(tnam, myThid)              CALL MNC_CW_DEL_VNAME(tnam, myThid)
274                            
275            ENDIF  c         ENDIF
276                    
277              IF ( kdiag(ndId) .GT. 1 ) THEN
278    
279                ilen = ILNBLNK(cdiag(ndId))
280                WRITE(tnam,'(a,a4,a3)')
281         &           cdiag(ndId)(1:ilen),'_lv_',stat_typ(ist+1)
282              
283                CALL MNC_CW_ADD_VNAME(tnam, d_cw_gname,
284         &           0,0, myThid)
285                CALL MNC_CW_ADD_VATTR_TEXT(tnam,'description',
286         &           tdiag(ndId),myThid)
287                CALL MNC_CW_ADD_VATTR_TEXT(tnam,'units',
288         &         udiag(ndId),myThid)
289              
290    C           Copy the data into a temporary with the necessary shape
291                DO j = 0,nRegions
292                  DO k = 1,kdiag(ndId)
293                    stmp(k,j+1) = statGlob(ist,k,j)
294                  ENDDO
295                ENDDO
296              
297                IF ((fflags(listId)(1:1) .EQ. ' ')
298         &           .OR. (fflags(listId)(1:1) .EQ. 'R')) THEN
299                
300                  CALL MNC_CW_RL_W('R',diag_mnc_bn,0,0,
301         &             tnam, stmp, myThid)
302                
303                ELSEIF (fflags(listId)(1:1) .EQ. 'D') THEN
304                
305                  CALL MNC_CW_RL_W('D',diag_mnc_bn,0,0,
306         &             tnam, stmp, myThid)
307                
308                ENDIF
309    
310                CALL MNC_CW_DEL_VNAME(tnam, myThid)
311              
312              ENDIF
313    
314          ENDDO          ENDDO
315                    
316          CALL MNC_CW_DEL_GNAME(d_cw_gname, myThid)          CALL MNC_CW_DEL_GNAME(d_cw_gname, myThid)

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

  ViewVC Help
Powered by ViewVC 1.1.22