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

Diff of /MITgcm/pkg/cal/cal_convdate.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_ConvDate  c     SUBROUTINE cal_ConvDate
35  c     ==================================================================  c     ==================================================================
# Line 53  c     == local variables == Line 56  c     == local variables ==
56        integer fac        integer fac
57        integer date_1        integer date_1
58        integer date_2        integer date_2
       integer check_sign_1  
       integer check_sign_2  
59        integer ierr        integer ierr
60          _RL check_sign
61    
62  c     == end of interface ==  c     == end of interface ==
63    
# Line 63  c     == end of interface == Line 65  c     == end of interface ==
65    
66  c     Check the sign of the date.  c     Check the sign of the date.
67    
68        check_sign_1 = sign(1,date(1))        check_sign = sign(1,dble(date(1))*dble(date(2)))
       check_sign_2 = sign(1,date(2))  
69    
70        if ( check_sign_1*check_sign_2 .ge. 0 ) then        if ( check_sign .ge. 0 ) then
71          if (date(1) .eq. 0) then          if (date(1) .eq. 0) then
72            date_1 = date(1)            date_1 = date(1)
73            if (date(2) .lt. 0) then            if (date(2) .lt. 0) then

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

  ViewVC Help
Powered by ViewVC 1.1.22