tos_data,
                                                           map_type='regress')
        reg_coeff_IOD, pvals_IOD = regress_map.regress_map(IOD,
                                                           tos_data,
                                                           map_type='regress')
        reg_coeff_IOBM, pvals_IOBM = regress_map.regress_map(
            IOBM, tos_data, map_type='regress')
        reg_coeff_IOBM2, pvals_IOBM2 = regress_map.regress_map(
            IOBM2, tos_data, map_type='regress')
        reg_coeff_NINO34, pvals_NINO34 = regress_map.regress_map(
            NINO34, tos_data, map_type='regress')

        # save
        new_file_name = saving_dir + '/SST_indices_' + model_name + '_' + id + '.nc'
        description = 'Various indices of SSTs including the PDO index calculated as the first principal component time series of monthly 20N-70N SST with seasonal cycle removed, Interdecadal Pacific Oscillation, Indian Ocean Basin Mode, Indian Ocean Dipole and Nino 3.4 index. '
        save = save_file(new_file_name, description)
        # add dimension variables
        save.add_dimension(lats, 'lats')
        save.add_dimension(lons, 'lons')
        save.add_times(times, calendar, t_units, time_name='times')
        # add variables
        save.add_variable(PDO, 'PDO', ('times', ))
        save.add_variable(reg_coeff_PDO, 'reg_coeff_PDO', (
            'lats',
            'lons',
        ))
        save.add_variable(pvals_PDO, 'pvals_PDO', (
            'lats',
            'lons',
        ))
        save.add_variable(IOD, 'IOD', ('times', ))
                                              calendar_SST,
                                              t_units_SST,
                                              N,
                                              season=season)
        NINO34_object = prep_index_regress_save('NINO34',
                                                nc_SST,
                                                times_SST,
                                                calendar_SST,
                                                t_units_SST,
                                                N,
                                                season=season)

        # save file object
        f = saving_dir + '/SST_index_circulation_regression_' + model_name + '_' + season + '.nc'
        description = '' + model_name
        save = save_file(f, description)

        # add dimensions
        save.add_dimension(lats_psl, 'lats')
        save.add_dimension(lons_psl, 'lons')
        save.add_times(years[halfN:][::-1][halfN - 1:][::-1],
                       calendar_psl,
                       t_units_psl,
                       time_name='running_mean_years')

        # regression on SST indices and save
        PDO_object.regress_variable(psl_rm, save, 'regress_coeff_PDO_psl',
                                    'pval_PDO_psl')
        IOD_object.regress_variable(psl_rm, save, 'regress_coeff_IOD_psl',
                                    'pval_IOD_psl')
        IPO_object.regress_variable(psl_rm, save, 'regress_coeff_IPO_psl',