Ignore:
Timestamp:
10/16/12 13:04:44 (12 years ago)
Author:
ymipsl
Message:

Major Update

  • redesign Type and attribute manipulation
  • add enumerate type and attribute
  • use blitz class array instead of boost class array

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/interface/fortran_attr/icontext_attr.F90

    r326 r369  
    1212   
    1313  SUBROUTINE xios(set_context_attr)  & 
    14     ( context_id, calendar_type, output_dir, start_date, timestep ) 
     14    ( context_id, calendar_type, output_dir, start_date, time_origin, timestep ) 
    1515     
    1616    IMPLICIT NONE 
     
    2020      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_dir 
    2121      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: start_date 
     22      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_origin 
    2223      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timestep 
    2324       
    2425      CALL xios(get_context_handle)(context_id,context_hdl) 
    2526      CALL xios(set_context_attr_hdl_)   & 
    26       ( context_hdl, calendar_type, output_dir, start_date, timestep ) 
     27      ( context_hdl, calendar_type, output_dir, start_date, time_origin, timestep ) 
    2728     
    2829  END SUBROUTINE xios(set_context_attr) 
    2930   
    3031  SUBROUTINE xios(set_context_attr_hdl)  & 
    31     ( context_hdl, calendar_type, output_dir, start_date, timestep ) 
     32    ( context_hdl, calendar_type, output_dir, start_date, time_origin, timestep ) 
    3233     
    3334    IMPLICIT NONE 
     
    3637      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_dir 
    3738      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: start_date 
     39      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_origin 
    3840      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timestep 
    3941       
    4042      CALL xios(set_context_attr_hdl_)  & 
    41       ( context_hdl, calendar_type, output_dir, start_date, timestep ) 
     43      ( context_hdl, calendar_type, output_dir, start_date, time_origin, timestep ) 
    4244     
    4345  END SUBROUTINE xios(set_context_attr_hdl) 
    4446   
    4547  SUBROUTINE xios(set_context_attr_hdl_)   & 
    46     ( context_hdl, calendar_type_, output_dir_, start_date_, timestep_ ) 
     48    ( context_hdl, calendar_type_, output_dir_, start_date_, time_origin_, timestep_ ) 
    4749     
    4850    IMPLICIT NONE 
     
    5153      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_dir_ 
    5254      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: start_date_ 
     55      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_origin_ 
    5356      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timestep_ 
    5457       
     
    6568      ENDIF 
    6669       
     70      IF (PRESENT(time_origin_)) THEN 
     71        CALL cxios_set_context_time_origin(context_hdl%daddr, time_origin_, len(time_origin_)) 
     72      ENDIF 
     73       
    6774      IF (PRESENT(timestep_)) THEN 
    6875        CALL cxios_set_context_timestep(context_hdl%daddr, timestep_, len(timestep_)) 
     
    7481   
    7582  SUBROUTINE xios(get_context_attr)  & 
    76     ( context_id, calendar_type, output_dir, start_date, timestep ) 
     83    ( context_id, calendar_type, output_dir, start_date, time_origin, timestep ) 
    7784     
    7885    IMPLICIT NONE 
     
    8289      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_dir 
    8390      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: start_date 
     91      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_origin 
    8492      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timestep 
    8593       
    8694      CALL xios(get_context_handle)(context_id,context_hdl) 
    8795      CALL xios(get_context_attr_hdl_)   & 
    88       ( context_hdl, calendar_type, output_dir, start_date, timestep ) 
     96      ( context_hdl, calendar_type, output_dir, start_date, time_origin, timestep ) 
    8997     
    9098  END SUBROUTINE xios(get_context_attr) 
    9199   
    92100  SUBROUTINE xios(get_context_attr_hdl)  & 
    93     ( context_hdl, calendar_type, output_dir, start_date, timestep ) 
     101    ( context_hdl, calendar_type, output_dir, start_date, time_origin, timestep ) 
    94102     
    95103    IMPLICIT NONE 
     
    98106      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_dir 
    99107      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: start_date 
     108      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_origin 
    100109      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timestep 
    101110       
    102111      CALL xios(get_context_attr_hdl_)  & 
    103       ( context_hdl, calendar_type, output_dir, start_date, timestep ) 
     112      ( context_hdl, calendar_type, output_dir, start_date, time_origin, timestep ) 
    104113     
    105114  END SUBROUTINE xios(get_context_attr_hdl) 
    106115   
    107116  SUBROUTINE xios(get_context_attr_hdl_)   & 
    108     ( context_hdl, calendar_type_, output_dir_, start_date_, timestep_ ) 
     117    ( context_hdl, calendar_type_, output_dir_, start_date_, time_origin_, timestep_ ) 
    109118     
    110119    IMPLICIT NONE 
     
    113122      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_dir_ 
    114123      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: start_date_ 
     124      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_origin_ 
    115125      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timestep_ 
    116126       
     
    127137      ENDIF 
    128138       
     139      IF (PRESENT(time_origin_)) THEN 
     140        CALL cxios_get_context_time_origin(context_hdl%daddr, time_origin_, len(time_origin_)) 
     141      ENDIF 
     142       
    129143      IF (PRESENT(timestep_)) THEN 
    130144        CALL cxios_get_context_timestep(context_hdl%daddr, timestep_, len(timestep_)) 
Note: See TracChangeset for help on using the changeset viewer.