Пример #1
0
)  # compile the source code to working directory $GFDL_WORK/codebase

exp_name = 'held_suarez_default'
exp = Experiment(exp_name, codebase=cb)

diag = DiagTable()
diag.add_file('atmos_monthly', 30, 'days', time_units='days')
diag.add_field('dynamics', 'ps', time_avg=True)
diag.add_field('dynamics', 'bk')
diag.add_field('dynamics', 'pk')
diag.add_field('dynamics', 'ucomp', time_avg=True)
diag.add_field('dynamics', 'vcomp', time_avg=True)
diag.add_field('dynamics', 'temp', time_avg=True)
diag.add_field('dynamics', 'vor', time_avg=True)
diag.add_field('dynamics', 'div', time_avg=True)
exp.diag_table = diag

namelist = Namelist({
    'main_nml': {
        'dt_atmos': 600,
        'days': 30,
        'calendar': 'thirty_day',
        'current_date': [2000, 1, 1, 0, 0, 0]
    },
    'atmosphere_nml': {
        'idealized_moist_model':
        False  # False for Newtonian Cooling.  True for Isca/Frierson
    },
    'spectral_dynamics_nml': {
        'damping_order': 4,  # default: 2
        'water_correction_limit': 200.e2,  # default: 0
Пример #2
0
experiments = [('qflux_on', {
    'mixed_layer_nml': {
        'do_qflux': True
    },
    'qflux_nml': {
        'qflux_amp': 30.0,
        'qflux_width': 16.0
    }
}), ('qflux_off', {
    'mixed_layer_nml': {
        'do_qflux': False
    }
})]

exps = []
for exp_name, parameters in experiments:
    exp = Experiment(exp_name, codebase=codebase)

    # Get some basic paramters from config.py.  We'll copy the Namelist,
    # DiagTable and input files list so for multiple Experiments in the
    # same file, each has their own version that can be edited independently.
    exp.diag_table = diag_table.copy()
    exp.namelist = namelist.copy()
    exp.inputfiles = inputfiles[::]

    exp.set_resolution('T42', 40)
    exp.update_namelist(parameters)
    exps.append(exp)

run_cli(exps)