From fb8f1cf9e18c466627655d63f78861432f8a3b09 Mon Sep 17 00:00:00 2001 From: aradhakrishnanGFDL Date: Mon, 18 Nov 2024 13:18:21 -0500 Subject: [PATCH] removign print and moving one to use logger as the verbose False is not serving its purpose otherwise. --- catalogbuilder/intakebuilder/getinfo.py | 6 +++--- catalogbuilder/intakebuilder/gfdlcrawler.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/catalogbuilder/intakebuilder/getinfo.py b/catalogbuilder/intakebuilder/getinfo.py index 6ae22bf..a09f8e5 100644 --- a/catalogbuilder/intakebuilder/getinfo.py +++ b/catalogbuilder/intakebuilder/getinfo.py @@ -126,7 +126,7 @@ def getInfoFromGFDLFilename(filename,dictInfo,logger,configyaml): sys.exit("oops in getInfoFromGFDLFilename"+str(i)+str(j)+output_file_template[i]+stemdir[j]) j = j - 1 cnt = cnt + 1 - print(dictInfo["realm"], filename) + #print(dictInfo["realm"], filename) if (".static" in filename): if ("ocean" in dictInfo["realm"]): dictInfo["table_id"] = "Ofx" @@ -134,7 +134,7 @@ def getInfoFromGFDLFilename(filename,dictInfo,logger,configyaml): dictInfo["table_id"] = "fx" return dictInfo -def getInfoFromGFDLDRS(dirpath,projectdir,dictInfo,configyaml,variable_id): +def getInfoFromGFDLDRS(dirpath,projectdir,dictInfo,configyaml,variable_id,logger): ''' Returns info from project directory and the DRS path to the file :param dirpath: @@ -188,7 +188,7 @@ def getInfoFromGFDLDRS(dirpath,projectdir,dictInfo,configyaml,variable_id): print("Skipping time-average data") return {} elif (dictInfo["cell_methods"] == "ts"): - print("time-series data") + logger.debug("time-series data") else: print("This is likely static") dictInfo["cell_methods"] = "" diff --git a/catalogbuilder/intakebuilder/gfdlcrawler.py b/catalogbuilder/intakebuilder/gfdlcrawler.py index 6cacdab..d5e0816 100644 --- a/catalogbuilder/intakebuilder/gfdlcrawler.py +++ b/catalogbuilder/intakebuilder/gfdlcrawler.py @@ -97,7 +97,7 @@ def crawlLocal(projectdir, dictFilter,dictFilterIgnore,logger,configyaml,slow): variable_id = dictInfo["variable_id"] else: variable_id = "" - dictInfo = getinfo.getInfoFromGFDLDRS(dirpath, projectdir, dictInfo,configyaml,variable_id) + dictInfo = getinfo.getInfoFromGFDLDRS(dirpath, projectdir, dictInfo,configyaml,variable_id,logger) list_bad_modellabel = ["","piControl","land-hist","piClim-SO2","abrupt-4xCO2","hist-piAer","hist-piNTCF","piClim-ghg","piClim-OC","hist-GHG","piClim-BC","1pctCO2"] list_bad_chunklabel = ['DO_NOT_USE'] if "source_id" in dictInfo: