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_PrintError(
                0004      I                           calerr,
                0005      I                           mythid
                0006      &                         )
                0007 
                0008 c     ==================================================================
                0009 c     SUBROUTINE cal_PrintError
                0010 c     ==================================================================
                0011 c
d659697902 Patr*0012 c     Purpose: Use the MITgcmuvs print routines to document errors that
a63ed37559 Patr*0013 c              occured during the execution of the calendar tool.
                0014 c
                0015 c     o Calling this routine allows to print out an error message for
                0016 c       several errors that might occur.
                0017 c
                0018 c       The error codes for the calendar tool are specified by a four
                0019 c       digit integer:
                0020 c                         RRCC
                0021 c
                0022 c       The RR digits identify the routine that detected the error.
                0023 c       The CC digits identify the specific error in the routine that
                0024 c          detected the error.
                0025 c
                0026 c       RR translates to routines in the following way:
                0027 c
                0028 c         cal_Init             0
                0029 c         cal_Set              1
                0030 c         cal_GetDate          2
                0031 c         cal_FullDate         3
                0032 c         cal_IsLeap           4
                0033 c         cal_TimePassed       5
                0034 c         cal_AddTime          6
                0035 c         cal_TimeInterval     7
                0036 c         cal_SubDates         8
                0037 c         cal_ConvDate         9
                0038 c         cal_ToSeconds       10
                0039 c         cal_StepsPerDay     11
                0040 c         cal_DaysPerMonth    12
                0041 c         cal_MonthsPerYear   13
                0042 c         cal_IntYears        14
                0043 c         cal_IntMonths       15
                0044 c         cal_IntDays         16
                0045 c         cal_nStepDay        17
                0046 c         cal_CheckDate       18
                0047 c         cal_PrintError      19
                0048 c         cal_PrintDate       20
                0049 c         cal_NumInts         25
                0050 c
                0051 c
                0052 c     started: Christian Eckert eckert@mit.edu  30-Jun-1999
                0053 c
                0054 c     changed: Christian Eckert eckert@mit.edu  29-Dec-1999
                0055 c
                0056 c              Christian Eckert eckert@mit.edu  10-Jan-2000
                0057 c
                0058 c              - Corrected the print statement for error code 104.
                0059 c                It contained more than 72 characters in one line.
                0060 c
                0061 c              Christian Eckert eckert@mit.edu  03-Feb-2000
                0062 c
                0063 c              - Introduced new routine and function names, cal_<NAME>,
                0064 c                for verion 0.1.3.
                0065 c
                0066 c              Christian Eckert eckert@mit.edu  24-Feb-2000
                0067 c
                0068 c              - Included cal_NumInts error code.
                0069 c
                0070 c     ==================================================================
                0071 c     SUBROUTINE cal_PrintError
                0072 c     ==================================================================
                0073 
                0074       implicit none
                0075 
087901a8ca Jean*0076 C     == global variables ==
a63ed37559 Patr*0077 
                0078 #include "EEPARAMS.h"
c34cc926ff Patr*0079 #include "SIZE.h"
                0080 #include "PARAMS.h"
a63ed37559 Patr*0081 
087901a8ca Jean*0082 C     == routine arguments ==
a63ed37559 Patr*0083 
087901a8ca Jean*0084 C     mythid - thread number for this instance of the routine.
                0085 C     calerr - error code
a63ed37559 Patr*0086 
                0087       integer mythid
                0088       integer calerr
                0089 
087901a8ca Jean*0090 C     == local variables ==
a63ed37559 Patr*0091 
                0092       integer nroutine
                0093       integer nerrcode
                0094       logical missingerrcode
c34cc926ff Patr*0095       CHARACTER*(MAX_LEN_MBUF) msgBuf
a63ed37559 Patr*0096 
087901a8ca Jean*0097 C     == end of interface ==
a63ed37559 Patr*0098 
                0099       nerrcode = mod(calerr,100)
                0100       nroutine = (calerr - nerrcode)/100
                0101       missingerrcode = .false.
                0102 
087901a8ca Jean*0103 c     if (nroutine .eq. 0) then
                0104 C     Error in cal_Init
a63ed37559 Patr*0105 
087901a8ca Jean*0106 c       if (nerrcode .eq. 1) then
                0107 c        WRITE(msgBuf,'(A)')
                0108 c    &    '  cal_Init: Unable to open calendar parameter file'
                0109 c        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0110 c        CALL PRINT_ERROR( msgBuf , 1)
                0111 c        WRITE(msgBuf,'(A)')
                0112 c    &    '            file "data.calendar".'
                0113 c        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0114 c        CALL PRINT_ERROR( msgBuf , 1)
                0115 c       endif
a63ed37559 Patr*0116 
087901a8ca Jean*0117 c     else if (nroutine .eq. 1) then
                0118       if (nroutine .eq. 1) then
                0119 C     Error in cal_Set
