Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Reduce length and remove space from budget operations table name #218

Closed
lizziel opened this issue May 15, 2023 · 3 comments
Assignees
Labels
category: Bug Something isn't working topic: Benchmark Plots and Tables Issues pertaining to generating plots/tables from benchmark output

Comments

@lizziel
Copy link
Contributor

lizziel commented May 15, 2023

Name: Lizzie Lundgren
Institution: Harvard University

The operations budget table name is very long and contains a space. For example:
Budgets_After_Operations_2019-07-01T00:00:00 - 2019-07-01T01:00:00.txt

The table could instead be named simply Budgets_After_Operations.txt, dropping the time interval strings. It is possible the time strings are needed if generating the budget from the 1-year benchmark but I am not sure. If it is, then we can come up with a more concise time string to append to the filename.

This is not urgent but something to address at some point.

@lizziel lizziel added the category: Bug Something isn't working label May 15, 2023
@lizziel lizziel self-assigned this May 15, 2023
@yantosca yantosca added the topic: Benchmark Plots and Tables Issues pertaining to generating plots/tables from benchmark output label Jun 1, 2023
@yantosca
Copy link
Contributor

yantosca commented Jun 1, 2023

@lizziel: The budget string is computed here e.g. in run_benchmark.py:

        # ==================================================================
        # GCC vs GCC string for month and year
        # (e.g. "2019-07-01T00:00:00 - 2019-08-01T00:00:00")
        # ==================================================================
        if np.equal(gcc_ref_date, gcc_dev_date) and np.equal(
            gcc_end_ref_date, gcc_end_dev_date
        ):
            comparison_str = (
                f"{config['data']['dev']['gcc']['bmk_start']} "
                + f"- {config['data']['dev']['gcc']['bmk_end']}"
            )
        else:
            comparison_str = (
                f"{config['data']['dev']['gcc']['bmk_start']} "
                + f"- {config['data']['dev']['gcc']['bmk_end']}"
                + f" Vs {config['data']['ref']['gcc']['bmk_start']} "
                + f"- {config['data']['ref']['gcc']['bmk_end']}"
            )

and then passed to

            # Create table
            bmk.make_benchmark_operations_budget(
                config["data"]["ref"]["gcc"]["version"],
                ref,
                config["data"]["dev"]["gcc"]["version"],
                dev,
                gcc_ref_sec_diff,
                gcc_dev_sec_diff,
                benchmark_type=config["options"]["bmk_type"],
                label=comparison_str,   # <==== HERE
                dst=gcc_vs_gcc_tablesdir,

A quick fix would be to set label=None in all the calls to the make_benchmark_operations_budget routine. I can try this, and will doublecheck if we need to add a string in the 1-yr benchmark output to avoid clobbering these files.

@yantosca yantosca self-assigned this Jun 1, 2023
@yantosca
Copy link
Contributor

yantosca commented Jun 1, 2023

In the 1-year benchmark scripts it looks like we already have short filenames passed via label:

                 # Create tables
                bmk.make_benchmark_operations_budget(
                    config["data"]["dev"]["gcc"]["version"],
                    refpath,
                    config["data"]["dev"]["gchp"]["version"],
                    devpath,
                    bmk_sec_per_month_dev[m],
                    bmk_sec_per_month_dev[m],
                    benchmark_type=bmk_type,
                    label=f"at 01{bmk_mon_yr_strs_dev[m]}",
                    operations=[
                        "Chemistry",
                        "Convection",
                        "EmisDryDep",
                        "Mixing",
                        "WetDep",
                    ],
                    compute_accum=False,
                    dst=gchp_vs_gcc_tablesdir,

@yantosca
Copy link
Contributor

yantosca commented Jun 2, 2023

PR #227 has now been merged, so we can close this issue.

@yantosca yantosca closed this as completed Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Something isn't working topic: Benchmark Plots and Tables Issues pertaining to generating plots/tables from benchmark output
Projects
None yet
Development

No branches or pull requests

2 participants