Ignore:
Timestamp:
09/29/15 14:17:42 (9 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).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.