# My python scripts from ImportData import * from TrainTestGPModel import * from remove_ind import * datadir = GetDir() time = 10 filename = datadir+'Inputs_0-{}_yrs_Outputs_70-100_yrs.nc'.format(time) (X_SfcTemp,X_AirTemp500,X_GeoHeight500,X_SLP,X_RF,y, lons,lats,lons1,lats1,Names) = OpenFile(filename) Noisy = ['No OC Global', 'No Dust Arabia','No VOC Global','No SO2 India','No NOX Global','No BC Europe','No BC East Asia','No BC US'] for runname in Noisy: (Names,[X_SfcTemp,X_AirTemp500,X_GeoHeight500,X_SLP,X_RF,y]) = remove_ind(Names,runname,[X_SfcTemp,X_AirTemp500,X_GeoHeight500,X_SLP,X_RF,y] ) CO_ind = Names.index('No CO Global') X_RF_CO = X_RF[CO_ind] print(Names) X = X_RF CO2_ind =(Names.index('2X CO2')) CO2_change = y[CO2_ind] y_coupled = y Names_coupled = Names print(CO2_change.shape) area_flat = Area(lons1,lats1).flatten()
datadir = GetDir() time = 10 end_time = 100 filename = datadir + 'Inputs_0-{}_yrs_Outputs_70-{}_yrs.nc'.format( time, end_time) (X_SfcTemp, X_AirTemp500, X_GeoHeight500, X_SLP, X_RF, y, lons, lats, lons1, lats1, Names) = OpenFile(filename) Noisy = [ 'No BB Tropics', '10X BB Tropics', 'No BB Africa', 'No OC Global', 'No Dust Arabia', 'No VOC Global', 'No SO2 India', 'No NOX Global', 'No BC Europe', 'No BC East Asia', 'No BC US' ] for runname in Noisy: if runname in Names: (Names, [X_SfcTemp, X_GeoHeight500, X_RF, y]) = remove_ind(Names, runname, [X_SfcTemp, X_GeoHeight500, X_RF, y]) # Predictor variable X = X_SfcTemp.copy() (N, p) = X.shape area = Area(lons1, lats1) area_flat = area.flatten() print(area_flat.shape, X_SfcTemp.shape) regions = ['Europe', 'Africa', 'US', 'South_America', 'East_Asia', 'India'] # Save to plot_dir = '/rds/general/user/lm2612/home/Outputs/GP/ScaledInputs_0-{}_yrs_ScaledOutputs_70-{}_yrs'.format( time, end_time)