bc_dict['MI'] = True
if args['--FT']:
    bc_dict['TT'] = False
    bc_dict['FT'] = True
elif args['--FF']:
    bc_dict['TT'] = False
    bc_dict['FF'] = True
if args['--FS']:
    bc_dict['NS'] = False
    bc_dict['FS'] = True

if threeD: resolution_flags = ['nx', 'ny', 'nz']
else: resolution_flags = ['nx', 'nz']
data_dir = construct_out_dir(args,
                             bc_dict,
                             base_flags=['3D', 'Q', 'Ra', 'Pr', 'Pm', 'a'],
                             label_flags=['noise_modes'],
                             resolution_flags=resolution_flags,
                             parent_dir_flag='root_dir')
logger.info("saving run in: {}".format(data_dir))

run_time_buoy = args['--run_time_buoy']
run_time_therm = args['--run_time_therm']
run_time_wall = float(args['--run_time_wall'])
if run_time_buoy is not None:
    run_time_buoy = float(run_time_buoy)
if run_time_therm is not None:
    run_time_therm = float(run_time_therm)

mesh = args['--mesh']
if mesh is not None:
    mesh = mesh.split(',')
from logic.checkpointing import Checkpoint
from logic.ae_tools import BoussinesqAESolver
from logic.extras import global_noise
from logic.parsing import construct_BC_dict, construct_out_dir

logger = logging.getLogger(__name__)
args = docopt(__doc__)

### 1. Read in command-line args, set up data directory
bc_dict = construct_BC_dict(args,
                            default_T_BC='TT',
                            default_u_BC='FS',
                            default_M_BC=None)
data_dir = construct_out_dir(args,
                             bc_dict,
                             base_flags=['Ek', 'Ra', 'Pr', 'a'],
                             label_flags=['Nu_ICs', 'AE', 'TT_to_FT'],
                             resolution_flags=['nx', 'ny', 'nz'])
logger.info("saving run in: {}".format(data_dir))

run_time_buoy = args['--run_time_buoy']
run_time_therm = args['--run_time_therm']
run_time_wall = float(args['--run_time_wall'])
if run_time_buoy is not None:
    run_time_buoy = float(run_time_buoy)
if run_time_therm is not None:
    run_time_therm = float(run_time_therm)

mesh = args['--mesh']
if mesh is not None:
    mesh = mesh.split(',')
示例#3
0
logger = logging.getLogger(__name__)
args = docopt(__doc__)

### 1. Read in command-line args, set up data directory
threeD = not (args['--2.5D'])
bc_dict = construct_BC_dict(args,
                            default_T_BC='TT',
                            default_u_BC='FS',
                            default_M_BC='MI')

if threeD: resolution_flags = ['nx', 'ny', 'nz']
else: resolution_flags = ['nx', 'nz']
data_dir = construct_out_dir(args,
                             bc_dict,
                             base_flags=['2.5D', 'Q', 'Ra', 'Pr', 'Pm', 'a'],
                             label_flags=['noise_modes'],
                             resolution_flags=resolution_flags)
logger.info("saving run in: {}".format(data_dir))

run_time_buoy = args['--run_time_buoy']
run_time_therm = args['--run_time_therm']
run_time_wall = float(args['--run_time_wall'])
if run_time_buoy is not None:
    run_time_buoy = float(run_time_buoy)
if run_time_therm is not None:
    run_time_therm = float(run_time_therm)

mesh = args['--mesh']
if mesh is not None:
    mesh = mesh.split(',')