def run(exp_dataset, variable):
    work_dir = "/home/hujk/ploto/esmvaltool/cases/case105/ploto"
    Path(work_dir).mkdir(parents=True, exist_ok=True)

    variable = combine_variable(
        variable=variable,
        dataset=exp_dataset,
    )
    add_variable_info(variable)

    data_path = climwip_config.data_path

    task = {
        "products": [{
            "variable": variable,
            "output": {
                "output_directory": "{dataset}/{variable_group}",
                "output_data_source_file": "data_source.yml",
            }
        }],
        "output": {
            "output_directory":
            "{work_dir}" + f"/{diagnostic_name}/fetcher/preproc",
        },
        "config": {
            "data_path": data_path,
        },
    }

    config = {}

    get_data(task=task, work_dir=work_dir, config=config)
def get_fetcher(exp_dataset, variable):
    combined_dataset = combine_variable(dataset=exp_dataset, variable=variable)
    add_variable_info(combined_dataset)

    data_path = zmnam_config.data_path

    task = {
        "products": [{
            "variable": combined_dataset,
            "output": {
                "output_directory": "{alias}/{variable_group}",
                "output_data_source_file": "data_source.yml",
            }
        }],
        "output": {
            "output_directory": "{work_dir}/fetcher/preproc/",
        },
        "config": {
            "data_path": data_path,
        },
        "step_type":
        "fetcher",
        "type":
        "ploto_esmvaltool.fetcher.esmvalcore_fetcher",
    }

    return task
def get_fetcher(exp_dataset, variable, diagnostic_name):
    combined_dataset = {**exp_dataset, **variable}
    add_variable_info(combined_dataset)

    task = {
        "products": [{
            "variable": combined_dataset,
            "output": {
                "output_directory": "{dataset}/{variable_group}",
                "output_data_source_file": "data_source.yml",
            }
        }],
        "output": {
            "output_directory":
            "{work_dir}" + f"/{diagnostic_name}/fetcher/preproc",
        },
        "config": {
            "data_path": miles_config.data_path,
        },
        "step_type":
        "fetcher",
        "type":
        "ploto_esmvaltool.fetcher.esmvalcore_fetcher",
    }

    return task
Beispiel #4
0
def run(exp_dataset, variable):
    work_dir = "/home/hujk/ploto/esmvaltool/cases/case102/ploto"

    combined_variable = {**exp_dataset, **variable}
    add_variable_info(combined_variable)

    data_path = diurnal_config.data_path

    task = {
        "products": [{
            "variable": combined_variable,
            "output": {
                "output_directory": "{alias}/{variable_group}",
                "output_data_source_file": "data_source.yml",
            }
        }],
        "config": {
            "data_path": data_path,
        },
        "output": {
            "output_directory": "{work_dir}/fetcher/preproc",
        }
    }

    config = {}

    get_data(task=task, work_dir=work_dir, config=config)
def run(
        exp_dataset,
        variable,
        diagnostic_name
):
    work_dir = "/home/hujk/ploto/esmvaltool/cases/case103/ploto"
    Path(work_dir).mkdir(parents=True, exist_ok=True)

    operations = generate_default_operations()

    combined_dataset = combine_variable(
        dataset=exp_dataset,
        variable=variable,
    )
    add_variable_info(combined_dataset)


    diagnostic = {
        "diagnostic": "diurnal_temperature_indicator",
    }

    settings = miles_recipe.processor_settings[combined_dataset["preprocessor"]]

    task = {
        "products": [
            {
                "variable": combined_dataset,
                "input": {
                    "input_data_source_file": (
                        "{work_dir}"
                        f"/{diagnostic_name}/fetcher/preproc"
                        "/{dataset}/{variable_group}/data_source.yml"
                    ),
                },
                "output": {
                    "output_directory": "{dataset}/{variable_group}"
                },
                "settings": settings
            }
        ],

        # operations
        "operations": operations,

        "diagnostic": diagnostic,

        "output": {
            "output_directory": "{work_dir}" + f"/{diagnostic_name}/processor/preproc",
        },
    }

    run_processor(
        task=task,
        work_dir=work_dir,
        config={},
    )
