Ignore:
Timestamp:
10/23/15 10:49:19 (9 years ago)
Author:
rlacroix
Message:

Support freq_offset for fields in files in read mode.

In theory the first record of a file being read is available at timestep 0, this allows to delay the availability of the data to a later timestep.

Use a temporary solution for now until this can be properly integrated in a temporal filter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/filter/source_filter.cpp

    r650 r756  
    22#include "grid.hpp" 
    33#include "exception.hpp" 
     4#include "calendar_util.hpp" 
    45 
    56namespace xios 
    67{ 
    7   CSourceFilter::CSourceFilter(CGrid* grid) 
     8  CSourceFilter::CSourceFilter(CGrid* grid, const CDuration offset /*= NoneDu*/) 
    89    : grid(grid) 
     10    , offset(offset) 
    911  { 
    1012    if (!grid) 
     
    1618  void CSourceFilter::streamData(CDate date, const CArray<double, N>& data) 
    1719  { 
     20    date = date + offset; // this is a temporary solution, it should be part of a proper temporal filter 
     21 
    1822    CDataPacketPtr packet(new CDataPacket); 
    1923    packet->date = date; 
     
    3337  void CSourceFilter::streamDataFromServer(CDate date, const std::map<int, CArray<double, 1> >& data) 
    3438  { 
     39    date = date + offset; // this is a temporary solution, it should be part of a proper temporal filter 
     40 
    3541    CDataPacketPtr packet(new CDataPacket); 
    3642    packet->date = date; 
Note: See TracChangeset for help on using the changeset viewer.