def add_global_attributes(self,attr_dict):
        if self.nc is None:
            #self.initialize_file()
            mess = "NetCDF.add_global_attributes() should only "+\
                   "be called after the file has been initialized"
            self.logger.warn(mess)
            raise Exception(mess)

        self.log("setting global attributes")
        self.nc.setncatts(attr_dict)
        self.log("setting global attributes")
add global attribute to an initialized file
dataset/ETHPy150Open modflowpy/flopy/flopy/export/netcdf.py/NetCdf.add_global_attributes