esmvaltool/diag_scripts/aerosols/diagnostics_tendency.py
def plot_time_series(cfg):
    """
    Example of personal diagnostic function.

    Arguments:
        run - dictionary of data files

    Returns:
        string; makes some time-series plots

    """
    # local path for e.g. plots: user input
    root_dir = '/group_workspaces/jasmin2/cmip6_prep/'  # edit as per need
    out_path = 'esmvaltool_users/valeriu/'   # edit as per need
    local_path = os.path.join(root_dir, out_path)

    # get the files (simple case, one-variable only)
    my_files_dict = _get_my_files(cfg)

    # iterate through preprocessed model data
    for key, value in my_files_dict.items():
        cube = iris.load_cube(value['file'])
        area_avg_cube = area_average(cube, 'latitude', 'longitude')
        plt.plot(area_avg_cube.data[:, 0], label=key)
        plt.xlabel('Time (months)')
        plt.ylabel(cube.standard_name)
        plt.title('Time series at ground level')
        plt.tight_layout()
        plt.grid()
        plt.legend()
        png_name = 'Time_series_' + key + '.png'
        plt.savefig(os.path.join(local_path, png_name))
        plt.close()

    return 'I made some plots!'

    Example of personal diagnostic function.

    Arguments:
        run - dictionary of data files

    Returns:
        string; makes some time-series plots

    
Example of personal diagnostic function.
Arguments:
run - dictionary of data files

string; makes some time-series plots
Example of personal diagnostic function . Arguments : run - dictionary of data files string ; makes some time - series plots
def plot_time_series(cfg):
    root_dir = '/group_workspaces/jasmin2/cmip6_prep/'  
    out_path = 'esmvaltool_users/valeriu/'   
    local_path = os.path.join(root_dir, out_path)
    my_files_dict = _get_my_files(cfg)
    for key, value in my_files_dict.items():
        cube = iris.load_cube(value['file'])
        area_avg_cube = area_average(cube, 'latitude', 'longitude')
        plt.plot(area_avg_cube.data[:, 0], label=key)
        plt.xlabel('Time (months)')
        plt.ylabel(cube.standard_name)
        plt.title('Time series at ground level')
        plt.tight_layout()
        plt.grid()
        plt.legend()
        png_name = 'Time_series_' + key + '.png'
        plt.savefig(os.path.join(local_path, png_name))
        plt.close()
    return 'I made some plots!'
def plot_time_series ( cfg ) : root_dir = '/group_workspaces/jasmin2/cmip6_prep/' out_path = 'esmvaltool_users/valeriu/' local_path = os . path . join ( root_dir , out_path ) my_files_dict = _get_my_files ( cfg ) for key , value in my_files_dict . items ( ) : cube = iris . load_cube ( value [ 'file' ] ) area_avg_cube = area_average ( cube , 'latitude' , 'longitude' ) plt . plot ( area_avg_cube . data [ : , 0 ] , label = key ) plt . xlabel ( 'Time (months)' ) plt . ylabel ( cube . standard_name ) plt . title ( 'Time series at ground level' ) plt . tight_layout ( ) plt . grid ( ) plt . legend ( ) png_name = 'Time_series_' + key + '.png' plt . savefig ( os . path . join ( local_path , png_name ) ) plt . close ( ) return 'I made some plots!'
Example of personal diagnostic function.
Example of personal diagnostic function .
"""
    Example of personal diagnostic function.

    Arguments:
        run - dictionary of data files

    Returns:
        string; makes some time-series plots

    """ # local path for e.g. plots: user input # edit as per need # edit as per need # get the files (simple case, one-variable only) # iterate through preprocessed model data
cfg