/[lmdze]/trunk/IOIPSL/ioget_calendar.f
ViewVC logotype

Diff of /trunk/IOIPSL/ioget_calendar.f

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

revision 82 by guez, Wed Mar 5 14:57:53 2014 UTC revision 93 by guez, Tue Apr 1 15:50:48 2014 UTC
# Line 1  Line 1 
1  MODULE ioget_calendar_m  MODULE ioget_calendar_m
2    
3      !- This subroutine returns the name of the calendar used here.
4      !- Three options exist :
5      !-  - gregorian : This is the gregorian calendar (default here)
6      !-  - noleap    : A calendar without leap years = 365 days
7      !-  - xxxd      : A calendar of xxx days (has to be a modulo of 12)
8      !-                with 12 month of equal length
9    
10      !- This routine will lock the calendar.
11      !- You do not want it to change after your inquiry.
12    
13    use calendar, only: lock_unan    use calendar, only: lock_unan
14    
15    IMPLICIT NONE    IMPLICIT NONE
16    
17    PRIVATE    PRIVATE lock_unan
   PUBLIC ioget_calendar  
   
   INTERFACE ioget_calendar  
      MODULE PROCEDURE ioget_calendar_real1, ioget_calendar_real2, &  
           ioget_calendar_str  
   END INTERFACE  
18    
19  CONTAINS  CONTAINS
20    
21    SUBROUTINE ioget_calendar_str (str)    SUBROUTINE ioget_calendar_str (str)
22      !---------------------------------------------------------------------      use ioconf_calendar_m, only: calendar_used
     !- This subroutine returns the name of the calendar used here.  
     !- Three options exist :  
     !-  - gregorian : This is the gregorian calendar (default here)  
     !-  - noleap    : A calendar without leap years = 365 days  
     !-  - xxxd      : A calendar of xxx days (has to be a modulo of 12)  
     !-                with 12 month of equal length  
   
     !- This routine will lock the calendar.  
     !- You do not want it to change after your inquiry.  
     !---------------------------------------------------------------------  
     use calendar, only: calendar_used  
23    
24      CHARACTER(LEN=*),INTENT(OUT) :: str      CHARACTER(LEN=*),INTENT(OUT) :: str
25      !---------------------------------------------------------------------      !---------------------------------------------------------------------
26      lock_unan = .TRUE.      lock_unan = .TRUE.
27    
28      str = calendar_used      str = calendar_used
     !--------------------------------  
29    END SUBROUTINE ioget_calendar_str    END SUBROUTINE ioget_calendar_str
30    !-    !-
31    !===    !===
32    !-    !-
33    SUBROUTINE ioget_calendar_real1 (long_an)    SUBROUTINE ioget_calendar_real(long_an,long_jour)
34      !---------------------------------------------------------------------      use calendar, only: un_jour
35      !- This subroutine returns the name of the calendar used here.      use ioconf_calendar_m, only: un_an
     !- Three options exist :  
     !-  - gregorian : This is the gregorian calendar (default here)  
     !-  - noleap    : A calendar without leap years = 365 days  
     !-  - xxxd      : A calendar of xxx days (has to be a modulo of 12)  
     !-                with 12 month of equal length  
   
     !- This routine will lock the calendar.  
     !- You do not want it to change after your inquiry.  
     !---------------------------------------------------------------------  
     use calendar, only: un_an  
36    
37      REAL,INTENT(OUT) :: long_an      REAL,INTENT(OUT) :: long_an
38        REAL,INTENT(OUT), optional :: long_jour
39      !---------------------------------------------------------------------      !---------------------------------------------------------------------
40      lock_unan = .TRUE.      lock_unan = .TRUE.
41    
42      long_an = un_an      long_an = un_an
43      !----------------------------------      if (present(long_jour)) long_jour = un_jour
44    END SUBROUTINE ioget_calendar_real1    END SUBROUTINE ioget_calendar_real
   !-  
   !===  
   !-  
   SUBROUTINE ioget_calendar_real2 (long_an,long_jour)  
     !---------------------------------------------------------------------  
     !- This subroutine returns the name of the calendar used here.  
     !- Three options exist :  
     !-  - gregorian : This is the gregorian calendar (default here)  
     !-  - noleap    : A calendar without leap years = 365 days  
     !-  - xxxd      : A calendar of xxx days (has to be a modulo of 12)  
     !-                with 12 month of equal length  
   
     !- This routine will lock the calendar.  
     !- You do not want it to change after your inquiry.  
     !---------------------------------------------------------------------  
     use calendar, only: un_an, un_jour  
   
     REAL,INTENT(OUT) :: long_an,long_jour  
     !---------------------------------------------------------------------  
     lock_unan = .TRUE.  
   
     long_an = un_an  
     long_jour = un_jour  
     !----------------------------------  
   END SUBROUTINE ioget_calendar_real2  
45    
46  END MODULE ioget_calendar_m  END MODULE ioget_calendar_m

Legend:
Removed from v.82  
changed lines
  Added in v.93

  ViewVC Help
Powered by ViewVC 1.1.21