Bugfixes. Add metadata to interfaces in write_nc.