File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ def get_output_file(variable, preproc_dir):
269
269
cfg = get_project_config (variable ['project' ])
270
270
271
271
# Join different experiment names
272
- if isinstance (variable [ 'exp' ] , (list , tuple )):
272
+ if isinstance (variable . get ( 'exp' ) , (list , tuple )):
273
273
variable = dict (variable )
274
274
variable ['exp' ] = '-' .join (variable ['exp' ])
275
275
Original file line number Diff line number Diff line change @@ -216,6 +216,9 @@ def write_metadata(products, write_ncl=False):
216
216
)
217
217
metadata = OrderedDict ()
218
218
for product in sorted_products :
219
+ if isinstance (product .attributes .get ('exp' ), (list , tuple )):
220
+ product .attributes = dict (product .attributes )
221
+ product .attributes ['exp' ] = '-' .join (product .attributes ['exp' ])
219
222
metadata [product .filename ] = product .attributes
220
223
221
224
output_filename = os .path .join (output_dir , 'metadata.yml' )
You can’t perform that action at this time.
0 commit comments