def nccopyAtt(ncin, ncout, excl=[]):
    """Function to copy attributes from an open netcdf file to another"""
    for attnm in ncin.ncattrs():
        if attnm in excl:
            continue
        ncout.setncattr(attnm, ncin.getncattr(attnm))
