def main(project_info):
    """Diagnostics and plotting script for Southern Hemisphere radiation."""

    # ESMValProject provides some easy methods to access information in
    # project_info but you can also access it directly (as in main.py)
    # First we get some general configurations (ESMValProject)
    # and then we read in the model configuration file

    E = ESMValProject(project_info)
    config_file = E.get_configfile()
    plot_dir = E.get_plot_dir()
    verbosity = E.get_verbosity()

    # A-laue_ax+
    diag_script = E.get_diag_script_name()
    res = E.write_references(
        diag_script,  # diag script name
        ["A_maek_ja"],  # authors
        ["A_eval_ma", "A_jone_co"],  # contributors
        [""],  # diag_references
        [""],  # obs_references
        ["P_embrace"],  # proj_references
        project_info,
        verbosity,
        False)
    # A-laue_ax-

    modelconfig = ConfigParser.ConfigParser()
    modelconfig.read(config_file)
    E.ensure_directory(plot_dir)

    # Check which parts of the code to run
    if (modelconfig.getboolean('general', 'plot_scatter')):
        info("Starting scatter plot", verbosity, 2)
        process_scatter(E, modelconfig)
Example #2
0
def main(project_info):
    """Diagnostics and plotting script for Southern Hemisphere radiation."""

    # ESMValProject provides some easy methods to access information in
    # project_info but you can also access it directly (as in main.py)
    # First we get some general configurations (ESMValProject)
    # and then we read in the model configuration file

    E = ESMValProject(project_info)
    config_file = E.get_configfile()
    datakeys = E.get_currVars()
    plot_dir = E.get_plot_dir()
    verbosity = E.get_verbosity()

    # A-laue_ax+
    diag_script = E.get_diag_script_name()
    res = E.write_references(diag_script,              # diag script name
                             ["A_maek_ja"],            # authors
                             ["A_eval_ma", "A_jone_co"], # contributors
                             [""],                     # diag_references
                             [""],                     # obs_references
                             ["P_embrace"],            # proj_references
                             project_info,
                             verbosity,
                             False)
    # A-laue_ax-

    modelconfig = ConfigParser.ConfigParser()
    modelconfig.read(config_file)
    E.ensure_directory(plot_dir)

    # Check at which stage of the program we are
    clouds = False
    fluxes = False
    radiation = False
    if ('clt' in datakeys or 'clivi' in datakeys or 'clwvi' in datakeys):
        clouds = True
    elif ('hfls' in datakeys or 'hfss' in datakeys):
        fluxes = True
    else:
        radiation = True

    # Check which parts of the code to run
    if (modelconfig.getboolean('general', 'plot_clouds') and clouds is True):
        info("Starting to plot clouds", verbosity, 2)
        process_clouds(E, modelconfig)

    if (modelconfig.getboolean('general', 'plot_fluxes') and fluxes is True):
        info("Starting to plot turbulent fluxes", verbosity, 2)
        process_fluxes(E, modelconfig)

    if (modelconfig.getboolean('general', 'plot_radiation') and radiation is True):
        info("Starting to plot radiation graphs", verbosity, 2)
        process_radiation(E, modelconfig)
Example #3
0
def main(project_info):
    """Diagnostics and plotting script for Tropical Variability.
    We use ts as a proxy for Sea Surface Temperature. """

    # ESMValProject provides some easy methods to access information in
    # project_info but you can also access it directly (as in main.py)
    # First we get some general configurations (ESMValProject)
    # and then we read in the model configuration file

    E = ESMValProject(project_info)
    config_file = E.get_configfile()
    plot_dir = E.get_plot_dir()
    verbosity = E.get_verbosity()

    # A-laue_ax+
    diag_script = E.get_diag_script_name()
    res = E.write_references(
        diag_script,  # diag script name
        ["A_maek_ja"],  # authors
        ["A_eval_ma", "A_jone_co"],  # contributors
        ["D_li14jclim"],  # diag_references
        [""],  # obs_references
        ["P_embrace"],  # proj_references
        project_info,
        verbosity,
        False)

    # A-laue_ax-

    modelconfig = ConfigParser.ConfigParser()
    modelconfig.read(config_file)
    E.ensure_directory(plot_dir)

    # Here we check and process only desired parts of the diagnostics
    if (modelconfig.getboolean('general', 'plot_zonal_means')):
        info("Starting to plot zonal means", verbosity, 2)
        process_zonal_means(E, modelconfig)

    if (modelconfig.getboolean('general', 'plot_scatter')):
        info("Starting scatterplot of temperature and precipitation",
             verbosity, 2)
        process_scatterplot(E, modelconfig)

    if (modelconfig.getboolean('general', 'plot_equatorial')):
        info("Starting to gather values for equatorial means", verbosity, 2)
        process_equatorial_means(E, modelconfig)