Changeset 532 for XIOS/trunk/src/interface
- Timestamp:
- 12/10/14 14:27:09 (10 years ago)
- Location:
- XIOS/trunk/src/interface
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp
r509 r532 10 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 #include "icdate.hpp" 12 13 #include "timer.hpp" 13 14 #include "node_type.hpp" -
XIOS/trunk/src/interface/c_attr/icaxisgroup_attr.cpp
r509 r532 10 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 #include "icdate.hpp" 12 13 #include "timer.hpp" 13 14 #include "node_type.hpp" -
XIOS/trunk/src/interface/c_attr/iccontext_attr.cpp
r526 r532 10 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 #include "icdate.hpp" 12 13 #include "timer.hpp" 13 14 #include "node_type.hpp" … … 69 70 70 71 71 void cxios_set_context_start_date(context_Ptr context_hdl, c onst char * start_date, int start_date_size)72 void cxios_set_context_start_date(context_Ptr context_hdl, cxios_date start_date_c) 72 73 { 73 std::string start_date_str; 74 if(!cstr2string(start_date, start_date_size, start_date_str)) return; 75 CTimer::get("XIOS").resume(); 76 context_hdl->start_date.setValue(start_date_str); 77 CTimer::get("XIOS").suspend(); 74 CTimer::get("XIOS").resume(); 75 context_hdl->start_date.allocate(); 76 CDate& start_date = context_hdl->start_date.get(); 77 start_date.setDate(start_date_c.year, 78 start_date_c.month, 79 start_date_c.day, 80 start_date_c.hour, 81 start_date_c.minute, 82 start_date_c.second); 83 if (start_date.hasRelCalendar()) 84 start_date.checkDate(); 85 CTimer::get("XIOS").suspend(); 78 86 } 79 87 80 void cxios_get_context_start_date(context_Ptr context_hdl, c har * start_date, int start_date_size)88 void cxios_get_context_start_date(context_Ptr context_hdl, cxios_date* start_date_c) 81 89 { 82 CTimer::get("XIOS").resume(); 83 if(!string_copy(context_hdl->start_date.getInheritedValue(),start_date , start_date_size)) 84 ERROR("void cxios_get_context_start_date(context_Ptr context_hdl, char * start_date, int start_date_size)", <<"Input string is to short"); 85 CTimer::get("XIOS").suspend(); 90 CTimer::get("XIOS").resume(); 91 CDate start_date = context_hdl->start_date.getInheritedValue(); 92 start_date_c->year = start_date.getYear(); 93 start_date_c->month = start_date.getMonth(); 94 start_date_c->day = start_date.getDay(); 95 start_date_c->hour = start_date.getHour(); 96 start_date_c->minute = start_date.getMinute(); 97 start_date_c->second = start_date.getSecond(); 98 CTimer::get("XIOS").suspend(); 86 99 } 87 100 … … 95 108 96 109 97 void cxios_set_context_time_origin(context_Ptr context_hdl, c onst char * time_origin, int time_origin_size)110 void cxios_set_context_time_origin(context_Ptr context_hdl, cxios_date time_origin_c) 98 111 { 99 std::string time_origin_str; 100 if(!cstr2string(time_origin, time_origin_size, time_origin_str)) return; 101 CTimer::get("XIOS").resume(); 102 context_hdl->time_origin.setValue(time_origin_str); 103 CTimer::get("XIOS").suspend(); 112 CTimer::get("XIOS").resume(); 113 context_hdl->time_origin.allocate(); 114 CDate& time_origin = context_hdl->time_origin.get(); 115 time_origin.setDate(time_origin_c.year, 116 time_origin_c.month, 117 time_origin_c.day, 118 time_origin_c.hour, 119 time_origin_c.minute, 120 time_origin_c.second); 121 if (time_origin.hasRelCalendar()) 122 time_origin.checkDate(); 123 CTimer::get("XIOS").suspend(); 104 124 } 105 125 106 void cxios_get_context_time_origin(context_Ptr context_hdl, c har * time_origin, int time_origin_size)126 void cxios_get_context_time_origin(context_Ptr context_hdl, cxios_date* time_origin_c) 107 127 { 108 CTimer::get("XIOS").resume(); 109 if(!string_copy(context_hdl->time_origin.getInheritedValue(),time_origin , time_origin_size)) 110 ERROR("void cxios_get_context_time_origin(context_Ptr context_hdl, char * time_origin, int time_origin_size)", <<"Input string is to short"); 111 CTimer::get("XIOS").suspend(); 128 CTimer::get("XIOS").resume(); 129 CDate time_origin = context_hdl->time_origin.getInheritedValue(); 130 time_origin_c->year = time_origin.getYear(); 131 time_origin_c->month = time_origin.getMonth(); 132 time_origin_c->day = time_origin.getDay(); 133 time_origin_c->hour = time_origin.getHour(); 134 time_origin_c->minute = time_origin.getMinute(); 135 time_origin_c->second = time_origin.getSecond(); 136 CTimer::get("XIOS").suspend(); 112 137 } 113 138 -
XIOS/trunk/src/interface/c_attr/icdomain_attr.cpp
r509 r532 10 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 #include "icdate.hpp" 12 13 #include "timer.hpp" 13 14 #include "node_type.hpp" -
XIOS/trunk/src/interface/c_attr/icdomaingroup_attr.cpp
r509 r532 10 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 #include "icdate.hpp" 12 13 #include "timer.hpp" 13 14 #include "node_type.hpp" -
XIOS/trunk/src/interface/c_attr/icfield_attr.cpp
r509 r532 10 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 #include "icdate.hpp" 12 13 #include "timer.hpp" 13 14 #include "node_type.hpp" -
XIOS/trunk/src/interface/c_attr/icfieldgroup_attr.cpp
r509 r532 10 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 #include "icdate.hpp" 12 13 #include "timer.hpp" 13 14 #include "node_type.hpp" -
XIOS/trunk/src/interface/c_attr/icfile_attr.cpp
r528 r532 10 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 #include "icdate.hpp" 12 13 #include "timer.hpp" 13 14 #include "node_type.hpp" -
XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp
r528 r532 10 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 #include "icdate.hpp" 12 13 #include "timer.hpp" 13 14 #include "node_type.hpp" -
XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp
r509 r532 10 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 #include "icdate.hpp" 12 13 #include "timer.hpp" 13 14 #include "node_type.hpp" -
XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp
r509 r532 10 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 #include "icdate.hpp" 12 13 #include "timer.hpp" 13 14 #include "node_type.hpp" -
XIOS/trunk/src/interface/c_attr/icvariable_attr.cpp
r527 r532 10 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 #include "icdate.hpp" 12 13 #include "timer.hpp" 13 14 #include "node_type.hpp" -
XIOS/trunk/src/interface/c_attr/icvariablegroup_attr.cpp
r527 r532 10 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 #include "icdate.hpp" 12 13 #include "timer.hpp" 13 14 #include "node_type.hpp" -
XIOS/trunk/src/interface/fortran/idate.F90
r501 r532 6 6 INTEGER(kind = C_INT), PARAMETER :: D360 = 0 , ALLLEAP = 1 , NOLEAP = 2 , JULIAN = 3 , GREGORIAN = 4 7 7 8 TYPE txios(date)9 INTEGER :: year, month, day, hour, minute, second8 TYPE, BIND(C) :: txios(date) 9 INTEGER(kind = C_INT) :: year, month, day, hour, minute, second 10 10 END TYPE txios(date) 11 11 -
XIOS/trunk/src/interface/fortran_attr/axis_interface_attr.F90
r531 r532 2 2 ! * Interface auto generated - do not modify * 3 3 ! * ************************************************************************** * 4 #include "../fortran/xios_fortran_prefix.hpp" 4 5 5 6 MODULE axis_interface_attr -
XIOS/trunk/src/interface/fortran_attr/axisgroup_interface_attr.F90
r531 r532 2 2 ! * Interface auto generated - do not modify * 3 3 ! * ************************************************************************** * 4 #include "../fortran/xios_fortran_prefix.hpp" 4 5 5 6 MODULE axisgroup_interface_attr -
XIOS/trunk/src/interface/fortran_attr/context_interface_attr.F90
r531 r532 2 2 ! * Interface auto generated - do not modify * 3 3 ! * ************************************************************************** * 4 #include "../fortran/xios_fortran_prefix.hpp" 4 5 5 6 MODULE context_interface_attr … … 51 52 52 53 53 SUBROUTINE cxios_set_context_start_date(context_hdl, start_date , start_date_size) BIND(C)54 SUBROUTINE cxios_set_context_start_date(context_hdl, start_date) BIND(C) 54 55 USE ISO_C_BINDING 56 USE IDATE 55 57 INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl 56 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: start_date 57 INTEGER (kind = C_INT) , VALUE :: start_date_size 58 TYPE(xios_date), VALUE :: start_date 58 59 END SUBROUTINE cxios_set_context_start_date 59 60 60 SUBROUTINE cxios_get_context_start_date(context_hdl, start_date , start_date_size) BIND(C)61 SUBROUTINE cxios_get_context_start_date(context_hdl, start_date) BIND(C) 61 62 USE ISO_C_BINDING 63 USE IDATE 62 64 INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl 63 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: start_date 64 INTEGER (kind = C_INT) , VALUE :: start_date_size 65 TYPE(txios(date)) :: start_date 65 66 END SUBROUTINE cxios_get_context_start_date 66 67 … … 72 73 73 74 74 SUBROUTINE cxios_set_context_time_origin(context_hdl, time_origin , time_origin_size) BIND(C)75 SUBROUTINE cxios_set_context_time_origin(context_hdl, time_origin) BIND(C) 75 76 USE ISO_C_BINDING 77 USE IDATE 76 78 INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl 77 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: time_origin 78 INTEGER (kind = C_INT) , VALUE :: time_origin_size 79 TYPE(xios_date), VALUE :: time_origin 79 80 END SUBROUTINE cxios_set_context_time_origin 80 81 81 SUBROUTINE cxios_get_context_time_origin(context_hdl, time_origin , time_origin_size) BIND(C)82 SUBROUTINE cxios_get_context_time_origin(context_hdl, time_origin) BIND(C) 82 83 USE ISO_C_BINDING 84 USE IDATE 83 85 INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl 84 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: time_origin 85 INTEGER (kind = C_INT) , VALUE :: time_origin_size 86 TYPE(txios(date)) :: time_origin 86 87 END SUBROUTINE cxios_get_context_time_origin 87 88 -
XIOS/trunk/src/interface/fortran_attr/domain_interface_attr.F90
r531 r532 2 2 ! * Interface auto generated - do not modify * 3 3 ! * ************************************************************************** * 4 #include "../fortran/xios_fortran_prefix.hpp" 4 5 5 6 MODULE domain_interface_attr -
XIOS/trunk/src/interface/fortran_attr/domaingroup_interface_attr.F90
r531 r532 2 2 ! * Interface auto generated - do not modify * 3 3 ! * ************************************************************************** * 4 #include "../fortran/xios_fortran_prefix.hpp" 4 5 5 6 MODULE domaingroup_interface_attr -
XIOS/trunk/src/interface/fortran_attr/field_interface_attr.F90
r531 r532 2 2 ! * Interface auto generated - do not modify * 3 3 ! * ************************************************************************** * 4 #include "../fortran/xios_fortran_prefix.hpp" 4 5 5 6 MODULE field_interface_attr -
XIOS/trunk/src/interface/fortran_attr/fieldgroup_interface_attr.F90
r531 r532 2 2 ! * Interface auto generated - do not modify * 3 3 ! * ************************************************************************** * 4 #include "../fortran/xios_fortran_prefix.hpp" 4 5 5 6 MODULE fieldgroup_interface_attr -
XIOS/trunk/src/interface/fortran_attr/file_interface_attr.F90
r531 r532 2 2 ! * Interface auto generated - do not modify * 3 3 ! * ************************************************************************** * 4 #include "../fortran/xios_fortran_prefix.hpp" 4 5 5 6 MODULE file_interface_attr -
XIOS/trunk/src/interface/fortran_attr/filegroup_interface_attr.F90
r531 r532 2 2 ! * Interface auto generated - do not modify * 3 3 ! * ************************************************************************** * 4 #include "../fortran/xios_fortran_prefix.hpp" 4 5 5 6 MODULE filegroup_interface_attr -
XIOS/trunk/src/interface/fortran_attr/grid_interface_attr.F90
r531 r532 2 2 ! * Interface auto generated - do not modify * 3 3 ! * ************************************************************************** * 4 #include "../fortran/xios_fortran_prefix.hpp" 4 5 5 6 MODULE grid_interface_attr -
XIOS/trunk/src/interface/fortran_attr/gridgroup_interface_attr.F90
r531 r532 2 2 ! * Interface auto generated - do not modify * 3 3 ! * ************************************************************************** * 4 #include "../fortran/xios_fortran_prefix.hpp" 4 5 5 6 MODULE gridgroup_interface_attr -
XIOS/trunk/src/interface/fortran_attr/icontext_attr.F90
r501 r532 19 19 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: calendar_type 20 20 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_dir 21 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: start_date22 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: time_origin21 TYPE(txios(date)) , OPTIONAL, INTENT(IN) :: start_date 22 TYPE(txios(date)) , OPTIONAL, INTENT(IN) :: time_origin 23 23 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timestep 24 24 … … 36 36 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: calendar_type 37 37 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_dir 38 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: start_date39 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: time_origin38 TYPE(txios(date)) , OPTIONAL, INTENT(IN) :: start_date 39 TYPE(txios(date)) , OPTIONAL, INTENT(IN) :: time_origin 40 40 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timestep 41 41 … … 52 52 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: calendar_type_ 53 53 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_dir_ 54 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: start_date_55 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: time_origin_54 TYPE(txios(date)) , OPTIONAL, INTENT(IN) :: start_date_ 55 TYPE(txios(date)) , OPTIONAL, INTENT(IN) :: time_origin_ 56 56 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timestep_ 57 57 … … 65 65 66 66 IF (PRESENT(start_date_)) THEN 67 CALL cxios_set_context_start_date(context_hdl%daddr, start_date_ , len(start_date_))67 CALL cxios_set_context_start_date(context_hdl%daddr, start_date_) 68 68 ENDIF 69 69 70 70 IF (PRESENT(time_origin_)) THEN 71 CALL cxios_set_context_time_origin(context_hdl%daddr, time_origin_ , len(time_origin_))71 CALL cxios_set_context_time_origin(context_hdl%daddr, time_origin_) 72 72 ENDIF 73 73 … … 88 88 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: calendar_type 89 89 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_dir 90 CHARACTER(len = *), OPTIONAL, INTENT(OUT) :: start_date91 CHARACTER(len = *), OPTIONAL, INTENT(OUT) :: time_origin90 TYPE(txios(date)) , OPTIONAL, INTENT(OUT) :: start_date 91 TYPE(txios(date)) , OPTIONAL, INTENT(OUT) :: time_origin 92 92 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timestep 93 93 … … 105 105 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: calendar_type 106 106 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_dir 107 CHARACTER(len = *), OPTIONAL, INTENT(OUT) :: start_date108 CHARACTER(len = *), OPTIONAL, INTENT(OUT) :: time_origin107 TYPE(txios(date)) , OPTIONAL, INTENT(OUT) :: start_date 108 TYPE(txios(date)) , OPTIONAL, INTENT(OUT) :: time_origin 109 109 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timestep 110 110 … … 121 121 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: calendar_type_ 122 122 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_dir_ 123 CHARACTER(len = *), OPTIONAL, INTENT(OUT) :: start_date_124 CHARACTER(len = *), OPTIONAL, INTENT(OUT) :: time_origin_123 TYPE(txios(date)) , OPTIONAL, INTENT(OUT) :: start_date_ 124 TYPE(txios(date)) , OPTIONAL, INTENT(OUT) :: time_origin_ 125 125 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timestep_ 126 126 … … 134 134 135 135 IF (PRESENT(start_date_)) THEN 136 CALL cxios_get_context_start_date(context_hdl%daddr, start_date_ , len(start_date_))136 CALL cxios_get_context_start_date(context_hdl%daddr, start_date_) 137 137 ENDIF 138 138 139 139 IF (PRESENT(time_origin_)) THEN 140 CALL cxios_get_context_time_origin(context_hdl%daddr, time_origin_ , len(time_origin_))140 CALL cxios_get_context_time_origin(context_hdl%daddr, time_origin_) 141 141 ENDIF 142 142 -
XIOS/trunk/src/interface/fortran_attr/variable_interface_attr.F90
r531 r532 2 2 ! * Interface auto generated - do not modify * 3 3 ! * ************************************************************************** * 4 #include "../fortran/xios_fortran_prefix.hpp" 4 5 5 6 MODULE variable_interface_attr -
XIOS/trunk/src/interface/fortran_attr/variablegroup_interface_attr.F90
r531 r532 2 2 ! * Interface auto generated - do not modify * 3 3 ! * ************************************************************************** * 4 #include "../fortran/xios_fortran_prefix.hpp" 4 5 5 6 MODULE variablegroup_interface_attr
Note: See TracChangeset
for help on using the changeset viewer.