Beispiel #1
0
    for species in species_list:
        units, obs_data_name, unit_cut, species_type, actual_species_name, obs_switch, model_cut_switch, ofac = modules.obs_variable_finder(
            species)

        #set GAW_switch on or off. 'y' = multiple location GAW sim, 'n' = 1 location output
        GAW_switch = 'y'

        # Read in the model output
        if GAW_switch == 'y':
            model, names = modules.readfile_GAW(
                "binary_logs/GEOS_v90103_2x2.5_GAW_O3_logs.npy",
                model_index)  #model index represents gaw location
        else:
            model, names = modules.readfile(
                "binary_logs/GEOS_v90103_4x5_CV_logs.npy",
                "001")  #001 represents single location

# Processes the model date
        date = model[:, 0]
        time = model[:, 1]
        model_time = modules.date_process(date, time)

        #Define sampling intervals
        samp_spacing = 1. / 24.

        #Convert model time array into numpy array
        model_time = np.array(model_time)

        counter = 0
Beispiel #2
0
obs_smoothed = np.exp(obs_smoothed)
ax = fig.add_subplot(1, 1, 1)
#Calculate Nyquist frequency, Si and Si x 2 for normalisation checks.
#nyquist_freq_lomb_model = frequencies[-1]
#Si_lomb_model = np.mean(fy)*nyquist_freq_lomb_model
#print nyquist_freq_lomb_model, Si_lomb_model, Si_lomb_model*2

#loop through diff models and get respective obs. data
for i in range(len(mversion)):

    if GAW_switch[counter] == 'n':
        if mversion[counter] == 'v90102':
            if res[counter] == '4x5':
                if met[counter] == 'GEOS 5':
                    model, names = modules.readfile(
                        "binary_logs/GEOS_v90102_4x5_CV_logs.npy",
                        "001")  #001 represents single location
                if met[counter] == 'MERRA':
                    model, names = modules.readfile(
                        "", "001")  #001 represents single location
            if res[counter] == '2x2.5':
                if met[counter] == 'GEOS 5':
                    model, names = modules.readfile(
                        "binary_logs/GEOS_v90103_2x25_CV_logs.npy",
                        "001")  #001 represents single location
                if met[counter] == 'MERRA':
                    model, names = modules.readfile(
                        "", "001")  #001 represents single location

        if mversion[counter] == 'v90103':
            if res[counter] == '4x5':
Beispiel #3
0
           label='%s Obs. %s Smoothed ' % (loc_label, actual_species_name))

#Calculate Nyquist frequency, Si and Si x 2 for normalisation checks.
#nyquist_freq_lomb_model = frequencies[-1]
#Si_lomb_model = np.mean(fy)*nyquist_freq_lomb_model
#print nyquist_freq_lomb_model, Si_lomb_model, Si_lomb_model*2

#loop through diff models and get respective obs. data
for i in range(len(mversion)):

    if GAW_switch[counter] == 'n':
        if mversion[counter] == 'v90102':
            if res[counter] == '4x5':
                if met[counter] == 'GEOS 5':
                    model, names = modules.readfile(
                        "binary_logs/GEOS_v90102_4x5_CV_logs.npy",
                        "001")  #001 represents single location
                if met[counter] == 'MERRA':
                    model, names = modules.readfile(
                        "", "001")  #001 represents single location
            if res[counter] == '2x2.5':
                if met[counter] == 'GEOS 5':
                    model, names = modules.readfile(
                        "binary_logs/GEOS_v90103_2x25_CV_logs.npy",
                        "001")  #001 represents single location
                if met[counter] == 'MERRA':
                    model, names = modules.readfile(
                        "", "001")  #001 represents single location

        if mversion[counter] == 'v90103':
            if res[counter] == '4x5':
Beispiel #4
0
#Define sampling intervals
samp_spacing = 1. / 24.

counter = 0

for species in species_list:
    units, obs_data_name, unit_cut, species_type, actual_species_name, obs_switch, model_cut_switch, ofac = modules.obs_variable_finder(
        species)

    #set plotting area & background to white
    fig = plt.figure(figsize=(20, 12))
    fig.patch.set_facecolor('white')
    ax = plt.subplot(111)

    model, names = modules.readfile("binary_logs/GEOS_v90103_4x5_CV_logs.npy",
                                    "001")

    # Processes the model date
    date = model[:, 0]
    time = model[:, 1]
    model_time = modules.date_process(date, time)

    k = names.index('O3')
    model = model[:, k] * 1e9

    #Define sampling frequency
    samp_freq = 24

    #FFT
    samp_spacing = float(1. / 24.)