import octant

from case_dictionary import case_dictionary

# supress warnings that occur in division in the polyfit_omega function
import warnings
warnings.filterwarnings("ignore")

parser = argparse.ArgumentParser()
parser.add_argument('directory',
                    type=str,
                    help='directory with top-level cases listed')
args = parser.parse_args()

cases = case_dictionary(args.directory)

# files = [cases.find(Ri=Ri, delta=delta, N2=1e-4)
#             for delta in [0.1, 0.2, 0.3, 0.5]
#             for Ri in [1, 2, 3, 5, 10]]
# fig, axs = plt.subplots(4, 5, figsize=(13.5, 6))
# normalize_time = False

files_delta = [
    cases.find(Ri=Ri, delta=delta, N2=1e-4) for delta in [0.1, 0.2, 0.3, 0.5]
    for Ri in [1, 2, 3, 5, 10]
]

files_S = [
    cases.find(Ri=Ri, S=S, N2=1e-4) for S in [0.1, 0.2, 0.3, 0.5]
    for Ri in [1, 2, 3, 5, 10]
Exemplo n.º 2
0
import os
import argparse

import matplotlib.pyplot as plt
import numpy as np
import netCDF4

from case_dictionary import case_dictionary

lowfric_cases = case_dictionary('sims_lowfric')
vlowfric_cases = case_dictionary('sims_vlfric')

#tidx = 112   # 14 days
tidx = -1

fig, axs = plt.subplots(6, 2, figsize=(6, 10))
axs = np.flipud(axs)

ax_crnr = axs[0, 0]

lowfric_files = [
    os.path.join('sims_lowfric',
                 lowfric_cases.find(Ri=Ri, delta=delta, N2=1e-4)[0])
    for delta in [0.1, 0.2, 0.3, 0.5, 1.0] for Ri in [1, 10]
]

vlowfric_files = [
    os.path.join('sims_vlfric',
                 vlowfric_cases.find(Ri=Ri, delta=delta, N2=1e-4)[0])
    for delta in [1.0] for Ri in [1, 10]
]