Commit c48c7b11 authored by Javier Vegas-Regidor's avatar Javier Vegas-Regidor
Browse files

Fix cmorized check at startup

parent bbbb838b
......@@ -422,10 +422,11 @@ class DataConvention(object):
var_path = self.get_file_path(
startdate, member, domain, var, cmor_var, chunk, frequency=freq
)
if os.path.isfile(var_path):
current_count += 1
if current_count >= self.config.cmor.min_cmorized_vars:
break
for path in (var_path, var_path.replace('/original_files/', '/')):
if os.path.isfile(path):
current_count += 1
if current_count >= self.config.cmor.min_cmorized_vars:
break
return current_count
def is_cmorized(self, startdate, member, chunk, domain):
......@@ -985,7 +986,9 @@ class Cmor3Convention(DataConvention):
"""
startdate_path = self.get_startdate_path(startdate)
if not os.path.isdir(startdate_path):
return False
startdate_path = startdate_path.replace('/original_files/', '/')
if not os.path.isdir(startdate_path):
return False
count = 0
member_path = os.path.join(startdate_path, self.get_member_str(member))
if not os.path.isdir(member_path):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment