示例#1
0
    # Loop through each ssp run being considered
    for ssp_option in range(0, ssp_options_length):
        ssp = ssp_options[ssp_option]  # selecting the ssp scenario

        # for loop for each cmip6 model
        for model_i in range(0, n_models):
            model = cmip6_models[model_i]  # seleting the models

            print(min_temperature, ssp, model)

            #%%
            # finding spatial profile for future temperature

            # time averaged, area averaged historical/present day temperature
            tas_preindustrial_cube = combine_netCDF_time_overlap(
                '/home/rmv203/cmip6_data/tas_Amon_' + model + '_historical*',
                model)
            tas_preindustrial_cube = open_netCDF(tas_preindustrial_cube)
            tas_preindustrial_cube = select_time(tas_preindustrial_cube, 1995,
                                                 2005)
            tas_preindustrial_cube = time_average(tas_preindustrial_cube)
            tas_preindustrial_cube = area_average(tas_preindustrial_cube,
                                                  region_global)
            tas_preindustrial_data = tas_preindustrial_cube.data  # time averaged, area averaged historical temperature

            # cube to find future temperature change
            tas_cube = combine_netCDF_time_overlap(
                '/home/rmv203/cmip6_historical_' + ssp + '/tas_Amon_' + model +
                '_*', model)
            tas_cube = open_netCDF(tas_cube)
            tas_test_cube = annual_average(tas_cube)
示例#2
0
    'MIROC-ES2L', 'UKESM1-0-LL'
]
n_models = len(cmip6_data_in)

# for loop for each cmip6 model
for model_i, a, in zip(range(n_models), range(n)):

    # subplot pannel for each model
    ax = fig_cmip6.add_subplot(gs[row_1, column_1])

    # seleting the models
    model = cmip6_data_in[model_i]
    print(model)

    # Heterotrophic Respiration (RH)
    rh_historical_cube = combine_netCDF_time_overlap(
        '/home/rmv203/cmip6_data/rh_Lmon_' + model + '_historical*', model)
    rh_historical_cube = open_netCDF(rh_historical_cube)
    # Soil Carbon (cSoil)
    cSoil_historical_cube = combine_netCDF_time_overlap(
        '/home/rmv203/cmip6_data/cSoil_Emon_' + model + '_historical*', model)
    cSoil_historical_cube = open_netCDF(cSoil_historical_cube)
    # Near Surface Air Temperature (tas)
    tas_historical_cube = combine_netCDF_time_overlap(
        '/home/rmv203/cmip6_data/tas_Amon_' + model + '_historical*', model)
    tas_historical_cube = open_netCDF(tas_historical_cube)
    # Select historical time period
    rh_historical_cube = select_time(rh_historical_cube, lower_historical,
                                     upper_historical)
    cSoil_historical_cube = select_time(cSoil_historical_cube,
                                        lower_historical, upper_historical)
    tas_historical_cube = select_time(tas_historical_cube, lower_historical,
    # for loop for each CMIP5 model
    for model_i in range(0, n_models):
        model = cmip6_models[model_i]  # seleting the models

        print(ssp, model)

        #%% historical soil turnover time

        # Heterotrophic Respiration (RH)
        rh_historical_cube = combine_netCDF_rh_cmip6(
            '/home/rmv203/cmip6_data/rh_Lmon_' + model + '_historical*', model)
        rh_historical_cube = open_netCDF(rh_historical_cube)
        # Soil Carbon (cSoil)
        cSoil_historical_cube = combine_netCDF_time_overlap(
            '/home/rmv203/cmip6_data/cSoil_Emon_' + model + '_historical*',
            model)
        cSoil_historical_cube = open_netCDF(cSoil_historical_cube)
        # Near Surface Air Temperature (tas)
        tas_historical_cube = combine_netCDF_time_overlap(
            '/home/rmv203/cmip6_data/tas_Amon_' + model + '_historical*',
            model)
        tas_historical_cube = open_netCDF(tas_historical_cube)

        # Select historical time period
        rh_historical_cube = select_time(rh_historical_cube, lower_historical,
                                         upper_historical)
        cSoil_historical_cube = select_time(cSoil_historical_cube,
                                            lower_historical, upper_historical)
        tas_historical_cube = select_time(tas_historical_cube,
                                          lower_historical, upper_historical)