- Timestamp:
- 04/24/18 18:03:18 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icgridgroup_attr.cpp
r932 r1492 18 18 typedef xios::CGridGroup* gridgroup_Ptr; 19 19 20 void cxios_set_gridgroup_comment(gridgroup_Ptr gridgroup_hdl, const char * comment, int comment_size) 21 { 22 std::string comment_str; 23 if (!cstr2string(comment, comment_size, comment_str)) return; 24 CTimer::get("XIOS").resume(); 25 gridgroup_hdl->comment.setValue(comment_str); 26 CTimer::get("XIOS").suspend(); 27 } 28 29 void cxios_get_gridgroup_comment(gridgroup_Ptr gridgroup_hdl, char * comment, int comment_size) 30 { 31 CTimer::get("XIOS").resume(); 32 if (!string_copy(gridgroup_hdl->comment.getInheritedValue(), comment, comment_size)) 33 ERROR("void cxios_get_gridgroup_comment(gridgroup_Ptr gridgroup_hdl, char * comment, int comment_size)", << "Input string is too short"); 34 CTimer::get("XIOS").suspend(); 35 } 36 37 bool cxios_is_defined_gridgroup_comment(gridgroup_Ptr gridgroup_hdl) 38 { 39 CTimer::get("XIOS").resume(); 40 bool isDefined = gridgroup_hdl->comment.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 43 } 44 45 20 46 void cxios_set_gridgroup_description(gridgroup_Ptr gridgroup_hdl, const char * description, int description_size) 21 47 { … … 70 96 71 97 98 void cxios_set_gridgroup_mask_0d(gridgroup_Ptr gridgroup_hdl, bool* mask_0d, int* extent) 99 { 100 CTimer::get("XIOS").resume(); 101 CArray<bool,1> tmp(mask_0d, shape(extent[0]), neverDeleteData); 102 gridgroup_hdl->mask_0d.reference(tmp.copy()); 103 CTimer::get("XIOS").suspend(); 104 } 105 106 void cxios_get_gridgroup_mask_0d(gridgroup_Ptr gridgroup_hdl, bool* mask_0d, int* extent) 107 { 108 CTimer::get("XIOS").resume(); 109 CArray<bool,1> tmp(mask_0d, shape(extent[0]), neverDeleteData); 110 tmp=gridgroup_hdl->mask_0d.getInheritedValue(); 111 CTimer::get("XIOS").suspend(); 112 } 113 114 bool cxios_is_defined_gridgroup_mask_0d(gridgroup_Ptr gridgroup_hdl) 115 { 116 CTimer::get("XIOS").resume(); 117 bool isDefined = gridgroup_hdl->mask_0d.hasInheritedValue(); 118 CTimer::get("XIOS").suspend(); 119 return isDefined; 120 } 121 122 72 123 void cxios_set_gridgroup_mask_1d(gridgroup_Ptr gridgroup_hdl, bool* mask_1d, int* extent) 73 124 {
Note: See TracChangeset
for help on using the changeset viewer.