Skip to content

Commit

Permalink
Merge pull request #86 from aradhakrishnanGFDL/53-bugfix
Browse files Browse the repository at this point in the history
Remove print and moving one to use logger
  • Loading branch information
ceblanton authored Nov 20, 2024
2 parents 419252d + fb8f1cf commit 29e8868
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions catalogbuilder/intakebuilder/getinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ 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"
else:
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:
Expand Down Expand Up @@ -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"] = ""
Expand Down
2 changes: 1 addition & 1 deletion catalogbuilder/intakebuilder/gfdlcrawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 29e8868

Please sign in to comment.