Пример #1
0
    def test_make_filename():
        netcdf_filepath = "VHP.G04.C07.NC.P1981035.VH.nc"
        subset_name = "kenya"
        t = pd.to_datetime("1981-08-31")

        out_fname = VHIPreprocessor.create_filename(t, netcdf_filepath,
                                                    subset_name)

        expected = "STAR_VHP.G04.C07.NC_1981_8_31_kenya_VH.nc"
        assert out_fname == expected, f"Expected: {expected}, got: {out_fname}"
Пример #2
0
    def test_make_filename():
        netcdf_filepath = 'VHP.G04.C07.NC.P1981035.VH.nc'
        subset_name = 'kenya'
        t = pd.to_datetime('1981-08-31')

        out_fname = VHIPreprocessor.create_filename(
            t,
            netcdf_filepath,
            subset_name,
        )

        expected = 'STAR_VHP.G04.C07.NC_1981_8_31_kenya_VH.nc'
        assert out_fname == expected, f'Expected: {expected}, got: {out_fname}'