diff --git a/catalogbuilder/intakebuilder/dat/gfdlcmipfreq.yaml b/catalogbuilder/intakebuilder/dat/gfdlcmipfreq.yaml index 240c103..d60c268 100644 --- a/catalogbuilder/intakebuilder/dat/gfdlcmipfreq.yaml +++ b/catalogbuilder/intakebuilder/dat/gfdlcmipfreq.yaml @@ -1,5 +1,7 @@ monthly: frequency: mon +h0: + frequency: mon daily: frequency: day hourly: diff --git a/catalogbuilder/intakebuilder/getinfo.py b/catalogbuilder/intakebuilder/getinfo.py index 8a79843..68b8506 100644 --- a/catalogbuilder/intakebuilder/getinfo.py +++ b/catalogbuilder/intakebuilder/getinfo.py @@ -134,6 +134,13 @@ def getInfoFromGFDLFilename(filename,dictInfo,logger,configyaml): dictInfo["table_id"] = "fx" return dictInfo +def getRealm(dictInfo): + realm = "" + if (dictInfo["source_id"] == "cam"): + realm = "atmos" + dictInfo["realm"] = realm + return(dictInfo) + def getInfoFromGFDLDRS(dirpath,projectdir,dictInfo,configyaml,variable_id,logger): ''' Returns info from project directory and the DRS path to the file @@ -193,6 +200,10 @@ def getInfoFromGFDLDRS(dirpath,projectdir,dictInfo,configyaml,variable_id,logger print("This is likely static") dictInfo["cell_methods"] = "" dictInfo["member_id"] = "" + #CAM ESM: If realm is empty, ensure if there is a helper utility to populate this + + if("realm" not in dictInfo.keys()): + dictInfo = getRealm(dictInfo) return dictInfo def getInfoFromDRS(dirpath,projectdir,dictInfo): diff --git a/catalogbuilder/intakebuilder/gfdlcrawler.py b/catalogbuilder/intakebuilder/gfdlcrawler.py index d3e7666..210e438 100644 --- a/catalogbuilder/intakebuilder/gfdlcrawler.py +++ b/catalogbuilder/intakebuilder/gfdlcrawler.py @@ -58,7 +58,6 @@ def crawlLocal(projectdir, dictFilter,dictFilterIgnore,logger,configyaml,slow): missingcols = [col for col in diffcols if col not in set_ftemplate] missingcols.remove("path") #because we get this anyway logger.debug("Missing cols from metadata sources:"+ (str)(missingcols)) - #Creating a dictionary to track the unique datasets we come across when using slow mode #The keys are the standard names and the values are lists tracking var_id,realm,etc.. unique_datasets = {'':''} @@ -156,6 +155,6 @@ def crawlLocal(projectdir, dictFilter,dictFilterIgnore,logger,configyaml,slow): cmipfreq = getinfo.getFreqFromYAML(yamlfile,gfdlfreq=dictInfo['frequency']) if(cmipfreq is not None): dictInfo['frequency'] = cmipfreq - #print("Adjusting frequency from ", gfdlfreq ," to ",cmipfreq) + print("Adjusting frequency from ", gfdlfreq ," to ",cmipfreq) listfiles.append(dictInfo) return listfiles