From 6fa2bf439f3817b3663ada1e0a601c86f371a1da Mon Sep 17 00:00:00 2001 From: aradhakrishnanGFDL Date: Mon, 21 Oct 2024 14:40:19 -0400 Subject: [PATCH 01/14] a logger message needs formatting moving from print to logger --- catalogbuilder/intakebuilder/gfdlcrawler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalogbuilder/intakebuilder/gfdlcrawler.py b/catalogbuilder/intakebuilder/gfdlcrawler.py index ed6f4ba..b2e29c9 100644 --- a/catalogbuilder/intakebuilder/gfdlcrawler.py +++ b/catalogbuilder/intakebuilder/gfdlcrawler.py @@ -57,7 +57,7 @@ def crawlLocal(projectdir, dictFilter,dictFilterIgnore,logger,configyaml,slow): if ( len(set_ftemplate) > 0 ): 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:", missingcols) + logger.debug("Missing cols from metadata sources:"+ (str)(missingcols)) #TODO INCLUDE filter in traversing through directories at the top From 76e34a269eea9150754cad7b7cb0a683d8be7a95 Mon Sep 17 00:00:00 2001 From: aradhakrishnanGFDL Date: Mon, 21 Oct 2024 16:39:47 -0400 Subject: [PATCH 02/14] static start implementations, path not skipped now --- catalogbuilder/intakebuilder/getinfo.py | 21 ++++++++++++++++++--- catalogbuilder/intakebuilder/gfdlcrawler.py | 6 +++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/catalogbuilder/intakebuilder/getinfo.py b/catalogbuilder/intakebuilder/getinfo.py index f413d6b..a82f2e3 100644 --- a/catalogbuilder/intakebuilder/getinfo.py +++ b/catalogbuilder/intakebuilder/getinfo.py @@ -97,6 +97,7 @@ def getInfoFromFilename(filename,dictInfo,logger): def getInfoFromGFDLFilename(filename,dictInfo,logger,configyaml): # 5 AR: get the following from the netCDF filename e.g. atmos.200501-200912.t_ref.nc if ( (filename.endswith(".nc"))): # & ("static" not in filename)) ): + print(filename) stemdir = filename.split(".") #lets go backwards and match given input directory to the template, add things to dictInfo j = -2 @@ -108,6 +109,12 @@ def getInfoFromGFDLFilename(filename,dictInfo,logger,configyaml): output_file_template = builderconfig.output_file_template except: 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','frequency'] + dictInfo["variable_id"] = "fixed" #TODO verify if variable_id is a key + ## nlen = len(output_file_template) for i in range(nlen-1,-1,-1): #nlen = 3 try: @@ -122,6 +129,7 @@ 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) return dictInfo def getInfoFromGFDLDRS(dirpath,projectdir,dictInfo,configyaml): @@ -151,7 +159,6 @@ def getInfoFromGFDLDRS(dirpath,projectdir,dictInfo,configyaml): output_path_template = builderconfig.output_path_template except: sys.exit("No output_path_template found in builderconfig.py. Check configuration.") - nlen = len(output_path_template) for i in range(nlen-1,0,-1): try: @@ -168,10 +175,18 @@ def getInfoFromGFDLDRS(dirpath,projectdir,dictInfo,configyaml): # WE do not want to work with anythi:1 # ng that's not time series #TODO have verbose option to print message + #TODO Make this elegant and intuitive + #TODO logger messages, not print if "cell_methods" in dictInfo.keys(): - if (dictInfo["cell_methods"] != "ts"): - #print("Skipping non-timeseries data") + if (dictInfo["cell_methods"] == "av"): + print("Skipping time-average data") return {} + elif (dictInfo["cell_methods"] == "ts"): + print("time-series data") + else: + print("This is likely static") + dictInfo["cell_methods"] = "" + dictInfo["member_id"] = "" return dictInfo def getInfoFromDRS(dirpath,projectdir,dictInfo): diff --git a/catalogbuilder/intakebuilder/gfdlcrawler.py b/catalogbuilder/intakebuilder/gfdlcrawler.py index b2e29c9..c1117c9 100644 --- a/catalogbuilder/intakebuilder/gfdlcrawler.py +++ b/catalogbuilder/intakebuilder/gfdlcrawler.py @@ -82,6 +82,8 @@ def crawlLocal(projectdir, dictFilter,dictFilterIgnore,logger,configyaml,slow): if ((len(filename.split('.'))-1) != len(set_ftemplate)): logger.debug("Skipping "+filename) continue + else: + print("tmp debugging static", filename) logger.debug(dirpath+"/"+filename) dictInfo = {} dictInfo = getinfo.getProject(projectdir, dictInfo) @@ -92,7 +94,9 @@ def crawlLocal(projectdir, dictFilter,dictFilterIgnore,logger,configyaml,slow): dictInfo = getinfo.getInfoFromFilename(filename,dictInfo, logger) else: dictInfo = getinfo.getInfoFromGFDLFilename(filename,dictInfo, logger,configyaml) + print("1. ", dictInfo) dictInfo = getinfo.getInfoFromGFDLDRS(dirpath, projectdir, dictInfo,configyaml) + print("2.", dictInfo) 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: @@ -129,6 +133,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 From 5b94458a8e55c07a9421e42b54be61f82bbf1658 Mon Sep 17 00:00:00 2001 From: aradhakrishnanGFDL Date: Tue, 22 Oct 2024 11:07:29 -0400 Subject: [PATCH 03/14] the other columns for static seem ok for the first pass --- catalogbuilder/intakebuilder/getinfo.py | 10 ++++++++-- catalogbuilder/intakebuilder/gfdlcrawler.py | 7 ++++++- configs/config-template.yaml | 4 ++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/catalogbuilder/intakebuilder/getinfo.py b/catalogbuilder/intakebuilder/getinfo.py index a82f2e3..d30f6d6 100644 --- a/catalogbuilder/intakebuilder/getinfo.py +++ b/catalogbuilder/intakebuilder/getinfo.py @@ -112,8 +112,10 @@ def getInfoFromGFDLFilename(filename,dictInfo,logger,configyaml): 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','frequency'] + output_file_template = ['realm'] dictInfo["variable_id"] = "fixed" #TODO verify if variable_id is a key + dictInfo["frequency"] = "fixed" + dictInfo["table_id"] = "fixed" ## nlen = len(output_file_template) for i in range(nlen-1,-1,-1): #nlen = 3 @@ -132,11 +134,12 @@ def getInfoFromGFDLFilename(filename,dictInfo,logger,configyaml): print(dictInfo) return dictInfo -def getInfoFromGFDLDRS(dirpath,projectdir,dictInfo,configyaml): +def getInfoFromGFDLDRS(dirpath,projectdir,dictInfo,configyaml,variable_id): ''' Returns info from project directory and the DRS path to the file :param dirpath: :param drsstructure: + :param variable_id to check for static :return: ''' # we need thise dict keys "project", "institute", "model", "experiment_id", @@ -159,6 +162,9 @@ def getInfoFromGFDLDRS(dirpath,projectdir,dictInfo,configyaml): output_path_template = builderconfig.output_path_template except: sys.exit("No output_path_template found in builderconfig.py. Check configuration.") + #If variable_id is fixed, it's a GFDL PP static dataset and the output path template in config is aligned only up to a particular directory structure as this does not have the ts and frequency or time chunks + if(variable_id == "fixed"): + output_path_template = output_path_template[:-3 or None] nlen = len(output_path_template) for i in range(nlen-1,0,-1): try: diff --git a/catalogbuilder/intakebuilder/gfdlcrawler.py b/catalogbuilder/intakebuilder/gfdlcrawler.py index c1117c9..919ae5a 100644 --- a/catalogbuilder/intakebuilder/gfdlcrawler.py +++ b/catalogbuilder/intakebuilder/gfdlcrawler.py @@ -95,7 +95,12 @@ def crawlLocal(projectdir, dictFilter,dictFilterIgnore,logger,configyaml,slow): else: dictInfo = getinfo.getInfoFromGFDLFilename(filename,dictInfo, logger,configyaml) print("1. ", dictInfo) - dictInfo = getinfo.getInfoFromGFDLDRS(dirpath, projectdir, dictInfo,configyaml) + if "variable_id" in dictInfo.keys(): + if dictInfo["variable_id"] is not None: + variable_id = dictInfo["variable_id"] + else: + variable_id = "" + dictInfo = getinfo.getInfoFromGFDLDRS(dirpath, projectdir, dictInfo,configyaml,variable_id) print("2.", dictInfo) 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'] diff --git a/configs/config-template.yaml b/configs/config-template.yaml index 85417ad..d1863e2 100644 --- a/configs/config-template.yaml +++ b/configs/config-template.yaml @@ -26,8 +26,8 @@ headerlist: ["activity_id", "institution_id", "source_id", "experiment_id", #this is a valid value in headerlist as well. #The fourth directory is am5f3b1r0 which does not map to an existing header value. So we simply NA in output_path_template #for the fourth value. - -output_path_template: ['NA','NA','source_id','NA','experiment_id','platform','custom_pp','realm','cell_methods','frequency','chunk_freq'] +#/archive/a1r/fre/FMS2024.02_OM5_20240724/CM4.5v01_om5b06_piC_noBLING/gfdl.ncrc5-intel23-prod-openmp/pp/ocean_monthly/ocean_monthly.static.nc +output_path_template: ['NA','NA','NA','source_id','experiment_id','platform','custom_pp','realm','cell_methods','frequency','chunk_freq'] output_file_template: ['realm','time_range','variable_id'] From 25a55aa0cb1dc61fd665efacc4c3ea783a608990 Mon Sep 17 00:00:00 2001 From: aradhakrishnanGFDL Date: Wed, 23 Oct 2024 11:35:42 -0400 Subject: [PATCH 04/14] frequency fx --- catalogbuilder/intakebuilder/getinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalogbuilder/intakebuilder/getinfo.py b/catalogbuilder/intakebuilder/getinfo.py index d30f6d6..a99dd30 100644 --- a/catalogbuilder/intakebuilder/getinfo.py +++ b/catalogbuilder/intakebuilder/getinfo.py @@ -114,7 +114,7 @@ def getInfoFromGFDLFilename(filename,dictInfo,logger,configyaml): #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"] = "fixed" + dictInfo["frequency"] = "fx" dictInfo["table_id"] = "fixed" ## nlen = len(output_file_template) From d5a40abce8b38391458d091ee3d720b8f346989e Mon Sep 17 00:00:00 2001 From: aradhakrishnanGFDL Date: Wed, 23 Oct 2024 13:12:48 -0400 Subject: [PATCH 05/14] two grid_label columns.. eliminating one --- catalogbuilder/intakebuilder/builderconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalogbuilder/intakebuilder/builderconfig.py b/catalogbuilder/intakebuilder/builderconfig.py index d6c9ad1..d2a3723 100644 --- a/catalogbuilder/intakebuilder/builderconfig.py +++ b/catalogbuilder/intakebuilder/builderconfig.py @@ -15,7 +15,7 @@ headerlist = ["activity_id", "institution_id", "source_id", "experiment_id", "frequency", "realm", "table_id", "member_id", "grid_label", "variable_id", - "time_range", "chunk_freq","grid_label","platform","dimensions","cell_methods","standard_name","path"] + "time_range", "chunk_freq","platform","dimensions","cell_methods","standard_name","path"] #what kind of directory structure to expect? #For a directory structure like /archive/am5/am5/am5f3b1r0/c96L65_am5f3b1r0_pdclim1850F/gfdl.ncrc5-deploy-prod-openmp/pp From 75fc450773f1b744e30ba3fe87e1032fb1a42b5b Mon Sep 17 00:00:00 2001 From: aradhakrishnanGFDL Date: Thu, 24 Oct 2024 12:57:26 -0400 Subject: [PATCH 06/14] 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 From 540cd38c0e2938a2b2c62e0aa8d21f6a6242c5a5 Mon Sep 17 00:00:00 2001 From: aradhakrishnanGFDL Date: Fri, 25 Oct 2024 10:42:07 -0400 Subject: [PATCH 07/14] table_id fx --- catalogbuilder/intakebuilder/getinfo.py | 2 +- catalogbuilder/intakebuilder/gfdlcrawler.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/catalogbuilder/intakebuilder/getinfo.py b/catalogbuilder/intakebuilder/getinfo.py index c81f10d..7bed7de 100644 --- a/catalogbuilder/intakebuilder/getinfo.py +++ b/catalogbuilder/intakebuilder/getinfo.py @@ -114,7 +114,7 @@ def getInfoFromGFDLFilename(filename,dictInfo,logger,configyaml): output_file_template = ['realm'] 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" + if "table_id" in dictInfo.keys(): dictInfo["table_id"] = "fx" ## nlen = len(output_file_template) for i in range(nlen-1,-1,-1): #nlen = 3 diff --git a/catalogbuilder/intakebuilder/gfdlcrawler.py b/catalogbuilder/intakebuilder/gfdlcrawler.py index 919ae5a..6cacdab 100644 --- a/catalogbuilder/intakebuilder/gfdlcrawler.py +++ b/catalogbuilder/intakebuilder/gfdlcrawler.py @@ -82,8 +82,6 @@ def crawlLocal(projectdir, dictFilter,dictFilterIgnore,logger,configyaml,slow): if ((len(filename.split('.'))-1) != len(set_ftemplate)): logger.debug("Skipping "+filename) continue - else: - print("tmp debugging static", filename) logger.debug(dirpath+"/"+filename) dictInfo = {} dictInfo = getinfo.getProject(projectdir, dictInfo) @@ -94,14 +92,12 @@ def crawlLocal(projectdir, dictFilter,dictFilterIgnore,logger,configyaml,slow): dictInfo = getinfo.getInfoFromFilename(filename,dictInfo, logger) else: dictInfo = getinfo.getInfoFromGFDLFilename(filename,dictInfo, logger,configyaml) - print("1. ", dictInfo) if "variable_id" in dictInfo.keys(): if dictInfo["variable_id"] is not None: variable_id = dictInfo["variable_id"] else: variable_id = "" dictInfo = getinfo.getInfoFromGFDLDRS(dirpath, projectdir, dictInfo,configyaml,variable_id) - print("2.", dictInfo) 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: From 460a089d2196f9ab409ec52c6fdf702af3ec8bd4 Mon Sep 17 00:00:00 2001 From: aradhakrishnanGFDL Date: Fri, 25 Oct 2024 10:51:20 -0400 Subject: [PATCH 08/14] one step back and two steps forward --- catalogbuilder/intakebuilder/getinfo.py | 7 +++---- catalogbuilder/intakebuilder/gfdlcrawler.py | 4 ---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/catalogbuilder/intakebuilder/getinfo.py b/catalogbuilder/intakebuilder/getinfo.py index a99dd30..c4fabd0 100644 --- a/catalogbuilder/intakebuilder/getinfo.py +++ b/catalogbuilder/intakebuilder/getinfo.py @@ -97,7 +97,6 @@ def getInfoFromFilename(filename,dictInfo,logger): def getInfoFromGFDLFilename(filename,dictInfo,logger,configyaml): # 5 AR: get the following from the netCDF filename e.g. atmos.200501-200912.t_ref.nc if ( (filename.endswith(".nc"))): # & ("static" not in filename)) ): - print(filename) stemdir = filename.split(".") #lets go backwards and match given input directory to the template, add things to dictInfo j = -2 @@ -111,11 +110,11 @@ 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 + #TODO error checking as needed output_file_template = ['realm'] - dictInfo["variable_id"] = "fixed" #TODO verify if variable_id is a key + dictInfo["variable_id"] = "fixed" dictInfo["frequency"] = "fx" - dictInfo["table_id"] = "fixed" + dictInfo["table_id"] = "fx" ## nlen = len(output_file_template) for i in range(nlen-1,-1,-1): #nlen = 3 diff --git a/catalogbuilder/intakebuilder/gfdlcrawler.py b/catalogbuilder/intakebuilder/gfdlcrawler.py index 919ae5a..6cacdab 100644 --- a/catalogbuilder/intakebuilder/gfdlcrawler.py +++ b/catalogbuilder/intakebuilder/gfdlcrawler.py @@ -82,8 +82,6 @@ def crawlLocal(projectdir, dictFilter,dictFilterIgnore,logger,configyaml,slow): if ((len(filename.split('.'))-1) != len(set_ftemplate)): logger.debug("Skipping "+filename) continue - else: - print("tmp debugging static", filename) logger.debug(dirpath+"/"+filename) dictInfo = {} dictInfo = getinfo.getProject(projectdir, dictInfo) @@ -94,14 +92,12 @@ def crawlLocal(projectdir, dictFilter,dictFilterIgnore,logger,configyaml,slow): dictInfo = getinfo.getInfoFromFilename(filename,dictInfo, logger) else: dictInfo = getinfo.getInfoFromGFDLFilename(filename,dictInfo, logger,configyaml) - print("1. ", dictInfo) if "variable_id" in dictInfo.keys(): if dictInfo["variable_id"] is not None: variable_id = dictInfo["variable_id"] else: variable_id = "" dictInfo = getinfo.getInfoFromGFDLDRS(dirpath, projectdir, dictInfo,configyaml,variable_id) - print("2.", dictInfo) 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: From b71722133d1e4cd4aab9154a34b333d7596b330d Mon Sep 17 00:00:00 2001 From: Aparna Radhakrishnan Date: Wed, 30 Oct 2024 11:56:32 -0400 Subject: [PATCH 09/14] Update catalogbuilder/intakebuilder/getinfo.py --- catalogbuilder/intakebuilder/getinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalogbuilder/intakebuilder/getinfo.py b/catalogbuilder/intakebuilder/getinfo.py index bdea6fc..6001533 100644 --- a/catalogbuilder/intakebuilder/getinfo.py +++ b/catalogbuilder/intakebuilder/getinfo.py @@ -108,7 +108,7 @@ def getInfoFromGFDLFilename(filename,dictInfo,logger,configyaml): output_file_template = builderconfig.output_file_template except: sys.exit("No output_path_template found. Check configuration.") - if( "static" in filename ): + if( ".static" in filename ): ## For static we handle this differently . The GFDL PP expected pattern is atmos.static.nc #TODO error checking as needed output_file_template = ['realm'] From 87eb4078223429077ff61b3683a318e6f1aa1cc0 Mon Sep 17 00:00:00 2001 From: aradhakrishnanGFDL Date: Wed, 30 Oct 2024 15:55:34 -0400 Subject: [PATCH 10/14] if realm has ocean , table_id is Ofx. Also fixed a file name template bug --- catalogbuilder/intakebuilder/getinfo.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/catalogbuilder/intakebuilder/getinfo.py b/catalogbuilder/intakebuilder/getinfo.py index 6001533..bf7fbd6 100644 --- a/catalogbuilder/intakebuilder/getinfo.py +++ b/catalogbuilder/intakebuilder/getinfo.py @@ -111,25 +111,27 @@ def getInfoFromGFDLFilename(filename,dictInfo,logger,configyaml): if( ".static" in filename ): ## For static we handle this differently . The GFDL PP expected pattern is atmos.static.nc #TODO error checking as needed - output_file_template = ['realm'] + output_file_template = ['realm','NA'] dictInfo["variable_id"] = "fixed" dictInfo["frequency"] = "fx" - dictInfo["table_id"] = "fx" nlen = len(output_file_template) for i in range(nlen-1,-1,-1): #nlen = 3 try: if(output_file_template[i] != "NA"): try: - #print(output_file_template[i], "=" , stemdir[(j)]) dictInfo[output_file_template[i]] = stemdir[(j)] except IndexError: - #print("Check configuration. Is output file template set correctly?") dictInfo[output_file_template[i]] = "" except IndexError: sys.exit("oops in getInfoFromGFDLFilename"+str(i)+str(j)+output_file_template[i]+stemdir[j]) j = j - 1 cnt = cnt + 1 - print(dictInfo) + 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): From caf67fdfd830aad1f35c2b119f97629766e55433 Mon Sep 17 00:00:00 2001 From: aradhakrishnanGFDL Date: Wed, 30 Oct 2024 15:59:40 -0400 Subject: [PATCH 11/14] adding specific version to intake-esm for it to be reproducible as newer versions may not be the most stable ones --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index d79469d..590a99f 100644 --- a/environment.yml +++ b/environment.yml @@ -10,5 +10,5 @@ dependencies: - xarray - pandas - jsondiff - - intake-esm + - intake-esm=2023.7.7 - boto3 From 6e56050d102d582f32d74700e379045a2b7c02a9 Mon Sep 17 00:00:00 2001 From: Aparna Radhakrishnan Date: Wed, 30 Oct 2024 16:08:11 -0400 Subject: [PATCH 12/14] Update setup.py CI failure, trying to see what the issue is. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 10fb18e..42532d4 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ 'xarray', 'pandas', 'jsondiff', - 'intake-esm', + 'intake-esm=2023.7.7', 'boto3' ] ) From 28851770b3edd0046386eee43f341fa8738696b0 Mon Sep 17 00:00:00 2001 From: Aparna Radhakrishnan Date: Wed, 30 Oct 2024 16:11:26 -0400 Subject: [PATCH 13/14] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 42532d4..5613cf3 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ 'xarray', 'pandas', 'jsondiff', - 'intake-esm=2023.7.7', + 'intake-esm==2023.7.7', 'boto3' ] ) From a40e18acf84c79623a4204b948cece8c3c0b6299 Mon Sep 17 00:00:00 2001 From: Aparna Radhakrishnan Date: Wed, 30 Oct 2024 16:17:33 -0400 Subject: [PATCH 14/14] Update environment.yml --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index 590a99f..b989d92 100644 --- a/environment.yml +++ b/environment.yml @@ -6,6 +6,7 @@ channels: dependencies: - python - pytest + - setuptools - click - xarray - pandas