def run_read_bin_and_llc_conversion_test(llc_grid_dir, llc_lons_fname='XC.data', llc_hfacc_fname='hFacC.data', llc=90, llc_grid_filetype='>f', make_plots=False):
    "\n\n    Runs test on the read_bin_llc and llc_conversion routines\n\n\n    Parameters\n    ----------\n    llc_grid_dir : string\n        A string with the directory of the binary file to open\n\n    llc_lons_fname : string\n        A string with the name of the XC grid file  [XC.data]\n\n    llc_hfacc_fname : string\n        A string with the name of the hfacC grid file [hFacC.data]\n\n    llc : int\n        the size of the llc grid.  For ECCO v4, we use the llc90 domain \n        so `llc` would be `90`.  \n        Default: 90\n\n    llc_grid_filetype: string\n        the file type, default is big endian (>) 32 bit float (f)\n        alternatively, ('<d') would be little endian (<) 64 bit float (d)\n        Deafult: '>f'\n        \n    make_plots : boolean\n        A boolean specifiying whether or not to make plots\n        Deafult: False\n\n    Returns\n    -------\n    1 : all tests passed\n    0 : at least one test failed\n    \n    "
    TEST_RESULT = 1
    tmpXC_c = read_llc_to_compact(llc_grid_dir, llc_lons_fname, llc=llc, filetype=llc_grid_filetype)
    tmpXC_f = read_llc_to_faces(llc_grid_dir, llc_lons_fname, llc=llc, filetype=llc_grid_filetype)
    tmpXC_t = read_llc_to_tiles(llc_grid_dir, llc_lons_fname, llc=llc, filetype=llc_grid_filetype)
    if make_plots:
        for f in range(1, 6):
            plt.figure()
            plt.imshow(tmpXC_f[f])
            plt.colorbar()
        plot_tiles(tmpXC_t)
        plt.draw()
        raw_input('Press Enter to continue...')
    tmpXC_cf = llc_compact_to_faces(tmpXC_c)
    tmpXC_ct = llc_compact_to_tiles(tmpXC_c)
    for f in range(1, 6):
        tmp = np.unique((tmpXC_f[f] - tmpXC_cf[f]))
        print('unique diffs CF ', f, tmp)
        if ((len(tmp) != 1) or (tmp[0] != 0)):
            TEST_RESULT = 0
            print('failed on 1b-1')
            return TEST_RESULT
    tmp = np.unique((tmpXC_ct - tmpXC_t))
    print('unique diffs for CT ', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 1b-2')
        return TEST_RESULT
    tmpXC_ft = llc_faces_to_tiles(tmpXC_f)
    tmpXC_fc = llc_faces_to_compact(tmpXC_f)
    tmp = np.unique((tmpXC_t - tmpXC_ft))
    print('unique diffs for FT ', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 1c-1')
        return TEST_RESULT
    tmp = np.unique((tmpXC_fc - tmpXC_c))
    print('unique diffs FC', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 1c-2')
        return TEST_RESULT
    tmpXC_tf = llc_tiles_to_faces(tmpXC_t)
    tmpXC_tc = llc_tiles_to_compact(tmpXC_t)
    for f in range(1, 6):
        tmp = np.unique((tmpXC_f[f] - tmpXC_tf[f]))
        print('unique diffs for TF ', f, tmp)
        if ((len(tmp) != 1) or (tmp[0] != 0)):
            TEST_RESULT = 0
            print('failed on 1d-1')
            return TEST_RESULT
    tmp = np.unique((tmpXC_tc - tmpXC_c))
    print('unique diffs TC', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 1d-2')
        return TEST_RESULT
    tmpXC_cftfc = llc_faces_to_compact(llc_tiles_to_faces(llc_faces_to_tiles(llc_compact_to_faces(tmpXC_c))))
    tmp = np.unique((tmpXC_cftfc - tmpXC_c))
    print('unique diffs CFTFC', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 1e')
        return TEST_RESULT
    tmpHF_c = read_llc_to_compact(llc_grid_dir, llc_hfacc_fname, llc=llc, nk=50, filetype=llc_grid_filetype)
    tmpHF_f = read_llc_to_faces(llc_grid_dir, llc_hfacc_fname, llc=llc, nk=50, filetype=llc_grid_filetype)
    tmpHF_t = read_llc_to_tiles(llc_grid_dir, llc_hfacc_fname, llc=llc, nk=50, filetype=llc_grid_filetype)
    tmpHF_c.shape
    if make_plots:
        plt.imshow(tmpHF_c[0, :])
        plt.colorbar()
        plot_tiles(tmpHF_t[:, 0, :])
        plot_tiles(tmpHF_t[:, 20, :])
        plt.draw()
        raw_input('Press Enter to continue...')
    tmpHF_cf = llc_compact_to_faces(tmpHF_c)
    tmpHF_ct = llc_compact_to_tiles(tmpHF_c)
    for f in range(1, 6):
        tmp = np.unique((tmpHF_f[f] - tmpHF_cf[f]))
        print('unique diffs CF ', f, tmp)
        if ((len(tmp) != 1) or (tmp[0] != 0)):
            TEST_RESULT = 0
            print('failed on 2b-1')
            return TEST_RESULT
    tmp = np.unique((tmpHF_ct - tmpHF_t))
    print('unique diffs CT ', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 2b-2')
        return TEST_RESULT
    if make_plots:
        for k in [0, 20]:
            for f in range(1, 6):
                plt.figure()
                plt.imshow(tmpHF_cf[f][k, :], origin='lower')
                plt.colorbar()
        plt.draw()
        raw_input('Press Enter to continue...')
    tmpHF_ft = llc_faces_to_tiles(tmpHF_f)
    tmpHF_fc = llc_faces_to_compact(tmpHF_f)
    if make_plots:
        plot_tiles(tmpHF_ft[:, 0, :])
        plot_tiles(tmpHF_ft[:, 20, :])
        plt.draw()
        raw_input('Press Enter to continue...')
    tmp = np.unique((tmpHF_t - tmpHF_ft))
    print('unique diffs FT ', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 2c-1')
        return TEST_RESULT
    tmp = np.unique((tmpHF_fc - tmpHF_c))
    print('unique diffs FC', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 2c-2')
        return TEST_RESULT
    tmpHF_tf = llc_tiles_to_faces(tmpHF_t)
    tmpHF_tc = llc_tiles_to_compact(tmpHF_t)
    if make_plots:
        for k in [0, 20]:
            for f in range(1, 6):
                plt.figure()
                plt.imshow(tmpHF_tf[f][k, :], origin='lower')
                plt.colorbar()
        plt.draw()
        raw_input('Press Enter to continue...')
    for f in range(1, 6):
        tmp = np.unique((tmpHF_f[f] - tmpHF_tf[f]))
        print('unique diffs TF ', f, tmp)
        if ((len(tmp) != 1) or (tmp[0] != 0)):
            TEST_RESULT = 0
            print('failed on 2d-1')
            return TEST_RESULT
    tmp = np.unique((tmpHF_tc - tmpHF_c))
    print('unique diffs TC ', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 2d-1')
        return TEST_RESULT
    tmpHF_cftfc = llc_faces_to_compact(llc_tiles_to_faces(llc_faces_to_tiles(llc_compact_to_faces(tmpHF_c))))
    tmp = np.unique((tmpHF_cftfc - tmpHF_c))
    print('unique diffs CFTFC ', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 2e')
        return TEST_RESULT
    print('YOU MADE IT THIS FAR, TESTS PASSED!')
    return TEST_RESULT
Runs test on the read_bin_llc and llc_conversion routines


Parameters
----------
llc_grid_dir : string
    A string with the directory of the binary file to open

llc_lons_fname : string
    A string with the name of the XC grid file  [XC.data]

llc_hfacc_fname : string
    A string with the name of the hfacC grid file [hFacC.data]

llc : int
    the size of the llc grid.  For ECCO v4, we use the llc90 domain 
    so `llc` would be `90`.  
    Default: 90

llc_grid_filetype: string
    the file type, default is big endian (>) 32 bit float (f)
    alternatively, ('<d') would be little endian (<) 64 bit float (d)
    Deafult: '>f'
    
make_plots : boolean
    A boolean specifiying whether or not to make plots
    Deafult: False

Returns
-------
1 : all tests passed
0 : at least one test failed
def run_read_bin_and_llc_conversion_test(llc_grid_dir, llc_lons_fname='XC.data', llc_hfacc_fname='hFacC.data', llc=90, llc_grid_filetype='>f', make_plots=False):
    "\n\n    Runs test on the read_bin_llc and llc_conversion routines\n\n\n    Parameters\n    ----------\n    llc_grid_dir : string\n        A string with the directory of the binary file to open\n\n    llc_lons_fname : string\n        A string with the name of the XC grid file  [XC.data]\n\n    llc_hfacc_fname : string\n        A string with the name of the hfacC grid file [hFacC.data]\n\n    llc : int\n        the size of the llc grid.  For ECCO v4, we use the llc90 domain \n        so `llc` would be `90`.  \n        Default: 90\n\n    llc_grid_filetype: string\n        the file type, default is big endian (>) 32 bit float (f)\n        alternatively, ('<d') would be little endian (<) 64 bit float (d)\n        Deafult: '>f'\n        \n    make_plots : boolean\n        A boolean specifiying whether or not to make plots\n        Deafult: False\n\n    Returns\n    -------\n    1 : all tests passed\n    0 : at least one test failed\n    \n    "
    TEST_RESULT = 1
    tmpXC_c = read_llc_to_compact(llc_grid_dir, llc_lons_fname, llc=llc, filetype=llc_grid_filetype)
    tmpXC_f = read_llc_to_faces(llc_grid_dir, llc_lons_fname, llc=llc, filetype=llc_grid_filetype)
    tmpXC_t = read_llc_to_tiles(llc_grid_dir, llc_lons_fname, llc=llc, filetype=llc_grid_filetype)
    if make_plots:
        for f in range(1, 6):
            plt.figure()
            plt.imshow(tmpXC_f[f])
            plt.colorbar()
        plot_tiles(tmpXC_t)
        plt.draw()
        raw_input('Press Enter to continue...')
    tmpXC_cf = llc_compact_to_faces(tmpXC_c)
    tmpXC_ct = llc_compact_to_tiles(tmpXC_c)
    for f in range(1, 6):
        tmp = np.unique((tmpXC_f[f] - tmpXC_cf[f]))
        print('unique diffs CF ', f, tmp)
        if ((len(tmp) != 1) or (tmp[0] != 0)):
            TEST_RESULT = 0
            print('failed on 1b-1')
            return TEST_RESULT
    tmp = np.unique((tmpXC_ct - tmpXC_t))
    print('unique diffs for CT ', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 1b-2')
        return TEST_RESULT
    tmpXC_ft = llc_faces_to_tiles(tmpXC_f)
    tmpXC_fc = llc_faces_to_compact(tmpXC_f)
    tmp = np.unique((tmpXC_t - tmpXC_ft))
    print('unique diffs for FT ', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 1c-1')
        return TEST_RESULT
    tmp = np.unique((tmpXC_fc - tmpXC_c))
    print('unique diffs FC', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 1c-2')
        return TEST_RESULT
    tmpXC_tf = llc_tiles_to_faces(tmpXC_t)
    tmpXC_tc = llc_tiles_to_compact(tmpXC_t)
    for f in range(1, 6):
        tmp = np.unique((tmpXC_f[f] - tmpXC_tf[f]))
        print('unique diffs for TF ', f, tmp)
        if ((len(tmp) != 1) or (tmp[0] != 0)):
            TEST_RESULT = 0
            print('failed on 1d-1')
            return TEST_RESULT
    tmp = np.unique((tmpXC_tc - tmpXC_c))
    print('unique diffs TC', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 1d-2')
        return TEST_RESULT
    tmpXC_cftfc = llc_faces_to_compact(llc_tiles_to_faces(llc_faces_to_tiles(llc_compact_to_faces(tmpXC_c))))
    tmp = np.unique((tmpXC_cftfc - tmpXC_c))
    print('unique diffs CFTFC', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 1e')
        return TEST_RESULT
    tmpHF_c = read_llc_to_compact(llc_grid_dir, llc_hfacc_fname, llc=llc, nk=50, filetype=llc_grid_filetype)
    tmpHF_f = read_llc_to_faces(llc_grid_dir, llc_hfacc_fname, llc=llc, nk=50, filetype=llc_grid_filetype)
    tmpHF_t = read_llc_to_tiles(llc_grid_dir, llc_hfacc_fname, llc=llc, nk=50, filetype=llc_grid_filetype)
    tmpHF_c.shape
    if make_plots:
        plt.imshow(tmpHF_c[0, :])
        plt.colorbar()
        plot_tiles(tmpHF_t[:, 0, :])
        plot_tiles(tmpHF_t[:, 20, :])
        plt.draw()
        raw_input('Press Enter to continue...')
    tmpHF_cf = llc_compact_to_faces(tmpHF_c)
    tmpHF_ct = llc_compact_to_tiles(tmpHF_c)
    for f in range(1, 6):
        tmp = np.unique((tmpHF_f[f] - tmpHF_cf[f]))
        print('unique diffs CF ', f, tmp)
        if ((len(tmp) != 1) or (tmp[0] != 0)):
            TEST_RESULT = 0
            print('failed on 2b-1')
            return TEST_RESULT
    tmp = np.unique((tmpHF_ct - tmpHF_t))
    print('unique diffs CT ', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 2b-2')
        return TEST_RESULT
    if make_plots:
        for k in [0, 20]:
            for f in range(1, 6):
                plt.figure()
                plt.imshow(tmpHF_cf[f][k, :], origin='lower')
                plt.colorbar()
        plt.draw()
        raw_input('Press Enter to continue...')
    tmpHF_ft = llc_faces_to_tiles(tmpHF_f)
    tmpHF_fc = llc_faces_to_compact(tmpHF_f)
    if make_plots:
        plot_tiles(tmpHF_ft[:, 0, :])
        plot_tiles(tmpHF_ft[:, 20, :])
        plt.draw()
        raw_input('Press Enter to continue...')
    tmp = np.unique((tmpHF_t - tmpHF_ft))
    print('unique diffs FT ', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 2c-1')
        return TEST_RESULT
    tmp = np.unique((tmpHF_fc - tmpHF_c))
    print('unique diffs FC', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 2c-2')
        return TEST_RESULT
    tmpHF_tf = llc_tiles_to_faces(tmpHF_t)
    tmpHF_tc = llc_tiles_to_compact(tmpHF_t)
    if make_plots:
        for k in [0, 20]:
            for f in range(1, 6):
                plt.figure()
                plt.imshow(tmpHF_tf[f][k, :], origin='lower')
                plt.colorbar()
        plt.draw()
        raw_input('Press Enter to continue...')
    for f in range(1, 6):
        tmp = np.unique((tmpHF_f[f] - tmpHF_tf[f]))
        print('unique diffs TF ', f, tmp)
        if ((len(tmp) != 1) or (tmp[0] != 0)):
            TEST_RESULT = 0
            print('failed on 2d-1')
            return TEST_RESULT
    tmp = np.unique((tmpHF_tc - tmpHF_c))
    print('unique diffs TC ', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 2d-1')
        return TEST_RESULT
    tmpHF_cftfc = llc_faces_to_compact(llc_tiles_to_faces(llc_faces_to_tiles(llc_compact_to_faces(tmpHF_c))))
    tmp = np.unique((tmpHF_cftfc - tmpHF_c))
    print('unique diffs CFTFC ', tmp)
    if ((len(tmp) != 1) or (tmp[0] != 0)):
        TEST_RESULT = 0
        print('failed on 2e')
        return TEST_RESULT
    print('YOU MADE IT THIS FAR, TESTS PASSED!')
    return TEST_RESULT