Ignore:
Timestamp:
04/24/18 18:03:18 (6 years ago)
Author:
oabramkina
Message:

Updating fortran interface for attributes that have been recently introduced and the following filters:

duplicate_scalar_to_axis
reduce_axis_to_axis
reduce_scalar_to_scalar
reorder_domain
temporal_splitting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icgrid_attr.cpp

    r932 r1492  
    1818  typedef xios::CGrid* grid_Ptr; 
    1919 
     20  void cxios_set_grid_comment(grid_Ptr grid_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    grid_hdl->comment.setValue(comment_str); 
     26    CTimer::get("XIOS").suspend(); 
     27  } 
     28 
     29  void cxios_get_grid_comment(grid_Ptr grid_hdl, char * comment, int comment_size) 
     30  { 
     31    CTimer::get("XIOS").resume(); 
     32    if (!string_copy(grid_hdl->comment.getInheritedValue(), comment, comment_size)) 
     33      ERROR("void cxios_get_grid_comment(grid_Ptr grid_hdl, char * comment, int comment_size)", << "Input string is too short"); 
     34    CTimer::get("XIOS").suspend(); 
     35  } 
     36 
     37  bool cxios_is_defined_grid_comment(grid_Ptr grid_hdl) 
     38  { 
     39     CTimer::get("XIOS").resume(); 
     40     bool isDefined = grid_hdl->comment.hasInheritedValue(); 
     41     CTimer::get("XIOS").suspend(); 
     42     return isDefined; 
     43  } 
     44 
     45 
    2046  void cxios_set_grid_description(grid_Ptr grid_hdl, const char * description, int description_size) 
    2147  { 
     
    4470 
    4571 
     72  void cxios_set_grid_mask_0d(grid_Ptr grid_hdl, bool* mask_0d, int* extent) 
     73  { 
     74    CTimer::get("XIOS").resume(); 
     75    CArray<bool,1> tmp(mask_0d, shape(extent[0]), neverDeleteData); 
     76    grid_hdl->mask_0d.reference(tmp.copy()); 
     77     CTimer::get("XIOS").suspend(); 
     78  } 
     79 
     80  void cxios_get_grid_mask_0d(grid_Ptr grid_hdl, bool* mask_0d, int* extent) 
     81  { 
     82    CTimer::get("XIOS").resume(); 
     83    CArray<bool,1> tmp(mask_0d, shape(extent[0]), neverDeleteData); 
     84    tmp=grid_hdl->mask_0d.getInheritedValue(); 
     85     CTimer::get("XIOS").suspend(); 
     86  } 
     87 
     88  bool cxios_is_defined_grid_mask_0d(grid_Ptr grid_hdl) 
     89  { 
     90     CTimer::get("XIOS").resume(); 
     91     bool isDefined = grid_hdl->mask_0d.hasInheritedValue(); 
     92     CTimer::get("XIOS").suspend(); 
     93     return isDefined; 
     94  } 
     95 
     96 
    4697  void cxios_set_grid_mask_1d(grid_Ptr grid_hdl, bool* mask_1d, int* extent) 
    4798  { 
Note: See TracChangeset for help on using the changeset viewer.