Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:38:16 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
6d54cf9ca1 Ed H*0001 #include "CAL_OPTIONS.h"
a63ed37559 Patr*0002 
                0003       subroutine cal_PrintDate(
                0004      I                          caldate,
                0005      I                          mythid
                0006      &                        )
                0007 
                0008 c     ==================================================================
                0009 c     SUBROUTINE cal_PrintDate
                0010 c     ==================================================================
                0011 c
                0012 c     o Print a calendar date.
                0013 c
                0014 c     Purpose: Print a date as used by the calendar tool in some nice
d659697902 Patr*0015 c              format by using the MITgcmuvs print routine
a63ed37559 Patr*0016 c
                0017 c     started: Christian Eckert eckert@mit.edu  30-Jun-1999
                0018 c
                0019 c     changed: Christian Eckert eckert@mit.edu  19-Jan-2000
                0020 c
                0021 c              - inserted print statements
                0022 c
                0023 c              Christian Eckert eckert@mit.edu  03-Feb-2000
                0024 c
                0025 c              - Introduced new routine and function names, cal_<NAME>,
                0026 c                for verion 0.1.3.
                0027 c
                0028 c     ==================================================================
                0029 c     SUBROUTINE cal_PrintDate
                0030 c     ==================================================================
                0031 
                0032       implicit none
                0033 
                0034 c     == global variables ==
                0035 
                0036 #include "EEPARAMS.h"
                0037 
                0038 c     == routine arguments ==
                0039 
                0040 c     caldate - date in the format used by the calendar tool.
                0041 c     mythid  - thread number for this instance of the routine.
                0042 
                0043       integer caldate(4)
                0044       integer mythid
                0045 
                0046 c     == local variables ==
                0047 
019718029c Gael*0048       integer ierr, ioUnit
                0049       character*(max_len_mbuf) msgbuf
a63ed37559 Patr*0050 
                0051 c     == end of interface ==
                0052 
019718029c Gael*0053       ioUnit=standardMessageUnit
                0054 
a63ed37559 Patr*0055       if ( caldate(4) .gt. 0 ) then
                0056 c       Print the calendar date.
019718029c Gael*0057         write(msgBuf,'(i10,i8,i3,i4)') caldate(1), caldate(2),
                0058      &                                 caldate(3), caldate(4)
                0059         CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
a63ed37559 Patr*0060 
                0061       else if ( caldate(4) .eq. -1 ) then
                0062 c       Print the time interval.
019718029c Gael*0063         write(msgBuf,'(i10,i8,i3,i4)') caldate(1), caldate(2),
                0064      &                                 caldate(3), caldate(4)
                0065         CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
a63ed37559 Patr*0066 
                0067       else
                0068 
                0069         ierr = 2001
                0070         call cal_PrintError( ierr, mythid )
                0071         stop ' stopped in cal_PrintDate.'
                0072 
                0073       endif
                0074 
                0075       return
                0076       end