Changeset 369 for XIOS/trunk/src/interface
- Timestamp:
- 10/16/12 13:04:44 (12 years ago)
- Location:
- XIOS/trunk/src/interface
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/interface/c/icdata.cpp
r361 r369 23 23 #include <mpi.h> 24 24 #include "timer.hpp" 25 #include "array_new.hpp" 25 26 26 27 extern "C" … … 111 112 CTimer::get("XIOS send field").resume() ; 112 113 CContext* context = CContext::getCurrent() ; 113 // boost::const_multi_array_ref<double, 1> array_(data_k8, 114 // boost::extents [data_Xsize], 115 // boost::fortran_storage_order()); 116 ARRAY(double, 1) data(new CArray<double, 1>(boost::extents [data_Xsize])); 117 std::copy(data_k8, &(data_k8[data->num_elements()]), data->data()); 118 119 // dtreat->write_data(fieldid_str, data); 120 CField::get(fieldid_str)->setData(data) ; 114 115 CArray<double,(StdSize)1> data(data_k8,shape(data_Xsize),neverDeleteData) ; 116 CField::get(fieldid_str)->setData(data) ; 117 CField toto ; 118 toto.setData(data) ; 121 119 CTimer::get("XIOS send field").suspend() ; 122 120 CTimer::get("XIOS").suspend() ; … … 132 130 CContext* context = CContext::getCurrent() ; 133 131 134 // boost::const_multi_array_ref<double, 2> array_(data_k8, 135 // boost::extents [data_Xsize][data_Ysize], 136 // boost::fortran_storage_order()); 137 ARRAY(double, 2) data(new CArray<double, 2>(boost::extents [data_Xsize][data_Ysize])); 138 std::copy(data_k8, &(data_k8[data->num_elements()]), data->data()); 139 // dtreat->write_data(fieldid_str, data); 132 CArray<double,2>data(data_k8,shape(data_Xsize,data_Ysize),neverDeleteData) ; 140 133 CField::get(fieldid_str)->setData(data) ; 141 134 CTimer::get("XIOS send field").suspend() ; … … 151 144 CTimer::get("XIOS send field").resume() ; 152 145 CContext* context = CContext::getCurrent() ; 153 // boost::const_multi_array_ref<double, 3> array_(data_k8, 154 // boost::extents [data_Xsize][data_Ysize][data_Zsize], 155 // boost::fortran_storage_order()); 156 ARRAY(double, 3) data(new CArray<double, 3>(boost::extents [data_Xsize][data_Ysize][data_Zsize])); 157 std::copy(data_k8, &(data_k8[data->num_elements()]), data->data()); 158 // dtreat->write_data(fieldid_str, data); 146 147 CArray<double,3>data(data_k8,shape(data_Xsize,data_Ysize,data_Zsize),neverDeleteData) ; 159 148 CField::get(fieldid_str)->setData(data) ; 160 149 CTimer::get("XIOS send field").suspend() ; … … 170 159 CTimer::get("XIOS send field").resume() ; 171 160 CContext* context = CContext::getCurrent() ; 172 // boost::const_multi_array_ref<float, 1> array_(data_k4, 173 // boost::extents [data_Xsize], 174 // boost::fortran_storage_order()); 175 // ARRAY(float, 1) data(new CArray<float, 1>(boost::extents [data_Xsize])); 176 // std::copy(data_k4, &(data_k4[data->num_elements()]), data->data()); 177 // dtreat->write_data(fieldid_str, data); 178 ARRAY(double, 1) data(new CArray<double, 1>(boost::extents [data_Xsize])); 179 double* ptr_data=data->data() ; 180 for(int i=0;i<data->num_elements();i++) ptr_data[i]=data_k4[i]; 161 CArray<float,1> data_tmp(data_k4,shape(data_Xsize),neverDeleteData) ; 162 CArray<double,1> data(data_Xsize) ; 163 data=data_tmp ; 181 164 CField::get(fieldid_str)->setData(data) ; 182 165 CTimer::get("XIOS send field").suspend() ; … … 192 175 CTimer::get("XIOS send field").resume() ; 193 176 CContext* context = CContext::getCurrent() ; 194 // boost::const_multi_array_ref<float, 2> array_(data_k4, 195 // boost::extents [data_Xsize][data_Ysize], 196 // boost::fortran_storage_order()); 197 // ARRAY(float, 2) data(new CArray<float, 2>(boost::extents [data_Xsize][data_Ysize])); 198 // std::copy(data_k4, &(data_k4[data->num_elements()]), data->data()); 199 // dtreat->write_data(fieldid_str, data); 200 ARRAY(double, 2) data(new CArray<double, 2>(boost::extents [data_Xsize][data_Ysize])); 201 double* ptr_data=data->data() ; 202 for(int i=0;i<data->num_elements();i++) ptr_data[i]=data_k4[i]; 177 CArray<float,2> data_tmp(data_k4,shape(data_Xsize,data_Ysize),neverDeleteData) ; 178 CArray<double,2> data(data_Xsize,data_Ysize) ; 179 data=data_tmp ; 203 180 CField::get(fieldid_str)->setData(data) ; 204 181 CTimer::get("XIOS send field").suspend() ; … … 215 192 CTimer::get("XIOS send field").resume() ; 216 193 CContext* context = CContext::getCurrent() ; 217 218 // boost::const_multi_array_ref<float, 3> array_(data_k4, 219 // boost::extents [data_Xsize][data_Ysize][data_Zsize], 220 // boost::fortran_storage_order()); 221 // ARRAY(float, 3) data(new CArray<float, 3>(boost::extents [data_Xsize][data_Ysize][data_Zsize])); 222 // std::copy(data_k4, &(data_k4[data->num_elements()]), data->data()); 223 // dtreat->write_data(fieldid_str, data); 224 ARRAY(double, 3) data(new CArray<double, 3>(boost::extents [data_Xsize][data_Ysize][data_Zsize])); 225 double* ptr_data=data->data() ; 226 for(int i=0;i<data->num_elements();i++) ptr_data[i]=data_k4[i]; 194 195 CArray<float,3> data_tmp(data_k4,shape(data_Xsize,data_Ysize,data_Zsize),neverDeleteData) ; 196 CArray<double,3> data(data_Xsize,data_Ysize,data_Zsize) ; 197 data=data_tmp ; 198 227 199 CField::get(fieldid_str)->setData(data) ; 228 200 CTimer::get("XIOS send field").suspend() ; -
XIOS/trunk/src/interface/c/icutil.hpp
r335 r369 40 40 } 41 41 } 42 /* 42 43 template<class T> 43 44 inline bool array_copy(ARRAY(T,1) array_in, T* array_out, size_t extent1) … … 63 64 return true ; 64 65 } 65 66 */ 66 67 67 68 #endif // __ICUTIL_HPP__ -
XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp
r352 r369 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include " axis.hpp"13 #include "node_type.hpp" 14 14 15 15 extern "C" … … 109 109 void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int extent1) 110 110 { 111 CTimer::get("XIOS").resume(); 112 ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); 113 std::copy(value, &(value[array_tmp->num_elements()]), array_tmp->data()); 114 axis_hdl->value.setValue(array_tmp); 111 CTimer::get("XIOS").resume(); 112 CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ; 113 axis_hdl->value.reference(tmp.copy()); 115 114 axis_hdl->sendAttributToServer(axis_hdl->value); 116 115 } … … 118 117 void cxios_get_axis_value(axis_Ptr axis_hdl, double* value, int extent1) 119 118 { 120 if (!array_copy(axis_hdl->value.getValue(), value, extent1))121 ERROR("void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int extent1)",<<"Output array size is not conform to array size attribute");119 CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ; 120 tmp=axis_hdl->value ; 122 121 CTimer::get("XIOS").suspend(); 122 } 123 124 125 void cxios_set_axis_zoom_begin(axis_Ptr axis_hdl, int zoom_begin) 126 { 127 CTimer::get("XIOS").resume(); 128 axis_hdl->zoom_begin.setValue(zoom_begin); 129 axis_hdl->sendAttributToServer(axis_hdl->zoom_begin); 130 CTimer::get("XIOS").suspend(); 131 } 132 133 void cxios_get_axis_zoom_begin(axis_Ptr axis_hdl, int* zoom_begin) 134 { 135 *zoom_begin = axis_hdl->zoom_begin.getValue(); 136 } 137 138 139 void cxios_set_axis_zoom_end(axis_Ptr axis_hdl, int zoom_end) 140 { 141 CTimer::get("XIOS").resume(); 142 axis_hdl->zoom_end.setValue(zoom_end); 143 axis_hdl->sendAttributToServer(axis_hdl->zoom_end); 144 CTimer::get("XIOS").suspend(); 145 } 146 147 void cxios_get_axis_zoom_end(axis_Ptr axis_hdl, int* zoom_end) 148 { 149 *zoom_end = axis_hdl->zoom_end.getValue(); 150 } 151 152 153 void cxios_set_axis_zoom_size(axis_Ptr axis_hdl, int zoom_size) 154 { 155 CTimer::get("XIOS").resume(); 156 axis_hdl->zoom_size.setValue(zoom_size); 157 axis_hdl->sendAttributToServer(axis_hdl->zoom_size); 158 CTimer::get("XIOS").suspend(); 159 } 160 161 void cxios_get_axis_zoom_size(axis_Ptr axis_hdl, int* zoom_size) 162 { 163 *zoom_size = axis_hdl->zoom_size.getValue(); 123 164 } 124 165 -
XIOS/trunk/src/interface/c_attr/icaxisgroup_attr.cpp
r352 r369 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include " axis.hpp"13 #include "node_type.hpp" 14 14 15 15 extern "C" … … 128 128 void cxios_set_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int extent1) 129 129 { 130 CTimer::get("XIOS").resume(); 131 ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); 132 std::copy(value, &(value[array_tmp->num_elements()]), array_tmp->data()); 133 axisgroup_hdl->value.setValue(array_tmp); 130 CTimer::get("XIOS").resume(); 131 CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ; 132 axisgroup_hdl->value.reference(tmp.copy()); 134 133 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->value); 135 134 } … … 137 136 void cxios_get_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int extent1) 138 137 { 139 if (!array_copy(axisgroup_hdl->value.getValue(), value, extent1))140 ERROR("void cxios_set_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int extent1)",<<"Output array size is not conform to array size attribute");138 CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ; 139 tmp=axisgroup_hdl->value ; 141 140 CTimer::get("XIOS").suspend(); 141 } 142 143 144 void cxios_set_axisgroup_zoom_begin(axisgroup_Ptr axisgroup_hdl, int zoom_begin) 145 { 146 CTimer::get("XIOS").resume(); 147 axisgroup_hdl->zoom_begin.setValue(zoom_begin); 148 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->zoom_begin); 149 CTimer::get("XIOS").suspend(); 150 } 151 152 void cxios_get_axisgroup_zoom_begin(axisgroup_Ptr axisgroup_hdl, int* zoom_begin) 153 { 154 *zoom_begin = axisgroup_hdl->zoom_begin.getValue(); 155 } 156 157 158 void cxios_set_axisgroup_zoom_end(axisgroup_Ptr axisgroup_hdl, int zoom_end) 159 { 160 CTimer::get("XIOS").resume(); 161 axisgroup_hdl->zoom_end.setValue(zoom_end); 162 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->zoom_end); 163 CTimer::get("XIOS").suspend(); 164 } 165 166 void cxios_get_axisgroup_zoom_end(axisgroup_Ptr axisgroup_hdl, int* zoom_end) 167 { 168 *zoom_end = axisgroup_hdl->zoom_end.getValue(); 169 } 170 171 172 void cxios_set_axisgroup_zoom_size(axisgroup_Ptr axisgroup_hdl, int zoom_size) 173 { 174 CTimer::get("XIOS").resume(); 175 axisgroup_hdl->zoom_size.setValue(zoom_size); 176 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->zoom_size); 177 CTimer::get("XIOS").suspend(); 178 } 179 180 void cxios_get_axisgroup_zoom_size(axisgroup_Ptr axisgroup_hdl, int* zoom_size) 181 { 182 *zoom_size = axisgroup_hdl->zoom_size.getValue(); 142 183 } 143 184 -
XIOS/trunk/src/interface/c_attr/iccontext_attr.cpp
r352 r369 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include " context.hpp"13 #include "node_type.hpp" 14 14 15 15 extern "C" -
XIOS/trunk/src/interface/c_attr/icdomain_attr.cpp
r352 r369 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include " domain.hpp"13 #include "node_type.hpp" 14 14 15 15 extern "C" … … 33 33 void cxios_set_domain_data_i_index(domain_Ptr domain_hdl, int* data_i_index, int extent1) 34 34 { 35 CTimer::get("XIOS").resume(); 36 ARRAY(int,1) array_tmp(new CArray<int,1>(boost::extents[extent1])); 37 std::copy(data_i_index, &(data_i_index[array_tmp->num_elements()]), array_tmp->data()); 38 domain_hdl->data_i_index.setValue(array_tmp); 35 CTimer::get("XIOS").resume(); 36 CArray<int,1> tmp(data_i_index,shape(extent1),neverDeleteData) ; 37 domain_hdl->data_i_index.reference(tmp.copy()); 39 38 domain_hdl->sendAttributToServer(domain_hdl->data_i_index); 40 39 } … … 42 41 void cxios_get_domain_data_i_index(domain_Ptr domain_hdl, int* data_i_index, int extent1) 43 42 { 44 if (!array_copy(domain_hdl->data_i_index.getValue(), data_i_index, extent1))45 ERROR("void cxios_set_domain_data_i_index(domain_Ptr domain_hdl, int* data_i_index, int extent1)",<<"Output array size is not conform to array size attribute");43 CArray<int,1> tmp(data_i_index,shape(extent1),neverDeleteData) ; 44 tmp=domain_hdl->data_i_index ; 46 45 CTimer::get("XIOS").suspend(); 47 46 } … … 64 63 void cxios_set_domain_data_j_index(domain_Ptr domain_hdl, int* data_j_index, int extent1) 65 64 { 66 CTimer::get("XIOS").resume(); 67 ARRAY(int,1) array_tmp(new CArray<int,1>(boost::extents[extent1])); 68 std::copy(data_j_index, &(data_j_index[array_tmp->num_elements()]), array_tmp->data()); 69 domain_hdl->data_j_index.setValue(array_tmp); 65 CTimer::get("XIOS").resume(); 66 CArray<int,1> tmp(data_j_index,shape(extent1),neverDeleteData) ; 67 domain_hdl->data_j_index.reference(tmp.copy()); 70 68 domain_hdl->sendAttributToServer(domain_hdl->data_j_index); 71 69 } … … 73 71 void cxios_get_domain_data_j_index(domain_Ptr domain_hdl, int* data_j_index, int extent1) 74 72 { 75 if (!array_copy(domain_hdl->data_j_index.getValue(), data_j_index, extent1))76 ERROR("void cxios_set_domain_data_j_index(domain_Ptr domain_hdl, int* data_j_index, int extent1)",<<"Output array size is not conform to array size attribute");73 CArray<int,1> tmp(data_j_index,shape(extent1),neverDeleteData) ; 74 tmp=domain_hdl->data_j_index ; 77 75 CTimer::get("XIOS").suspend(); 78 76 } … … 212 210 void cxios_set_domain_latvalue(domain_Ptr domain_hdl, double* latvalue, int extent1) 213 211 { 214 CTimer::get("XIOS").resume(); 215 ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); 216 std::copy(latvalue, &(latvalue[array_tmp->num_elements()]), array_tmp->data()); 217 domain_hdl->latvalue.setValue(array_tmp); 212 CTimer::get("XIOS").resume(); 213 CArray<double,1> tmp(latvalue,shape(extent1),neverDeleteData) ; 214 domain_hdl->latvalue.reference(tmp.copy()); 218 215 domain_hdl->sendAttributToServer(domain_hdl->latvalue); 219 216 } … … 221 218 void cxios_get_domain_latvalue(domain_Ptr domain_hdl, double* latvalue, int extent1) 222 219 { 223 if (!array_copy(domain_hdl->latvalue.getValue(), latvalue, extent1))224 ERROR("void cxios_set_domain_latvalue(domain_Ptr domain_hdl, double* latvalue, int extent1)",<<"Output array size is not conform to array size attribute");220 CArray<double,1> tmp(latvalue,shape(extent1),neverDeleteData) ; 221 tmp=domain_hdl->latvalue ; 225 222 CTimer::get("XIOS").suspend(); 226 223 } … … 248 245 void cxios_set_domain_lonvalue(domain_Ptr domain_hdl, double* lonvalue, int extent1) 249 246 { 250 CTimer::get("XIOS").resume(); 251 ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); 252 std::copy(lonvalue, &(lonvalue[array_tmp->num_elements()]), array_tmp->data()); 253 domain_hdl->lonvalue.setValue(array_tmp); 247 CTimer::get("XIOS").resume(); 248 CArray<double,1> tmp(lonvalue,shape(extent1),neverDeleteData) ; 249 domain_hdl->lonvalue.reference(tmp.copy()); 254 250 domain_hdl->sendAttributToServer(domain_hdl->lonvalue); 255 251 } … … 257 253 void cxios_get_domain_lonvalue(domain_Ptr domain_hdl, double* lonvalue, int extent1) 258 254 { 259 if (!array_copy(domain_hdl->lonvalue.getValue(), lonvalue, extent1))260 ERROR("void cxios_set_domain_lonvalue(domain_Ptr domain_hdl, double* lonvalue, int extent1)",<<"Output array size is not conform to array size attribute");255 CArray<double,1> tmp(lonvalue,shape(extent1),neverDeleteData) ; 256 tmp=domain_hdl->lonvalue ; 261 257 CTimer::get("XIOS").suspend(); 262 258 } … … 265 261 void cxios_set_domain_mask(domain_Ptr domain_hdl, bool* mask, int extent1, int extent2) 266 262 { 267 CTimer::get("XIOS").resume(); 268 ARRAY(bool,2) array_tmp(new CArray<bool,2>(boost::extents[extent1][extent2])); 269 std::copy(mask, &(mask[array_tmp->num_elements()]), array_tmp->data()); 270 domain_hdl->mask.setValue(array_tmp); 263 CTimer::get("XIOS").resume(); 264 CArray<bool,2> tmp(mask,shape(extent1,extent2),neverDeleteData) ; 265 domain_hdl->mask.reference(tmp.copy()); 271 266 domain_hdl->sendAttributToServer(domain_hdl->mask); 272 267 } … … 274 269 void cxios_get_domain_mask(domain_Ptr domain_hdl, bool* mask, int extent1, int extent2) 275 270 { 276 if (!array_copy(domain_hdl->mask.getValue(), mask, extent1, extent2))277 ERROR("void cxios_set_domain_mask(domain_Ptr domain_hdl, bool* mask, int extent1, int extent2)",<<"Output array size is not conform to array size attribute");271 CArray<bool,2> tmp(mask,shape(extent1,extent2),neverDeleteData) ; 272 tmp=domain_hdl->mask ; 278 273 CTimer::get("XIOS").suspend(); 279 274 } -
XIOS/trunk/src/interface/c_attr/icdomaingroup_attr.cpp
r352 r369 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include " domain.hpp"13 #include "node_type.hpp" 14 14 15 15 extern "C" … … 33 33 void cxios_set_domaingroup_data_i_index(domaingroup_Ptr domaingroup_hdl, int* data_i_index, int extent1) 34 34 { 35 CTimer::get("XIOS").resume(); 36 ARRAY(int,1) array_tmp(new CArray<int,1>(boost::extents[extent1])); 37 std::copy(data_i_index, &(data_i_index[array_tmp->num_elements()]), array_tmp->data()); 38 domaingroup_hdl->data_i_index.setValue(array_tmp); 35 CTimer::get("XIOS").resume(); 36 CArray<int,1> tmp(data_i_index,shape(extent1),neverDeleteData) ; 37 domaingroup_hdl->data_i_index.reference(tmp.copy()); 39 38 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->data_i_index); 40 39 } … … 42 41 void cxios_get_domaingroup_data_i_index(domaingroup_Ptr domaingroup_hdl, int* data_i_index, int extent1) 43 42 { 44 if (!array_copy(domaingroup_hdl->data_i_index.getValue(), data_i_index, extent1))45 ERROR("void cxios_set_domaingroup_data_i_index(domaingroup_Ptr domaingroup_hdl, int* data_i_index, int extent1)",<<"Output array size is not conform to array size attribute");43 CArray<int,1> tmp(data_i_index,shape(extent1),neverDeleteData) ; 44 tmp=domaingroup_hdl->data_i_index ; 46 45 CTimer::get("XIOS").suspend(); 47 46 } … … 64 63 void cxios_set_domaingroup_data_j_index(domaingroup_Ptr domaingroup_hdl, int* data_j_index, int extent1) 65 64 { 66 CTimer::get("XIOS").resume(); 67 ARRAY(int,1) array_tmp(new CArray<int,1>(boost::extents[extent1])); 68 std::copy(data_j_index, &(data_j_index[array_tmp->num_elements()]), array_tmp->data()); 69 domaingroup_hdl->data_j_index.setValue(array_tmp); 65 CTimer::get("XIOS").resume(); 66 CArray<int,1> tmp(data_j_index,shape(extent1),neverDeleteData) ; 67 domaingroup_hdl->data_j_index.reference(tmp.copy()); 70 68 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->data_j_index); 71 69 } … … 73 71 void cxios_get_domaingroup_data_j_index(domaingroup_Ptr domaingroup_hdl, int* data_j_index, int extent1) 74 72 { 75 if (!array_copy(domaingroup_hdl->data_j_index.getValue(), data_j_index, extent1))76 ERROR("void cxios_set_domaingroup_data_j_index(domaingroup_Ptr domaingroup_hdl, int* data_j_index, int extent1)",<<"Output array size is not conform to array size attribute");73 CArray<int,1> tmp(data_j_index,shape(extent1),neverDeleteData) ; 74 tmp=domaingroup_hdl->data_j_index ; 77 75 CTimer::get("XIOS").suspend(); 78 76 } … … 231 229 void cxios_set_domaingroup_latvalue(domaingroup_Ptr domaingroup_hdl, double* latvalue, int extent1) 232 230 { 233 CTimer::get("XIOS").resume(); 234 ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); 235 std::copy(latvalue, &(latvalue[array_tmp->num_elements()]), array_tmp->data()); 236 domaingroup_hdl->latvalue.setValue(array_tmp); 231 CTimer::get("XIOS").resume(); 232 CArray<double,1> tmp(latvalue,shape(extent1),neverDeleteData) ; 233 domaingroup_hdl->latvalue.reference(tmp.copy()); 237 234 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->latvalue); 238 235 } … … 240 237 void cxios_get_domaingroup_latvalue(domaingroup_Ptr domaingroup_hdl, double* latvalue, int extent1) 241 238 { 242 if (!array_copy(domaingroup_hdl->latvalue.getValue(), latvalue, extent1))243 ERROR("void cxios_set_domaingroup_latvalue(domaingroup_Ptr domaingroup_hdl, double* latvalue, int extent1)",<<"Output array size is not conform to array size attribute");239 CArray<double,1> tmp(latvalue,shape(extent1),neverDeleteData) ; 240 tmp=domaingroup_hdl->latvalue ; 244 241 CTimer::get("XIOS").suspend(); 245 242 } … … 267 264 void cxios_set_domaingroup_lonvalue(domaingroup_Ptr domaingroup_hdl, double* lonvalue, int extent1) 268 265 { 269 CTimer::get("XIOS").resume(); 270 ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); 271 std::copy(lonvalue, &(lonvalue[array_tmp->num_elements()]), array_tmp->data()); 272 domaingroup_hdl->lonvalue.setValue(array_tmp); 266 CTimer::get("XIOS").resume(); 267 CArray<double,1> tmp(lonvalue,shape(extent1),neverDeleteData) ; 268 domaingroup_hdl->lonvalue.reference(tmp.copy()); 273 269 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->lonvalue); 274 270 } … … 276 272 void cxios_get_domaingroup_lonvalue(domaingroup_Ptr domaingroup_hdl, double* lonvalue, int extent1) 277 273 { 278 if (!array_copy(domaingroup_hdl->lonvalue.getValue(), lonvalue, extent1))279 ERROR("void cxios_set_domaingroup_lonvalue(domaingroup_Ptr domaingroup_hdl, double* lonvalue, int extent1)",<<"Output array size is not conform to array size attribute");274 CArray<double,1> tmp(lonvalue,shape(extent1),neverDeleteData) ; 275 tmp=domaingroup_hdl->lonvalue ; 280 276 CTimer::get("XIOS").suspend(); 281 277 } … … 284 280 void cxios_set_domaingroup_mask(domaingroup_Ptr domaingroup_hdl, bool* mask, int extent1, int extent2) 285 281 { 286 CTimer::get("XIOS").resume(); 287 ARRAY(bool,2) array_tmp(new CArray<bool,2>(boost::extents[extent1][extent2])); 288 std::copy(mask, &(mask[array_tmp->num_elements()]), array_tmp->data()); 289 domaingroup_hdl->mask.setValue(array_tmp); 282 CTimer::get("XIOS").resume(); 283 CArray<bool,2> tmp(mask,shape(extent1,extent2),neverDeleteData) ; 284 domaingroup_hdl->mask.reference(tmp.copy()); 290 285 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->mask); 291 286 } … … 293 288 void cxios_get_domaingroup_mask(domaingroup_Ptr domaingroup_hdl, bool* mask, int extent1, int extent2) 294 289 { 295 if (!array_copy(domaingroup_hdl->mask.getValue(), mask, extent1, extent2))296 ERROR("void cxios_set_domaingroup_mask(domaingroup_Ptr domaingroup_hdl, bool* mask, int extent1, int extent2)",<<"Output array size is not conform to array size attribute");290 CArray<bool,2> tmp(mask,shape(extent1,extent2),neverDeleteData) ; 291 tmp=domaingroup_hdl->mask ; 297 292 CTimer::get("XIOS").suspend(); 298 293 } -
XIOS/trunk/src/interface/c_attr/icfield_attr.cpp
r352 r369 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include " field.hpp"13 #include "node_type.hpp" 14 14 15 15 extern "C" -
XIOS/trunk/src/interface/c_attr/icfieldgroup_attr.cpp
r352 r369 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include " field.hpp"13 #include "node_type.hpp" 14 14 15 15 extern "C" -
XIOS/trunk/src/interface/c_attr/icfile_attr.cpp
r352 r369 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include " file.hpp"13 #include "node_type.hpp" 14 14 15 15 extern "C" … … 183 183 if(!cstr2string(type, type_size, type_str)) return; 184 184 CTimer::get("XIOS").resume(); 185 file_hdl->type. setValue(type_str);185 file_hdl->type.fromString(type_str); 186 186 file_hdl->sendAttributToServer(file_hdl->type); 187 187 CTimer::get("XIOS").suspend(); … … 191 191 { 192 192 CTimer::get("XIOS").resume(); 193 if(!string_copy(file_hdl->type.get Value(),type , type_size))193 if(!string_copy(file_hdl->type.getStringValue(),type , type_size)) 194 194 ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", <<"Input string is to short"); 195 195 CTimer::get("XIOS").suspend(); -
XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp
r352 r369 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include " file.hpp"13 #include "node_type.hpp" 14 14 15 15 extern "C" … … 202 202 if(!cstr2string(type, type_size, type_str)) return; 203 203 CTimer::get("XIOS").resume(); 204 filegroup_hdl->type. setValue(type_str);204 filegroup_hdl->type.fromString(type_str); 205 205 filegroup_hdl->sendAttributToServer(filegroup_hdl->type); 206 206 CTimer::get("XIOS").suspend(); … … 210 210 { 211 211 CTimer::get("XIOS").resume(); 212 if(!string_copy(filegroup_hdl->type.get Value(),type , type_size))212 if(!string_copy(filegroup_hdl->type.getStringValue(),type , type_size)) 213 213 ERROR("void cxios_get_filegroup_type(filegroup_Ptr filegroup_hdl, char * type, int type_size)", <<"Input string is to short"); 214 214 CTimer::get("XIOS").suspend(); -
XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp
r352 r369 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include " grid.hpp"13 #include "node_type.hpp" 14 14 15 15 extern "C" -
XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp
r352 r369 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include " grid.hpp"13 #include "node_type.hpp" 14 14 15 15 extern "C" -
XIOS/trunk/src/interface/fortran_attr/axis_interface_attr.f90
r326 r369 97 97 98 98 99 SUBROUTINE cxios_set_axis_zoom_begin(axis_hdl, zoom_begin) BIND(C) 100 USE ISO_C_BINDING 101 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 102 INTEGER (KIND=C_INT) , VALUE :: zoom_begin 103 END SUBROUTINE cxios_set_axis_zoom_begin 104 105 SUBROUTINE cxios_get_axis_zoom_begin(axis_hdl, zoom_begin) BIND(C) 106 USE ISO_C_BINDING 107 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 108 INTEGER (KIND=C_INT) :: zoom_begin 109 END SUBROUTINE cxios_get_axis_zoom_begin 110 111 112 SUBROUTINE cxios_set_axis_zoom_end(axis_hdl, zoom_end) BIND(C) 113 USE ISO_C_BINDING 114 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 115 INTEGER (KIND=C_INT) , VALUE :: zoom_end 116 END SUBROUTINE cxios_set_axis_zoom_end 117 118 SUBROUTINE cxios_get_axis_zoom_end(axis_hdl, zoom_end) BIND(C) 119 USE ISO_C_BINDING 120 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 121 INTEGER (KIND=C_INT) :: zoom_end 122 END SUBROUTINE cxios_get_axis_zoom_end 123 124 125 SUBROUTINE cxios_set_axis_zoom_size(axis_hdl, zoom_size) BIND(C) 126 USE ISO_C_BINDING 127 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 128 INTEGER (KIND=C_INT) , VALUE :: zoom_size 129 END SUBROUTINE cxios_set_axis_zoom_size 130 131 SUBROUTINE cxios_get_axis_zoom_size(axis_hdl, zoom_size) BIND(C) 132 USE ISO_C_BINDING 133 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 134 INTEGER (KIND=C_INT) :: zoom_size 135 END SUBROUTINE cxios_get_axis_zoom_size 136 137 99 138 END INTERFACE 100 139 -
XIOS/trunk/src/interface/fortran_attr/axisgroup_interface_attr.f90
r326 r369 112 112 113 113 114 SUBROUTINE cxios_set_axisgroup_zoom_begin(axisgroup_hdl, zoom_begin) BIND(C) 115 USE ISO_C_BINDING 116 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 117 INTEGER (KIND=C_INT) , VALUE :: zoom_begin 118 END SUBROUTINE cxios_set_axisgroup_zoom_begin 119 120 SUBROUTINE cxios_get_axisgroup_zoom_begin(axisgroup_hdl, zoom_begin) BIND(C) 121 USE ISO_C_BINDING 122 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 123 INTEGER (KIND=C_INT) :: zoom_begin 124 END SUBROUTINE cxios_get_axisgroup_zoom_begin 125 126 127 SUBROUTINE cxios_set_axisgroup_zoom_end(axisgroup_hdl, zoom_end) BIND(C) 128 USE ISO_C_BINDING 129 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 130 INTEGER (KIND=C_INT) , VALUE :: zoom_end 131 END SUBROUTINE cxios_set_axisgroup_zoom_end 132 133 SUBROUTINE cxios_get_axisgroup_zoom_end(axisgroup_hdl, zoom_end) BIND(C) 134 USE ISO_C_BINDING 135 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 136 INTEGER (KIND=C_INT) :: zoom_end 137 END SUBROUTINE cxios_get_axisgroup_zoom_end 138 139 140 SUBROUTINE cxios_set_axisgroup_zoom_size(axisgroup_hdl, zoom_size) BIND(C) 141 USE ISO_C_BINDING 142 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 143 INTEGER (KIND=C_INT) , VALUE :: zoom_size 144 END SUBROUTINE cxios_set_axisgroup_zoom_size 145 146 SUBROUTINE cxios_get_axisgroup_zoom_size(axisgroup_hdl, zoom_size) BIND(C) 147 USE ISO_C_BINDING 148 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 149 INTEGER (KIND=C_INT) :: zoom_size 150 END SUBROUTINE cxios_get_axisgroup_zoom_size 151 152 114 153 END INTERFACE 115 154 -
XIOS/trunk/src/interface/fortran_attr/iaxis_attr.F90
r326 r369 12 12 13 13 SUBROUTINE xios(set_axis_attr) & 14 ( axis_id, long_name, name, size, standard_name, unit, value ) 14 ( axis_id, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size & 15 ) 15 16 16 17 IMPLICIT NONE … … 23 24 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit 24 25 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value(:) 26 INTEGER , OPTIONAL, INTENT(IN) :: zoom_begin 27 INTEGER , OPTIONAL, INTENT(IN) :: zoom_end 28 INTEGER , OPTIONAL, INTENT(IN) :: zoom_size 25 29 26 30 CALL xios(get_axis_handle)(axis_id,axis_hdl) 27 31 CALL xios(set_axis_attr_hdl_) & 28 ( axis_hdl, long_name, name, size, standard_name, unit, value ) 32 ( axis_hdl, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size & 33 ) 29 34 30 35 END SUBROUTINE xios(set_axis_attr) 31 36 32 37 SUBROUTINE xios(set_axis_attr_hdl) & 33 ( axis_hdl, long_name, name, size, standard_name, unit, value ) 38 ( axis_hdl, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size & 39 ) 34 40 35 41 IMPLICIT NONE … … 41 47 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit 42 48 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value(:) 49 INTEGER , OPTIONAL, INTENT(IN) :: zoom_begin 50 INTEGER , OPTIONAL, INTENT(IN) :: zoom_end 51 INTEGER , OPTIONAL, INTENT(IN) :: zoom_size 43 52 44 53 CALL xios(set_axis_attr_hdl_) & 45 ( axis_hdl, long_name, name, size, standard_name, unit, value ) 54 ( axis_hdl, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size & 55 ) 46 56 47 57 END SUBROUTINE xios(set_axis_attr_hdl) 48 58 49 59 SUBROUTINE xios(set_axis_attr_hdl_) & 50 ( axis_hdl, long_name_, name_, size_, standard_name_, unit_, value_ ) 60 ( axis_hdl, long_name_, name_, size_, standard_name_, unit_, value_, zoom_begin_, zoom_end_ & 61 , zoom_size_ ) 51 62 52 63 IMPLICIT NONE … … 58 69 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit_ 59 70 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value_(:) 71 INTEGER , OPTIONAL, INTENT(IN) :: zoom_begin_ 72 INTEGER , OPTIONAL, INTENT(IN) :: zoom_end_ 73 INTEGER , OPTIONAL, INTENT(IN) :: zoom_size_ 60 74 61 75 IF (PRESENT(long_name_)) THEN … … 83 97 ENDIF 84 98 99 IF (PRESENT(zoom_begin_)) THEN 100 CALL cxios_set_axis_zoom_begin(axis_hdl%daddr, zoom_begin_) 101 ENDIF 102 103 IF (PRESENT(zoom_end_)) THEN 104 CALL cxios_set_axis_zoom_end(axis_hdl%daddr, zoom_end_) 105 ENDIF 106 107 IF (PRESENT(zoom_size_)) THEN 108 CALL cxios_set_axis_zoom_size(axis_hdl%daddr, zoom_size_) 109 ENDIF 110 85 111 86 112 … … 88 114 89 115 SUBROUTINE xios(get_axis_attr) & 90 ( axis_id, long_name, name, size, standard_name, unit, value ) 116 ( axis_id, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size & 117 ) 91 118 92 119 IMPLICIT NONE … … 99 126 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit 100 127 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value(:) 128 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_begin 129 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_end 130 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_size 101 131 102 132 CALL xios(get_axis_handle)(axis_id,axis_hdl) 103 133 CALL xios(get_axis_attr_hdl_) & 104 ( axis_hdl, long_name, name, size, standard_name, unit, value ) 134 ( axis_hdl, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size & 135 ) 105 136 106 137 END SUBROUTINE xios(get_axis_attr) 107 138 108 139 SUBROUTINE xios(get_axis_attr_hdl) & 109 ( axis_hdl, long_name, name, size, standard_name, unit, value ) 140 ( axis_hdl, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size & 141 ) 110 142 111 143 IMPLICIT NONE … … 117 149 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit 118 150 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value(:) 151 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_begin 152 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_end 153 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_size 119 154 120 155 CALL xios(get_axis_attr_hdl_) & 121 ( axis_hdl, long_name, name, size, standard_name, unit, value ) 156 ( axis_hdl, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size & 157 ) 122 158 123 159 END SUBROUTINE xios(get_axis_attr_hdl) 124 160 125 161 SUBROUTINE xios(get_axis_attr_hdl_) & 126 ( axis_hdl, long_name_, name_, size_, standard_name_, unit_, value_ ) 162 ( axis_hdl, long_name_, name_, size_, standard_name_, unit_, value_, zoom_begin_, zoom_end_ & 163 , zoom_size_ ) 127 164 128 165 IMPLICIT NONE … … 134 171 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit_ 135 172 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value_(:) 173 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_begin_ 174 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_end_ 175 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_size_ 136 176 137 177 IF (PRESENT(long_name_)) THEN … … 159 199 ENDIF 160 200 201 IF (PRESENT(zoom_begin_)) THEN 202 CALL cxios_get_axis_zoom_begin(axis_hdl%daddr, zoom_begin_) 203 ENDIF 204 205 IF (PRESENT(zoom_end_)) THEN 206 CALL cxios_get_axis_zoom_end(axis_hdl%daddr, zoom_end_) 207 ENDIF 208 209 IF (PRESENT(zoom_size_)) THEN 210 CALL cxios_get_axis_zoom_size(axis_hdl%daddr, zoom_size_) 211 ENDIF 212 161 213 162 214 -
XIOS/trunk/src/interface/fortran_attr/iaxisgroup_attr.F90
r326 r369 12 12 13 13 SUBROUTINE xios(set_axisgroup_attr) & 14 ( axisgroup_id, group_ref, long_name, name, size, standard_name, unit, value ) 14 ( axisgroup_id, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end & 15 , zoom_size ) 15 16 16 17 IMPLICIT NONE … … 24 25 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit 25 26 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value(:) 27 INTEGER , OPTIONAL, INTENT(IN) :: zoom_begin 28 INTEGER , OPTIONAL, INTENT(IN) :: zoom_end 29 INTEGER , OPTIONAL, INTENT(IN) :: zoom_size 26 30 27 31 CALL xios(get_axisgroup_handle)(axisgroup_id,axisgroup_hdl) 28 32 CALL xios(set_axisgroup_attr_hdl_) & 29 ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value ) 33 ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end & 34 , zoom_size ) 30 35 31 36 END SUBROUTINE xios(set_axisgroup_attr) 32 37 33 38 SUBROUTINE xios(set_axisgroup_attr_hdl) & 34 ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value ) 39 ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end & 40 , zoom_size ) 35 41 36 42 IMPLICIT NONE … … 43 49 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit 44 50 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value(:) 51 INTEGER , OPTIONAL, INTENT(IN) :: zoom_begin 52 INTEGER , OPTIONAL, INTENT(IN) :: zoom_end 53 INTEGER , OPTIONAL, INTENT(IN) :: zoom_size 45 54 46 55 CALL xios(set_axisgroup_attr_hdl_) & 47 ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value ) 56 ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end & 57 , zoom_size ) 48 58 49 59 END SUBROUTINE xios(set_axisgroup_attr_hdl) 50 60 51 61 SUBROUTINE xios(set_axisgroup_attr_hdl_) & 52 ( axisgroup_hdl, group_ref_, long_name_, name_, size_, standard_name_, unit_, value_ ) 62 ( axisgroup_hdl, group_ref_, long_name_, name_, size_, standard_name_, unit_, value_, zoom_begin_ & 63 , zoom_end_, zoom_size_ ) 53 64 54 65 IMPLICIT NONE … … 61 72 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit_ 62 73 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value_(:) 74 INTEGER , OPTIONAL, INTENT(IN) :: zoom_begin_ 75 INTEGER , OPTIONAL, INTENT(IN) :: zoom_end_ 76 INTEGER , OPTIONAL, INTENT(IN) :: zoom_size_ 63 77 64 78 IF (PRESENT(group_ref_)) THEN … … 90 104 ENDIF 91 105 106 IF (PRESENT(zoom_begin_)) THEN 107 CALL cxios_set_axisgroup_zoom_begin(axisgroup_hdl%daddr, zoom_begin_) 108 ENDIF 109 110 IF (PRESENT(zoom_end_)) THEN 111 CALL cxios_set_axisgroup_zoom_end(axisgroup_hdl%daddr, zoom_end_) 112 ENDIF 113 114 IF (PRESENT(zoom_size_)) THEN 115 CALL cxios_set_axisgroup_zoom_size(axisgroup_hdl%daddr, zoom_size_) 116 ENDIF 117 92 118 93 119 … … 95 121 96 122 SUBROUTINE xios(get_axisgroup_attr) & 97 ( axisgroup_id, group_ref, long_name, name, size, standard_name, unit, value ) 123 ( axisgroup_id, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end & 124 , zoom_size ) 98 125 99 126 IMPLICIT NONE … … 107 134 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit 108 135 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value(:) 136 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_begin 137 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_end 138 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_size 109 139 110 140 CALL xios(get_axisgroup_handle)(axisgroup_id,axisgroup_hdl) 111 141 CALL xios(get_axisgroup_attr_hdl_) & 112 ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value ) 142 ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end & 143 , zoom_size ) 113 144 114 145 END SUBROUTINE xios(get_axisgroup_attr) 115 146 116 147 SUBROUTINE xios(get_axisgroup_attr_hdl) & 117 ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value ) 148 ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end & 149 , zoom_size ) 118 150 119 151 IMPLICIT NONE … … 126 158 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit 127 159 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value(:) 160 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_begin 161 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_end 162 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_size 128 163 129 164 CALL xios(get_axisgroup_attr_hdl_) & 130 ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value ) 165 ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end & 166 , zoom_size ) 131 167 132 168 END SUBROUTINE xios(get_axisgroup_attr_hdl) 133 169 134 170 SUBROUTINE xios(get_axisgroup_attr_hdl_) & 135 ( axisgroup_hdl, group_ref_, long_name_, name_, size_, standard_name_, unit_, value_ ) 171 ( axisgroup_hdl, group_ref_, long_name_, name_, size_, standard_name_, unit_, value_, zoom_begin_ & 172 , zoom_end_, zoom_size_ ) 136 173 137 174 IMPLICIT NONE … … 144 181 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit_ 145 182 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value_(:) 183 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_begin_ 184 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_end_ 185 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_size_ 146 186 147 187 IF (PRESENT(group_ref_)) THEN … … 173 213 ENDIF 174 214 215 IF (PRESENT(zoom_begin_)) THEN 216 CALL cxios_get_axisgroup_zoom_begin(axisgroup_hdl%daddr, zoom_begin_) 217 ENDIF 218 219 IF (PRESENT(zoom_end_)) THEN 220 CALL cxios_get_axisgroup_zoom_end(axisgroup_hdl%daddr, zoom_end_) 221 ENDIF 222 223 IF (PRESENT(zoom_size_)) THEN 224 CALL cxios_get_axisgroup_zoom_size(axisgroup_hdl%daddr, zoom_size_) 225 ENDIF 226 175 227 176 228 -
XIOS/trunk/src/interface/fortran_attr/icontext_attr.F90
r326 r369 12 12 13 13 SUBROUTINE xios(set_context_attr) & 14 ( context_id, calendar_type, output_dir, start_date, time step )14 ( context_id, calendar_type, output_dir, start_date, time_origin, timestep ) 15 15 16 16 IMPLICIT NONE … … 20 20 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_dir 21 21 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: start_date 22 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_origin 22 23 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timestep 23 24 24 25 CALL xios(get_context_handle)(context_id,context_hdl) 25 26 CALL xios(set_context_attr_hdl_) & 26 ( context_hdl, calendar_type, output_dir, start_date, time step )27 ( context_hdl, calendar_type, output_dir, start_date, time_origin, timestep ) 27 28 28 29 END SUBROUTINE xios(set_context_attr) 29 30 30 31 SUBROUTINE xios(set_context_attr_hdl) & 31 ( context_hdl, calendar_type, output_dir, start_date, time step )32 ( context_hdl, calendar_type, output_dir, start_date, time_origin, timestep ) 32 33 33 34 IMPLICIT NONE … … 36 37 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_dir 37 38 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: start_date 39 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_origin 38 40 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timestep 39 41 40 42 CALL xios(set_context_attr_hdl_) & 41 ( context_hdl, calendar_type, output_dir, start_date, time step )43 ( context_hdl, calendar_type, output_dir, start_date, time_origin, timestep ) 42 44 43 45 END SUBROUTINE xios(set_context_attr_hdl) 44 46 45 47 SUBROUTINE xios(set_context_attr_hdl_) & 46 ( context_hdl, calendar_type_, output_dir_, start_date_, time step_ )48 ( context_hdl, calendar_type_, output_dir_, start_date_, time_origin_, timestep_ ) 47 49 48 50 IMPLICIT NONE … … 51 53 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_dir_ 52 54 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: start_date_ 55 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_origin_ 53 56 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timestep_ 54 57 … … 65 68 ENDIF 66 69 70 IF (PRESENT(time_origin_)) THEN 71 CALL cxios_set_context_time_origin(context_hdl%daddr, time_origin_, len(time_origin_)) 72 ENDIF 73 67 74 IF (PRESENT(timestep_)) THEN 68 75 CALL cxios_set_context_timestep(context_hdl%daddr, timestep_, len(timestep_)) … … 74 81 75 82 SUBROUTINE xios(get_context_attr) & 76 ( context_id, calendar_type, output_dir, start_date, time step )83 ( context_id, calendar_type, output_dir, start_date, time_origin, timestep ) 77 84 78 85 IMPLICIT NONE … … 82 89 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_dir 83 90 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: start_date 91 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_origin 84 92 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timestep 85 93 86 94 CALL xios(get_context_handle)(context_id,context_hdl) 87 95 CALL xios(get_context_attr_hdl_) & 88 ( context_hdl, calendar_type, output_dir, start_date, time step )96 ( context_hdl, calendar_type, output_dir, start_date, time_origin, timestep ) 89 97 90 98 END SUBROUTINE xios(get_context_attr) 91 99 92 100 SUBROUTINE xios(get_context_attr_hdl) & 93 ( context_hdl, calendar_type, output_dir, start_date, time step )101 ( context_hdl, calendar_type, output_dir, start_date, time_origin, timestep ) 94 102 95 103 IMPLICIT NONE … … 98 106 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_dir 99 107 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: start_date 108 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_origin 100 109 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timestep 101 110 102 111 CALL xios(get_context_attr_hdl_) & 103 ( context_hdl, calendar_type, output_dir, start_date, time step )112 ( context_hdl, calendar_type, output_dir, start_date, time_origin, timestep ) 104 113 105 114 END SUBROUTINE xios(get_context_attr_hdl) 106 115 107 116 SUBROUTINE xios(get_context_attr_hdl_) & 108 ( context_hdl, calendar_type_, output_dir_, start_date_, time step_ )117 ( context_hdl, calendar_type_, output_dir_, start_date_, time_origin_, timestep_ ) 109 118 110 119 IMPLICIT NONE … … 113 122 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_dir_ 114 123 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: start_date_ 124 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_origin_ 115 125 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timestep_ 116 126 … … 127 137 ENDIF 128 138 139 IF (PRESENT(time_origin_)) THEN 140 CALL cxios_get_context_time_origin(context_hdl%daddr, time_origin_, len(time_origin_)) 141 ENDIF 142 129 143 IF (PRESENT(timestep_)) THEN 130 144 CALL cxios_get_context_timestep(context_hdl%daddr, timestep_, len(timestep_)) -
XIOS/trunk/src/interface/fortran_attr/ifile_attr.F90
r326 r369 12 12 13 13 SUBROUTINE xios(set_file_attr) & 14 ( file_id, description, enabled, name, name_suffix, output_freq, output_level, split_freq, sync_freq &15 , type )14 ( file_id, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq & 15 , sync_freq, type ) 16 16 17 17 IMPLICIT NONE … … 25 25 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_freq 26 26 INTEGER , OPTIONAL, INTENT(IN) :: output_level 27 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access 27 28 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq 28 29 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: sync_freq … … 31 32 CALL xios(get_file_handle)(file_id,file_hdl) 32 33 CALL xios(set_file_attr_hdl_) & 33 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, split_freq, sync_freq &34 , type )34 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq & 35 , sync_freq, type ) 35 36 36 37 END SUBROUTINE xios(set_file_attr) 37 38 38 39 SUBROUTINE xios(set_file_attr_hdl) & 39 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, split_freq, sync_freq &40 , type )40 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq & 41 , sync_freq, type ) 41 42 42 43 IMPLICIT NONE … … 49 50 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_freq 50 51 INTEGER , OPTIONAL, INTENT(IN) :: output_level 52 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access 51 53 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq 52 54 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: sync_freq … … 54 56 55 57 CALL xios(set_file_attr_hdl_) & 56 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, split_freq, sync_freq &57 , type )58 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq & 59 , sync_freq, type ) 58 60 59 61 END SUBROUTINE xios(set_file_attr_hdl) 60 62 61 63 SUBROUTINE xios(set_file_attr_hdl_) & 62 ( file_hdl, description_, enabled_, name_, name_suffix_, output_freq_, output_level_, split_freq_ &63 , s ync_freq_, type_ )64 ( file_hdl, description_, enabled_, name_, name_suffix_, output_freq_, output_level_, par_access_ & 65 , split_freq_, sync_freq_, type_ ) 64 66 65 67 IMPLICIT NONE … … 72 74 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_freq_ 73 75 INTEGER , OPTIONAL, INTENT(IN) :: output_level_ 76 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access_ 74 77 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_ 75 78 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: sync_freq_ … … 101 104 ENDIF 102 105 106 IF (PRESENT(par_access_)) THEN 107 CALL cxios_set_file_par_access(file_hdl%daddr, par_access_, len(par_access_)) 108 ENDIF 109 103 110 IF (PRESENT(split_freq_)) THEN 104 111 CALL cxios_set_file_split_freq(file_hdl%daddr, split_freq_, len(split_freq_)) … … 118 125 119 126 SUBROUTINE xios(get_file_attr) & 120 ( file_id, description, enabled, name, name_suffix, output_freq, output_level, split_freq, sync_freq &121 , type )127 ( file_id, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq & 128 , sync_freq, type ) 122 129 123 130 IMPLICIT NONE … … 131 138 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_freq 132 139 INTEGER , OPTIONAL, INTENT(OUT) :: output_level 140 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access 133 141 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq 134 142 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: sync_freq … … 137 145 CALL xios(get_file_handle)(file_id,file_hdl) 138 146 CALL xios(get_file_attr_hdl_) & 139 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, split_freq, sync_freq &140 , type )147 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq & 148 , sync_freq, type ) 141 149 142 150 END SUBROUTINE xios(get_file_attr) 143 151 144 152 SUBROUTINE xios(get_file_attr_hdl) & 145 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, split_freq, sync_freq &146 , type )153 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq & 154 , sync_freq, type ) 147 155 148 156 IMPLICIT NONE … … 155 163 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_freq 156 164 INTEGER , OPTIONAL, INTENT(OUT) :: output_level 165 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access 157 166 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq 158 167 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: sync_freq … … 160 169 161 170 CALL xios(get_file_attr_hdl_) & 162 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, split_freq, sync_freq &163 , type )171 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq & 172 , sync_freq, type ) 164 173 165 174 END SUBROUTINE xios(get_file_attr_hdl) 166 175 167 176 SUBROUTINE xios(get_file_attr_hdl_) & 168 ( file_hdl, description_, enabled_, name_, name_suffix_, output_freq_, output_level_, split_freq_ &169 , s ync_freq_, type_ )177 ( file_hdl, description_, enabled_, name_, name_suffix_, output_freq_, output_level_, par_access_ & 178 , split_freq_, sync_freq_, type_ ) 170 179 171 180 IMPLICIT NONE … … 178 187 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_freq_ 179 188 INTEGER , OPTIONAL, INTENT(OUT) :: output_level_ 189 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access_ 180 190 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_ 181 191 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: sync_freq_ … … 207 217 ENDIF 208 218 219 IF (PRESENT(par_access_)) THEN 220 CALL cxios_get_file_par_access(file_hdl%daddr, par_access_, len(par_access_)) 221 ENDIF 222 209 223 IF (PRESENT(split_freq_)) THEN 210 224 CALL cxios_get_file_split_freq(file_hdl%daddr, split_freq_, len(split_freq_)) -
XIOS/trunk/src/interface/fortran_attr/ifilegroup_attr.F90
r326 r369 13 13 SUBROUTINE xios(set_filegroup_attr) & 14 14 ( filegroup_id, description, enabled, group_ref, name, name_suffix, output_freq, output_level & 15 , split_freq, sync_freq, type )15 , par_access, split_freq, sync_freq, type ) 16 16 17 17 IMPLICIT NONE … … 26 26 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_freq 27 27 INTEGER , OPTIONAL, INTENT(IN) :: output_level 28 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access 28 29 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq 29 30 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: sync_freq … … 33 34 CALL xios(set_filegroup_attr_hdl_) & 34 35 ( filegroup_hdl, description, enabled, group_ref, name, name_suffix, output_freq, output_level & 35 , split_freq, sync_freq, type )36 , par_access, split_freq, sync_freq, type ) 36 37 37 38 END SUBROUTINE xios(set_filegroup_attr) … … 39 40 SUBROUTINE xios(set_filegroup_attr_hdl) & 40 41 ( filegroup_hdl, description, enabled, group_ref, name, name_suffix, output_freq, output_level & 41 , split_freq, sync_freq, type )42 , par_access, split_freq, sync_freq, type ) 42 43 43 44 IMPLICIT NONE … … 51 52 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_freq 52 53 INTEGER , OPTIONAL, INTENT(IN) :: output_level 54 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access 53 55 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq 54 56 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: sync_freq … … 57 59 CALL xios(set_filegroup_attr_hdl_) & 58 60 ( filegroup_hdl, description, enabled, group_ref, name, name_suffix, output_freq, output_level & 59 , split_freq, sync_freq, type )61 , par_access, split_freq, sync_freq, type ) 60 62 61 63 END SUBROUTINE xios(set_filegroup_attr_hdl) … … 63 65 SUBROUTINE xios(set_filegroup_attr_hdl_) & 64 66 ( filegroup_hdl, description_, enabled_, group_ref_, name_, name_suffix_, output_freq_, output_level_ & 65 , split_freq_, sync_freq_, type_ )67 , par_access_, split_freq_, sync_freq_, type_ ) 66 68 67 69 IMPLICIT NONE … … 75 77 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_freq_ 76 78 INTEGER , OPTIONAL, INTENT(IN) :: output_level_ 79 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access_ 77 80 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_ 78 81 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: sync_freq_ … … 108 111 ENDIF 109 112 113 IF (PRESENT(par_access_)) THEN 114 CALL cxios_set_filegroup_par_access(filegroup_hdl%daddr, par_access_, len(par_access_)) 115 ENDIF 116 110 117 IF (PRESENT(split_freq_)) THEN 111 118 CALL cxios_set_filegroup_split_freq(filegroup_hdl%daddr, split_freq_, len(split_freq_)) … … 126 133 SUBROUTINE xios(get_filegroup_attr) & 127 134 ( filegroup_id, description, enabled, group_ref, name, name_suffix, output_freq, output_level & 128 , split_freq, sync_freq, type )135 , par_access, split_freq, sync_freq, type ) 129 136 130 137 IMPLICIT NONE … … 139 146 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_freq 140 147 INTEGER , OPTIONAL, INTENT(OUT) :: output_level 148 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access 141 149 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq 142 150 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: sync_freq … … 146 154 CALL xios(get_filegroup_attr_hdl_) & 147 155 ( filegroup_hdl, description, enabled, group_ref, name, name_suffix, output_freq, output_level & 148 , split_freq, sync_freq, type )156 , par_access, split_freq, sync_freq, type ) 149 157 150 158 END SUBROUTINE xios(get_filegroup_attr) … … 152 160 SUBROUTINE xios(get_filegroup_attr_hdl) & 153 161 ( filegroup_hdl, description, enabled, group_ref, name, name_suffix, output_freq, output_level & 154 , split_freq, sync_freq, type )162 , par_access, split_freq, sync_freq, type ) 155 163 156 164 IMPLICIT NONE … … 164 172 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_freq 165 173 INTEGER , OPTIONAL, INTENT(OUT) :: output_level 174 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access 166 175 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq 167 176 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: sync_freq … … 170 179 CALL xios(get_filegroup_attr_hdl_) & 171 180 ( filegroup_hdl, description, enabled, group_ref, name, name_suffix, output_freq, output_level & 172 , split_freq, sync_freq, type )181 , par_access, split_freq, sync_freq, type ) 173 182 174 183 END SUBROUTINE xios(get_filegroup_attr_hdl) … … 176 185 SUBROUTINE xios(get_filegroup_attr_hdl_) & 177 186 ( filegroup_hdl, description_, enabled_, group_ref_, name_, name_suffix_, output_freq_, output_level_ & 178 , split_freq_, sync_freq_, type_ )187 , par_access_, split_freq_, sync_freq_, type_ ) 179 188 180 189 IMPLICIT NONE … … 188 197 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_freq_ 189 198 INTEGER , OPTIONAL, INTENT(OUT) :: output_level_ 199 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access_ 190 200 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_ 191 201 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: sync_freq_ … … 221 231 ENDIF 222 232 233 IF (PRESENT(par_access_)) THEN 234 CALL cxios_get_filegroup_par_access(filegroup_hdl%daddr, par_access_, len(par_access_)) 235 ENDIF 236 223 237 IF (PRESENT(split_freq_)) THEN 224 238 CALL cxios_get_filegroup_split_freq(filegroup_hdl%daddr, split_freq_, len(split_freq_))
Note: See TracChangeset
for help on using the changeset viewer.