def METHOD_NAME(data, atr, out_file=None):
    """Write GMT .grd file for input data matrix, using giant._gmt module.
    Parameters: data     - 2D np.ndarray in int/float, data matrix to write
                atr      - dict, attributes of input data matrix
                out_file - str, output file name
    Returns:    out_file - str, output file name
    """
    # Get 1D array of lats and lons
    lats, lons = get_geo_lat_lon(atr)
    # writing
    print('writing >>> '+out_file)
    write_gmt_simple(
        lons=lons,
        lats=np.flipud(lats),
        z=np.flipud(data),
        fname=out_file,
        name=atr['FILE_TYPE'],
        units=atr['UNIT'],
    )
    return out_file