a63ed37559 Patr*0120 
                0121         if (nerrcode .eq. 1) then
a8259b3bc9 Jean*0122          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0123      &    '  cal_Set: No appropriate calendar has been specified.'
c34cc926ff Patr*0124          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0125          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0126         else if (nerrcode .eq. 2) then
a8259b3bc9 Jean*0127          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0128      &    '  cal_Set: The time step specified is not valid.'
c34cc926ff Patr*0129          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0130          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0131         else if (nerrcode .eq. 3) then
a8259b3bc9 Jean*0132          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0133      &    '  cal_Set: The time step is less than a second.'
c34cc926ff Patr*0134          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0135          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0136         else if (nerrcode .eq. 4) then
a8259b3bc9 Jean*0137          WRITE(msgBuf,'(A)')
c34cc926ff Patr*0138      &    '  cal_Set: The time step contains fractions of a second.'
                0139          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0140          CALL PRINT_ERROR( msgBuf , 1)
a8259b3bc9 Jean*0141 c       else if (nerrcode .eq. 5) then
                0142 c        WRITE(msgBuf,'(A)')
                0143 c    &    '  cal_Set: Less than one time step per calendar day.'
                0144 c        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0145 c        CALL PRINT_ERROR( msgBuf , 1)
                0146 c       else if (nerrcode .eq. 6) then
                0147 c        WRITE(msgBuf,'(A)')
                0148 c    &    '  cal_Set: The specifications are incomplete. Please'
                0149 c        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0150 c        CALL PRINT_ERROR( msgBuf , 1)
                0151 c        WRITE(msgBuf,'(A)')
                0152 c    &    '                refer to the documentation.'
                0153 c        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0154 c        CALL PRINT_ERROR( msgBuf , 1)
                0155 c       else if (nerrcode .eq. 7) then
                0156 c        WRITE(msgBuf,'(A)')
                0157 c    &    '  cal_Set: The final date of integration is before its'
                0158 c        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0159 c        CALL PRINT_ERROR( msgBuf , 1)
                0160 c        WRITE(msgBuf,'(A)')
                0161 c    &    '                start date.'
                0162 c        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0163 c        CALL PRINT_ERROR( msgBuf , 1)
                0164 c       else if (nerrcode .eq. 10) then
                0165 c        WRITE(msgBuf,'(A)')
                0166 c    &    '  cal_Set: The Julian Calendar is not implemented yet.'
                0167 c        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0168 c        CALL PRINT_ERROR( msgBuf , 1)
                0169 c       else if (nerrcode .eq. 11) then
                0170 c        WRITE(msgBuf,'(A)')
                0171 c    &    '  cal_Set: The No Calendar case is not implemented yet.'
                0172 c        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0173 c        CALL PRINT_ERROR( msgBuf , 1)
                0174 c       else if ( nerrcode .eq. 12) then
                0175 c        WRITE(msgBuf,'(A)')
                0176 c    &    '  cal_Set: modelstart .ne. startTime ... please check.'
                0177 c        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0178 c        CALL PRINT_ERROR( msgBuf , 1)
                0179 c       else if ( nerrcode .eq. 13 ) then
                0180 c        WRITE(msgBuf,'(A)')
                0181 c    &    '  cal_Set: modelend .ne. endTime ... please check.'
                0182 c        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0183 c        CALL PRINT_ERROR( msgBuf , 1)
                0184 c       else if ( nerrcode .eq. 14 ) then
                0185 c        WRITE(msgBuf,'(A)')
                0186 c    &    '  cal_Set: modelstep .ne. deltaTclock ... please check.'
                0187 c        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0188 c        CALL PRINT_ERROR( msgBuf , 1)
                0189 c       else if ( nerrcode .eq. 15 ) then
                0190 c        WRITE(msgBuf,'(A)')
                0191 c    &    '  cal_Set: modeliter0 .ne. nIter0 ... please check.'
                0192 c       else if ( nerrcode .eq. 16 ) then
                0193 c        WRITE(msgBuf,'(A)')
                0194 c    &    '  cal_Set: modeliterend .ne. nEndIter ... please check.'
                0195 c        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0196 c        CALL PRINT_ERROR( msgBuf , 1)
                0197 c       else if ( nerrcode .eq. 17 ) then
                0198 c        WRITE(msgBuf,'(A)')
                0199 c    &    '  cal_Set: modelintsteps .ne. nTimeSteps'
                0200 c        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0201 c        CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0202         else
                0203           missingerrcode = .true.
                0204         endif
                0205 
                0206       else if (nroutine .eq. 2) then
087901a8ca Jean*0207 C     Error in cal_GetDate
a63ed37559 Patr*0208 
                0209         missingerrcode = .true.
                0210 
                0211       else if (nroutine .eq. 3) then
