diff --git a/catalogbuilder/intakebuilder/gfdlcrawler.py b/catalogbuilder/intakebuilder/gfdlcrawler.py index b2e29c9..7cd8651 100644 --- a/catalogbuilder/intakebuilder/gfdlcrawler.py +++ b/catalogbuilder/intakebuilder/gfdlcrawler.py @@ -77,21 +77,28 @@ def crawlLocal(projectdir, dictFilter,dictFilterIgnore,logger,configyaml,slow): if not filename.endswith(".nc"): logger.debug("FILE does not end with .nc. Skipping "+ filepath) continue + dictInfo = {} + if "/uda" in filepath: + if len(filename.split('.')) != len(set_ftemplate): + logger.debug("Skipping "+filename) + continue + dictInfo["activity_id"] = "UDA" #if our filename expectations are not met compared to the output_file_path_template in config, skip the loop. TODO revisit for statics - if ("static" not in filename): - if ((len(filename.split('.'))-1) != len(set_ftemplate)): - logger.debug("Skipping "+filename) - continue + else: + if ("static" not in filename): + if ((len(filename.split('.'))-1) != len(set_ftemplate)): + logger.debug("Skipping "+filename) + continue + logger.debug(dirpath+"/"+filename) - dictInfo = {} dictInfo = getinfo.getProject(projectdir, dictInfo) # get info from filename #filepath = os.path.join(dirpath,filename) # 1 AR: Bugfix: this needs to join dirpath and filename to get the full path to the file dictInfo["path"]=filepath - if (op.countOf(filename,".") == 1): - dictInfo = getinfo.getInfoFromFilename(filename,dictInfo, logger) - else: - dictInfo = getinfo.getInfoFromGFDLFilename(filename,dictInfo, logger,configyaml) + #if (op.countOf(filename,".") == 1): + # dictInfo = getinfo.getInfoFromFilename(filename,dictInfo, logger) + #else: + # dictInfo = getinfo.getInfoFromGFDLFilename(filename,dictInfo, logger,configyaml) dictInfo = getinfo.getInfoFromGFDLDRS(dirpath, projectdir, dictInfo,configyaml) 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']