Changeset 538 for XIOS


Ignore:
Timestamp:
12/11/14 16:07:42 (9 years ago)
Author:
rlacroix
Message:

Convert more attributes to use the new duration type:

  • field: freq_op and freq_offset
  • file: output_freq, sync_freq and split_freq.

Remember that you now have to use the "xios_duration" type instead of strings to get/set those attributes through the Fortran interface.

Location:
XIOS/trunk/src
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/config/field_attribute.conf

    r501 r538  
    77DECLARE_ATTRIBUTE(bool,      detect_missing_value) 
    88 
    9 DECLARE_ATTRIBUTE(StdString, freq_op) 
    10 DECLARE_ATTRIBUTE(StdString, freq_offset) 
     9DECLARE_ATTRIBUTE(CDuration, freq_op) 
     10DECLARE_ATTRIBUTE(CDuration, freq_offset) 
    1111DECLARE_ATTRIBUTE(int,       level) 
    1212DECLARE_ATTRIBUTE(int,       prec) 
  • XIOS/trunk/src/config/file_attribute.conf

    r528 r538  
    55DECLARE_ATTRIBUTE(int, min_digits ) 
    66 
    7 DECLARE_ATTRIBUTE(StdString, output_freq) 
     7DECLARE_ATTRIBUTE(CDuration, output_freq) 
    88DECLARE_ATTRIBUTE(int,       output_level) 
    9 DECLARE_ATTRIBUTE(StdString, sync_freq) 
    10 DECLARE_ATTRIBUTE(StdString, split_freq) 
     9DECLARE_ATTRIBUTE(CDuration, sync_freq) 
     10DECLARE_ATTRIBUTE(CDuration, split_freq) 
    1111DECLARE_ATTRIBUTE(StdString, split_freq_format) 
    1212DECLARE_ATTRIBUTE(bool,      enabled) 
  • XIOS/trunk/src/interface/c_attr/icfield_attr.cpp

    r532 r538  
    180180   
    181181   
    182   void cxios_set_field_freq_offset(field_Ptr field_hdl, const char * freq_offset, int freq_offset_size) 
    183   { 
    184     std::string freq_offset_str; 
    185     if(!cstr2string(freq_offset, freq_offset_size, freq_offset_str)) return; 
    186      CTimer::get("XIOS").resume(); 
    187     field_hdl->freq_offset.setValue(freq_offset_str); 
    188      CTimer::get("XIOS").suspend(); 
    189   } 
    190    
    191   void cxios_get_field_freq_offset(field_Ptr field_hdl, char * freq_offset, int freq_offset_size) 
    192   { 
    193      CTimer::get("XIOS").resume(); 
    194     if(!string_copy(field_hdl->freq_offset.getInheritedValue(),freq_offset , freq_offset_size)) 
    195       ERROR("void cxios_get_field_freq_offset(field_Ptr field_hdl, char * freq_offset, int freq_offset_size)", <<"Input string is to short"); 
    196      CTimer::get("XIOS").suspend(); 
     182  void cxios_set_field_freq_offset(field_Ptr field_hdl, cxios_duration freq_offset_c) 
     183  { 
     184    CTimer::get("XIOS").resume(); 
     185    field_hdl->freq_offset.allocate(); 
     186    CDuration& freq_offset = field_hdl->freq_offset.get(); 
     187    freq_offset.year = freq_offset_c.year; 
     188    freq_offset.month = freq_offset_c.month; 
     189    freq_offset.day = freq_offset_c.day; 
     190    freq_offset.hour = freq_offset_c.hour; 
     191    freq_offset.minute = freq_offset_c.minute; 
     192    freq_offset.second = freq_offset_c.second; 
     193    freq_offset.timestep = freq_offset_c.timestep; 
     194    CTimer::get("XIOS").suspend(); 
     195  } 
     196   
     197  void cxios_get_field_freq_offset(field_Ptr field_hdl, cxios_duration* freq_offset_c) 
     198  { 
     199    CTimer::get("XIOS").resume(); 
     200    CDuration freq_offset = field_hdl->freq_offset.getInheritedValue(); 
     201    freq_offset_c->year = freq_offset.year; 
     202    freq_offset_c->month = freq_offset.month; 
     203    freq_offset_c->day = freq_offset.day; 
     204    freq_offset_c->hour = freq_offset.hour; 
     205    freq_offset_c->minute = freq_offset.minute; 
     206    freq_offset_c->second = freq_offset.second; 
     207    freq_offset_c->timestep = freq_offset.timestep; 
     208    CTimer::get("XIOS").suspend(); 
    197209  } 
    198210   
     
    206218   
    207219   
    208   void cxios_set_field_freq_op(field_Ptr field_hdl, const char * freq_op, int freq_op_size) 
    209   { 
    210     std::string freq_op_str; 
    211     if(!cstr2string(freq_op, freq_op_size, freq_op_str)) return; 
    212      CTimer::get("XIOS").resume(); 
    213     field_hdl->freq_op.setValue(freq_op_str); 
    214      CTimer::get("XIOS").suspend(); 
    215   } 
    216    
    217   void cxios_get_field_freq_op(field_Ptr field_hdl, char * freq_op, int freq_op_size) 
    218   { 
    219      CTimer::get("XIOS").resume(); 
    220     if(!string_copy(field_hdl->freq_op.getInheritedValue(),freq_op , freq_op_size)) 
    221       ERROR("void cxios_get_field_freq_op(field_Ptr field_hdl, char * freq_op, int freq_op_size)", <<"Input string is to short"); 
    222      CTimer::get("XIOS").suspend(); 
     220  void cxios_set_field_freq_op(field_Ptr field_hdl, cxios_duration freq_op_c) 
     221  { 
     222    CTimer::get("XIOS").resume(); 
     223    field_hdl->freq_op.allocate(); 
     224    CDuration& freq_op = field_hdl->freq_op.get(); 
     225    freq_op.year = freq_op_c.year; 
     226    freq_op.month = freq_op_c.month; 
     227    freq_op.day = freq_op_c.day; 
     228    freq_op.hour = freq_op_c.hour; 
     229    freq_op.minute = freq_op_c.minute; 
     230    freq_op.second = freq_op_c.second; 
     231    freq_op.timestep = freq_op_c.timestep; 
     232    CTimer::get("XIOS").suspend(); 
     233  } 
     234   
     235  void cxios_get_field_freq_op(field_Ptr field_hdl, cxios_duration* freq_op_c) 
     236  { 
     237    CTimer::get("XIOS").resume(); 
     238    CDuration freq_op = field_hdl->freq_op.getInheritedValue(); 
     239    freq_op_c->year = freq_op.year; 
     240    freq_op_c->month = freq_op.month; 
     241    freq_op_c->day = freq_op.day; 
     242    freq_op_c->hour = freq_op.hour; 
     243    freq_op_c->minute = freq_op.minute; 
     244    freq_op_c->second = freq_op.second; 
     245    freq_op_c->timestep = freq_op.timestep; 
     246    CTimer::get("XIOS").suspend(); 
    223247  } 
    224248   
  • XIOS/trunk/src/interface/c_attr/icfieldgroup_attr.cpp

    r532 r538  
    180180   
    181181   
    182   void cxios_set_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, const char * freq_offset, int freq_offset_size) 
    183   { 
    184     std::string freq_offset_str; 
    185     if(!cstr2string(freq_offset, freq_offset_size, freq_offset_str)) return; 
    186      CTimer::get("XIOS").resume(); 
    187     fieldgroup_hdl->freq_offset.setValue(freq_offset_str); 
    188      CTimer::get("XIOS").suspend(); 
    189   } 
    190    
    191   void cxios_get_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, char * freq_offset, int freq_offset_size) 
    192   { 
    193      CTimer::get("XIOS").resume(); 
    194     if(!string_copy(fieldgroup_hdl->freq_offset.getInheritedValue(),freq_offset , freq_offset_size)) 
    195       ERROR("void cxios_get_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, char * freq_offset, int freq_offset_size)", <<"Input string is to short"); 
    196      CTimer::get("XIOS").suspend(); 
     182  void cxios_set_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, cxios_duration freq_offset_c) 
     183  { 
     184    CTimer::get("XIOS").resume(); 
     185    fieldgroup_hdl->freq_offset.allocate(); 
     186    CDuration& freq_offset = fieldgroup_hdl->freq_offset.get(); 
     187    freq_offset.year = freq_offset_c.year; 
     188    freq_offset.month = freq_offset_c.month; 
     189    freq_offset.day = freq_offset_c.day; 
     190    freq_offset.hour = freq_offset_c.hour; 
     191    freq_offset.minute = freq_offset_c.minute; 
     192    freq_offset.second = freq_offset_c.second; 
     193    freq_offset.timestep = freq_offset_c.timestep; 
     194    CTimer::get("XIOS").suspend(); 
     195  } 
     196   
     197  void cxios_get_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, cxios_duration* freq_offset_c) 
     198  { 
     199    CTimer::get("XIOS").resume(); 
     200    CDuration freq_offset = fieldgroup_hdl->freq_offset.getInheritedValue(); 
     201    freq_offset_c->year = freq_offset.year; 
     202    freq_offset_c->month = freq_offset.month; 
     203    freq_offset_c->day = freq_offset.day; 
     204    freq_offset_c->hour = freq_offset.hour; 
     205    freq_offset_c->minute = freq_offset.minute; 
     206    freq_offset_c->second = freq_offset.second; 
     207    freq_offset_c->timestep = freq_offset.timestep; 
     208    CTimer::get("XIOS").suspend(); 
    197209  } 
    198210   
     
    206218   
    207219   
    208   void cxios_set_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, const char * freq_op, int freq_op_size) 
    209   { 
    210     std::string freq_op_str; 
    211     if(!cstr2string(freq_op, freq_op_size, freq_op_str)) return; 
    212      CTimer::get("XIOS").resume(); 
    213     fieldgroup_hdl->freq_op.setValue(freq_op_str); 
    214      CTimer::get("XIOS").suspend(); 
    215   } 
    216    
    217   void cxios_get_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, char * freq_op, int freq_op_size) 
    218   { 
    219      CTimer::get("XIOS").resume(); 
    220     if(!string_copy(fieldgroup_hdl->freq_op.getInheritedValue(),freq_op , freq_op_size)) 
    221       ERROR("void cxios_get_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, char * freq_op, int freq_op_size)", <<"Input string is to short"); 
    222      CTimer::get("XIOS").suspend(); 
     220  void cxios_set_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, cxios_duration freq_op_c) 
     221  { 
     222    CTimer::get("XIOS").resume(); 
     223    fieldgroup_hdl->freq_op.allocate(); 
     224    CDuration& freq_op = fieldgroup_hdl->freq_op.get(); 
     225    freq_op.year = freq_op_c.year; 
     226    freq_op.month = freq_op_c.month; 
     227    freq_op.day = freq_op_c.day; 
     228    freq_op.hour = freq_op_c.hour; 
     229    freq_op.minute = freq_op_c.minute; 
     230    freq_op.second = freq_op_c.second; 
     231    freq_op.timestep = freq_op_c.timestep; 
     232    CTimer::get("XIOS").suspend(); 
     233  } 
     234   
     235  void cxios_get_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, cxios_duration* freq_op_c) 
     236  { 
     237    CTimer::get("XIOS").resume(); 
     238    CDuration freq_op = fieldgroup_hdl->freq_op.getInheritedValue(); 
     239    freq_op_c->year = freq_op.year; 
     240    freq_op_c->month = freq_op.month; 
     241    freq_op_c->day = freq_op.day; 
     242    freq_op_c->hour = freq_op.hour; 
     243    freq_op_c->minute = freq_op.minute; 
     244    freq_op_c->second = freq_op.second; 
     245    freq_op_c->timestep = freq_op.timestep; 
     246    CTimer::get("XIOS").suspend(); 
    223247  } 
    224248   
  • XIOS/trunk/src/interface/c_attr/icfile_attr.cpp

    r532 r538  
    185185   
    186186   
    187   void cxios_set_file_output_freq(file_Ptr file_hdl, const char * output_freq, int output_freq_size) 
    188   { 
    189     std::string output_freq_str; 
    190     if(!cstr2string(output_freq, output_freq_size, output_freq_str)) return; 
    191      CTimer::get("XIOS").resume(); 
    192     file_hdl->output_freq.setValue(output_freq_str); 
    193      CTimer::get("XIOS").suspend(); 
    194   } 
    195    
    196   void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size) 
    197   { 
    198      CTimer::get("XIOS").resume(); 
    199     if(!string_copy(file_hdl->output_freq.getInheritedValue(),output_freq , output_freq_size)) 
    200       ERROR("void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size)", <<"Input string is to short"); 
    201      CTimer::get("XIOS").suspend(); 
     187  void cxios_set_file_output_freq(file_Ptr file_hdl, cxios_duration output_freq_c) 
     188  { 
     189    CTimer::get("XIOS").resume(); 
     190    file_hdl->output_freq.allocate(); 
     191    CDuration& output_freq = file_hdl->output_freq.get(); 
     192    output_freq.year = output_freq_c.year; 
     193    output_freq.month = output_freq_c.month; 
     194    output_freq.day = output_freq_c.day; 
     195    output_freq.hour = output_freq_c.hour; 
     196    output_freq.minute = output_freq_c.minute; 
     197    output_freq.second = output_freq_c.second; 
     198    output_freq.timestep = output_freq_c.timestep; 
     199    CTimer::get("XIOS").suspend(); 
     200  } 
     201   
     202  void cxios_get_file_output_freq(file_Ptr file_hdl, cxios_duration* output_freq_c) 
     203  { 
     204    CTimer::get("XIOS").resume(); 
     205    CDuration output_freq = file_hdl->output_freq.getInheritedValue(); 
     206    output_freq_c->year = output_freq.year; 
     207    output_freq_c->month = output_freq.month; 
     208    output_freq_c->day = output_freq.day; 
     209    output_freq_c->hour = output_freq.hour; 
     210    output_freq_c->minute = output_freq.minute; 
     211    output_freq_c->second = output_freq.second; 
     212    output_freq_c->timestep = output_freq.timestep; 
     213    CTimer::get("XIOS").suspend(); 
    202214  } 
    203215   
     
    258270   
    259271   
    260   void cxios_set_file_split_freq(file_Ptr file_hdl, const char * split_freq, int split_freq_size) 
    261   { 
    262     std::string split_freq_str; 
    263     if(!cstr2string(split_freq, split_freq_size, split_freq_str)) return; 
    264      CTimer::get("XIOS").resume(); 
    265     file_hdl->split_freq.setValue(split_freq_str); 
    266      CTimer::get("XIOS").suspend(); 
    267   } 
    268    
    269   void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size) 
    270   { 
    271      CTimer::get("XIOS").resume(); 
    272     if(!string_copy(file_hdl->split_freq.getInheritedValue(),split_freq , split_freq_size)) 
    273       ERROR("void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size)", <<"Input string is to short"); 
    274      CTimer::get("XIOS").suspend(); 
     272  void cxios_set_file_split_freq(file_Ptr file_hdl, cxios_duration split_freq_c) 
     273  { 
     274    CTimer::get("XIOS").resume(); 
     275    file_hdl->split_freq.allocate(); 
     276    CDuration& split_freq = file_hdl->split_freq.get(); 
     277    split_freq.year = split_freq_c.year; 
     278    split_freq.month = split_freq_c.month; 
     279    split_freq.day = split_freq_c.day; 
     280    split_freq.hour = split_freq_c.hour; 
     281    split_freq.minute = split_freq_c.minute; 
     282    split_freq.second = split_freq_c.second; 
     283    split_freq.timestep = split_freq_c.timestep; 
     284    CTimer::get("XIOS").suspend(); 
     285  } 
     286   
     287  void cxios_get_file_split_freq(file_Ptr file_hdl, cxios_duration* split_freq_c) 
     288  { 
     289    CTimer::get("XIOS").resume(); 
     290    CDuration split_freq = file_hdl->split_freq.getInheritedValue(); 
     291    split_freq_c->year = split_freq.year; 
     292    split_freq_c->month = split_freq.month; 
     293    split_freq_c->day = split_freq.day; 
     294    split_freq_c->hour = split_freq.hour; 
     295    split_freq_c->minute = split_freq.minute; 
     296    split_freq_c->second = split_freq.second; 
     297    split_freq_c->timestep = split_freq.timestep; 
     298    CTimer::get("XIOS").suspend(); 
    275299  } 
    276300   
     
    310334   
    311335   
    312   void cxios_set_file_sync_freq(file_Ptr file_hdl, const char * sync_freq, int sync_freq_size) 
    313   { 
    314     std::string sync_freq_str; 
    315     if(!cstr2string(sync_freq, sync_freq_size, sync_freq_str)) return; 
    316      CTimer::get("XIOS").resume(); 
    317     file_hdl->sync_freq.setValue(sync_freq_str); 
    318      CTimer::get("XIOS").suspend(); 
    319   } 
    320    
    321   void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size) 
    322   { 
    323      CTimer::get("XIOS").resume(); 
    324     if(!string_copy(file_hdl->sync_freq.getInheritedValue(),sync_freq , sync_freq_size)) 
    325       ERROR("void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size)", <<"Input string is to short"); 
    326      CTimer::get("XIOS").suspend(); 
     336  void cxios_set_file_sync_freq(file_Ptr file_hdl, cxios_duration sync_freq_c) 
     337  { 
     338    CTimer::get("XIOS").resume(); 
     339    file_hdl->sync_freq.allocate(); 
     340    CDuration& sync_freq = file_hdl->sync_freq.get(); 
     341    sync_freq.year = sync_freq_c.year; 
     342    sync_freq.month = sync_freq_c.month; 
     343    sync_freq.day = sync_freq_c.day; 
     344    sync_freq.hour = sync_freq_c.hour; 
     345    sync_freq.minute = sync_freq_c.minute; 
     346    sync_freq.second = sync_freq_c.second; 
     347    sync_freq.timestep = sync_freq_c.timestep; 
     348    CTimer::get("XIOS").suspend(); 
     349  } 
     350   
     351  void cxios_get_file_sync_freq(file_Ptr file_hdl, cxios_duration* sync_freq_c) 
     352  { 
     353    CTimer::get("XIOS").resume(); 
     354    CDuration sync_freq = file_hdl->sync_freq.getInheritedValue(); 
     355    sync_freq_c->year = sync_freq.year; 
     356    sync_freq_c->month = sync_freq.month; 
     357    sync_freq_c->day = sync_freq.day; 
     358    sync_freq_c->hour = sync_freq.hour; 
     359    sync_freq_c->minute = sync_freq.minute; 
     360    sync_freq_c->second = sync_freq.second; 
     361    sync_freq_c->timestep = sync_freq.timestep; 
     362    CTimer::get("XIOS").suspend(); 
    327363  } 
    328364   
  • XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp

    r532 r538  
    211211   
    212212   
    213   void cxios_set_filegroup_output_freq(filegroup_Ptr filegroup_hdl, const char * output_freq, int output_freq_size) 
    214   { 
    215     std::string output_freq_str; 
    216     if(!cstr2string(output_freq, output_freq_size, output_freq_str)) return; 
    217      CTimer::get("XIOS").resume(); 
    218     filegroup_hdl->output_freq.setValue(output_freq_str); 
    219      CTimer::get("XIOS").suspend(); 
    220   } 
    221    
    222   void cxios_get_filegroup_output_freq(filegroup_Ptr filegroup_hdl, char * output_freq, int output_freq_size) 
    223   { 
    224      CTimer::get("XIOS").resume(); 
    225     if(!string_copy(filegroup_hdl->output_freq.getInheritedValue(),output_freq , output_freq_size)) 
    226       ERROR("void cxios_get_filegroup_output_freq(filegroup_Ptr filegroup_hdl, char * output_freq, int output_freq_size)", <<"Input string is to short"); 
    227      CTimer::get("XIOS").suspend(); 
     213  void cxios_set_filegroup_output_freq(filegroup_Ptr filegroup_hdl, cxios_duration output_freq_c) 
     214  { 
     215    CTimer::get("XIOS").resume(); 
     216    filegroup_hdl->output_freq.allocate(); 
     217    CDuration& output_freq = filegroup_hdl->output_freq.get(); 
     218    output_freq.year = output_freq_c.year; 
     219    output_freq.month = output_freq_c.month; 
     220    output_freq.day = output_freq_c.day; 
     221    output_freq.hour = output_freq_c.hour; 
     222    output_freq.minute = output_freq_c.minute; 
     223    output_freq.second = output_freq_c.second; 
     224    output_freq.timestep = output_freq_c.timestep; 
     225    CTimer::get("XIOS").suspend(); 
     226  } 
     227   
     228  void cxios_get_filegroup_output_freq(filegroup_Ptr filegroup_hdl, cxios_duration* output_freq_c) 
     229  { 
     230    CTimer::get("XIOS").resume(); 
     231    CDuration output_freq = filegroup_hdl->output_freq.getInheritedValue(); 
     232    output_freq_c->year = output_freq.year; 
     233    output_freq_c->month = output_freq.month; 
     234    output_freq_c->day = output_freq.day; 
     235    output_freq_c->hour = output_freq.hour; 
     236    output_freq_c->minute = output_freq.minute; 
     237    output_freq_c->second = output_freq.second; 
     238    output_freq_c->timestep = output_freq.timestep; 
     239    CTimer::get("XIOS").suspend(); 
    228240  } 
    229241   
     
    284296   
    285297   
    286   void cxios_set_filegroup_split_freq(filegroup_Ptr filegroup_hdl, const char * split_freq, int split_freq_size) 
    287   { 
    288     std::string split_freq_str; 
    289     if(!cstr2string(split_freq, split_freq_size, split_freq_str)) return; 
    290      CTimer::get("XIOS").resume(); 
    291     filegroup_hdl->split_freq.setValue(split_freq_str); 
    292      CTimer::get("XIOS").suspend(); 
    293   } 
    294    
    295   void cxios_get_filegroup_split_freq(filegroup_Ptr filegroup_hdl, char * split_freq, int split_freq_size) 
    296   { 
    297      CTimer::get("XIOS").resume(); 
    298     if(!string_copy(filegroup_hdl->split_freq.getInheritedValue(),split_freq , split_freq_size)) 
    299       ERROR("void cxios_get_filegroup_split_freq(filegroup_Ptr filegroup_hdl, char * split_freq, int split_freq_size)", <<"Input string is to short"); 
    300      CTimer::get("XIOS").suspend(); 
     298  void cxios_set_filegroup_split_freq(filegroup_Ptr filegroup_hdl, cxios_duration split_freq_c) 
     299  { 
     300    CTimer::get("XIOS").resume(); 
     301    filegroup_hdl->split_freq.allocate(); 
     302    CDuration& split_freq = filegroup_hdl->split_freq.get(); 
     303    split_freq.year = split_freq_c.year; 
     304    split_freq.month = split_freq_c.month; 
     305    split_freq.day = split_freq_c.day; 
     306    split_freq.hour = split_freq_c.hour; 
     307    split_freq.minute = split_freq_c.minute; 
     308    split_freq.second = split_freq_c.second; 
     309    split_freq.timestep = split_freq_c.timestep; 
     310    CTimer::get("XIOS").suspend(); 
     311  } 
     312   
     313  void cxios_get_filegroup_split_freq(filegroup_Ptr filegroup_hdl, cxios_duration* split_freq_c) 
     314  { 
     315    CTimer::get("XIOS").resume(); 
     316    CDuration split_freq = filegroup_hdl->split_freq.getInheritedValue(); 
     317    split_freq_c->year = split_freq.year; 
     318    split_freq_c->month = split_freq.month; 
     319    split_freq_c->day = split_freq.day; 
     320    split_freq_c->hour = split_freq.hour; 
     321    split_freq_c->minute = split_freq.minute; 
     322    split_freq_c->second = split_freq.second; 
     323    split_freq_c->timestep = split_freq.timestep; 
     324    CTimer::get("XIOS").suspend(); 
    301325  } 
    302326   
     
    336360   
    337361   
    338   void cxios_set_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, const char * sync_freq, int sync_freq_size) 
    339   { 
    340     std::string sync_freq_str; 
    341     if(!cstr2string(sync_freq, sync_freq_size, sync_freq_str)) return; 
    342      CTimer::get("XIOS").resume(); 
    343     filegroup_hdl->sync_freq.setValue(sync_freq_str); 
    344      CTimer::get("XIOS").suspend(); 
    345   } 
    346    
    347   void cxios_get_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, char * sync_freq, int sync_freq_size) 
    348   { 
    349      CTimer::get("XIOS").resume(); 
    350     if(!string_copy(filegroup_hdl->sync_freq.getInheritedValue(),sync_freq , sync_freq_size)) 
    351       ERROR("void cxios_get_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, char * sync_freq, int sync_freq_size)", <<"Input string is to short"); 
    352      CTimer::get("XIOS").suspend(); 
     362  void cxios_set_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, cxios_duration sync_freq_c) 
     363  { 
     364    CTimer::get("XIOS").resume(); 
     365    filegroup_hdl->sync_freq.allocate(); 
     366    CDuration& sync_freq = filegroup_hdl->sync_freq.get(); 
     367    sync_freq.year = sync_freq_c.year; 
     368    sync_freq.month = sync_freq_c.month; 
     369    sync_freq.day = sync_freq_c.day; 
     370    sync_freq.hour = sync_freq_c.hour; 
     371    sync_freq.minute = sync_freq_c.minute; 
     372    sync_freq.second = sync_freq_c.second; 
     373    sync_freq.timestep = sync_freq_c.timestep; 
     374    CTimer::get("XIOS").suspend(); 
     375  } 
     376   
     377  void cxios_get_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, cxios_duration* sync_freq_c) 
     378  { 
     379    CTimer::get("XIOS").resume(); 
     380    CDuration sync_freq = filegroup_hdl->sync_freq.getInheritedValue(); 
     381    sync_freq_c->year = sync_freq.year; 
     382    sync_freq_c->month = sync_freq.month; 
     383    sync_freq_c->day = sync_freq.day; 
     384    sync_freq_c->hour = sync_freq.hour; 
     385    sync_freq_c->minute = sync_freq.minute; 
     386    sync_freq_c->second = sync_freq.second; 
     387    sync_freq_c->timestep = sync_freq.timestep; 
     388    CTimer::get("XIOS").suspend(); 
    353389  } 
    354390   
  • XIOS/trunk/src/interface/fortran/ifield.F90

    r501 r538  
    77!   USE IFIELD_ATTR 
    88!   USE IFIELDGROUP_ATTR 
     9   USE IDATE 
    910    
    1011   TYPE txios(field) 
  • XIOS/trunk/src/interface/fortran/ifile.F90

    r501 r538  
    77!   USE IFILE_ATTR 
    88!   USE IFILEGROUP_ATTR 
     9   USE IDATE 
    910    
    1011   TYPE txios(file) 
  • XIOS/trunk/src/interface/fortran_attr/field_interface_attr.F90

    r532 r538  
    149149     
    150150     
    151     SUBROUTINE cxios_set_field_freq_offset(field_hdl, freq_offset, freq_offset_size) BIND(C) 
    152       USE ISO_C_BINDING 
    153       INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
    154       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: freq_offset 
    155       INTEGER  (kind = C_INT)     , VALUE        :: freq_offset_size 
     151    SUBROUTINE cxios_set_field_freq_offset(field_hdl, freq_offset) BIND(C) 
     152      USE ISO_C_BINDING 
     153      USE IDATE 
     154      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
     155      TYPE(txios(duration)), VALUE :: freq_offset 
    156156    END SUBROUTINE cxios_set_field_freq_offset 
    157157     
    158     SUBROUTINE cxios_get_field_freq_offset(field_hdl, freq_offset, freq_offset_size) BIND(C) 
    159       USE ISO_C_BINDING 
    160       INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
    161       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: freq_offset 
    162       INTEGER  (kind = C_INT)     , VALUE        :: freq_offset_size 
     158    SUBROUTINE cxios_get_field_freq_offset(field_hdl, freq_offset) BIND(C) 
     159      USE ISO_C_BINDING 
     160      USE IDATE 
     161      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
     162      TYPE(txios(duration)) :: freq_offset 
    163163    END SUBROUTINE cxios_get_field_freq_offset 
    164164     
     
    170170     
    171171     
    172     SUBROUTINE cxios_set_field_freq_op(field_hdl, freq_op, freq_op_size) BIND(C) 
    173       USE ISO_C_BINDING 
    174       INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
    175       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: freq_op 
    176       INTEGER  (kind = C_INT)     , VALUE        :: freq_op_size 
     172    SUBROUTINE cxios_set_field_freq_op(field_hdl, freq_op) BIND(C) 
     173      USE ISO_C_BINDING 
     174      USE IDATE 
     175      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
     176      TYPE(txios(duration)), VALUE :: freq_op 
    177177    END SUBROUTINE cxios_set_field_freq_op 
    178178     
    179     SUBROUTINE cxios_get_field_freq_op(field_hdl, freq_op, freq_op_size) BIND(C) 
    180       USE ISO_C_BINDING 
    181       INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
    182       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: freq_op 
    183       INTEGER  (kind = C_INT)     , VALUE        :: freq_op_size 
     179    SUBROUTINE cxios_get_field_freq_op(field_hdl, freq_op) BIND(C) 
     180      USE ISO_C_BINDING 
     181      USE IDATE 
     182      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
     183      TYPE(txios(duration)) :: freq_op 
    184184    END SUBROUTINE cxios_get_field_freq_op 
    185185     
  • XIOS/trunk/src/interface/fortran_attr/fieldgroup_interface_attr.F90

    r532 r538  
    149149     
    150150     
    151     SUBROUTINE cxios_set_fieldgroup_freq_offset(fieldgroup_hdl, freq_offset, freq_offset_size) BIND(C) 
    152       USE ISO_C_BINDING 
    153       INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
    154       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: freq_offset 
    155       INTEGER  (kind = C_INT)     , VALUE        :: freq_offset_size 
     151    SUBROUTINE cxios_set_fieldgroup_freq_offset(fieldgroup_hdl, freq_offset) BIND(C) 
     152      USE ISO_C_BINDING 
     153      USE IDATE 
     154      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
     155      TYPE(txios(duration)), VALUE :: freq_offset 
    156156    END SUBROUTINE cxios_set_fieldgroup_freq_offset 
    157157     
    158     SUBROUTINE cxios_get_fieldgroup_freq_offset(fieldgroup_hdl, freq_offset, freq_offset_size) BIND(C) 
    159       USE ISO_C_BINDING 
    160       INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
    161       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: freq_offset 
    162       INTEGER  (kind = C_INT)     , VALUE        :: freq_offset_size 
     158    SUBROUTINE cxios_get_fieldgroup_freq_offset(fieldgroup_hdl, freq_offset) BIND(C) 
     159      USE ISO_C_BINDING 
     160      USE IDATE 
     161      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
     162      TYPE(txios(duration)) :: freq_offset 
    163163    END SUBROUTINE cxios_get_fieldgroup_freq_offset 
    164164     
     
    170170     
    171171     
    172     SUBROUTINE cxios_set_fieldgroup_freq_op(fieldgroup_hdl, freq_op, freq_op_size) BIND(C) 
    173       USE ISO_C_BINDING 
    174       INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
    175       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: freq_op 
    176       INTEGER  (kind = C_INT)     , VALUE        :: freq_op_size 
     172    SUBROUTINE cxios_set_fieldgroup_freq_op(fieldgroup_hdl, freq_op) BIND(C) 
     173      USE ISO_C_BINDING 
     174      USE IDATE 
     175      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
     176      TYPE(txios(duration)), VALUE :: freq_op 
    177177    END SUBROUTINE cxios_set_fieldgroup_freq_op 
    178178     
    179     SUBROUTINE cxios_get_fieldgroup_freq_op(fieldgroup_hdl, freq_op, freq_op_size) BIND(C) 
    180       USE ISO_C_BINDING 
    181       INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
    182       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: freq_op 
    183       INTEGER  (kind = C_INT)     , VALUE        :: freq_op_size 
     179    SUBROUTINE cxios_get_fieldgroup_freq_op(fieldgroup_hdl, freq_op) BIND(C) 
     180      USE ISO_C_BINDING 
     181      USE IDATE 
     182      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
     183      TYPE(txios(duration)) :: freq_op 
    184184    END SUBROUTINE cxios_get_fieldgroup_freq_op 
    185185     
  • XIOS/trunk/src/interface/fortran_attr/file_interface_attr.F90

    r532 r538  
    151151     
    152152     
    153     SUBROUTINE cxios_set_file_output_freq(file_hdl, output_freq, output_freq_size) BIND(C) 
    154       USE ISO_C_BINDING 
    155       INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
    156       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: output_freq 
    157       INTEGER  (kind = C_INT)     , VALUE        :: output_freq_size 
     153    SUBROUTINE cxios_set_file_output_freq(file_hdl, output_freq) BIND(C) 
     154      USE ISO_C_BINDING 
     155      USE IDATE 
     156      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     157      TYPE(txios(duration)), VALUE :: output_freq 
    158158    END SUBROUTINE cxios_set_file_output_freq 
    159159     
    160     SUBROUTINE cxios_get_file_output_freq(file_hdl, output_freq, output_freq_size) BIND(C) 
    161       USE ISO_C_BINDING 
    162       INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
    163       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: output_freq 
    164       INTEGER  (kind = C_INT)     , VALUE        :: output_freq_size 
     160    SUBROUTINE cxios_get_file_output_freq(file_hdl, output_freq) BIND(C) 
     161      USE ISO_C_BINDING 
     162      USE IDATE 
     163      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     164      TYPE(txios(duration)) :: output_freq 
    165165    END SUBROUTINE cxios_get_file_output_freq 
    166166     
     
    212212     
    213213     
    214     SUBROUTINE cxios_set_file_split_freq(file_hdl, split_freq, split_freq_size) BIND(C) 
    215       USE ISO_C_BINDING 
    216       INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
    217       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: split_freq 
    218       INTEGER  (kind = C_INT)     , VALUE        :: split_freq_size 
     214    SUBROUTINE cxios_set_file_split_freq(file_hdl, split_freq) BIND(C) 
     215      USE ISO_C_BINDING 
     216      USE IDATE 
     217      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     218      TYPE(txios(duration)), VALUE :: split_freq 
    219219    END SUBROUTINE cxios_set_file_split_freq 
    220220     
    221     SUBROUTINE cxios_get_file_split_freq(file_hdl, split_freq, split_freq_size) BIND(C) 
    222       USE ISO_C_BINDING 
    223       INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
    224       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: split_freq 
    225       INTEGER  (kind = C_INT)     , VALUE        :: split_freq_size 
     221    SUBROUTINE cxios_get_file_split_freq(file_hdl, split_freq) BIND(C) 
     222      USE ISO_C_BINDING 
     223      USE IDATE 
     224      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     225      TYPE(txios(duration)) :: split_freq 
    226226    END SUBROUTINE cxios_get_file_split_freq 
    227227     
     
    254254     
    255255     
    256     SUBROUTINE cxios_set_file_sync_freq(file_hdl, sync_freq, sync_freq_size) BIND(C) 
    257       USE ISO_C_BINDING 
    258       INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
    259       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: sync_freq 
    260       INTEGER  (kind = C_INT)     , VALUE        :: sync_freq_size 
     256    SUBROUTINE cxios_set_file_sync_freq(file_hdl, sync_freq) BIND(C) 
     257      USE ISO_C_BINDING 
     258      USE IDATE 
     259      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     260      TYPE(txios(duration)), VALUE :: sync_freq 
    261261    END SUBROUTINE cxios_set_file_sync_freq 
    262262     
    263     SUBROUTINE cxios_get_file_sync_freq(file_hdl, sync_freq, sync_freq_size) BIND(C) 
    264       USE ISO_C_BINDING 
    265       INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
    266       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: sync_freq 
    267       INTEGER  (kind = C_INT)     , VALUE        :: sync_freq_size 
     263    SUBROUTINE cxios_get_file_sync_freq(file_hdl, sync_freq) BIND(C) 
     264      USE ISO_C_BINDING 
     265      USE IDATE 
     266      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     267      TYPE(txios(duration)) :: sync_freq 
    268268    END SUBROUTINE cxios_get_file_sync_freq 
    269269     
  • XIOS/trunk/src/interface/fortran_attr/filegroup_interface_attr.F90

    r532 r538  
    172172     
    173173     
    174     SUBROUTINE cxios_set_filegroup_output_freq(filegroup_hdl, output_freq, output_freq_size) BIND(C) 
    175       USE ISO_C_BINDING 
    176       INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
    177       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: output_freq 
    178       INTEGER  (kind = C_INT)     , VALUE        :: output_freq_size 
     174    SUBROUTINE cxios_set_filegroup_output_freq(filegroup_hdl, output_freq) BIND(C) 
     175      USE ISO_C_BINDING 
     176      USE IDATE 
     177      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     178      TYPE(txios(duration)), VALUE :: output_freq 
    179179    END SUBROUTINE cxios_set_filegroup_output_freq 
    180180     
    181     SUBROUTINE cxios_get_filegroup_output_freq(filegroup_hdl, output_freq, output_freq_size) BIND(C) 
    182       USE ISO_C_BINDING 
    183       INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
    184       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: output_freq 
    185       INTEGER  (kind = C_INT)     , VALUE        :: output_freq_size 
     181    SUBROUTINE cxios_get_filegroup_output_freq(filegroup_hdl, output_freq) BIND(C) 
     182      USE ISO_C_BINDING 
     183      USE IDATE 
     184      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     185      TYPE(txios(duration)) :: output_freq 
    186186    END SUBROUTINE cxios_get_filegroup_output_freq 
    187187     
     
    233233     
    234234     
    235     SUBROUTINE cxios_set_filegroup_split_freq(filegroup_hdl, split_freq, split_freq_size) BIND(C) 
    236       USE ISO_C_BINDING 
    237       INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
    238       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: split_freq 
    239       INTEGER  (kind = C_INT)     , VALUE        :: split_freq_size 
     235    SUBROUTINE cxios_set_filegroup_split_freq(filegroup_hdl, split_freq) BIND(C) 
     236      USE ISO_C_BINDING 
     237      USE IDATE 
     238      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     239      TYPE(txios(duration)), VALUE :: split_freq 
    240240    END SUBROUTINE cxios_set_filegroup_split_freq 
    241241     
    242     SUBROUTINE cxios_get_filegroup_split_freq(filegroup_hdl, split_freq, split_freq_size) BIND(C) 
    243       USE ISO_C_BINDING 
    244       INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
    245       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: split_freq 
    246       INTEGER  (kind = C_INT)     , VALUE        :: split_freq_size 
     242    SUBROUTINE cxios_get_filegroup_split_freq(filegroup_hdl, split_freq) BIND(C) 
     243      USE ISO_C_BINDING 
     244      USE IDATE 
     245      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     246      TYPE(txios(duration)) :: split_freq 
    247247    END SUBROUTINE cxios_get_filegroup_split_freq 
    248248     
     
    275275     
    276276     
    277     SUBROUTINE cxios_set_filegroup_sync_freq(filegroup_hdl, sync_freq, sync_freq_size) BIND(C) 
    278       USE ISO_C_BINDING 
    279       INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
    280       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: sync_freq 
    281       INTEGER  (kind = C_INT)     , VALUE        :: sync_freq_size 
     277    SUBROUTINE cxios_set_filegroup_sync_freq(filegroup_hdl, sync_freq) BIND(C) 
     278      USE ISO_C_BINDING 
     279      USE IDATE 
     280      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     281      TYPE(txios(duration)), VALUE :: sync_freq 
    282282    END SUBROUTINE cxios_set_filegroup_sync_freq 
    283283     
    284     SUBROUTINE cxios_get_filegroup_sync_freq(filegroup_hdl, sync_freq, sync_freq_size) BIND(C) 
    285       USE ISO_C_BINDING 
    286       INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
    287       CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: sync_freq 
    288       INTEGER  (kind = C_INT)     , VALUE        :: sync_freq_size 
     284    SUBROUTINE cxios_get_filegroup_sync_freq(filegroup_hdl, sync_freq) BIND(C) 
     285      USE ISO_C_BINDING 
     286      USE IDATE 
     287      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     288      TYPE(txios(duration)) :: sync_freq 
    289289    END SUBROUTINE cxios_get_filegroup_sync_freq 
    290290     
  • XIOS/trunk/src/interface/fortran_attr/ifield_attr.F90

    r501 r538  
    2828      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
    2929      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: field_ref 
    30       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: freq_offset 
    31       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: freq_op 
     30      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: freq_offset 
     31      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: freq_op 
    3232      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_ref 
    3333      INTEGER  , OPTIONAL, INTENT(IN) :: level 
     
    6666      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
    6767      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: field_ref 
    68       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: freq_offset 
    69       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: freq_op 
     68      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: freq_offset 
     69      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: freq_op 
    7070      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_ref 
    7171      INTEGER  , OPTIONAL, INTENT(IN) :: level 
     
    103103      LOGICAL (KIND=C_BOOL) :: enabled__tmp 
    104104      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: field_ref_ 
    105       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: freq_offset_ 
    106       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: freq_op_ 
     105      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: freq_offset_ 
     106      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: freq_op_ 
    107107      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_ref_ 
    108108      INTEGER  , OPTIONAL, INTENT(IN) :: level_ 
     
    148148       
    149149      IF (PRESENT(freq_offset_)) THEN 
    150         CALL cxios_set_field_freq_offset(field_hdl%daddr, freq_offset_, len(freq_offset_)) 
     150        CALL cxios_set_field_freq_offset(field_hdl%daddr, freq_offset_) 
    151151      ENDIF 
    152152       
    153153      IF (PRESENT(freq_op_)) THEN 
    154         CALL cxios_set_field_freq_op(field_hdl%daddr, freq_op_, len(freq_op_)) 
     154        CALL cxios_set_field_freq_op(field_hdl%daddr, freq_op_) 
    155155      ENDIF 
    156156       
     
    220220      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
    221221      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: field_ref 
    222       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: freq_offset 
    223       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: freq_op 
     222      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: freq_offset 
     223      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: freq_op 
    224224      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_ref 
    225225      INTEGER  , OPTIONAL, INTENT(OUT) :: level 
     
    258258      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
    259259      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: field_ref 
    260       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: freq_offset 
    261       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: freq_op 
     260      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: freq_offset 
     261      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: freq_op 
    262262      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_ref 
    263263      INTEGER  , OPTIONAL, INTENT(OUT) :: level 
     
    295295      LOGICAL (KIND=C_BOOL) :: enabled__tmp 
    296296      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: field_ref_ 
    297       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: freq_offset_ 
    298       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: freq_op_ 
     297      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: freq_offset_ 
     298      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: freq_op_ 
    299299      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_ref_ 
    300300      INTEGER  , OPTIONAL, INTENT(OUT) :: level_ 
     
    340340       
    341341      IF (PRESENT(freq_offset_)) THEN 
    342         CALL cxios_get_field_freq_offset(field_hdl%daddr, freq_offset_, len(freq_offset_)) 
     342        CALL cxios_get_field_freq_offset(field_hdl%daddr, freq_offset_) 
    343343      ENDIF 
    344344       
    345345      IF (PRESENT(freq_op_)) THEN 
    346         CALL cxios_get_field_freq_op(field_hdl%daddr, freq_op_, len(freq_op_)) 
     346        CALL cxios_get_field_freq_op(field_hdl%daddr, freq_op_) 
    347347      ENDIF 
    348348       
  • XIOS/trunk/src/interface/fortran_attr/ifieldgroup_attr.F90

    r501 r538  
    2828      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
    2929      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: field_ref 
    30       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: freq_offset 
    31       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: freq_op 
     30      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: freq_offset 
     31      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: freq_op 
    3232      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_ref 
    3333      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 
     
    6767      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
    6868      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: field_ref 
    69       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: freq_offset 
    70       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: freq_op 
     69      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: freq_offset 
     70      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: freq_op 
    7171      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_ref 
    7272      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 
     
    105105      LOGICAL (KIND=C_BOOL) :: enabled__tmp 
    106106      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: field_ref_ 
    107       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: freq_offset_ 
    108       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: freq_op_ 
     107      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: freq_offset_ 
     108      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: freq_op_ 
    109109      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_ref_ 
    110110      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_ 
     
    151151       
    152152      IF (PRESENT(freq_offset_)) THEN 
    153         CALL cxios_set_fieldgroup_freq_offset(fieldgroup_hdl%daddr, freq_offset_, len(freq_offset_)) 
     153        CALL cxios_set_fieldgroup_freq_offset(fieldgroup_hdl%daddr, freq_offset_) 
    154154      ENDIF 
    155155       
    156156      IF (PRESENT(freq_op_)) THEN 
    157         CALL cxios_set_fieldgroup_freq_op(fieldgroup_hdl%daddr, freq_op_, len(freq_op_)) 
     157        CALL cxios_set_fieldgroup_freq_op(fieldgroup_hdl%daddr, freq_op_) 
    158158      ENDIF 
    159159       
     
    227227      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
    228228      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: field_ref 
    229       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: freq_offset 
    230       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: freq_op 
     229      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: freq_offset 
     230      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: freq_op 
    231231      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_ref 
    232232      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 
     
    266266      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
    267267      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: field_ref 
    268       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: freq_offset 
    269       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: freq_op 
     268      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: freq_offset 
     269      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: freq_op 
    270270      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_ref 
    271271      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 
     
    304304      LOGICAL (KIND=C_BOOL) :: enabled__tmp 
    305305      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: field_ref_ 
    306       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: freq_offset_ 
    307       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: freq_op_ 
     306      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: freq_offset_ 
     307      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: freq_op_ 
    308308      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_ref_ 
    309309      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_ 
     
    350350       
    351351      IF (PRESENT(freq_offset_)) THEN 
    352         CALL cxios_get_fieldgroup_freq_offset(fieldgroup_hdl%daddr, freq_offset_, len(freq_offset_)) 
     352        CALL cxios_get_fieldgroup_freq_offset(fieldgroup_hdl%daddr, freq_offset_) 
    353353      ENDIF 
    354354       
    355355      IF (PRESENT(freq_op_)) THEN 
    356         CALL cxios_get_fieldgroup_freq_op(fieldgroup_hdl%daddr, freq_op_, len(freq_op_)) 
     356        CALL cxios_get_fieldgroup_freq_op(fieldgroup_hdl%daddr, freq_op_) 
    357357      ENDIF 
    358358       
  • XIOS/trunk/src/interface/fortran_attr/ifile_attr.F90

    r528 r538  
    2727      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    2828      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix 
    29       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_freq 
     29      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: output_freq 
    3030      INTEGER  , OPTIONAL, INTENT(IN) :: output_level 
    3131      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access 
    32       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq 
     32      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: split_freq 
    3333      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_format 
    34       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: sync_freq 
     34      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: sync_freq 
    3535      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type 
    3636       
     
    5757      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    5858      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix 
    59       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_freq 
     59      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: output_freq 
    6060      INTEGER  , OPTIONAL, INTENT(IN) :: output_level 
    6161      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access 
    62       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq 
     62      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: split_freq 
    6363      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_format 
    64       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: sync_freq 
     64      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: sync_freq 
    6565      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type 
    6666       
     
    8686      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 
    8787      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix_ 
    88       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_freq_ 
     88      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: output_freq_ 
    8989      INTEGER  , OPTIONAL, INTENT(IN) :: output_level_ 
    9090      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access_ 
    91       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_ 
     91      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: split_freq_ 
    9292      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_format_ 
    93       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: sync_freq_ 
     93      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: sync_freq_ 
    9494      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_ 
    9595       
     
    125125       
    126126      IF (PRESENT(output_freq_)) THEN 
    127         CALL cxios_set_file_output_freq(file_hdl%daddr, output_freq_, len(output_freq_)) 
     127        CALL cxios_set_file_output_freq(file_hdl%daddr, output_freq_) 
    128128      ENDIF 
    129129       
     
    137137       
    138138      IF (PRESENT(split_freq_)) THEN 
    139         CALL cxios_set_file_split_freq(file_hdl%daddr, split_freq_, len(split_freq_)) 
     139        CALL cxios_set_file_split_freq(file_hdl%daddr, split_freq_) 
    140140      ENDIF 
    141141       
     
    145145       
    146146      IF (PRESENT(sync_freq_)) THEN 
    147         CALL cxios_set_file_sync_freq(file_hdl%daddr, sync_freq_, len(sync_freq_)) 
     147        CALL cxios_set_file_sync_freq(file_hdl%daddr, sync_freq_) 
    148148      ENDIF 
    149149       
     
    172172      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    173173      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix 
    174       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_freq 
     174      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: output_freq 
    175175      INTEGER  , OPTIONAL, INTENT(OUT) :: output_level 
    176176      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access 
    177       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq 
     177      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: split_freq 
    178178      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_format 
    179       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: sync_freq 
     179      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: sync_freq 
    180180      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type 
    181181       
     
    202202      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    203203      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix 
    204       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_freq 
     204      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: output_freq 
    205205      INTEGER  , OPTIONAL, INTENT(OUT) :: output_level 
    206206      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access 
    207       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq 
     207      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: split_freq 
    208208      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_format 
    209       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: sync_freq 
     209      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: sync_freq 
    210210      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type 
    211211       
     
    231231      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 
    232232      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix_ 
    233       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_freq_ 
     233      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: output_freq_ 
    234234      INTEGER  , OPTIONAL, INTENT(OUT) :: output_level_ 
    235235      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access_ 
    236       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_ 
     236      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: split_freq_ 
    237237      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_format_ 
    238       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: sync_freq_ 
     238      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: sync_freq_ 
    239239      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_ 
    240240       
     
    270270       
    271271      IF (PRESENT(output_freq_)) THEN 
    272         CALL cxios_get_file_output_freq(file_hdl%daddr, output_freq_, len(output_freq_)) 
     272        CALL cxios_get_file_output_freq(file_hdl%daddr, output_freq_) 
    273273      ENDIF 
    274274       
     
    282282       
    283283      IF (PRESENT(split_freq_)) THEN 
    284         CALL cxios_get_file_split_freq(file_hdl%daddr, split_freq_, len(split_freq_)) 
     284        CALL cxios_get_file_split_freq(file_hdl%daddr, split_freq_) 
    285285      ENDIF 
    286286       
     
    290290       
    291291      IF (PRESENT(sync_freq_)) THEN 
    292         CALL cxios_get_file_sync_freq(file_hdl%daddr, sync_freq_, len(sync_freq_)) 
     292        CALL cxios_get_file_sync_freq(file_hdl%daddr, sync_freq_) 
    293293      ENDIF 
    294294       
  • XIOS/trunk/src/interface/fortran_attr/ifilegroup_attr.F90

    r528 r538  
    2828      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    2929      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix 
    30       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_freq 
     30      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: output_freq 
    3131      INTEGER  , OPTIONAL, INTENT(IN) :: output_level 
    3232      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access 
    33       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq 
     33      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: split_freq 
    3434      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_format 
    35       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: sync_freq 
     35      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: sync_freq 
    3636      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type 
    3737       
     
    5959      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    6060      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix 
    61       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_freq 
     61      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: output_freq 
    6262      INTEGER  , OPTIONAL, INTENT(IN) :: output_level 
    6363      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access 
    64       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq 
     64      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: split_freq 
    6565      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_format 
    66       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: sync_freq 
     66      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: sync_freq 
    6767      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type 
    6868       
     
    9090      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 
    9191      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix_ 
    92       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_freq_ 
     92      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: output_freq_ 
    9393      INTEGER  , OPTIONAL, INTENT(IN) :: output_level_ 
    9494      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access_ 
    95       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_ 
     95      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: split_freq_ 
    9696      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_format_ 
    97       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: sync_freq_ 
     97      TYPE(txios(duration)) , OPTIONAL, INTENT(IN) :: sync_freq_ 
    9898      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_ 
    9999       
     
    133133       
    134134      IF (PRESENT(output_freq_)) THEN 
    135         CALL cxios_set_filegroup_output_freq(filegroup_hdl%daddr, output_freq_, len(output_freq_)) 
     135        CALL cxios_set_filegroup_output_freq(filegroup_hdl%daddr, output_freq_) 
    136136      ENDIF 
    137137       
     
    145145       
    146146      IF (PRESENT(split_freq_)) THEN 
    147         CALL cxios_set_filegroup_split_freq(filegroup_hdl%daddr, split_freq_, len(split_freq_)) 
     147        CALL cxios_set_filegroup_split_freq(filegroup_hdl%daddr, split_freq_) 
    148148      ENDIF 
    149149       
     
    153153       
    154154      IF (PRESENT(sync_freq_)) THEN 
    155         CALL cxios_set_filegroup_sync_freq(filegroup_hdl%daddr, sync_freq_, len(sync_freq_)) 
     155        CALL cxios_set_filegroup_sync_freq(filegroup_hdl%daddr, sync_freq_) 
    156156      ENDIF 
    157157       
     
    181181      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    182182      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix 
    183       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_freq 
     183      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: output_freq 
    184184      INTEGER  , OPTIONAL, INTENT(OUT) :: output_level 
    185185      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access 
    186       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq 
     186      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: split_freq 
    187187      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_format 
    188       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: sync_freq 
     188      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: sync_freq 
    189189      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type 
    190190       
     
    212212      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    213213      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix 
    214       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_freq 
     214      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: output_freq 
    215215      INTEGER  , OPTIONAL, INTENT(OUT) :: output_level 
    216216      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access 
    217       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq 
     217      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: split_freq 
    218218      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_format 
    219       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: sync_freq 
     219      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: sync_freq 
    220220      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type 
    221221       
     
    243243      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 
    244244      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix_ 
    245       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_freq_ 
     245      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: output_freq_ 
    246246      INTEGER  , OPTIONAL, INTENT(OUT) :: output_level_ 
    247247      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access_ 
    248       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_ 
     248      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: split_freq_ 
    249249      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_format_ 
    250       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: sync_freq_ 
     250      TYPE(txios(duration)) , OPTIONAL, INTENT(OUT) :: sync_freq_ 
    251251      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_ 
    252252       
     
    286286       
    287287      IF (PRESENT(output_freq_)) THEN 
    288         CALL cxios_get_filegroup_output_freq(filegroup_hdl%daddr, output_freq_, len(output_freq_)) 
     288        CALL cxios_get_filegroup_output_freq(filegroup_hdl%daddr, output_freq_) 
    289289      ENDIF 
    290290       
     
    298298       
    299299      IF (PRESENT(split_freq_)) THEN 
    300         CALL cxios_get_filegroup_split_freq(filegroup_hdl%daddr, split_freq_, len(split_freq_)) 
     300        CALL cxios_get_filegroup_split_freq(filegroup_hdl%daddr, split_freq_) 
    301301      ENDIF 
    302302       
     
    306306       
    307307      IF (PRESENT(sync_freq_)) THEN 
    308         CALL cxios_get_filegroup_sync_freq(filegroup_hdl%daddr, sync_freq_, len(sync_freq_)) 
     308        CALL cxios_get_filegroup_sync_freq(filegroup_hdl%daddr, sync_freq_) 
    309309      ENDIF 
    310310       
  • XIOS/trunk/src/node/field.cpp

    r518 r538  
    518518      CContext* context = CContext::getCurrent(); 
    519519 
    520       if (freq_op.isEmpty()) freq_op=string("1ts") ; 
     520      if (freq_op.isEmpty()) freq_op.setValue(TimeStep); 
    521521 
    522522      if (operation.isEmpty() ) 
     
    527527      } 
    528528 
    529       CDuration freq_offset_ = NoneDu; 
    530       if (!freq_offset.isEmpty()) 
    531       { 
    532          freq_offset_ = CDuration::FromString(freq_offset.getValue()); 
    533       } 
    534       else 
    535       { 
    536          freq_offset.setValue(NoneDu.toString()); 
    537       } 
     529      if (freq_offset.isEmpty()) 
     530        freq_offset.setValue(NoneDu); 
    538531 
    539532//      if (CXIOSManager::GetStatus() == CXIOSManager::LOC_SERVER) 
     
    542535         if (hasOutputFile) 
    543536         { 
    544            this->freq_operation_srv =CDuration::FromString(this->file->output_freq.getValue()); 
    545            this->freq_write_srv = CDuration::FromString(this->file->output_freq.getValue()); 
     537           this->freq_operation_srv = this->file->output_freq.getValue(); 
     538           this->freq_write_srv = this->file->output_freq.getValue(); 
    546539         } 
    547          this->lastlast_Write_srv     = boost::shared_ptr<CDate> 
     540         this->lastlast_Write_srv = boost::shared_ptr<CDate> 
    548541                        (new CDate(context->getCalendar()->getInitDate())); 
    549542         this->last_Write_srv     = boost::shared_ptr<CDate> 
     
    556549         if (hasOutputFile) 
    557550         { 
    558            const CDuration toffset = this->freq_operation_srv - freq_offset_ - context->getCalendar()->getTimeStep(); 
     551           const CDuration toffset = this->freq_operation_srv - freq_offset.getValue() - context->getCalendar()->getTimeStep(); 
    559552           *this->last_operation_srv   = *this->last_operation_srv - toffset; 
    560553         } 
     
    563556//      if (context->hasClient) 
    564557//      { 
    565          this->freq_operation = CDuration::FromString(freq_op.getValue()); 
    566          if (hasOutputFile) this->freq_write     = CDuration::FromString(this->file->output_freq.getValue()); 
     558         this->freq_operation = freq_op.getValue(); 
     559         if (hasOutputFile) this->freq_write = this->file->output_freq.getValue(); 
    567560         if (hasFieldOut) 
    568561         { 
    569            this->freq_write = CDuration::FromString(this->fieldOut->freq_op.getValue()); 
     562           this->freq_write = this->fieldOut->freq_op.getValue(); 
    570563         } 
    571564         this->last_Write     = boost::shared_ptr<CDate> 
     
    574567                        (new CDate(context->getCalendar()->getInitDate())); 
    575568 
    576          const CDuration toffset = this->freq_operation - freq_offset_ - context->getCalendar()->getTimeStep(); 
     569         const CDuration toffset = this->freq_operation - freq_offset.getValue() - context->getCalendar()->getTimeStep(); 
    577570         *this->last_operation   = *this->last_operation - toffset; 
    578571 
  • XIOS/trunk/src/node/file.cpp

    r528 r538  
    189189     CContext* context = CContext::getCurrent() ; 
    190190     CDate& currentDate=context->calendar->getCurrentDate() ; 
    191      if (! sync_freq.isEmpty()) 
     191     if (!sync_freq.isEmpty()) 
    192192     { 
    193        if (*lastSync+syncFreq < currentDate) 
     193       if (*lastSync + sync_freq.getValue() < currentDate) 
    194194       { 
    195195         *lastSync=currentDate ; 
     
    207207      CContextServer* server=context->server ; 
    208208 
    209       if (! sync_freq.isEmpty()) syncFreq = CDuration::FromString(sync_freq.getValue()); 
    210       if (! split_freq.isEmpty()) splitFreq = CDuration::FromString(split_freq.getValue()); 
    211       if (! output_freq.isEmpty()) outputFreq = CDuration::FromString(output_freq.getValue()); 
    212209      lastSync=new CDate(currentDate) ; 
    213210      lastSplit=new CDate(currentDate) ; 
     
    253250     CContext* context = CContext::getCurrent() ; 
    254251     CDate& currentDate=context->calendar->getCurrentDate() ; 
    255      if (! sync_freq.isEmpty()) 
     252     if (!sync_freq.isEmpty()) 
    256253     { 
    257        if (*lastSync+syncFreq <= currentDate) 
     254       if (*lastSync + sync_freq.getValue() <= currentDate) 
    258255       { 
    259256         *lastSync=currentDate ; 
     
    275272      CContext* context = CContext::getCurrent() ; 
    276273      CDate& currentDate=context->calendar->getCurrentDate() ; 
    277       if (! split_freq.isEmpty()) 
     274      if (!split_freq.isEmpty()) 
    278275      { 
    279         if (currentDate > *lastSplit+splitFreq) 
     276        if (currentDate > *lastSplit + split_freq.getValue()) 
    280277        { 
    281           *lastSplit=*lastSplit+splitFreq ; 
     278          *lastSplit = *lastSplit + split_freq.getValue(); 
    282279          std::vector<CField*>::iterator it, end = this->enabledFields.end(); 
    283280          for (it = this->enabledFields.begin() ;it != end; it++)  (*it)->resetNStep() ; 
     
    304301         oss << filename; 
    305302         if (!name_suffix.isEmpty()) oss << name_suffix.getValue(); 
    306 //         if (!split_freq.isEmpty()) oss<<"_"<<lastSplit->getStryyyymmdd()<<"-"<< (*lastSplit+(splitFreq-1*Second)).getStryyyymmdd(); 
    307 //         if (!split_freq.isEmpty()) oss<<"_"<<lastSplit->getStr("%y_%mo_%d")<<"-"<< (*lastSplit+(splitFreq-1*Second)).getStr("%y_%mo_%d"); 
     303 
    308304         if (!split_freq.isEmpty()) 
    309305         { 
     
    311307           if (split_freq_format.isEmpty()) 
    312308           { 
    313              if (splitFreq.second!=0) splitFormat="%y%mo%d%h%mi%s"; 
    314              else if (splitFreq.minute!=0) splitFormat="%y%mo%d%h%mi"; 
    315              else if (splitFreq.hour!=0) splitFormat="%y%mo%d%h"; 
    316              else if (splitFreq.day!=0) splitFormat="%y%mo%d"; 
    317              else if (splitFreq.month!=0) splitFormat="%y%mo"; 
    318              else splitFormat="%y"; 
     309             if (split_freq.getValue().second != 0) splitFormat = "%y%mo%d%h%mi%s"; 
     310             else if (split_freq.getValue().minute != 0) splitFormat = "%y%mo%d%h%mi"; 
     311             else if (split_freq.getValue().hour != 0) splitFormat = "%y%mo%d%h"; 
     312             else if (split_freq.getValue().day != 0) splitFormat = "%y%mo%d"; 
     313             else if (split_freq.getValue().month != 0) splitFormat = "%y%mo"; 
     314             else splitFormat = "%y"; 
    319315           } 
    320316           else splitFormat=split_freq_format ; 
    321            oss<<"_"<<lastSplit->getStr(splitFormat)<<"-"<< (*lastSplit+(splitFreq-1*Second)).getStr(splitFormat); 
     317           oss << "_" << lastSplit->getStr(splitFormat) 
     318               << "-" << (*lastSplit + (split_freq.getValue() - 1 * Second)).getStr(splitFormat); 
    322319         } 
    323320 
  • XIOS/trunk/src/node/file.hpp

    r509 r538  
    150150         CDate* lastSync ; 
    151151         CDate* lastSplit ; 
    152          CDuration syncFreq ; 
    153          CDuration splitFreq ; 
    154          CDuration outputFreq ; 
    155152         int nbDomain ; 
    156153         bool isOpen ; 
  • XIOS/trunk/src/output/nc4_data_output.cpp

    r527 r538  
    712712           if (wtime) 
    713713           { 
    714               CDuration duration ; 
    715  
    716               duration=CDuration::FromString(field->freq_op) ; 
     714              CDuration duration = field->freq_op.getValue(); 
    717715              duration.solveTimeStep(*(context->calendar)); 
    718716              SuperClassWriter::addAttribute("interval_operation", duration.toString(), &fieldid); 
    719717 
    720               duration=CDuration::FromString(field->getRelFile()->output_freq) ; 
     718              duration = field->getRelFile()->output_freq.getValue(); 
    721719              duration.solveTimeStep(*(context->calendar)); 
    722720              SuperClassWriter::addAttribute("interval_write", duration.toString(), &fieldid); 
Note: See TracChangeset for help on using the changeset viewer.