087901a8ca Jean*0212 C     Error in cal_FullDate
a63ed37559 Patr*0213 
                0214         missingerrcode = .true.
                0215 
                0216       else if (nroutine .eq. 4) then
087901a8ca Jean*0217 C     Error in cal_IsLeap
a63ed37559 Patr*0218 
                0219         missingerrcode = .true.
                0220 
                0221       else if (nroutine .eq. 5) then
087901a8ca Jean*0222 C     Error in cal_TimePassed
a63ed37559 Patr*0223 
                0224         if (nerrcode .eq. 1) then
a8259b3bc9 Jean*0225          WRITE(msgBuf,'(A)')
c34cc926ff Patr*0226      &    'cal_TimePassed: cal and timeinterval cannot be compared'
                0227          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0228          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0229         else
                0230           missingerrcode = .true.
                0231         endif
                0232 
                0233       else if (nroutine .eq. 6) then
087901a8ca Jean*0234 C     Error in cal_AddTime
a63ed37559 Patr*0235 
                0236         if (nerrcode .eq. 1) then
a8259b3bc9 Jean*0237          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0238      &    '  cal_AddTime: not a valid time interval.'
c34cc926ff Patr*0239          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0240          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0241         else
                0242           missingerrcode = .true.
                0243         endif
                0244 
                0245       else if (nroutine .eq. 7) then
087901a8ca Jean*0246 C     Error in cal_TimeInterval
a63ed37559 Patr*0247 
                0248         if (nerrcode .eq. 1) then
a8259b3bc9 Jean*0249          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0250      &    '  cal_TimeInterval: not a valid time unit.'
c34cc926ff Patr*0251          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0252          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0253         else
                0254           missingerrcode = .true.
                0255         endif
                0256 
                0257       else if (nroutine .eq. 8) then
087901a8ca Jean*0258 C     Error in cal_SubDates
a63ed37559 Patr*0259 
                0260         if (nerrcode .eq. 1) then
a8259b3bc9 Jean*0261          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0262      &    '  cal_SubDates: Not a valid combination of calendar dates'
c34cc926ff Patr*0263          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0264          CALL PRINT_ERROR( msgBuf , 1)
a8259b3bc9 Jean*0265          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0266      &    '             or time intervals.'
c34cc926ff Patr*0267          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0268          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0269         else
                0270           missingerrcode = .true.
                0271         endif
                0272 
                0273       else if (nroutine .eq. 9) then
087901a8ca Jean*0274 C     Error in cal_ConvDate
a63ed37559 Patr*0275 
                0276         if (nerrcode .eq. 1) then
a8259b3bc9 Jean*0277          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0278      &    '  cal_ConvDate: date specification has mixed signs.'
c34cc926ff Patr*0279          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0280          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0281         else
                0282           missingerrcode = .true.
                0283         endif
                0284 
                0285       else if (nroutine .eq. 10) then
087901a8ca Jean*0286 C     Error in cal_ToSeconds
a63ed37559 Patr*0287 
                0288         if (nerrcode .eq. 1) then
a8259b3bc9 Jean*0289          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0290      &    '  cal_ToSeconds: input not a time interval array.'
c34cc926ff Patr*0291          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0292          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0293         else
                0294           missingerrcode = .true.
                0295         endif
                0296 
                0297       else if (nroutine .eq. 11) then
087901a8ca Jean*0298 C     Error in cal_StepsPerDay
a63ed37559 Patr*0299 
                0300         if (nerrcode .eq. 1) then
a8259b3bc9 Jean*0301          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0302      &    '  cal_StepsPerDay: nothing else to do.'
c34cc926ff Patr*0303          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0304          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0305         else
                0306           missingerrcode = .true.
                0307         endif
                0308 
                0309       else if (nroutine .eq. 12) then
087901a8ca Jean*0310 C     Error in cal_DaysPerMonth
a63ed37559 Patr*0311 
                0312         if (nerrcode .eq. 1) then
a8259b3bc9 Jean*0313          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0314      &    '  cal_DaysPerMonth: current year after final year.'
c34cc926ff Patr*0315          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0316          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0317         else
                0318           missingerrcode = .true.
                0319         endif
                0320 
                0321       else if (nroutine .eq. 13) then
087901a8ca Jean*0322 C     Error in cal_MonthsPerYear
a63ed37559 Patr*0323 
                0324         missingerrcode = .true.
                0325 
                0326       else if (nroutine .eq. 14) then
087901a8ca Jean*0327 C     Error in cal_IntYears
a63ed37559 Patr*0328 
                0329         missingerrcode = .true.
                0330 
                0331       else if (nroutine .eq. 15) then
087901a8ca Jean*0332 C     Error in cal_IntMonths
a63ed37559 Patr*0333 
                0334         missingerrcode = .true.
                0335 
                0336       else if (nroutine .eq. 16) then
