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