Commit 065f70a5 authored by Marc R.'s avatar Marc R.

removed 'non-ENS' datasource entries that were erroneously in traj branch;...

removed 'non-ENS' datasource entries that were erroneously in traj branch; fixed wrong END_TIME for streamlines
parent db872a99
......@@ -2706,11 +2706,23 @@ void MTrajectoryActor::asynchronousDataRequest(bool synchronizationRequest)
// If computed dataSource is used, additional information is needed.
if (!precomputedDataSource)
{
QDateTime endTime = availableStartTimes.at(
properties->mEnum()->value(
computationIntegrationTimeProperty));
unsigned int lineType = properties->mEnum()->value(
computationLineTypeProperty);
QDateTime endTime;
if (TRAJECTORY_COMPUTATION_LINE_TYPE(lineType) == PATH_LINE)
{
endTime = availableStartTimes.at(
properties->mEnum()->value(
computationIntegrationTimeProperty));
}
else
{
// For streamlines the "end time" is not really required.
// The trajectory computation source, however, requests all
// time steps between validTime and endTime, hence set it
// to the same time. (mr, 17Jul2018 -- could be changed..)
endTime = validTime;
}
unsigned int integrationMethod = properties->mEnum()->value(
computationIntegrationMethodProperty);
unsigned int interpolationMethod = properties->mEnum()->value(
......@@ -2884,15 +2896,27 @@ void MTrajectoryActor::asynchronousSelectionRequest()
// If computed dataSource is used, additional information is needed.
if (!precomputedDataSource)
{
int endTimeIndex =
properties->mEnum()->value(computationIntegrationTimeProperty);
if (endTimeIndex < 0)
unsigned int lineType = properties->mEnum()->value(
computationLineTypeProperty);
QDateTime endTime;
if (TRAJECTORY_COMPUTATION_LINE_TYPE(lineType) == PATH_LINE)
{
continue;
int endTimeIndex = properties->mEnum()->value(
computationIntegrationTimeProperty);
if (endTimeIndex < 0)
{
continue;
}
endTime = availableStartTimes.at(max(0, endTimeIndex));
}
else
{
// For streamlines the "end time" is not really required.
// The trajectory computation source, however, requests all
// time steps between validTime and endTime, hence set it
// to the same time. (mr, 17Jul2018 -- could be changed..)
endTime = validTime;
}
QDateTime endTime = availableStartTimes.at(max(0, endTimeIndex));
unsigned int lineType =
properties->mEnum()->value(computationLineTypeProperty);
unsigned int integrationMethod = properties->mEnum()->value(
computationIntegrationMethodProperty);
unsigned int interpolatonMethod = properties->mEnum()->value(
......
......@@ -601,10 +601,6 @@ void MPipelineConfiguration::initializeNWPPipeline(
nwpReaderENS->setScheduler(scheduler);
nwpReaderENS->setDataRoot(fileDir, fileFilter);
// (Should the "raw" data reader be selectable as a data source?)
// Yes it should, for computed trajectories.
sysMC->registerDataSource(dataSourceId, nwpReaderENS);
MStructuredGridEnsembleFilter *ensFilter =
new MStructuredGridEnsembleFilter();
ensFilter->setMemoryManager(memoryManager);
......@@ -746,8 +742,9 @@ void MPipelineConfiguration::initializePrecomputedTrajectoriesPipeline(
trajectoryReader);
// Initialize trajectory pipeline.
initializeEnsemblePipeline(dataSourceId, boundaryLayerTrajectories,
trajectoryReader, scheduler, memoryManager);
initializeEnsembleTrajectoriesPipeline(
dataSourceId, boundaryLayerTrajectories,
trajectoryReader, scheduler, memoryManager);
LOG4CPLUS_DEBUG(mlog, "Pipeline ''" << dataSourceId.toStdString()
<< "'' has been initialized.");
......@@ -868,15 +865,16 @@ void MPipelineConfiguration::initializeTrajectoryComputationPipeline(
trajectoryComputation);
// Initialize trajectory pipeline.
initializeEnsemblePipeline(dataSourceId, boundaryLayerTrajectories,
trajectoryComputation, scheduler, memoryManager);
initializeEnsembleTrajectoriesPipeline(
dataSourceId, boundaryLayerTrajectories,
trajectoryComputation, scheduler, memoryManager);
LOG4CPLUS_DEBUG(mlog, "Pipeline ''" << dataSourceId.toStdString()
<< "'' has been initialized.");
}
void MPipelineConfiguration::initializeEnsemblePipeline(
void MPipelineConfiguration::initializeEnsembleTrajectoriesPipeline(
QString dataSourceId,
bool boundaryLayerTrajectories,
MTrajectoryDataSource* baseDataSource,
......
......@@ -160,7 +160,7 @@ protected:
QString windVerticalVariable,
MVerticalLevelType verticalLevelType);
void initializeEnsemblePipeline(
void initializeEnsembleTrajectoriesPipeline(
QString dataSourceId,
bool boundaryLayerTrajectories,
MTrajectoryDataSource* baseDataSource,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment