def main(): work_dir = "/home/hujk/ploto/esmvaltool/cases/case108/ploto" Path(work_dir).mkdir(parents=True, exist_ok=True) variables = bock20_recipe.fig4.variables plot_task = generate_default_plot_task(diagnostic_name) task = { "step_type": "plotter", "type": "ploto_esmvaltool.plotter.esmvaltool_diag_plotter", **plot_task, "config": bock20_config.plot_config, "input_files": [ f"{work_dir}/{diagnostic_name}/processor/preproc/{v['variable_group']}/{v['short_name']}_info.ncl" for v in variables ], "step_work_dir": "{work_dir}" + f"/{diagnostic_name}/plotter" } config = bock20_config.config os.chdir(work_dir) run_plotter( task=task, work_dir=work_dir, config=config, )
def run_miles_regimes(): work_dir = "/home/hujk/ploto/esmvaltool/cases/case103/ploto" Path(work_dir).mkdir(parents=True, exist_ok=True) diagnostic_name = "miles_regimes" data_diagnostic_name = "miles_block" plot_task = generate_default_plot_task(name=diagnostic_name) task = { "step_type": "plotter", "type": "ploto_esmvaltool.plotter.esmvaltool_diag_plotter", **plot_task, "config": miles_config.plot_config, "input_files": [f"{work_dir}/{data_diagnostic_name}/processor/preproc/metadata.yml"], } config = miles_config.config os.chdir(work_dir) run_plotter( task=task, work_dir=work_dir, config=config, )
def run_dry_days(): work_dir = "/home/hujk/ploto/esmvaltool/cases/case105/ploto" Path(work_dir).mkdir(parents=True, exist_ok=True) variables = climwip_recipe.weights_variables plot_task = generate_default_plot_task("calculate_weights_climwip") task = { "step_type": "plotter", "type": "ploto_esmvaltool.plotter.esmvaltool_diag_plotter", **plot_task, "config": climwip_config.plot_config, "input_files": [ f"/home/hujk/ploto/esmvaltool/cases/case105/ploto/weights/processor/preproc/{variable['variable_group']}/metadata.yml" for variable in variables ], } config = climwip_config.config os.chdir(work_dir) run_plotter( task=task, work_dir=work_dir, config=config, )
def run_dry_days(): work_dir = "/home/hujk/ploto/esmvaltool/cases/case102/ploto" plot_task = generate_default_plot_task() task = { "step_type": "plotter", "type": "ploto_esmvaltool.plotter.esmvaltool_diag_plotter", "config": diurnal_config.plot_config, **plot_task, "input_files": [ "{work_dir}" + f"/processor/preproc/{v['variable_group']}/metadata.yml" for v in diurnal_recipe.variables ], } config = diurnal_config.config os.chdir(work_dir) run_plotter( task=task, work_dir=work_dir, config=config, )
def main(): work_dir = "/home/hujk/ploto/esmvaltool/cases/case106/ploto" Path(work_dir).mkdir(parents=True, exist_ok=True) variables = deangelis_recipe.f2ext.variables plot_task = generate_default_plot_task(diagnostic_name) task = { "step_type": "plotter", "type": "ploto_esmvaltool.plotter.esmvaltool_diag_plotter", **plot_task, "config": deangelis_config.plot_config, "input_files": [ "{work_dir}" + f"/{diagnostic_name}/processor/preproc/{v['variable_group']}/metadata.yml" for v in variables ], } config = deangelis_config.config os.chdir(work_dir) run_plotter( task=task, work_dir=work_dir, config=config, )
def run_dry_days(): work_dir = "/home/hujk/ploto/esmvaltool/cases/case105/ploto" Path(work_dir).mkdir(parents=True, exist_ok=True) variable = climwip_recipe.graph_variables plot_task = generate_default_plot_task("weighted_temperature_graph") task = { "step_type": "plotter", "type": "ploto_esmvaltool.plotter.esmvaltool_diag_plotter", **plot_task, "config": climwip_config.plot_config, "input_files": [ "{work_dir}/weights/plotter/work/", *[ "{work_dir}" + f"/graph/processor/preproc/{v['variable_group']}/metadata.yml" for v in variable ] ], } config = climwip_config.config os.chdir(work_dir) run_plotter( task=task, work_dir=work_dir, config=config, )
def main(): work_dir = "/home/hujk/ploto/esmvaltool/cases/land/case401/ploto" Path(work_dir).mkdir(parents=True, exist_ok=True) variables = landcover_recipe.obs.variables plot_tasks = [ { **generate_default_plot_task(diagnostic_name), "input_files": [ f"{work_dir}/{diagnostic_name}/processor/preproc/{v['variable_group']}/metadata.yml" for v in variables ], "step_work_dir": "{work_dir}" + f"/{diagnostic_name}/plotter", }, ] tasks = [{ "step_type": "plotter", "type": "ploto_esmvaltool.plotter.esmvaltool_diag_plotter", **plot_task, "config": landcover_config.plot_config, } for plot_task in plot_tasks] config = landcover_config.config os.chdir(work_dir) for task in tasks: run_plotter( task=task, work_dir=work_dir, config=config, )
def get_plotter(): work_dir = "/home/hujk/ploto/esmvaltool/cases/case101/ploto" steps = [] datasets = dry_days_recipe.exp_datasets variables = dry_days_recipe.variables plot_task = generate_default_plot_task() steps.extend([{ "step_type": "plotter", "type": "ploto_esmvaltool.plotter.esmvaltool_diag_plotter", **plot_task, "config": dry_days_config.plot_config, "input_files": [ "{work_dir}" + f"/processor/preproc/{d['dataset']}/{v['variable_group']}/metadata.yml" for d in datasets ], } for v in variables]) config = dry_days_config.config os.chdir(work_dir) for task in steps: run_plotter( task=task, work_dir=work_dir, config=config, )
def main(): work_dir = "/home/hujk/ploto/esmvaltool/cases/case109/ploto" Path(work_dir).mkdir(parents=True, exist_ok=True) variables = strato_recipe.variables plot_tasks = [ { **generate_default_plot_task( diagnostic_name, script_name="autoassess_strato_test_1", control_model="CAS-ESM2-0", exp_model="FGOALS-g3", obs_models=["ERA-Interim"], additional_metrics=["ERA-Interim"], ), "step_work_dir": "{work_dir}" + f"/{diagnostic_name}/plotter/autoassess_strato_test_1", }, { **generate_default_plot_task( diagnostic_name, script_name="autoassess_strato_test_2", control_model="CAS-ESM2-0", exp_model="BCC-CSM2-MR", obs_models=["ERA-Interim"], additional_metrics=["ERA-Interim"], ), "step_work_dir": "{work_dir}" + f"/{diagnostic_name}/plotter/autoassess_strato_test_2", } ] tasks = [ { "step_type": "plotter", "type": "ploto_esmvaltool.plotter.esmvaltool_diag_plotter", **plot_task, "config": strato_config.plot_config, "input_files": [ f"{work_dir}/{diagnostic_name}/processor/preproc/{v['variable_group']}/metadata.yml" for v in variables ], # "step_work_dir": "{work_dir}" + f"/{diagnostic_name}/plotter" } for plot_task in plot_tasks ] config = strato_config.config os.chdir(work_dir) for task in tasks: run_plotter( task=task, work_dir=work_dir, config=config, )
def main(): work_dir = "./dist/tests/esmvalcore_pre_processor" task = generate_default_plot_task() task = { **task, "config": { "log_level": "info", "write_netcdf": True, "write_plots": True, "output_file_type": "png", "profile_diagnostic": False, "auxiliary_data_dir": "/home/hujk/ploto/esmvaltool/cases/case1/case1.2/auxiliary_data" }, "input_files": ["{work_dir}/preproc/pr/metadata.yml"], } config = { "esmvaltool": { "executables": { "py": "/home/hujk/anaconda3/envs/wangdp-esm/bin/python" }, "recipes": { "base": "/home/hujk/ploto/esmvaltool/study/esmvaltool/ESMValTool/esmvaltool/recipes", }, "diag_scripts": { "base": "/home/hujk/ploto/esmvaltool/study/esmvaltool/ESMValTool/esmvaltool/diag_scripts", }, } } run_plotter(task=task, work_dir=work_dir, config=config)