def run(
        exp_dataset,
        variable,
):
    work_dir = "/home/hujk/ploto/esmvaltool/cases/case105/ploto"
    Path(work_dir).mkdir(parents=True, exist_ok=True)

    operations = generate_default_operations("climatological_mean")

    combined_dataset = combine_variable(
        dataset=exp_dataset,
        variable=variable
    )
    add_variable_info(combined_dataset)

    diagnostic = {
        "diagnostic": "calculate_weights_climwip",
    }

    settings = climwip_recipe.processor_settings[combined_dataset["preprocessor"]]

    task = {
        "products": [
            {
                "variable": combined_dataset,
                "input": {
                    "input_data_source_file": (
                            "{work_dir}" + f"/{diagnostic_name}/fetcher/preproc" + "/{dataset}/{variable_group}/data_source.yml"
                    ),
                },
                "output": {
                    "output_directory": "{alias}/{variable_group}"
                },
                "settings": settings
            }
        ],

        # operations
        "operations": operations,

        "diagnostic": diagnostic,

        "output": {
            "output_directory": "{work_dir}" + f"/{diagnostic_name}/processor/preproc",
        },

        "step_type": "processor",
        "type": "ploto_esmvaltool.processor.esmvalcore_pre_processor",
    }

    run_processor(
        task=task,
        work_dir=work_dir,
        config={},
    )
def get_processor(exp_dataset, variable, diagnostic_name):
    operations = generate_default_operations()

    combined_dataset = combine_variable(
        dataset=exp_dataset,
        variable=variable,
    )
    add_variable_info(combined_dataset)

    diagnostic = {
        "diagnostic": "diurnal_temperature_indicator",
    }

    settings = miles_recipe.processor_settings[
        combined_dataset["preprocessor"]]

    task = {
        "products": [{
            "variable": combined_dataset,
            "input": {
                "input_data_source_file":
                ("{work_dir}"
                 f"/{diagnostic_name}/fetcher/preproc"
                 "/{dataset}/{variable_group}/data_source.yml"),
            },
            "output": {
                "output_directory": "{dataset}/{variable_group}"
            },
            "settings": settings
        }],

        # operations
        "operations":
        operations,
        "diagnostic":
        diagnostic,
        "output": {
            "output_directory":
            "{work_dir}" + f"/{diagnostic_name}/processor/preproc",
        },
        "step_type":
        "processor",
        "type":
        "ploto_esmvaltool.processor.esmvalcore_pre_processor",
    }
    return task
def get_processor(
        exp_dataset,
        variable
):
    operations = generate_default_operations()

    combined_dataset = combine_variable(
        dataset=exp_dataset,
        variable=variable
    )
    add_variable_info(combined_dataset)

    diagnostic = {
        "diagnostic": "dry_days",
    }

    task = {
        "products": [
            {
                "variable": combined_dataset,
                "input": {
                    "input_data_source_file": "{work_dir}/fetcher/preproc/{dataset}/{variable_group}/data_source.yml",
                },
                "output": {
                    "output_directory": "{dataset}/{variable_group}"
                }
            }
        ],

        # operations
        "operations": operations,

        "diagnostic": diagnostic,

        "output": {
            "output_directory": "{work_dir}/processor/preproc",
        },

        "step_type": "processor",
        "type": "ploto_esmvaltool.processor.esmvalcore_pre_processor",
    }

    return task
Beispiel #9
0
def get_processor(exp_dataset, variable):
    work_dir = "/home/hujk/ploto/esmvaltool/cases/case101/ploto"
    operations = generate_default_operations()

    combined_dataset = combine_variable(
        dataset=exp_dataset,
        variable=variable,
    )
    add_variable_info(combined_dataset)

    diagnostic = {
        "diagnostic": "dry_days",
    }

    task = {
        "products": [{
            "variable": combined_dataset,
            "input": {
                "input_data_source_file":
                "{work_dir}/fetcher/preproc/{dataset}/{variable_group}/data_source.yml",
            },
            "output": {
                "output_directory": "{dataset}/{variable_group}"
            }
        }],

        # operations
        "operations":
        operations,
        "diagnostic":
        diagnostic,
        "output": {
            "output_directory": "{work_dir}/processor/preproc",
        },
    }

    run_processor(
        task=task,
        work_dir=work_dir,
        config={},
    )