Changeset 1516 for XIOS


Ignore:
Timestamp:
05/31/18 17:53:06 (6 years ago)
Author:
oabramkina
Message:

Bugfix for cases of split_freq defined in ts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/file.cpp

    r1494 r1516  
    479479           if (split_freq_format.isEmpty()) 
    480480           { 
    481              if (split_freq.getValue().second != 0) splitFormat = "%y%mo%d%h%mi%s"; 
    482              else if (split_freq.getValue().minute != 0) splitFormat = "%y%mo%d%h%mi"; 
    483              else if (split_freq.getValue().hour != 0) splitFormat = "%y%mo%d%h"; 
    484              else if (split_freq.getValue().day != 0) splitFormat = "%y%mo%d"; 
    485              else if (split_freq.getValue().month != 0) splitFormat = "%y%mo"; 
     481             CDuration splitFreq = split_freq.getValue(); 
     482             splitFreq.solveTimeStep(*CContext::getCurrent()->getCalendar()); 
     483             if (splitFreq.second != 0) splitFormat = "%y%mo%d%h%mi%s"; 
     484             else if (splitFreq.minute != 0) splitFormat = "%y%mo%d%h%mi"; 
     485             else if (splitFreq.hour != 0) splitFormat = "%y%mo%d%h"; 
     486             else if (splitFreq.day != 0) splitFormat = "%y%mo%d"; 
     487             else if (splitFreq.month != 0) splitFormat = "%y%mo"; 
    486488             else splitFormat = "%y"; 
    487489           } 
     
    613615        if (split_freq_format.isEmpty()) 
    614616        { 
    615           if (split_freq.getValue().second != 0) splitFormat = "%y%mo%d%h%mi%s"; 
    616           else if (split_freq.getValue().minute != 0) splitFormat = "%y%mo%d%h%mi"; 
    617           else if (split_freq.getValue().hour != 0) splitFormat = "%y%mo%d%h"; 
    618           else if (split_freq.getValue().day != 0) splitFormat = "%y%mo%d"; 
    619           else if (split_freq.getValue().month != 0) splitFormat = "%y%mo"; 
     617          CDuration splitFreq = split_freq.getValue(); 
     618          splitFreq.solveTimeStep(*CContext::getCurrent()->getCalendar()); 
     619          if (splitFreq.second != 0) splitFormat = "%y%mo%d%h%mi%s"; 
     620          else if (splitFreq.minute != 0) splitFormat = "%y%mo%d%h%mi"; 
     621          else if (splitFreq.hour != 0) splitFormat = "%y%mo%d%h"; 
     622          else if (splitFreq.day != 0) splitFormat = "%y%mo%d"; 
     623          else if (splitFreq.month != 0) splitFormat = "%y%mo"; 
    620624          else splitFormat = "%y"; 
    621625        } 
Note: See TracChangeset for help on using the changeset viewer.