Make IF/ELSE statements more concise by using MERGE

1 job for hdf5_bool_attribute in 2 minutes and 2 seconds (queued for 7 seconds)