/[MITgcm]/MITgcm/pkg/cal/cal_checkdate.F
ViewVC logotype

Diff of /MITgcm/pkg/cal/cal_checkdate.F

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

revision 1.1 by heimbach, Mon May 14 22:07:26 2001 UTC revision 1.2 by dimitri, Tue Sep 23 04:34:24 2003 UTC
# Line 27  c Line 27  c
27  c              - Introduced new routine and function names, cal_<NAME>,  c              - Introduced new routine and function names, cal_<NAME>,
28  c                for verion 0.1.3.  c                for verion 0.1.3.
29  c  c
30    c              21-Sep-2003: fixed check_sign logic to work with
31    c              negative intervals (menemenlis@jpl.nasa.gov)
32    c
33  c     ==================================================================  c     ==================================================================
34  c     SUBROUTINE cal_CheckDate  c     SUBROUTINE cal_CheckDate
35  c     ==================================================================  c     ==================================================================
# Line 52  c     == local variables == Line 55  c     == local variables ==
55        integer hhmmss        integer hhmmss
56        integer yymmdd        integer yymmdd
57        integer fac        integer fac
58        integer check_sign_1        _RL check_sign
       integer check_sign_2  
59    
60  c     == end of interface ==  c     == end of interface ==
61    
# Line 69  c     == end of interface == Line 71  c     == end of interface ==
71            if (date(3) .ne. 0) then            if (date(3) .ne. 0) then
72              calerr = 1802              calerr = 1802
73            else            else
74              check_sign_1 = sign(1,date(1))              check_sign = sign(1,dble(date(1))*dble(date(2)))
75              check_sign_2 = sign(1,date(2))              if (check_sign .lt. 0) then
             if (check_sign_1*check_sign_2 .lt. 0) then  
76                calerr = 1803                calerr = 1803
77              else              else
78                call cal_ConvDate(date,yy,mm,dd,nsecs,lp,wd,mythid)                call cal_ConvDate(date,yy,mm,dd,nsecs,lp,wd,mythid)
# Line 95  c     == end of interface == Line 96  c     == end of interface ==
96       &        (date(3) .ne. 2)) then       &        (date(3) .ne. 2)) then
97              calerr = 1806              calerr = 1806
98            else            else
99              check_sign_1 = sign(1,date(1))              check_sign = sign(1,dble(date(1))*dble(date(2)))
100              check_sign_2 = sign(1,date(2))              if (check_sign .lt. 0) then
             if (check_sign_1*check_sign_2 .lt. 0) then  
101                calerr = 1803                calerr = 1803
102              else              else
103                call cal_ConvDate( date,yy,mm,dd,nsecs,lp,wd,mythid )                call cal_ConvDate( date,yy,mm,dd,nsecs,lp,wd,mythid )

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22