<commit_before>import climt
from sympl import PlotFunctionMonitor


def plot_function(fig, state):

    ax = fig.add_subplot(1, 1, 1)
    state['surface_air_pressure'].transpose().plot.contourf(
        ax=ax, levels=16)


monitor = PlotFunctionMonitor(plot_function)

dycore = climt.GfsDynamicalCore(number_of_longitudes=198,
                                number_of_latitudes=94,
                                dry_pressure=1e5)
dcmip = climt.DcmipInitialConditions()

my_state = climt.get_default_state([dycore], x=dycore.grid_definition['x'],
                                   y=dycore.grid_definition['y'],
                                   mid_levels=dycore.grid_definition['mid_levels'],
                                   interface_levels=dycore.grid_definition['interface_levels'])

my_state['surface_air_pressure'].values[:] = 1e5
dycore(my_state)

out = dcmip(my_state, add_perturbation=True)

my_state.update(out)

for i in range(1000):
    diag, output = dycore(my_state)
    monitor.store(output)
    my_state.update(output)<commit_msg>reflects change in order of outputs<commit_after>import climt
from sympl import PlotFunctionMonitor


def plot_function(fig, state):

    ax = fig.add_subplot(1, 1, 1)
    state['surface_air_pressure'].transpose().plot.contourf(
        ax=ax, levels=16)


monitor = PlotFunctionMonitor(plot_function)

dycore = climt.GfsDynamicalCore(number_of_longitudes=198,
                                number_of_latitudes=94,
                                dry_pressure=1e5)
dcmip = climt.DcmipInitialConditions()

my_state = climt.get_default_state([dycore], x=dycore.grid_definition['x'],
                                   y=dycore.grid_definition['y'],
                                   mid_levels=dycore.grid_definition['mid_levels'],
                                   interface_levels=dycore.grid_definition['interface_levels'])

my_state['surface_air_pressure'].values[:] = 1e5
dycore(my_state)

out = dcmip(my_state, add_perturbation=True)

my_state.update(out)

for i in range(1000):
    output, diag = dycore(my_state)
    monitor.store(output)
    my_state.update(output)
{'fraction_non_alphanumeric': 0.10234741784037558, 'fraction_numerical': 0.016901408450704224, 'mean_word_length': 2.8189964157706093, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6171694', 'n_tokens_mistral': 711, 'n_tokens_neox': 655, 'n_words': 96}