Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove print and moving one to use logger #86

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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