Skip to content

Commit

Permalink
Removing debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenplieger committed Jun 28, 2023
1 parent 037a670 commit cd8fc09
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
3 changes: 2 additions & 1 deletion adagucserverEC/CDFObjectStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,15 @@ CDFObject *CDFObjectStore::getCDFObject(CDataSource *dataSource, CServerParams *

if (dataSource) {
if (dataSource->cfgLayer) {
/* Apply NCML file to the datamodel */
// Apply NCML file to the datamodel */
if (dataSource->cfgLayer->FilePath.size() == 1) {
CT::string ncmlFileName = dataSource->cfgLayer->FilePath[0]->attr.ncml;
if (!ncmlFileName.empty()) {
CDBDebug("NCML: Applying NCML file %s", ncmlFileName.c_str());
cdfObject->applyNCMLFile(ncmlFileName.c_str());
}
}
// Rename variable, if requested
if (!dataSource->cfgLayer->Variable[0]->attr.orgname.empty()) {
CDF::Variable *var = cdfObject->getVariable(dataSource->cfgLayer->Variable[0]->attr.orgname);
var->name.copy(dataSource->cfgLayer->Variable[0]->value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int CDPPIncludeLayer::execute(CServerConfig::XMLE_DataPostProc *proc, CDataSourc

if (mode == CDATAPOSTPROCESSOR_RUNBEFOREREADING) {

CDBDebug("CDATAPOSTPROCESSOR_RUNBEFOREREADING::Applying include_layer");
// CDBDebug("CDATAPOSTPROCESSOR_RUNBEFOREREADING::Applying include_layer");

/* First check if this was already added */
auto dataObjectsVector = *dataSource->getDataObjectsVector();
Expand All @@ -81,7 +81,7 @@ int CDPPIncludeLayer::execute(CServerConfig::XMLE_DataPostProc *proc, CDataSourc
return 1;
}

CDBDebug("TEMPORAL METADATA READER");
// CDBDebug("TEMPORAL METADATA READER");
CDataReader reader;
reader.enablePostProcessors = false;
status = reader.open(dataSourceToInclude, CNETCDFREADER_MODE_OPEN_HEADER); // Only read metadata
Expand Down Expand Up @@ -121,7 +121,7 @@ int CDPPIncludeLayer::execute(CServerConfig::XMLE_DataPostProc *proc, CDataSourc

if (mode == 1) dataSource->getDataObjectsVector()->insert(dataSource->getDataObjectsVector()->begin(), newDataObject);

CDBDebug("--------> newDataObject %d ", dataSource->getDataObjectsVector()->size());
// CDBDebug("--------> newDataObject %d ", dataSource->getDataObjectsVector()->size());

newDataObject->variableName.copy(varToClone->name.c_str());
newDataObject->dataObjectName = proc->attr.name;
Expand All @@ -130,20 +130,20 @@ int CDPPIncludeLayer::execute(CServerConfig::XMLE_DataPostProc *proc, CDataSourc
CT::string text;
text.print("{\"variable\":\"%s\",\"datapostproc\":\"%s\"}", varToClone->name.c_str(), this->getId());
newDataObject->cdfObject = currentDataObject->cdfObject; //(CDFObject*)varToClone->getParentCDFObject();
CDBDebug("--------> Adding variable %s ", varToClone->name.c_str());
// CDBDebug("--------> Adding variable %s ", varToClone->name.c_str());
newDataObject->cdfObject->addVariable(newDataObject->cdfVariable);
newDataObject->cdfVariable->setName(varToClone->name.c_str());
newDataObject->cdfVariable->setType(varToClone->getType());
newDataObject->cdfVariable->setSize(dataSource->dWidth * dataSource->dHeight);

for (size_t j = 0; j < currentDataObject->cdfVariable->dimensionlinks.size(); j++) {
CDBDebug("Copying %d %s (%d)", j, currentDataObject->cdfVariable->dimensionlinks[j]->name.c_str(), currentDataObject->cdfVariable->dimensionlinks[j]->getSize());
// CDBDebug("Copying %d %s (%d)", j, currentDataObject->cdfVariable->dimensionlinks[j]->name.c_str(), currentDataObject->cdfVariable->dimensionlinks[j]->getSize());
newDataObject->cdfVariable->dimensionlinks.push_back(currentDataObject->cdfVariable->dimensionlinks[j]);
}

for (size_t j = 0; j < newDataObject->cdfVariable->dimensionlinks.size(); j++) {
CDBDebug("NowHas dimensions %d %s (%d)", j, newDataObject->cdfVariable->dimensionlinks[j]->name.c_str(), newDataObject->cdfVariable->dimensionlinks[j]->getSize());
}
// for (size_t j = 0; j < newDataObject->cdfVariable->dimensionlinks.size(); j++) {
// CDBDebug("NowHas dimensions %d %s (%d)", j, newDataObject->cdfVariable->dimensionlinks[j]->name.c_str(), newDataObject->cdfVariable->dimensionlinks[j]->getSize());
// }

for (size_t j = 0; j < varToClone->attributes.size(); j++) {
newDataObject->cdfVariable->attributes.push_back(new CDF::Attribute(varToClone->attributes[j]));
Expand All @@ -156,13 +156,13 @@ int CDPPIncludeLayer::execute(CServerConfig::XMLE_DataPostProc *proc, CDataSourc
newDataObject->cdfVariable->setCustomReader(CDF::Variable::CustomMemoryReaderInstance);
}
reader.close();
CDBDebug("CLOSING TEMPORAL METADATA READER");
// CDBDebug("CLOSING TEMPORAL METADATA READER");
delete dataSourceToInclude;
return 0;
}

if (mode == CDATAPOSTPROCESSOR_RUNAFTERREADING) {
CDBDebug("CDATAPOSTPROCESSOR_RUNAFTERREADING::Applying include_layer");
// CDBDebug("CDATAPOSTPROCESSOR_RUNAFTERREADING::Applying include_layer");

// Load the other datasource.
CDataSource *dataSourceToInclude = getDataSource(proc, dataSource);
Expand All @@ -184,7 +184,7 @@ int CDPPIncludeLayer::execute(CServerConfig::XMLE_DataPostProc *proc, CDataSourc
}

// dataSourceToInclude->getDataObject(0)->cdfVariable->data=NULL;
CDBDebug("TEMPORAL FULL READER");
// CDBDebug("TEMPORAL FULL READER");
CDataReader reader;
reader.enablePostProcessors = false;
// CDBDebug("Opening %s",dataSourceToInclude->getFileName());
Expand Down Expand Up @@ -269,7 +269,7 @@ int CDPPIncludeLayer::execute(CServerConfig::XMLE_DataPostProc *proc, CDataSourc
}
}
reader.close();
CDBDebug("CLOSING TEMPORAL FULL READER");
// CDBDebug("CLOSING TEMPORAL FULL READER");
delete dataSourceToInclude;
}
return 0;
Expand Down
1 change: 0 additions & 1 deletion adagucserverEC/CImageDataWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,6 @@ int CImageDataWriter::getFeatureInfo(std::vector<CDataSource *> dataSources, int
}
}
}
CDBDebug("fINISHED TIMESTEP %d ----------------------------->", step);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion python/lib/adaguc/CGIRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def run(self,
env=[],
path=None,
isCGI=True,
timeout=180):
timeout=300):
localenv = {}
if url != None:
localenv['QUERY_STRING'] = url
Expand Down
3 changes: 0 additions & 3 deletions python/python_fastapi_server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,4 @@ async def root():

if __name__ == "__main__":
testadaguc()
print(
'------------------------DEVELOPMENT MODE ----------------------------'
)
uvicorn.run(app="main:app", host="0.0.0.0", port=8080, reload=True)

0 comments on commit cd8fc09

Please sign in to comment.