Skip to content

Commit

Permalink
CORDEX: cut of dates in filename's period
Browse files Browse the repository at this point in the history
  • Loading branch information
h-dh committed Jan 12, 2016
1 parent 252ce87 commit b220805
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions include/date.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ class Date

static bool
isValidDate(std::string);

//! Set the calendar type
/*! Valid types: proleptic_georgian|georgian, noleap,
equal_months|360_day. The case of the strings doesn't
Expand Down Expand Up @@ -400,6 +400,8 @@ class Date

void clear(void);

double *regularMonthDays ;

private:
enum Calendar { GREGORIAN, PROLEPTIC_GREGORIAN, JULIAN,
EQUAL_MONTHS, ALL_LEAP, NO_LEAP, UNDEF } ;
Expand All @@ -413,8 +415,6 @@ class Date
int lY_cycleDays; // num of days between consecutive leap years
bool lY_is;

// this will be shifted, so index==-1 gets the 31 days from jan
double *regularMonthDays ;
int precision ;

bool isDateSet ;
Expand Down
2 changes: 1 addition & 1 deletion include/qa_time.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class TimeOutputBuffer

enum TimeTableMode
{
UNDEF, REGULAR, ORPHAN, DISABLE, CYCLE
INIT, UNDEF, REGULAR, ORPHAN, DISABLE, CYCLE
};
TimeTableMode timeTableMode;

Expand Down
10 changes: 7 additions & 3 deletions src/QA_time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ QA_Time::applyOptions(std::vector<std::string> &optStr)
|| split[0] == "table_time_ranges" )
{
timeTable.setFile(split[1]) ;
timeTableMode=UNDEF;
timeTableMode=INIT;
continue;
}
}
Expand Down Expand Up @@ -433,7 +433,9 @@ QA_Time::initDefaults(void)
bufferCount=0;
maxBufferSize=1500;

return;
timeTableMode=UNDEF;

return;
}

bool
Expand Down Expand Up @@ -725,6 +727,8 @@ QA_Time::initTimeTable(std::string id_1st, std::string id_2nd)
return ;
}

ifs.skipComment();

// find the identifier in the table
Split splt_line;
splt_line.setSeparator(',');
Expand Down Expand Up @@ -1242,7 +1246,7 @@ QA_Time::testTimeBounds(NcAPI &nc)
// checks below don't make any sense for climatologies
if( pIn->variable[timeBounds_ix].isClimatology )
return;

if( isFormattedDate )
{
refDate.setDate( currTimeBoundsValue[0] );
Expand Down

0 comments on commit b220805

Please sign in to comment.