087901a8ca Jean*0337 C     Error in cal_IntDays
a63ed37559 Patr*0338 
                0339         missingerrcode = .true.
                0340 
                0341       else if (nroutine .eq. 17) then
087901a8ca Jean*0342 C     Error in cal_nStepDay
a63ed37559 Patr*0343 
                0344         missingerrcode = .true.
                0345 
                0346       else if (nroutine .eq. 18) then
087901a8ca Jean*0347 C     Error in cal_CheckDate
a63ed37559 Patr*0348 
                0349         if (nerrcode .eq. 0) then
a8259b3bc9 Jean*0350          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0351      &    '   cal_CheckDate: A valid date specification!'
c34cc926ff Patr*0352          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0353          CALL PRINT_ERROR( msgBuf , 1)
a8259b3bc9 Jean*0354          WRITE(msgBuf,'(A)')
1cc1e58e5f Patr*0355      &    '   This only means that the format is ok'
c34cc926ff Patr*0356          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0357          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0358         else if (nerrcode .eq. 1) then
a8259b3bc9 Jean*0359          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0360      &    '   cal_CheckDate: Last component of array not valid!'
c34cc926ff Patr*0361          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0362          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0363         else if (nerrcode .eq. 2) then
a8259b3bc9 Jean*0364          WRITE(msgBuf,'(A)')
c34cc926ff Patr*0365      &    '   cal_CheckDate: Third component of interval array not 0'
                0366          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0367          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0368         else if (nerrcode .eq. 3) then
a8259b3bc9 Jean*0369          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0370      &    '   cal_CheckDate: Signs of first two components unequal!'
c34cc926ff Patr*0371          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0372          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0373         else if (nerrcode .eq. 4) then
a8259b3bc9 Jean*0374          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0375      &    '   cal_CheckDate: Second component not in hhmmss format!'
c34cc926ff Patr*0376          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0377          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0378         else if (nerrcode .eq. 5) then
a8259b3bc9 Jean*0379          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0380      &    '   cal_CheckDate: Weekday indentifier not correct!'
c34cc926ff Patr*0381          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0382          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0383         else if (nerrcode .eq. 6) then
a8259b3bc9 Jean*0384          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0385      &    '   cal_CheckDate: Leap year identifier not correct!'
c34cc926ff Patr*0386          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0387          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0388         else if (nerrcode .eq. 7) then
a8259b3bc9 Jean*0389          WRITE(msgBuf,'(A)')
c34cc926ff Patr*0390      &    'cal_CheckDate: Calendar date before predef. reference date'
                0391          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0392          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0393         else if (nerrcode .eq. 8) then
a8259b3bc9 Jean*0394          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0395      &    '   cal_CheckDate: First component not in yymmdd format!'
c34cc926ff Patr*0396          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0397          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0398         else
                0399           missingerrcode = .true.
                0400         endif
                0401 
                0402       else if (nroutine .eq. 19) then
087901a8ca Jean*0403 C     Error in cal_PrintError
a63ed37559 Patr*0404 
                0405         missingerrcode = .true.
                0406 
                0407       else if (nroutine .eq. 20) then
087901a8ca Jean*0408 C     Error in cal_PrintDate
a63ed37559 Patr*0409 
                0410         if (nerrcode .eq. 1) then
a8259b3bc9 Jean*0411          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0412      &    '  cal_PrintDate: date not a legal calendar array.'
c34cc926ff Patr*0413          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0414          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0415         else
                0416           missingerrcode = .true.
                0417         endif
                0418 
                0419       else if (nroutine .eq. 21) then
087901a8ca Jean*0420 C     Error in cal_PrintError
a63ed37559 Patr*0421 
                0422         missingerrcode = .true.
                0423 
                0424       else if (nroutine .eq. 25) then
087901a8ca Jean*0425 C     Error in cal_NumInts
a63ed37559 Patr*0426 
                0427         if (nerrcode .eq. 1) then
a8259b3bc9 Jean*0428          WRITE(msgBuf,'(A)')
a63ed37559 Patr*0429      &    '  cal_NumInts: Expected a time interval as third argument.'
c34cc926ff Patr*0430          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0431          CALL PRINT_ERROR( msgBuf , 1)
a63ed37559 Patr*0432         else
                0433           missingerrcode = .true.
                0434         endif
                0435 
                0436       else
                0437         missingerrcode = .true.
                0438       endif
                0439 
                0440       if (missingerrcode) then
                0441         print*,'  cal_PrintError: routine called by an undefined'
                0442         print*,'                  error code.'
                0443         print*,'  cal_PrintError: error code = ',calerr
                0444         stop   '  stopped in cal_PrintError.'
                0445       endif
                0446 
                0447       return
                0448       end