Changeset 711


Ignore:
Timestamp:
09/29/15 14:17:42 (6 years ago)
Author:
rlacroix
Message:

Support creating the timeseries automatically.

Fields which should be outputted as timeseries must have the ts_enabled attribute set to true.

Files have a new attribute timeseries which must be one of:

  • none: no timeseries are outputted, only the regular file (default behavior when the attribute is ommited).
  • only: only the timeseries are outputted, the regular file is not created.
  • both: both the timeseries and the regular files are outputted.
  • exclusive: the timeseries are outputted and a regular file is created with only the fields which were not marked for output as a timeserie (if any).

The name of the files created for the timeseries is composed of a prefix followed by the name of the variable. The file attribute ts_prefix can be used to control the prefix used (by default, the name of the regular file is used).

All the attributes of the regular file are inherited by the files created for the timeseries. The field attribute ts_split_freq can be used to configure the splitting for each timeseries (by default, the splitting frequency of the regular file is used).

Location:
XIOS/trunk/src
Files:
16 edited

Legend:

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

    r676 r711  
    2828 
    2929DECLARE_ATTRIBUTE(int,       compression_level) 
     30 
     31DECLARE_ATTRIBUTE(bool,      ts_enabled) 
     32DECLARE_ATTRIBUTE(CDuration, ts_split_freq) 
  • XIOS/trunk/src/config/file_attribute.conf

    r692 r711  
    33 
    44DECLARE_ATTRIBUTE(StdString, name_suffix) 
    5 DECLARE_ATTRIBUTE(int, min_digits ) 
     5DECLARE_ATTRIBUTE(int,       min_digits ) 
    66 
    77DECLARE_ATTRIBUTE(CDuration, output_freq) 
     
    1111DECLARE_ATTRIBUTE(StdString, split_freq_format) 
    1212DECLARE_ATTRIBUTE(bool,      enabled) 
    13 DECLARE_ENUM2(type,one_file,multiple_file) 
    14 DECLARE_ENUM2(format, netcdf4, netcdf4_classic) 
    15 DECLARE_ENUM2(par_access, collective, independent) 
     13DECLARE_ENUM2(type,          one_file, multiple_file) 
     14DECLARE_ENUM2(format,        netcdf4, netcdf4_classic) 
     15DECLARE_ENUM2(par_access,    collective, independent) 
    1616DECLARE_ATTRIBUTE(bool,      append) 
    17 DECLARE_ENUM2(mode, read, write) 
    18 DECLARE_ENUM4(time_counter, centered, instant, record, none) 
     17DECLARE_ENUM2(mode,          read, write) 
     18DECLARE_ENUM4(time_counter,  centered, instant, record, none) 
    1919 
    2020DECLARE_ATTRIBUTE(int,       compression_level) 
     21 
     22DECLARE_ENUM4(timeseries,    none, only, both, exclusive) 
     23DECLARE_ATTRIBUTE(StdString, ts_prefix) 
  • XIOS/trunk/src/interface/c_attr/icfield_attr.cpp

    r676 r711  
    532532 
    533533 
     534  void cxios_set_field_ts_enabled(field_Ptr field_hdl, bool ts_enabled) 
     535  { 
     536    CTimer::get("XIOS").resume(); 
     537    field_hdl->ts_enabled.setValue(ts_enabled); 
     538    CTimer::get("XIOS").suspend(); 
     539  } 
     540 
     541  void cxios_get_field_ts_enabled(field_Ptr field_hdl, bool* ts_enabled) 
     542  { 
     543    CTimer::get("XIOS").resume(); 
     544    *ts_enabled = field_hdl->ts_enabled.getInheritedValue(); 
     545    CTimer::get("XIOS").suspend(); 
     546  } 
     547 
     548  bool cxios_is_defined_field_ts_enabled(field_Ptr field_hdl) 
     549  { 
     550     CTimer::get("XIOS").resume(); 
     551     bool isDefined = field_hdl->ts_enabled.hasInheritedValue(); 
     552     CTimer::get("XIOS").suspend(); 
     553     return isDefined; 
     554  } 
     555 
     556 
     557  void cxios_set_field_ts_split_freq(field_Ptr field_hdl, cxios_duration ts_split_freq_c) 
     558  { 
     559    CTimer::get("XIOS").resume(); 
     560    field_hdl->ts_split_freq.allocate(); 
     561    CDuration& ts_split_freq = field_hdl->ts_split_freq.get(); 
     562    ts_split_freq.year = ts_split_freq_c.year; 
     563    ts_split_freq.month = ts_split_freq_c.month; 
     564    ts_split_freq.day = ts_split_freq_c.day; 
     565    ts_split_freq.hour = ts_split_freq_c.hour; 
     566    ts_split_freq.minute = ts_split_freq_c.minute; 
     567    ts_split_freq.second = ts_split_freq_c.second; 
     568    ts_split_freq.timestep = ts_split_freq_c.timestep; 
     569    CTimer::get("XIOS").suspend(); 
     570  } 
     571 
     572  void cxios_get_field_ts_split_freq(field_Ptr field_hdl, cxios_duration* ts_split_freq_c) 
     573  { 
     574    CTimer::get("XIOS").resume(); 
     575    CDuration ts_split_freq = field_hdl->ts_split_freq.getInheritedValue(); 
     576    ts_split_freq_c->year = ts_split_freq.year; 
     577    ts_split_freq_c->month = ts_split_freq.month; 
     578    ts_split_freq_c->day = ts_split_freq.day; 
     579    ts_split_freq_c->hour = ts_split_freq.hour; 
     580    ts_split_freq_c->minute = ts_split_freq.minute; 
     581    ts_split_freq_c->second = ts_split_freq.second; 
     582    ts_split_freq_c->timestep = ts_split_freq.timestep; 
     583    CTimer::get("XIOS").suspend(); 
     584  } 
     585 
     586  bool cxios_is_defined_field_ts_split_freq(field_Ptr field_hdl) 
     587  { 
     588     CTimer::get("XIOS").resume(); 
     589     bool isDefined = field_hdl->ts_split_freq.hasInheritedValue(); 
     590     CTimer::get("XIOS").suspend(); 
     591     return isDefined; 
     592  } 
     593 
     594 
    534595  void cxios_set_field_unit(field_Ptr field_hdl, const char * unit, int unit_size) 
    535596  { 
  • XIOS/trunk/src/interface/c_attr/icfieldgroup_attr.cpp

    r676 r711  
    558558 
    559559 
     560  void cxios_set_fieldgroup_ts_enabled(fieldgroup_Ptr fieldgroup_hdl, bool ts_enabled) 
     561  { 
     562    CTimer::get("XIOS").resume(); 
     563    fieldgroup_hdl->ts_enabled.setValue(ts_enabled); 
     564    CTimer::get("XIOS").suspend(); 
     565  } 
     566 
     567  void cxios_get_fieldgroup_ts_enabled(fieldgroup_Ptr fieldgroup_hdl, bool* ts_enabled) 
     568  { 
     569    CTimer::get("XIOS").resume(); 
     570    *ts_enabled = fieldgroup_hdl->ts_enabled.getInheritedValue(); 
     571    CTimer::get("XIOS").suspend(); 
     572  } 
     573 
     574  bool cxios_is_defined_fieldgroup_ts_enabled(fieldgroup_Ptr fieldgroup_hdl) 
     575  { 
     576     CTimer::get("XIOS").resume(); 
     577     bool isDefined = fieldgroup_hdl->ts_enabled.hasInheritedValue(); 
     578     CTimer::get("XIOS").suspend(); 
     579     return isDefined; 
     580  } 
     581 
     582 
     583  void cxios_set_fieldgroup_ts_split_freq(fieldgroup_Ptr fieldgroup_hdl, cxios_duration ts_split_freq_c) 
     584  { 
     585    CTimer::get("XIOS").resume(); 
     586    fieldgroup_hdl->ts_split_freq.allocate(); 
     587    CDuration& ts_split_freq = fieldgroup_hdl->ts_split_freq.get(); 
     588    ts_split_freq.year = ts_split_freq_c.year; 
     589    ts_split_freq.month = ts_split_freq_c.month; 
     590    ts_split_freq.day = ts_split_freq_c.day; 
     591    ts_split_freq.hour = ts_split_freq_c.hour; 
     592    ts_split_freq.minute = ts_split_freq_c.minute; 
     593    ts_split_freq.second = ts_split_freq_c.second; 
     594    ts_split_freq.timestep = ts_split_freq_c.timestep; 
     595    CTimer::get("XIOS").suspend(); 
     596  } 
     597 
     598  void cxios_get_fieldgroup_ts_split_freq(fieldgroup_Ptr fieldgroup_hdl, cxios_duration* ts_split_freq_c) 
     599  { 
     600    CTimer::get("XIOS").resume(); 
     601    CDuration ts_split_freq = fieldgroup_hdl->ts_split_freq.getInheritedValue(); 
     602    ts_split_freq_c->year = ts_split_freq.year; 
     603    ts_split_freq_c->month = ts_split_freq.month; 
     604    ts_split_freq_c->day = ts_split_freq.day; 
     605    ts_split_freq_c->hour = ts_split_freq.hour; 
     606    ts_split_freq_c->minute = ts_split_freq.minute; 
     607    ts_split_freq_c->second = ts_split_freq.second; 
     608    ts_split_freq_c->timestep = ts_split_freq.timestep; 
     609    CTimer::get("XIOS").suspend(); 
     610  } 
     611 
     612  bool cxios_is_defined_fieldgroup_ts_split_freq(fieldgroup_Ptr fieldgroup_hdl) 
     613  { 
     614     CTimer::get("XIOS").resume(); 
     615     bool isDefined = fieldgroup_hdl->ts_split_freq.hasInheritedValue(); 
     616     CTimer::get("XIOS").suspend(); 
     617     return isDefined; 
     618  } 
     619 
     620 
    560621  void cxios_set_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, const char * unit, int unit_size) 
    561622  { 
  • XIOS/trunk/src/interface/c_attr/icfile_attr.cpp

    r699 r711  
    455455 
    456456 
     457  void cxios_set_file_timeseries(file_Ptr file_hdl, const char * timeseries, int timeseries_size) 
     458  { 
     459    std::string timeseries_str; 
     460    if (!cstr2string(timeseries, timeseries_size, timeseries_str)) return; 
     461    CTimer::get("XIOS").resume(); 
     462    file_hdl->timeseries.fromString(timeseries_str); 
     463    CTimer::get("XIOS").suspend(); 
     464  } 
     465 
     466  void cxios_get_file_timeseries(file_Ptr file_hdl, char * timeseries, int timeseries_size) 
     467  { 
     468    CTimer::get("XIOS").resume(); 
     469    if (!string_copy(file_hdl->timeseries.getInheritedStringValue(), timeseries, timeseries_size)) 
     470      ERROR("void cxios_get_file_timeseries(file_Ptr file_hdl, char * timeseries, int timeseries_size)", << "Input string is too short"); 
     471    CTimer::get("XIOS").suspend(); 
     472  } 
     473 
     474  bool cxios_is_defined_file_timeseries(file_Ptr file_hdl) 
     475  { 
     476     CTimer::get("XIOS").resume(); 
     477     bool isDefined = file_hdl->timeseries.hasInheritedValue(); 
     478     CTimer::get("XIOS").suspend(); 
     479     return isDefined; 
     480  } 
     481 
     482 
     483  void cxios_set_file_ts_prefix(file_Ptr file_hdl, const char * ts_prefix, int ts_prefix_size) 
     484  { 
     485    std::string ts_prefix_str; 
     486    if (!cstr2string(ts_prefix, ts_prefix_size, ts_prefix_str)) return; 
     487    CTimer::get("XIOS").resume(); 
     488    file_hdl->ts_prefix.setValue(ts_prefix_str); 
     489    CTimer::get("XIOS").suspend(); 
     490  } 
     491 
     492  void cxios_get_file_ts_prefix(file_Ptr file_hdl, char * ts_prefix, int ts_prefix_size) 
     493  { 
     494    CTimer::get("XIOS").resume(); 
     495    if (!string_copy(file_hdl->ts_prefix.getInheritedValue(), ts_prefix, ts_prefix_size)) 
     496      ERROR("void cxios_get_file_ts_prefix(file_Ptr file_hdl, char * ts_prefix, int ts_prefix_size)", << "Input string is too short"); 
     497    CTimer::get("XIOS").suspend(); 
     498  } 
     499 
     500  bool cxios_is_defined_file_ts_prefix(file_Ptr file_hdl) 
     501  { 
     502     CTimer::get("XIOS").resume(); 
     503     bool isDefined = file_hdl->ts_prefix.hasInheritedValue(); 
     504     CTimer::get("XIOS").suspend(); 
     505     return isDefined; 
     506  } 
     507 
     508 
    457509  void cxios_set_file_type(file_Ptr file_hdl, const char * type, int type_size) 
    458510  { 
  • XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp

    r699 r711  
    481481 
    482482 
     483  void cxios_set_filegroup_timeseries(filegroup_Ptr filegroup_hdl, const char * timeseries, int timeseries_size) 
     484  { 
     485    std::string timeseries_str; 
     486    if (!cstr2string(timeseries, timeseries_size, timeseries_str)) return; 
     487    CTimer::get("XIOS").resume(); 
     488    filegroup_hdl->timeseries.fromString(timeseries_str); 
     489    CTimer::get("XIOS").suspend(); 
     490  } 
     491 
     492  void cxios_get_filegroup_timeseries(filegroup_Ptr filegroup_hdl, char * timeseries, int timeseries_size) 
     493  { 
     494    CTimer::get("XIOS").resume(); 
     495    if (!string_copy(filegroup_hdl->timeseries.getInheritedStringValue(), timeseries, timeseries_size)) 
     496      ERROR("void cxios_get_filegroup_timeseries(filegroup_Ptr filegroup_hdl, char * timeseries, int timeseries_size)", << "Input string is too short"); 
     497    CTimer::get("XIOS").suspend(); 
     498  } 
     499 
     500  bool cxios_is_defined_filegroup_timeseries(filegroup_Ptr filegroup_hdl) 
     501  { 
     502     CTimer::get("XIOS").resume(); 
     503     bool isDefined = filegroup_hdl->timeseries.hasInheritedValue(); 
     504     CTimer::get("XIOS").suspend(); 
     505     return isDefined; 
     506  } 
     507 
     508 
     509  void cxios_set_filegroup_ts_prefix(filegroup_Ptr filegroup_hdl, const char * ts_prefix, int ts_prefix_size) 
     510  { 
     511    std::string ts_prefix_str; 
     512    if (!cstr2string(ts_prefix, ts_prefix_size, ts_prefix_str)) return; 
     513    CTimer::get("XIOS").resume(); 
     514    filegroup_hdl->ts_prefix.setValue(ts_prefix_str); 
     515    CTimer::get("XIOS").suspend(); 
     516  } 
     517 
     518  void cxios_get_filegroup_ts_prefix(filegroup_Ptr filegroup_hdl, char * ts_prefix, int ts_prefix_size) 
     519  { 
     520    CTimer::get("XIOS").resume(); 
     521    if (!string_copy(filegroup_hdl->ts_prefix.getInheritedValue(), ts_prefix, ts_prefix_size)) 
     522      ERROR("void cxios_get_filegroup_ts_prefix(filegroup_Ptr filegroup_hdl, char * ts_prefix, int ts_prefix_size)", << "Input string is too short"); 
     523    CTimer::get("XIOS").suspend(); 
     524  } 
     525 
     526  bool cxios_is_defined_filegroup_ts_prefix(filegroup_Ptr filegroup_hdl) 
     527  { 
     528     CTimer::get("XIOS").resume(); 
     529     bool isDefined = filegroup_hdl->ts_prefix.hasInheritedValue(); 
     530     CTimer::get("XIOS").suspend(); 
     531     return isDefined; 
     532  } 
     533 
     534 
    483535  void cxios_set_filegroup_type(filegroup_Ptr filegroup_hdl, const char * type, int type_size) 
    484536  { 
  • XIOS/trunk/src/interface/fortran_attr/field_interface_attr.F90

    r676 r711  
    410410 
    411411 
     412    SUBROUTINE cxios_set_field_ts_enabled(field_hdl, ts_enabled) BIND(C) 
     413      USE ISO_C_BINDING 
     414      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
     415      LOGICAL (KIND=C_BOOL)      , VALUE :: ts_enabled 
     416    END SUBROUTINE cxios_set_field_ts_enabled 
     417 
     418    SUBROUTINE cxios_get_field_ts_enabled(field_hdl, ts_enabled) BIND(C) 
     419      USE ISO_C_BINDING 
     420      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
     421      LOGICAL (KIND=C_BOOL)             :: ts_enabled 
     422    END SUBROUTINE cxios_get_field_ts_enabled 
     423 
     424    FUNCTION cxios_is_defined_field_ts_enabled(field_hdl) BIND(C) 
     425      USE ISO_C_BINDING 
     426      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_ts_enabled 
     427      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
     428    END FUNCTION cxios_is_defined_field_ts_enabled 
     429 
     430 
     431    SUBROUTINE cxios_set_field_ts_split_freq(field_hdl, ts_split_freq) BIND(C) 
     432      USE ISO_C_BINDING 
     433      USE IDURATION 
     434      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
     435      TYPE(txios(duration)), VALUE :: ts_split_freq 
     436    END SUBROUTINE cxios_set_field_ts_split_freq 
     437 
     438    SUBROUTINE cxios_get_field_ts_split_freq(field_hdl, ts_split_freq) BIND(C) 
     439      USE ISO_C_BINDING 
     440      USE IDURATION 
     441      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
     442      TYPE(txios(duration)) :: ts_split_freq 
     443    END SUBROUTINE cxios_get_field_ts_split_freq 
     444 
     445    FUNCTION cxios_is_defined_field_ts_split_freq(field_hdl) BIND(C) 
     446      USE ISO_C_BINDING 
     447      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_ts_split_freq 
     448      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
     449    END FUNCTION cxios_is_defined_field_ts_split_freq 
     450 
     451 
    412452    SUBROUTINE cxios_set_field_unit(field_hdl, unit, unit_size) BIND(C) 
    413453      USE ISO_C_BINDING 
  • XIOS/trunk/src/interface/fortran_attr/fieldgroup_interface_attr.F90

    r676 r711  
    431431 
    432432 
     433    SUBROUTINE cxios_set_fieldgroup_ts_enabled(fieldgroup_hdl, ts_enabled) BIND(C) 
     434      USE ISO_C_BINDING 
     435      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
     436      LOGICAL (KIND=C_BOOL)      , VALUE :: ts_enabled 
     437    END SUBROUTINE cxios_set_fieldgroup_ts_enabled 
     438 
     439    SUBROUTINE cxios_get_fieldgroup_ts_enabled(fieldgroup_hdl, ts_enabled) BIND(C) 
     440      USE ISO_C_BINDING 
     441      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
     442      LOGICAL (KIND=C_BOOL)             :: ts_enabled 
     443    END SUBROUTINE cxios_get_fieldgroup_ts_enabled 
     444 
     445    FUNCTION cxios_is_defined_fieldgroup_ts_enabled(fieldgroup_hdl) BIND(C) 
     446      USE ISO_C_BINDING 
     447      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_ts_enabled 
     448      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
     449    END FUNCTION cxios_is_defined_fieldgroup_ts_enabled 
     450 
     451 
     452    SUBROUTINE cxios_set_fieldgroup_ts_split_freq(fieldgroup_hdl, ts_split_freq) BIND(C) 
     453      USE ISO_C_BINDING 
     454      USE IDURATION 
     455      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
     456      TYPE(txios(duration)), VALUE :: ts_split_freq 
     457    END SUBROUTINE cxios_set_fieldgroup_ts_split_freq 
     458 
     459    SUBROUTINE cxios_get_fieldgroup_ts_split_freq(fieldgroup_hdl, ts_split_freq) BIND(C) 
     460      USE ISO_C_BINDING 
     461      USE IDURATION 
     462      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
     463      TYPE(txios(duration)) :: ts_split_freq 
     464    END SUBROUTINE cxios_get_fieldgroup_ts_split_freq 
     465 
     466    FUNCTION cxios_is_defined_fieldgroup_ts_split_freq(fieldgroup_hdl) BIND(C) 
     467      USE ISO_C_BINDING 
     468      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_ts_split_freq 
     469      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
     470    END FUNCTION cxios_is_defined_fieldgroup_ts_split_freq 
     471 
     472 
    433473    SUBROUTINE cxios_set_fieldgroup_unit(fieldgroup_hdl, unit, unit_size) BIND(C) 
    434474      USE ISO_C_BINDING 
  • XIOS/trunk/src/interface/fortran_attr/file_interface_attr.F90

    r699 r711  
    336336 
    337337 
     338    SUBROUTINE cxios_set_file_timeseries(file_hdl, timeseries, timeseries_size) BIND(C) 
     339      USE ISO_C_BINDING 
     340      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     341      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: timeseries 
     342      INTEGER  (kind = C_INT)     , VALUE        :: timeseries_size 
     343    END SUBROUTINE cxios_set_file_timeseries 
     344 
     345    SUBROUTINE cxios_get_file_timeseries(file_hdl, timeseries, timeseries_size) BIND(C) 
     346      USE ISO_C_BINDING 
     347      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     348      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: timeseries 
     349      INTEGER  (kind = C_INT)     , VALUE        :: timeseries_size 
     350    END SUBROUTINE cxios_get_file_timeseries 
     351 
     352    FUNCTION cxios_is_defined_file_timeseries(file_hdl) BIND(C) 
     353      USE ISO_C_BINDING 
     354      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_timeseries 
     355      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     356    END FUNCTION cxios_is_defined_file_timeseries 
     357 
     358 
     359    SUBROUTINE cxios_set_file_ts_prefix(file_hdl, ts_prefix, ts_prefix_size) BIND(C) 
     360      USE ISO_C_BINDING 
     361      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     362      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: ts_prefix 
     363      INTEGER  (kind = C_INT)     , VALUE        :: ts_prefix_size 
     364    END SUBROUTINE cxios_set_file_ts_prefix 
     365 
     366    SUBROUTINE cxios_get_file_ts_prefix(file_hdl, ts_prefix, ts_prefix_size) BIND(C) 
     367      USE ISO_C_BINDING 
     368      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     369      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: ts_prefix 
     370      INTEGER  (kind = C_INT)     , VALUE        :: ts_prefix_size 
     371    END SUBROUTINE cxios_get_file_ts_prefix 
     372 
     373    FUNCTION cxios_is_defined_file_ts_prefix(file_hdl) BIND(C) 
     374      USE ISO_C_BINDING 
     375      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_ts_prefix 
     376      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     377    END FUNCTION cxios_is_defined_file_ts_prefix 
     378 
     379 
    338380    SUBROUTINE cxios_set_file_type(file_hdl, type, type_size) BIND(C) 
    339381      USE ISO_C_BINDING 
  • XIOS/trunk/src/interface/fortran_attr/filegroup_interface_attr.F90

    r699 r711  
    357357 
    358358 
     359    SUBROUTINE cxios_set_filegroup_timeseries(filegroup_hdl, timeseries, timeseries_size) BIND(C) 
     360      USE ISO_C_BINDING 
     361      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     362      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: timeseries 
     363      INTEGER  (kind = C_INT)     , VALUE        :: timeseries_size 
     364    END SUBROUTINE cxios_set_filegroup_timeseries 
     365 
     366    SUBROUTINE cxios_get_filegroup_timeseries(filegroup_hdl, timeseries, timeseries_size) BIND(C) 
     367      USE ISO_C_BINDING 
     368      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     369      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: timeseries 
     370      INTEGER  (kind = C_INT)     , VALUE        :: timeseries_size 
     371    END SUBROUTINE cxios_get_filegroup_timeseries 
     372 
     373    FUNCTION cxios_is_defined_filegroup_timeseries(filegroup_hdl) BIND(C) 
     374      USE ISO_C_BINDING 
     375      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_timeseries 
     376      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     377    END FUNCTION cxios_is_defined_filegroup_timeseries 
     378 
     379 
     380    SUBROUTINE cxios_set_filegroup_ts_prefix(filegroup_hdl, ts_prefix, ts_prefix_size) BIND(C) 
     381      USE ISO_C_BINDING 
     382      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     383      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: ts_prefix 
     384      INTEGER  (kind = C_INT)     , VALUE        :: ts_prefix_size 
     385    END SUBROUTINE cxios_set_filegroup_ts_prefix 
     386 
     387    SUBROUTINE cxios_get_filegroup_ts_prefix(filegroup_hdl, ts_prefix, ts_prefix_size) BIND(C) 
     388      USE ISO_C_BINDING 
     389      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     390      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: ts_prefix 
     391      INTEGER  (kind = C_INT)     , VALUE        :: ts_prefix_size 
     392    END SUBROUTINE cxios_get_filegroup_ts_prefix 
     393 
     394    FUNCTION cxios_is_defined_filegroup_ts_prefix(filegroup_hdl) BIND(C) 
     395      USE ISO_C_BINDING 
     396      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_ts_prefix 
     397      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     398    END FUNCTION cxios_is_defined_filegroup_ts_prefix 
     399 
     400 
    359401    SUBROUTINE cxios_set_filegroup_type(filegroup_hdl, type, type_size) BIND(C) 
    360402      USE ISO_C_BINDING 
  • XIOS/trunk/src/interface/fortran_attr/ifield_attr.F90

    r676 r711  
    1414    ( field_id, add_offset, axis_ref, compression_level, default_value, detect_missing_value, domain_ref  & 
    1515    , enabled, field_ref, freq_offset, freq_op, grid_ref, indexed_output, level, long_name, name  & 
    16     , operation, prec, read_access, scale_factor, standard_name, unit, valid_max, valid_min ) 
     16    , operation, prec, read_access, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  & 
     17    , valid_max, valid_min ) 
    1718 
    1819    IMPLICIT NONE 
     
    4344      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: scale_factor 
    4445      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 
     46      LOGICAL  , OPTIONAL, INTENT(IN) :: ts_enabled 
     47      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp 
     48      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: ts_split_freq 
    4549      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit 
    4650      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_max 
     
    5155      ( field_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value, domain_ref  & 
    5256      , enabled, field_ref, freq_offset, freq_op, grid_ref, indexed_output, level, long_name, name  & 
    53       , operation, prec, read_access, scale_factor, standard_name, unit, valid_max, valid_min ) 
     57      , operation, prec, read_access, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  & 
     58      , valid_max, valid_min ) 
    5459 
    5560  END SUBROUTINE xios(set_field_attr) 
     
    5863    ( field_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value, domain_ref  & 
    5964    , enabled, field_ref, freq_offset, freq_op, grid_ref, indexed_output, level, long_name, name  & 
    60     , operation, prec, read_access, scale_factor, standard_name, unit, valid_max, valid_min ) 
     65    , operation, prec, read_access, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  & 
     66    , valid_max, valid_min ) 
    6167 
    6268    IMPLICIT NONE 
     
    8692      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: scale_factor 
    8793      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 
     94      LOGICAL  , OPTIONAL, INTENT(IN) :: ts_enabled 
     95      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp 
     96      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: ts_split_freq 
    8897      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit 
    8998      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_max 
     
    93102      ( field_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value, domain_ref  & 
    94103      , enabled, field_ref, freq_offset, freq_op, grid_ref, indexed_output, level, long_name, name  & 
    95       , operation, prec, read_access, scale_factor, standard_name, unit, valid_max, valid_min ) 
     104      , operation, prec, read_access, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  & 
     105      , valid_max, valid_min ) 
    96106 
    97107  END SUBROUTINE xios(set_field_attr_hdl) 
     
    100110    ( field_hdl, add_offset_, axis_ref_, compression_level_, default_value_, detect_missing_value_  & 
    101111    , domain_ref_, enabled_, field_ref_, freq_offset_, freq_op_, grid_ref_, indexed_output_, level_  & 
    102     , long_name_, name_, operation_, prec_, read_access_, scale_factor_, standard_name_, unit_, valid_max_  & 
    103     , valid_min_ ) 
     112    , long_name_, name_, operation_, prec_, read_access_, scale_factor_, standard_name_, ts_enabled_  & 
     113    , ts_split_freq_, unit_, valid_max_, valid_min_ ) 
    104114 
    105115    IMPLICIT NONE 
     
    129139      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: scale_factor_ 
    130140      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_ 
     141      LOGICAL  , OPTIONAL, INTENT(IN) :: ts_enabled_ 
     142      LOGICAL (KIND=C_BOOL) :: ts_enabled__tmp 
     143      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: ts_split_freq_ 
    131144      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit_ 
    132145      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_max_ 
     
    217230      ENDIF 
    218231 
     232      IF (PRESENT(ts_enabled_)) THEN 
     233        ts_enabled__tmp = ts_enabled_ 
     234        CALL cxios_set_field_ts_enabled(field_hdl%daddr, ts_enabled__tmp) 
     235      ENDIF 
     236 
     237      IF (PRESENT(ts_split_freq_)) THEN 
     238        CALL cxios_set_field_ts_split_freq(field_hdl%daddr, ts_split_freq_) 
     239      ENDIF 
     240 
    219241      IF (PRESENT(unit_)) THEN 
    220242        CALL cxios_set_field_unit(field_hdl%daddr, unit_, len(unit_)) 
     
    234256    ( field_id, add_offset, axis_ref, compression_level, default_value, detect_missing_value, domain_ref  & 
    235257    , enabled, field_ref, freq_offset, freq_op, grid_ref, indexed_output, level, long_name, name  & 
    236     , operation, prec, read_access, scale_factor, standard_name, unit, valid_max, valid_min ) 
     258    , operation, prec, read_access, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  & 
     259    , valid_max, valid_min ) 
    237260 
    238261    IMPLICIT NONE 
     
    263286      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: scale_factor 
    264287      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 
     288      LOGICAL  , OPTIONAL, INTENT(OUT) :: ts_enabled 
     289      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp 
     290      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: ts_split_freq 
    265291      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit 
    266292      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_max 
     
    271297      ( field_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value, domain_ref  & 
    272298      , enabled, field_ref, freq_offset, freq_op, grid_ref, indexed_output, level, long_name, name  & 
    273       , operation, prec, read_access, scale_factor, standard_name, unit, valid_max, valid_min ) 
     299      , operation, prec, read_access, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  & 
     300      , valid_max, valid_min ) 
    274301 
    275302  END SUBROUTINE xios(get_field_attr) 
     
    278305    ( field_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value, domain_ref  & 
    279306    , enabled, field_ref, freq_offset, freq_op, grid_ref, indexed_output, level, long_name, name  & 
    280     , operation, prec, read_access, scale_factor, standard_name, unit, valid_max, valid_min ) 
     307    , operation, prec, read_access, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  & 
     308    , valid_max, valid_min ) 
    281309 
    282310    IMPLICIT NONE 
     
    306334      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: scale_factor 
    307335      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 
     336      LOGICAL  , OPTIONAL, INTENT(OUT) :: ts_enabled 
     337      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp 
     338      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: ts_split_freq 
    308339      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit 
    309340      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_max 
     
    313344      ( field_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value, domain_ref  & 
    314345      , enabled, field_ref, freq_offset, freq_op, grid_ref, indexed_output, level, long_name, name  & 
    315       , operation, prec, read_access, scale_factor, standard_name, unit, valid_max, valid_min ) 
     346      , operation, prec, read_access, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  & 
     347      , valid_max, valid_min ) 
    316348 
    317349  END SUBROUTINE xios(get_field_attr_hdl) 
     
    320352    ( field_hdl, add_offset_, axis_ref_, compression_level_, default_value_, detect_missing_value_  & 
    321353    , domain_ref_, enabled_, field_ref_, freq_offset_, freq_op_, grid_ref_, indexed_output_, level_  & 
    322     , long_name_, name_, operation_, prec_, read_access_, scale_factor_, standard_name_, unit_, valid_max_  & 
    323     , valid_min_ ) 
     354    , long_name_, name_, operation_, prec_, read_access_, scale_factor_, standard_name_, ts_enabled_  & 
     355    , ts_split_freq_, unit_, valid_max_, valid_min_ ) 
    324356 
    325357    IMPLICIT NONE 
     
    349381      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: scale_factor_ 
    350382      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_ 
     383      LOGICAL  , OPTIONAL, INTENT(OUT) :: ts_enabled_ 
     384      LOGICAL (KIND=C_BOOL) :: ts_enabled__tmp 
     385      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: ts_split_freq_ 
    351386      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit_ 
    352387      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_max_ 
     
    437472      ENDIF 
    438473 
     474      IF (PRESENT(ts_enabled_)) THEN 
     475        CALL cxios_get_field_ts_enabled(field_hdl%daddr, ts_enabled__tmp) 
     476        ts_enabled_ = ts_enabled__tmp 
     477      ENDIF 
     478 
     479      IF (PRESENT(ts_split_freq_)) THEN 
     480        CALL cxios_get_field_ts_split_freq(field_hdl%daddr, ts_split_freq_) 
     481      ENDIF 
     482 
    439483      IF (PRESENT(unit_)) THEN 
    440484        CALL cxios_get_field_unit(field_hdl%daddr, unit_, len(unit_)) 
     
    454498    ( field_id, add_offset, axis_ref, compression_level, default_value, detect_missing_value, domain_ref  & 
    455499    , enabled, field_ref, freq_offset, freq_op, grid_ref, indexed_output, level, long_name, name  & 
    456     , operation, prec, read_access, scale_factor, standard_name, unit, valid_max, valid_min ) 
     500    , operation, prec, read_access, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  & 
     501    , valid_max, valid_min ) 
    457502 
    458503    IMPLICIT NONE 
     
    499544      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name 
    500545      LOGICAL(KIND=C_BOOL) :: standard_name_tmp 
     546      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_enabled 
     547      LOGICAL(KIND=C_BOOL) :: ts_enabled_tmp 
     548      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_split_freq 
     549      LOGICAL(KIND=C_BOOL) :: ts_split_freq_tmp 
    501550      LOGICAL, OPTIONAL, INTENT(OUT) :: unit 
    502551      LOGICAL(KIND=C_BOOL) :: unit_tmp 
     
    510559      ( field_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value, domain_ref  & 
    511560      , enabled, field_ref, freq_offset, freq_op, grid_ref, indexed_output, level, long_name, name  & 
    512       , operation, prec, read_access, scale_factor, standard_name, unit, valid_max, valid_min ) 
     561      , operation, prec, read_access, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  & 
     562      , valid_max, valid_min ) 
    513563 
    514564  END SUBROUTINE xios(is_defined_field_attr) 
     
    517567    ( field_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value, domain_ref  & 
    518568    , enabled, field_ref, freq_offset, freq_op, grid_ref, indexed_output, level, long_name, name  & 
    519     , operation, prec, read_access, scale_factor, standard_name, unit, valid_max, valid_min ) 
     569    , operation, prec, read_access, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  & 
     570    , valid_max, valid_min ) 
    520571 
    521572    IMPLICIT NONE 
     
    561612      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name 
    562613      LOGICAL(KIND=C_BOOL) :: standard_name_tmp 
     614      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_enabled 
     615      LOGICAL(KIND=C_BOOL) :: ts_enabled_tmp 
     616      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_split_freq 
     617      LOGICAL(KIND=C_BOOL) :: ts_split_freq_tmp 
    563618      LOGICAL, OPTIONAL, INTENT(OUT) :: unit 
    564619      LOGICAL(KIND=C_BOOL) :: unit_tmp 
     
    571626      ( field_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value, domain_ref  & 
    572627      , enabled, field_ref, freq_offset, freq_op, grid_ref, indexed_output, level, long_name, name  & 
    573       , operation, prec, read_access, scale_factor, standard_name, unit, valid_max, valid_min ) 
     628      , operation, prec, read_access, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  & 
     629      , valid_max, valid_min ) 
    574630 
    575631  END SUBROUTINE xios(is_defined_field_attr_hdl) 
     
    578634    ( field_hdl, add_offset_, axis_ref_, compression_level_, default_value_, detect_missing_value_  & 
    579635    , domain_ref_, enabled_, field_ref_, freq_offset_, freq_op_, grid_ref_, indexed_output_, level_  & 
    580     , long_name_, name_, operation_, prec_, read_access_, scale_factor_, standard_name_, unit_, valid_max_  & 
    581     , valid_min_ ) 
     636    , long_name_, name_, operation_, prec_, read_access_, scale_factor_, standard_name_, ts_enabled_  & 
     637    , ts_split_freq_, unit_, valid_max_, valid_min_ ) 
    582638 
    583639    IMPLICIT NONE 
     
    623679      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name_ 
    624680      LOGICAL(KIND=C_BOOL) :: standard_name__tmp 
     681      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_enabled_ 
     682      LOGICAL(KIND=C_BOOL) :: ts_enabled__tmp 
     683      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_split_freq_ 
     684      LOGICAL(KIND=C_BOOL) :: ts_split_freq__tmp 
    625685      LOGICAL, OPTIONAL, INTENT(OUT) :: unit_ 
    626686      LOGICAL(KIND=C_BOOL) :: unit__tmp 
     
    730790      ENDIF 
    731791 
     792      IF (PRESENT(ts_enabled_)) THEN 
     793        ts_enabled__tmp = cxios_is_defined_field_ts_enabled(field_hdl%daddr) 
     794        ts_enabled_ = ts_enabled__tmp 
     795      ENDIF 
     796 
     797      IF (PRESENT(ts_split_freq_)) THEN 
     798        ts_split_freq__tmp = cxios_is_defined_field_ts_split_freq(field_hdl%daddr) 
     799        ts_split_freq_ = ts_split_freq__tmp 
     800      ENDIF 
     801 
    732802      IF (PRESENT(unit_)) THEN 
    733803        unit__tmp = cxios_is_defined_field_unit(field_hdl%daddr) 
  • XIOS/trunk/src/interface/fortran_attr/ifieldgroup_attr.F90

    r676 r711  
    1414    ( fieldgroup_id, add_offset, axis_ref, compression_level, default_value, detect_missing_value  & 
    1515    , domain_ref, enabled, field_ref, freq_offset, freq_op, grid_ref, group_ref, indexed_output  & 
    16     , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, unit, valid_max  & 
    17     , valid_min ) 
     16    , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, ts_enabled  & 
     17    , ts_split_freq, unit, valid_max, valid_min ) 
    1818 
    1919    IMPLICIT NONE 
     
    4545      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: scale_factor 
    4646      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 
     47      LOGICAL  , OPTIONAL, INTENT(IN) :: ts_enabled 
     48      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp 
     49      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: ts_split_freq 
    4750      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit 
    4851      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_max 
     
    5356      ( fieldgroup_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value  & 
    5457      , domain_ref, enabled, field_ref, freq_offset, freq_op, grid_ref, group_ref, indexed_output  & 
    55       , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, unit, valid_max  & 
    56       , valid_min ) 
     58      , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, ts_enabled  & 
     59      , ts_split_freq, unit, valid_max, valid_min ) 
    5760 
    5861  END SUBROUTINE xios(set_fieldgroup_attr) 
     
    6164    ( fieldgroup_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value  & 
    6265    , domain_ref, enabled, field_ref, freq_offset, freq_op, grid_ref, group_ref, indexed_output  & 
    63     , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, unit, valid_max  & 
    64     , valid_min ) 
     66    , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, ts_enabled  & 
     67    , ts_split_freq, unit, valid_max, valid_min ) 
    6568 
    6669    IMPLICIT NONE 
     
    9194      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: scale_factor 
    9295      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 
     96      LOGICAL  , OPTIONAL, INTENT(IN) :: ts_enabled 
     97      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp 
     98      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: ts_split_freq 
    9399      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit 
    94100      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_max 
     
    98104      ( fieldgroup_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value  & 
    99105      , domain_ref, enabled, field_ref, freq_offset, freq_op, grid_ref, group_ref, indexed_output  & 
    100       , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, unit, valid_max  & 
    101       , valid_min ) 
     106      , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, ts_enabled  & 
     107      , ts_split_freq, unit, valid_max, valid_min ) 
    102108 
    103109  END SUBROUTINE xios(set_fieldgroup_attr_hdl) 
     
    107113    , domain_ref_, enabled_, field_ref_, freq_offset_, freq_op_, grid_ref_, group_ref_, indexed_output_  & 
    108114    , level_, long_name_, name_, operation_, prec_, read_access_, scale_factor_, standard_name_  & 
    109     , unit_, valid_max_, valid_min_ ) 
     115    , ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_ ) 
    110116 
    111117    IMPLICIT NONE 
     
    136142      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: scale_factor_ 
    137143      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_ 
     144      LOGICAL  , OPTIONAL, INTENT(IN) :: ts_enabled_ 
     145      LOGICAL (KIND=C_BOOL) :: ts_enabled__tmp 
     146      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: ts_split_freq_ 
    138147      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit_ 
    139148      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_max_ 
     
    228237      ENDIF 
    229238 
     239      IF (PRESENT(ts_enabled_)) THEN 
     240        ts_enabled__tmp = ts_enabled_ 
     241        CALL cxios_set_fieldgroup_ts_enabled(fieldgroup_hdl%daddr, ts_enabled__tmp) 
     242      ENDIF 
     243 
     244      IF (PRESENT(ts_split_freq_)) THEN 
     245        CALL cxios_set_fieldgroup_ts_split_freq(fieldgroup_hdl%daddr, ts_split_freq_) 
     246      ENDIF 
     247 
    230248      IF (PRESENT(unit_)) THEN 
    231249        CALL cxios_set_fieldgroup_unit(fieldgroup_hdl%daddr, unit_, len(unit_)) 
     
    245263    ( fieldgroup_id, add_offset, axis_ref, compression_level, default_value, detect_missing_value  & 
    246264    , domain_ref, enabled, field_ref, freq_offset, freq_op, grid_ref, group_ref, indexed_output  & 
    247     , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, unit, valid_max  & 
    248     , valid_min ) 
     265    , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, ts_enabled  & 
     266    , ts_split_freq, unit, valid_max, valid_min ) 
    249267 
    250268    IMPLICIT NONE 
     
    276294      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: scale_factor 
    277295      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 
     296      LOGICAL  , OPTIONAL, INTENT(OUT) :: ts_enabled 
     297      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp 
     298      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: ts_split_freq 
    278299      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit 
    279300      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_max 
     
    284305      ( fieldgroup_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value  & 
    285306      , domain_ref, enabled, field_ref, freq_offset, freq_op, grid_ref, group_ref, indexed_output  & 
    286       , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, unit, valid_max  & 
    287       , valid_min ) 
     307      , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, ts_enabled  & 
     308      , ts_split_freq, unit, valid_max, valid_min ) 
    288309 
    289310  END SUBROUTINE xios(get_fieldgroup_attr) 
     
    292313    ( fieldgroup_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value  & 
    293314    , domain_ref, enabled, field_ref, freq_offset, freq_op, grid_ref, group_ref, indexed_output  & 
    294     , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, unit, valid_max  & 
    295     , valid_min ) 
     315    , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, ts_enabled  & 
     316    , ts_split_freq, unit, valid_max, valid_min ) 
    296317 
    297318    IMPLICIT NONE 
     
    322343      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: scale_factor 
    323344      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 
     345      LOGICAL  , OPTIONAL, INTENT(OUT) :: ts_enabled 
     346      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp 
     347      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: ts_split_freq 
    324348      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit 
    325349      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_max 
     
    329353      ( fieldgroup_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value  & 
    330354      , domain_ref, enabled, field_ref, freq_offset, freq_op, grid_ref, group_ref, indexed_output  & 
    331       , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, unit, valid_max  & 
    332       , valid_min ) 
     355      , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, ts_enabled  & 
     356      , ts_split_freq, unit, valid_max, valid_min ) 
    333357 
    334358  END SUBROUTINE xios(get_fieldgroup_attr_hdl) 
     
    338362    , domain_ref_, enabled_, field_ref_, freq_offset_, freq_op_, grid_ref_, group_ref_, indexed_output_  & 
    339363    , level_, long_name_, name_, operation_, prec_, read_access_, scale_factor_, standard_name_  & 
    340     , unit_, valid_max_, valid_min_ ) 
     364    , ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_ ) 
    341365 
    342366    IMPLICIT NONE 
     
    367391      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: scale_factor_ 
    368392      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_ 
     393      LOGICAL  , OPTIONAL, INTENT(OUT) :: ts_enabled_ 
     394      LOGICAL (KIND=C_BOOL) :: ts_enabled__tmp 
     395      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: ts_split_freq_ 
    369396      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit_ 
    370397      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_max_ 
     
    459486      ENDIF 
    460487 
     488      IF (PRESENT(ts_enabled_)) THEN 
     489        CALL cxios_get_fieldgroup_ts_enabled(fieldgroup_hdl%daddr, ts_enabled__tmp) 
     490        ts_enabled_ = ts_enabled__tmp 
     491      ENDIF 
     492 
     493      IF (PRESENT(ts_split_freq_)) THEN 
     494        CALL cxios_get_fieldgroup_ts_split_freq(fieldgroup_hdl%daddr, ts_split_freq_) 
     495      ENDIF 
     496 
    461497      IF (PRESENT(unit_)) THEN 
    462498        CALL cxios_get_fieldgroup_unit(fieldgroup_hdl%daddr, unit_, len(unit_)) 
     
    476512    ( fieldgroup_id, add_offset, axis_ref, compression_level, default_value, detect_missing_value  & 
    477513    , domain_ref, enabled, field_ref, freq_offset, freq_op, grid_ref, group_ref, indexed_output  & 
    478     , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, unit, valid_max  & 
    479     , valid_min ) 
     514    , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, ts_enabled  & 
     515    , ts_split_freq, unit, valid_max, valid_min ) 
    480516 
    481517    IMPLICIT NONE 
     
    524560      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name 
    525561      LOGICAL(KIND=C_BOOL) :: standard_name_tmp 
     562      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_enabled 
     563      LOGICAL(KIND=C_BOOL) :: ts_enabled_tmp 
     564      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_split_freq 
     565      LOGICAL(KIND=C_BOOL) :: ts_split_freq_tmp 
    526566      LOGICAL, OPTIONAL, INTENT(OUT) :: unit 
    527567      LOGICAL(KIND=C_BOOL) :: unit_tmp 
     
    535575      ( fieldgroup_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value  & 
    536576      , domain_ref, enabled, field_ref, freq_offset, freq_op, grid_ref, group_ref, indexed_output  & 
    537       , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, unit, valid_max  & 
    538       , valid_min ) 
     577      , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, ts_enabled  & 
     578      , ts_split_freq, unit, valid_max, valid_min ) 
    539579 
    540580  END SUBROUTINE xios(is_defined_fieldgroup_attr) 
     
    543583    ( fieldgroup_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value  & 
    544584    , domain_ref, enabled, field_ref, freq_offset, freq_op, grid_ref, group_ref, indexed_output  & 
    545     , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, unit, valid_max  & 
    546     , valid_min ) 
     585    , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, ts_enabled  & 
     586    , ts_split_freq, unit, valid_max, valid_min ) 
    547587 
    548588    IMPLICIT NONE 
     
    590630      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name 
    591631      LOGICAL(KIND=C_BOOL) :: standard_name_tmp 
     632      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_enabled 
     633      LOGICAL(KIND=C_BOOL) :: ts_enabled_tmp 
     634      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_split_freq 
     635      LOGICAL(KIND=C_BOOL) :: ts_split_freq_tmp 
    592636      LOGICAL, OPTIONAL, INTENT(OUT) :: unit 
    593637      LOGICAL(KIND=C_BOOL) :: unit_tmp 
     
    600644      ( fieldgroup_hdl, add_offset, axis_ref, compression_level, default_value, detect_missing_value  & 
    601645      , domain_ref, enabled, field_ref, freq_offset, freq_op, grid_ref, group_ref, indexed_output  & 
    602       , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, unit, valid_max  & 
    603       , valid_min ) 
     646      , level, long_name, name, operation, prec, read_access, scale_factor, standard_name, ts_enabled  & 
     647      , ts_split_freq, unit, valid_max, valid_min ) 
    604648 
    605649  END SUBROUTINE xios(is_defined_fieldgroup_attr_hdl) 
     
    609653    , domain_ref_, enabled_, field_ref_, freq_offset_, freq_op_, grid_ref_, group_ref_, indexed_output_  & 
    610654    , level_, long_name_, name_, operation_, prec_, read_access_, scale_factor_, standard_name_  & 
    611     , unit_, valid_max_, valid_min_ ) 
     655    , ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_ ) 
    612656 
    613657    IMPLICIT NONE 
     
    655699      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name_ 
    656700      LOGICAL(KIND=C_BOOL) :: standard_name__tmp 
     701      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_enabled_ 
     702      LOGICAL(KIND=C_BOOL) :: ts_enabled__tmp 
     703      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_split_freq_ 
     704      LOGICAL(KIND=C_BOOL) :: ts_split_freq__tmp 
    657705      LOGICAL, OPTIONAL, INTENT(OUT) :: unit_ 
    658706      LOGICAL(KIND=C_BOOL) :: unit__tmp 
     
    767815      ENDIF 
    768816 
     817      IF (PRESENT(ts_enabled_)) THEN 
     818        ts_enabled__tmp = cxios_is_defined_fieldgroup_ts_enabled(fieldgroup_hdl%daddr) 
     819        ts_enabled_ = ts_enabled__tmp 
     820      ENDIF 
     821 
     822      IF (PRESENT(ts_split_freq_)) THEN 
     823        ts_split_freq__tmp = cxios_is_defined_fieldgroup_ts_split_freq(fieldgroup_hdl%daddr) 
     824        ts_split_freq_ = ts_split_freq__tmp 
     825      ENDIF 
     826 
    769827      IF (PRESENT(unit_)) THEN 
    770828        unit__tmp = cxios_is_defined_fieldgroup_unit(fieldgroup_hdl%daddr) 
  • XIOS/trunk/src/interface/fortran_attr/ifile_attr.F90

    r699 r711  
    1414    ( file_id, append, compression_level, description, enabled, format, min_digits, mode, name, name_suffix  & 
    1515    , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, time_counter  & 
    16     , type ) 
     16    , timeseries, ts_prefix, type ) 
    1717 
    1818    IMPLICIT NONE 
     
    3737      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq 
    3838      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter 
     39      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timeseries 
     40      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_prefix 
    3941      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type 
    4042 
     
    4345      ( file_hdl, append, compression_level, description, enabled, format, min_digits, mode, name  & 
    4446      , name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq  & 
    45       , time_counter, type ) 
     47      , time_counter, timeseries, ts_prefix, type ) 
    4648 
    4749  END SUBROUTINE xios(set_file_attr) 
     
    5052    ( file_hdl, append, compression_level, description, enabled, format, min_digits, mode, name  & 
    5153    , name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq  & 
    52     , time_counter, type ) 
     54    , time_counter, timeseries, ts_prefix, type ) 
    5355 
    5456    IMPLICIT NONE 
     
    7274      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq 
    7375      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter 
     76      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timeseries 
     77      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_prefix 
    7478      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type 
    7579 
     
    7781      ( file_hdl, append, compression_level, description, enabled, format, min_digits, mode, name  & 
    7882      , name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq  & 
    79       , time_counter, type ) 
     83      , time_counter, timeseries, ts_prefix, type ) 
    8084 
    8185  END SUBROUTINE xios(set_file_attr_hdl) 
     
    8488    ( file_hdl, append_, compression_level_, description_, enabled_, format_, min_digits_, mode_  & 
    8589    , name_, name_suffix_, output_freq_, output_level_, par_access_, split_freq_, split_freq_format_  & 
    86     , sync_freq_, time_counter_, type_ ) 
     90    , sync_freq_, time_counter_, timeseries_, ts_prefix_, type_ ) 
    8791 
    8892    IMPLICIT NONE 
     
    106110      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq_ 
    107111      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter_ 
     112      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timeseries_ 
     113      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_prefix_ 
    108114      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_ 
    109115 
     
    174180      ENDIF 
    175181 
     182      IF (PRESENT(timeseries_)) THEN 
     183        CALL cxios_set_file_timeseries(file_hdl%daddr, timeseries_, len(timeseries_)) 
     184      ENDIF 
     185 
     186      IF (PRESENT(ts_prefix_)) THEN 
     187        CALL cxios_set_file_ts_prefix(file_hdl%daddr, ts_prefix_, len(ts_prefix_)) 
     188      ENDIF 
     189 
    176190      IF (PRESENT(type_)) THEN 
    177191        CALL cxios_set_file_type(file_hdl%daddr, type_, len(type_)) 
     
    183197    ( file_id, append, compression_level, description, enabled, format, min_digits, mode, name, name_suffix  & 
    184198    , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, time_counter  & 
    185     , type ) 
     199    , timeseries, ts_prefix, type ) 
    186200 
    187201    IMPLICIT NONE 
     
    206220      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq 
    207221      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter 
     222      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timeseries 
     223      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_prefix 
    208224      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type 
    209225 
     
    212228      ( file_hdl, append, compression_level, description, enabled, format, min_digits, mode, name  & 
    213229      , name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq  & 
    214       , time_counter, type ) 
     230      , time_counter, timeseries, ts_prefix, type ) 
    215231 
    216232  END SUBROUTINE xios(get_file_attr) 
     
    219235    ( file_hdl, append, compression_level, description, enabled, format, min_digits, mode, name  & 
    220236    , name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq  & 
    221     , time_counter, type ) 
     237    , time_counter, timeseries, ts_prefix, type ) 
    222238 
    223239    IMPLICIT NONE 
     
    241257      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq 
    242258      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter 
     259      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timeseries 
     260      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_prefix 
    243261      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type 
    244262 
     
    246264      ( file_hdl, append, compression_level, description, enabled, format, min_digits, mode, name  & 
    247265      , name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq  & 
    248       , time_counter, type ) 
     266      , time_counter, timeseries, ts_prefix, type ) 
    249267 
    250268  END SUBROUTINE xios(get_file_attr_hdl) 
     
    253271    ( file_hdl, append_, compression_level_, description_, enabled_, format_, min_digits_, mode_  & 
    254272    , name_, name_suffix_, output_freq_, output_level_, par_access_, split_freq_, split_freq_format_  & 
    255     , sync_freq_, time_counter_, type_ ) 
     273    , sync_freq_, time_counter_, timeseries_, ts_prefix_, type_ ) 
    256274 
    257275    IMPLICIT NONE 
     
    275293      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq_ 
    276294      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter_ 
     295      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timeseries_ 
     296      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_prefix_ 
    277297      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_ 
    278298 
     
    343363      ENDIF 
    344364 
     365      IF (PRESENT(timeseries_)) THEN 
     366        CALL cxios_get_file_timeseries(file_hdl%daddr, timeseries_, len(timeseries_)) 
     367      ENDIF 
     368 
     369      IF (PRESENT(ts_prefix_)) THEN 
     370        CALL cxios_get_file_ts_prefix(file_hdl%daddr, ts_prefix_, len(ts_prefix_)) 
     371      ENDIF 
     372 
    345373      IF (PRESENT(type_)) THEN 
    346374        CALL cxios_get_file_type(file_hdl%daddr, type_, len(type_)) 
     
    352380    ( file_id, append, compression_level, description, enabled, format, min_digits, mode, name, name_suffix  & 
    353381    , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, time_counter  & 
    354     , type ) 
     382    , timeseries, ts_prefix, type ) 
    355383 
    356384    IMPLICIT NONE 
     
    389417      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter 
    390418      LOGICAL(KIND=C_BOOL) :: time_counter_tmp 
     419      LOGICAL, OPTIONAL, INTENT(OUT) :: timeseries 
     420      LOGICAL(KIND=C_BOOL) :: timeseries_tmp 
     421      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_prefix 
     422      LOGICAL(KIND=C_BOOL) :: ts_prefix_tmp 
    391423      LOGICAL, OPTIONAL, INTENT(OUT) :: type 
    392424      LOGICAL(KIND=C_BOOL) :: type_tmp 
     
    396428      ( file_hdl, append, compression_level, description, enabled, format, min_digits, mode, name  & 
    397429      , name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq  & 
    398       , time_counter, type ) 
     430      , time_counter, timeseries, ts_prefix, type ) 
    399431 
    400432  END SUBROUTINE xios(is_defined_file_attr) 
     
    403435    ( file_hdl, append, compression_level, description, enabled, format, min_digits, mode, name  & 
    404436    , name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq  & 
    405     , time_counter, type ) 
     437    , time_counter, timeseries, ts_prefix, type ) 
    406438 
    407439    IMPLICIT NONE 
     
    439471      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter 
    440472      LOGICAL(KIND=C_BOOL) :: time_counter_tmp 
     473      LOGICAL, OPTIONAL, INTENT(OUT) :: timeseries 
     474      LOGICAL(KIND=C_BOOL) :: timeseries_tmp 
     475      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_prefix 
     476      LOGICAL(KIND=C_BOOL) :: ts_prefix_tmp 
    441477      LOGICAL, OPTIONAL, INTENT(OUT) :: type 
    442478      LOGICAL(KIND=C_BOOL) :: type_tmp 
     
    445481      ( file_hdl, append, compression_level, description, enabled, format, min_digits, mode, name  & 
    446482      , name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq  & 
    447       , time_counter, type ) 
     483      , time_counter, timeseries, ts_prefix, type ) 
    448484 
    449485  END SUBROUTINE xios(is_defined_file_attr_hdl) 
     
    452488    ( file_hdl, append_, compression_level_, description_, enabled_, format_, min_digits_, mode_  & 
    453489    , name_, name_suffix_, output_freq_, output_level_, par_access_, split_freq_, split_freq_format_  & 
    454     , sync_freq_, time_counter_, type_ ) 
     490    , sync_freq_, time_counter_, timeseries_, ts_prefix_, type_ ) 
    455491 
    456492    IMPLICIT NONE 
     
    488524      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter_ 
    489525      LOGICAL(KIND=C_BOOL) :: time_counter__tmp 
     526      LOGICAL, OPTIONAL, INTENT(OUT) :: timeseries_ 
     527      LOGICAL(KIND=C_BOOL) :: timeseries__tmp 
     528      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_prefix_ 
     529      LOGICAL(KIND=C_BOOL) :: ts_prefix__tmp 
    490530      LOGICAL, OPTIONAL, INTENT(OUT) :: type_ 
    491531      LOGICAL(KIND=C_BOOL) :: type__tmp 
     
    571611      ENDIF 
    572612 
     613      IF (PRESENT(timeseries_)) THEN 
     614        timeseries__tmp = cxios_is_defined_file_timeseries(file_hdl%daddr) 
     615        timeseries_ = timeseries__tmp 
     616      ENDIF 
     617 
     618      IF (PRESENT(ts_prefix_)) THEN 
     619        ts_prefix__tmp = cxios_is_defined_file_ts_prefix(file_hdl%daddr) 
     620        ts_prefix_ = ts_prefix__tmp 
     621      ENDIF 
     622 
    573623      IF (PRESENT(type_)) THEN 
    574624        type__tmp = cxios_is_defined_file_type(file_hdl%daddr) 
  • XIOS/trunk/src/interface/fortran_attr/ifilegroup_attr.F90

    r699 r711  
    1414    ( filegroup_id, append, compression_level, description, enabled, format, group_ref, min_digits  & 
    1515    , mode, name, name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format  & 
    16     , sync_freq, time_counter, type ) 
     16    , sync_freq, time_counter, timeseries, ts_prefix, type ) 
    1717 
    1818    IMPLICIT NONE 
     
    3838      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq 
    3939      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter 
     40      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timeseries 
     41      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_prefix 
    4042      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type 
    4143 
     
    4446      ( filegroup_hdl, append, compression_level, description, enabled, format, group_ref, min_digits  & 
    4547      , mode, name, name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format  & 
    46       , sync_freq, time_counter, type ) 
     48      , sync_freq, time_counter, timeseries, ts_prefix, type ) 
    4749 
    4850  END SUBROUTINE xios(set_filegroup_attr) 
     
    5153    ( filegroup_hdl, append, compression_level, description, enabled, format, group_ref, min_digits  & 
    5254    , mode, name, name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format  & 
    53     , sync_freq, time_counter, type ) 
     55    , sync_freq, time_counter, timeseries, ts_prefix, type ) 
    5456 
    5557    IMPLICIT NONE 
     
    7476      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq 
    7577      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter 
     78      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timeseries 
     79      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_prefix 
    7680      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type 
    7781 
     
    7983      ( filegroup_hdl, append, compression_level, description, enabled, format, group_ref, min_digits  & 
    8084      , mode, name, name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format  & 
    81       , sync_freq, time_counter, type ) 
     85      , sync_freq, time_counter, timeseries, ts_prefix, type ) 
    8286 
    8387  END SUBROUTINE xios(set_filegroup_attr_hdl) 
     
    8690    ( filegroup_hdl, append_, compression_level_, description_, enabled_, format_, group_ref_, min_digits_  & 
    8791    , mode_, name_, name_suffix_, output_freq_, output_level_, par_access_, split_freq_, split_freq_format_  & 
    88     , sync_freq_, time_counter_, type_ ) 
     92    , sync_freq_, time_counter_, timeseries_, ts_prefix_, type_ ) 
    8993 
    9094    IMPLICIT NONE 
     
    109113      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq_ 
    110114      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter_ 
     115      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timeseries_ 
     116      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_prefix_ 
    111117      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_ 
    112118 
     
    181187      ENDIF 
    182188 
     189      IF (PRESENT(timeseries_)) THEN 
     190        CALL cxios_set_filegroup_timeseries(filegroup_hdl%daddr, timeseries_, len(timeseries_)) 
     191      ENDIF 
     192 
     193      IF (PRESENT(ts_prefix_)) THEN 
     194        CALL cxios_set_filegroup_ts_prefix(filegroup_hdl%daddr, ts_prefix_, len(ts_prefix_)) 
     195      ENDIF 
     196 
    183197      IF (PRESENT(type_)) THEN 
    184198        CALL cxios_set_filegroup_type(filegroup_hdl%daddr, type_, len(type_)) 
     
    190204    ( filegroup_id, append, compression_level, description, enabled, format, group_ref, min_digits  & 
    191205    , mode, name, name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format  & 
    192     , sync_freq, time_counter, type ) 
     206    , sync_freq, time_counter, timeseries, ts_prefix, type ) 
    193207 
    194208    IMPLICIT NONE 
     
    214228      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq 
    215229      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter 
     230      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timeseries 
     231      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_prefix 
    216232      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type 
    217233 
     
    220236      ( filegroup_hdl, append, compression_level, description, enabled, format, group_ref, min_digits  & 
    221237      , mode, name, name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format  & 
    222       , sync_freq, time_counter, type ) 
     238      , sync_freq, time_counter, timeseries, ts_prefix, type ) 
    223239 
    224240  END SUBROUTINE xios(get_filegroup_attr) 
     
    227243    ( filegroup_hdl, append, compression_level, description, enabled, format, group_ref, min_digits  & 
    228244    , mode, name, name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format  & 
    229     , sync_freq, time_counter, type ) 
     245    , sync_freq, time_counter, timeseries, ts_prefix, type ) 
    230246 
    231247    IMPLICIT NONE 
     
    250266      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq 
    251267      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter 
     268      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timeseries 
     269      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_prefix 
    252270      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type 
    253271 
     
    255273      ( filegroup_hdl, append, compression_level, description, enabled, format, group_ref, min_digits  & 
    256274      , mode, name, name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format  & 
    257       , sync_freq, time_counter, type ) 
     275      , sync_freq, time_counter, timeseries, ts_prefix, type ) 
    258276 
    259277  END SUBROUTINE xios(get_filegroup_attr_hdl) 
     
    262280    ( filegroup_hdl, append_, compression_level_, description_, enabled_, format_, group_ref_, min_digits_  & 
    263281    , mode_, name_, name_suffix_, output_freq_, output_level_, par_access_, split_freq_, split_freq_format_  & 
    264     , sync_freq_, time_counter_, type_ ) 
     282    , sync_freq_, time_counter_, timeseries_, ts_prefix_, type_ ) 
    265283 
    266284    IMPLICIT NONE 
     
    285303      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq_ 
    286304      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter_ 
     305      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timeseries_ 
     306      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_prefix_ 
    287307      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_ 
    288308 
     
    357377      ENDIF 
    358378 
     379      IF (PRESENT(timeseries_)) THEN 
     380        CALL cxios_get_filegroup_timeseries(filegroup_hdl%daddr, timeseries_, len(timeseries_)) 
     381      ENDIF 
     382 
     383      IF (PRESENT(ts_prefix_)) THEN 
     384        CALL cxios_get_filegroup_ts_prefix(filegroup_hdl%daddr, ts_prefix_, len(ts_prefix_)) 
     385      ENDIF 
     386 
    359387      IF (PRESENT(type_)) THEN 
    360388        CALL cxios_get_filegroup_type(filegroup_hdl%daddr, type_, len(type_)) 
     
    366394    ( filegroup_id, append, compression_level, description, enabled, format, group_ref, min_digits  & 
    367395    , mode, name, name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format  & 
    368     , sync_freq, time_counter, type ) 
     396    , sync_freq, time_counter, timeseries, ts_prefix, type ) 
    369397 
    370398    IMPLICIT NONE 
     
    405433      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter 
    406434      LOGICAL(KIND=C_BOOL) :: time_counter_tmp 
     435      LOGICAL, OPTIONAL, INTENT(OUT) :: timeseries 
     436      LOGICAL(KIND=C_BOOL) :: timeseries_tmp 
     437      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_prefix 
     438      LOGICAL(KIND=C_BOOL) :: ts_prefix_tmp 
    407439      LOGICAL, OPTIONAL, INTENT(OUT) :: type 
    408440      LOGICAL(KIND=C_BOOL) :: type_tmp 
     
    412444      ( filegroup_hdl, append, compression_level, description, enabled, format, group_ref, min_digits  & 
    413445      , mode, name, name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format  & 
    414       , sync_freq, time_counter, type ) 
     446      , sync_freq, time_counter, timeseries, ts_prefix, type ) 
    415447 
    416448  END SUBROUTINE xios(is_defined_filegroup_attr) 
     
    419451    ( filegroup_hdl, append, compression_level, description, enabled, format, group_ref, min_digits  & 
    420452    , mode, name, name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format  & 
    421     , sync_freq, time_counter, type ) 
     453    , sync_freq, time_counter, timeseries, ts_prefix, type ) 
    422454 
    423455    IMPLICIT NONE 
     
    457489      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter 
    458490      LOGICAL(KIND=C_BOOL) :: time_counter_tmp 
     491      LOGICAL, OPTIONAL, INTENT(OUT) :: timeseries 
     492      LOGICAL(KIND=C_BOOL) :: timeseries_tmp 
     493      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_prefix 
     494      LOGICAL(KIND=C_BOOL) :: ts_prefix_tmp 
    459495      LOGICAL, OPTIONAL, INTENT(OUT) :: type 
    460496      LOGICAL(KIND=C_BOOL) :: type_tmp 
     
    463499      ( filegroup_hdl, append, compression_level, description, enabled, format, group_ref, min_digits  & 
    464500      , mode, name, name_suffix, output_freq, output_level, par_access, split_freq, split_freq_format  & 
    465       , sync_freq, time_counter, type ) 
     501      , sync_freq, time_counter, timeseries, ts_prefix, type ) 
    466502 
    467503  END SUBROUTINE xios(is_defined_filegroup_attr_hdl) 
     
    470506    ( filegroup_hdl, append_, compression_level_, description_, enabled_, format_, group_ref_, min_digits_  & 
    471507    , mode_, name_, name_suffix_, output_freq_, output_level_, par_access_, split_freq_, split_freq_format_  & 
    472     , sync_freq_, time_counter_, type_ ) 
     508    , sync_freq_, time_counter_, timeseries_, ts_prefix_, type_ ) 
    473509 
    474510    IMPLICIT NONE 
     
    508544      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter_ 
    509545      LOGICAL(KIND=C_BOOL) :: time_counter__tmp 
     546      LOGICAL, OPTIONAL, INTENT(OUT) :: timeseries_ 
     547      LOGICAL(KIND=C_BOOL) :: timeseries__tmp 
     548      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_prefix_ 
     549      LOGICAL(KIND=C_BOOL) :: ts_prefix__tmp 
    510550      LOGICAL, OPTIONAL, INTENT(OUT) :: type_ 
    511551      LOGICAL(KIND=C_BOOL) :: type__tmp 
     
    596636      ENDIF 
    597637 
     638      IF (PRESENT(timeseries_)) THEN 
     639        timeseries__tmp = cxios_is_defined_filegroup_timeseries(filegroup_hdl%daddr) 
     640        timeseries_ = timeseries__tmp 
     641      ENDIF 
     642 
     643      IF (PRESENT(ts_prefix_)) THEN 
     644        ts_prefix__tmp = cxios_is_defined_filegroup_ts_prefix(filegroup_hdl%daddr) 
     645        ts_prefix_ = ts_prefix__tmp 
     646      ENDIF 
     647 
    598648      IF (PRESENT(type_)) THEN 
    599649        type__tmp = cxios_is_defined_filegroup_type(filegroup_hdl%daddr) 
  • XIOS/trunk/src/node/context.cpp

    r697 r711  
    771771      // Warning: This must be done after solving the inheritance and before the rest of post-processing 
    772772      checkAxisDomainsGridsEligibilityForCompressedOutput(); 
     773 
     774      // Check if some automatic time series should be generated 
     775      // Warning: This must be done after solving the inheritance and before the rest of post-processing 
     776      prepareTimeseries(); 
    773777 
    774778      //Initialisation du vecteur 'enabledFiles' contenant la liste des fichiers à sortir. 
     
    895899   } 
    896900 
     901   //! Client side: Prepare the timeseries by adding the necessary files 
     902   void CContext::prepareTimeseries() 
     903   { 
     904     if (!hasClient) return; 
     905 
     906     const std::vector<CFile*> allFiles = CFile::getAll(); 
     907     for (size_t i = 0; i < allFiles.size(); i++) 
     908     { 
     909       CFile* file = allFiles[i]; 
     910 
     911       if (!file->timeseries.isEmpty() && file->timeseries != CFile::timeseries_attr::none) 
     912       { 
     913         StdString tsPrefix = !file->ts_prefix.isEmpty() ? file->ts_prefix : (!file->name.isEmpty() ? file->name : file->getId()); 
     914 
     915         const std::vector<CField*> allFields = file->getAllFields(); 
     916         for (size_t j = 0; j < allFields.size(); j++) 
     917         { 
     918           CField* field = allFields[j]; 
     919 
     920           if (!field->ts_enabled.isEmpty() && field->ts_enabled) 
     921           { 
     922             CFile* tsFile = CFile::create(); 
     923             tsFile->duplicateAttributes(file); 
     924 
     925             tsFile->name = tsPrefix + "_"; 
     926             if (!field->name.isEmpty()) 
     927               tsFile->name.get() += field->name; 
     928             else if (field->hasDirectFieldReference()) // We cannot use getBaseFieldReference() just yet 
     929               tsFile->name.get() += field->field_ref; 
     930             else 
     931               tsFile->name.get() += field->getId(); 
     932 
     933             if (!field->ts_split_freq.isEmpty()) 
     934               tsFile->split_freq = field->ts_split_freq; 
     935 
     936             CField* tsField = tsFile->addField(); 
     937             tsField->field_ref = field->getId(); 
     938 
     939             tsFile->solveFieldRefInheritance(true); 
     940 
     941             if (file->timeseries == CFile::timeseries_attr::exclusive) 
     942               field->enabled = false; 
     943           } 
     944         } 
     945 
     946         // Finally disable the original file is need be 
     947         if (file->timeseries == CFile::timeseries_attr::only) 
     948          file->enabled = false; 
     949       } 
     950     } 
     951   } 
     952 
    897953   //! Client side: Send information of reference grid of active fields 
    898954   void CContext::sendRefGrid() 
  • XIOS/trunk/src/node/context.hpp

    r697 r711  
    110110         void createFileHeader(void ); 
    111111         void checkAxisDomainsGridsEligibilityForCompressedOutput(); 
     112         void prepareTimeseries(void); 
    112113         void solveAllRefOfEnabledFields(bool sendToServer); 
    113114         void buildFilterGraphOfEnabledFields(); 
Note: See TracChangeset for help on using the changeset viewer.