Changeset 1272


Ignore:
Timestamp:
09/21/17 17:54:45 (3 years ago)
Author:
oabramkina
Message:

Changing default values in the temporal filter of freq_op and freq_offset in case of instant operation.

freq_op = output_freq, only if freq_op in not defined by a user.
freq_offset = output_freq - 1ts, if freq_op and freq_offset are not defined.

If freq_op is set to 1ts, it stays so. In this case data will be copied unnecessarily.

Location:
XIOS/dev/XIOS_DEV_CMIP6/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/filter/temporal_filter.cpp

    r1158 r1272  
    1515    , isInstantOperation(functor->timeType() == func::CFunctor::instant) 
    1616    // If we can optimize the sampling when dealing with an instant functor we do it 
    17     , samplingFreq((isInstantOperation && samplingFreq == TimeStep && samplingOffset == NoneDu) ? opFreq : samplingFreq) 
    18     , samplingOffset((isInstantOperation && samplingFreq == TimeStep && samplingOffset == NoneDu) ? opFreq - initDate.getRelCalendar().getTimeStep() : samplingOffset) 
     17    , samplingOffset((isInstantOperation && samplingFreq == NoneDu && samplingOffset == NoneDu) ? opFreq - initDate.getRelCalendar().getTimeStep() : samplingOffset) 
     18    , samplingFreq((samplingFreq == NoneDu ? (isInstantOperation ? opFreq : initDate.getRelCalendar().getTimeStep()) : samplingFreq)) 
    1919    , opFreq(opFreq) 
    2020    , nextSamplingDate(initDate + this->samplingOffset + initDate.getRelCalendar().getTimeStep()) 
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/field.cpp

    r1263 r1272  
    11451145 
    11461146       if (freq_op.isEmpty()) 
    1147          freq_op.setValue(TimeStep); 
     1147//         freq_op.setValue(TimeStep); 
     1148         freq_op.setValue(NoneDu); 
    11481149       if (freq_offset.isEmpty()) 
    11491150         freq_offset.setValue(NoneDu); 
Note: See TracChangeset for help on using the changeset viewer.