From 75fc450773f1b744e30ba3fe87e1032fb1a42b5b Mon Sep 17 00:00:00 2001 From: aradhakrishnanGFDL Date: Thu, 24 Oct 2024 12:57:26 -0400 Subject: [PATCH] error checking --- catalogbuilder/intakebuilder/getinfo.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/catalogbuilder/intakebuilder/getinfo.py b/catalogbuilder/intakebuilder/getinfo.py index a99dd30..c81f10d 100644 --- a/catalogbuilder/intakebuilder/getinfo.py +++ b/catalogbuilder/intakebuilder/getinfo.py @@ -111,11 +111,10 @@ def getInfoFromGFDLFilename(filename,dictInfo,logger,configyaml): sys.exit("No output_path_template found. Check configuration.") if( "static" in filename ): ## For static we handle this differently . The GFDL PP expected pattern is atmos.static.nc - #TODO figure out better ways to set this and use fixed for frequency and table_id output_file_template = ['realm'] - dictInfo["variable_id"] = "fixed" #TODO verify if variable_id is a key - dictInfo["frequency"] = "fx" - dictInfo["table_id"] = "fixed" + if "variable_id" in dictInfo.keys(): dictInfo["variable_id"] = "fixed" + if "frequency" in dictInfo.keys(): dictInfo["frequency"] = "fx" + if "table_id" in dictInfo.keys(): dictInfo["table_id"] = "fixed" ## nlen = len(output_file_template) for i in range(nlen-1,-1,-1): #nlen = 3