problem1_test.addTestComp( run_index, "AUTOUGH2 t = 1.e9 s", FieldWithinTolTC(fieldsToTest=["Temperature"], defFieldTol=1.0e-4, expected=AUTOUGH2_result, testOutputIndex=-1)) digitised_result = {} for sim in digitised_simulators: data = {} for field_name in digitised_test_fields: data_filename = '_'.join((model_name, field_name, 'time', sim)) data_filename = data_filename.lower().replace(' ', '_') data_filename = os.path.join(data_dir, data_filename + '.dat') data[field_name, obs_cell_index] = np.loadtxt(data_filename) digitised_result[sim] = HistoryDataResult(sim, data) for sim in digitised_simulators: problem1_test.addTestComp( run_index, ' '.join((sim, field_name, obspt)), HistoryWithinTolTC(fieldsToTest=[field_name], defFieldTol=2.e-2, expected=digitised_result[sim], testCellIndex=obs_cell_index, orthogonalError=True, logx=True)) for field_name in digitised_test_fields: data_filename = '_'.join((model_name, field_name, 'r', sim)) data_filename = data_filename.lower().replace(' ', '_') data_filename = os.path.join(data_dir, data_filename + '.dat')
problem6_test.addTestComp(run_index, "AUTOUGH2 " + obspt + ' well', HistoryWithinTolTC(fieldsToTest = test_source_fields, defFieldTol = 2.e-2, expected = AUTOUGH2_result, testSourceIndex = source_index)) digitised_result = {} digitised_source_result = {} source_index = 0 for sim in digitised_simulators: data = {} for field_name in digitised_test_fields: data_filename = '_'.join((model_name, obspt, field_name, sim)) data_filename = data_filename.lower().replace(' ', '_') data_filename = os.path.join(data_dir, data_filename + '.dat') data[field_name, obs_cell_index] = np.loadtxt(data_filename) digitised_result[sim] = HistoryDataResult(sim, data) data = {} for field_name in test_source_fields: data_filename = '_'.join((model_name, obspt, field_name, sim)) data_filename = data_filename.lower().replace(' ', '_') data_filename = os.path.join(data_dir, data_filename + '.dat') data[field_name, source_index] = np.loadtxt(data_filename) digitised_source_result[sim] = HistoryDataResult(sim, data) sim_tol = {"LBL": 0.075, "S-Cubed": 0.015} for sim in digitised_simulators: problem6_test.addTestComp(run_index, ' '.join((sim, obspt + ' well')), HistoryWithinTolTC(fieldsToTest = digitised_test_fields, defFieldTol = sim_tol[sim], expected = digitised_result[sim],
dat_filename = os.path.join(model_dir, run_base_name + ".dat") run_filename = os.path.join(model_dir, run_base_name + ".listing") AUTOUGH2_result[run_name] = T2ModelResult("AUTOUGH2", run_filename, geo_filename = t2geo_filename, dat_filename = dat_filename, ordering_map = map_out_atm, fieldname_map = AUT2_FIELDMAP) for sim in digitised_simulators: data = {} for obspt in obs_points: for field_name in digitised_test_fields[obspt]: data_filename = '_'.join((model_name + run_name, obspt, field_name, sim)) data_filename = os.path.join(data_dir, data_filename.lower() + '.dat') data[field_name, obs_cell_index[obspt]] = np.loadtxt(data_filename) digitised_result[run_name, sim] = HistoryDataResult(sim, data) obspt = "production" for field_name in test_source_fields: data_filename = '_'.join((model_name + run_name, obspt, field_name, sim)) data_filename = os.path.join(data_dir, data_filename.lower() + '.dat') data[field_name, source_index] = np.loadtxt(data_filename) digitised_source_result[run_name, sim] = HistoryDataResult(sim, data) for obspt in obs_points: blk_index = obs_cell_index[obspt] if obspt == 'total': fields = digitised_test_fields[obspt] else: fields = test_fields problem5_test.addTestComp(run_index, "AUTOUGH2 " + obspt, HistoryWithinTolTC(fieldsToTest = fields, defFieldTol = 1.e-3, expected = AUTOUGH2_result[run_name],
for depth in depths: obs_position = np.array([50., 50., -depth]) obs_blk = geo.block_name_containing_point(obs_position) obs_cell_index[ depth] = geo.block_name_index[obs_blk] - geo.num_atmosphere_blocks data = {} ref_sim = 'S-Cubed' for depth in depths: for field in digitised_test_fields[depth]: obspt = str(depth) data_filename = '_'.join((model_name, obspt, field, ref_sim)) data_filename = data_filename.lower().replace(' ', '_') data_filename = os.path.join(data_dir, data_filename + '.dat') data[field, obs_cell_index[depth]] = np.loadtxt(data_filename) ref_result = HistoryDataResult(ref_sim, data) source_data = {} source_index = 0 for field in test_source_fields: data_filename = '_'.join((model_name, "source", field, ref_sim)) data_filename = data_filename.lower().replace(' ', '_') data_filename = os.path.join(data_dir, data_filename + '.dat') source_data[field, source_index] = np.loadtxt(data_filename) ref_source_result = HistoryDataResult(ref_sim, source_data) for depth in depths: obspt = str(depth) problem4_test.addTestComp( run_index, "AUTOUGH2 z = " + obspt, HistoryWithinTolTC(fieldsToTest=test_fields,