diff --git a/ecgtools/parsers/cmip.py b/ecgtools/parsers/cmip.py index 1e3d820..18d432a 100644 --- a/ecgtools/parsers/cmip.py +++ b/ecgtools/parsers/cmip.py @@ -74,6 +74,10 @@ def parse_cmip6(file): attributes['init_year'] = init_year attributes['start_time'] = start_time attributes['end_time'] = end_time + if not (start_time and end_time): + attributes['time_range'] = None + else: + attributes['time_range'] = f'{start_time}-{end_time}' attributes['path'] = file return attributes