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

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

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

revision 1.30 by jmc, Sun Dec 24 20:15:42 2006 UTC revision 1.31 by jmc, Fri Dec 29 05:43:56 2006 UTC
# Line 337  C jmc: for now, this can only work in an Line 337  C jmc: for now, this can only work in an
337             ENDIF             ENDIF
338            ENDIF            ENDIF
339    
340    C--    Ready to write field "md", element "lm" in averageCycle(listId)
341    
342  #ifdef ALLOW_MDSIO  #ifdef ALLOW_MDSIO
343  C         Prepare for mdsio optionality  C-        write to binary file, using MDSIO pkg:
344            IF (diag_mdsio) THEN            IF (diag_mdsio) THEN
345              glf = globalFiles              glf = globalFiles
346              nRec = lm + (md-1)*averageCycle(listId)              nRec = lm + (md-1)*averageCycle(listId)
# Line 347  C           default precision for output Line 349  C           default precision for output
349  C           fFlag(1)=R(or D): force it to be 32-bit(or 64) precision  C           fFlag(1)=R(or D): force it to be 32-bit(or 64) precision
350              IF ( fflags(listId)(1:1).EQ.'R' ) prec = precFloat32              IF ( fflags(listId)(1:1).EQ.'R' ) prec = precFloat32
351              IF ( fflags(listId)(1:1).EQ.'D' ) prec = precFloat64              IF ( fflags(listId)(1:1).EQ.'D' ) prec = precFloat64
352              CALL MDSWRITEFIELD_NEW(fn,prec,glf,.FALSE.,'RL',  c           CALL MDS_WRITE_FIELD(fn,prec,glf,.FALSE.,'RL',
353       &              NrMax,nlevels(listId),qtmp1,nRec,myIter,myThid)  c    &              NrMax,nlevels(listId),qtmp1,nRec,myIter,myThid)
354    C         a hack not to write meta files now:
355                CALL MDS_WRITE_FIELD(fn,prec,glf,.FALSE.,'RL',
356         &              NrMax,nlevels(listId),qtmp1,-nRec,myIter,myThid)
357            ENDIF            ENDIF
358  #endif /*  ALLOW_MDSIO  */  #endif /*  ALLOW_MDSIO  */
359    
# Line 465  C--     end of Processing Fld # md Line 470  C--     end of Processing Fld # md
470          ENDIF          ENDIF
471        ENDDO        ENDDO
472    
473    #ifdef ALLOW_MDSIO
474          IF (diag_mdsio) THEN
475    C-    Note: temporary: since it's a pain to add more arguments to
476    C     all MDSIO S/R, uses instead this specific S/R to write only
477    C     meta files but with more informations in it.
478                glf = globalFiles
479                nRec = nfields(listId)*averageCycle(listId)
480                CALL MDS_WR_METAFILES(fn, prec, glf, .FALSE.,
481         &              0, 0, nlevels(listId), ' ',
482         &              nfields(listId), flds(1,listId), 1, myTime,
483         &              nRec, myIter, myThid)
484          ENDIF
485    #endif /*  ALLOW_MDSIO  */
486    
487        RETURN        RETURN
488        END        END
489    

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

  ViewVC Help
Powered by ViewVC 1.1.22