Added error message for 2D models and sub-grids.

这个提交包含在:
Craig Warren
2020-08-17 18:10:00 +01:00
父节点 4fb18b3fff
当前提交 b92a98f950

查看文件

@@ -121,6 +121,13 @@ class Domain(UserObjectSingle):
G.calculate_dt() G.calculate_dt()
logger.info(f'Mode: {config.get_model_config().mode}') logger.info(f'Mode: {config.get_model_config().mode}')
# Sub-grids cannot be used with 2D models. There would typically be
# minimal performance benefit with sub-gridding and 2D models.
if '2D' in config.get_model_config().mode and config.sim_config.general['subgrid']:
logger.exception('Sub-gridding cannot be used with 2D models')
raise ValueError
logger.info(f'Time step (at CFL limit): {G.dt:g} secs') logger.info(f'Time step (at CFL limit): {G.dt:g} secs')