def METHOD_NAME(self, gfile, mode):
    """Export grid to Eclipse GRDECL format (ascii, mode=1) or binary (mode=0)."""
    fileformat = "grdecl" if mode == 1 else "bgrdecl"
    GrdeclGrid.from_xtgeo_grid(self).to_file(gfile, fileformat=fileformat)