Exemplo n.º 1
0
 def test_waiwera(self):
     mrun = WaiweraModelRun('test_super_fruit',
                          '',
                          simulator='test_all.exe',
                          basePath=TEST_PATH,
                          )
     jrunner = SimpleJobRunner(mpi=True)
     jmi = jrunner.submitRun(mrun)
     mres = jrunner.blockResult(mrun, jmi)
Exemplo n.º 2
0
problem1_test = SciBenchmarkTest(model_name + "_test", nproc=num_procs)
problem1_test.description = """Model Intercomparison Study problem 1
(radial Avdonin problem)"""

obspt = 'r = 37.5 m'
obs_position = np.array([37.5, 0., -50.])
obs_blk = geo.block_name_containing_point(obs_position)
obs_cell_index = geo.block_name_index[obs_blk] - geo.num_atmosphere_blocks
max_radius = 500.

run_base_name = model_name
run_filename = run_base_name + '.json'
model_run = WaiweraModelRun(run_name,
                            run_filename,
                            fieldname_map=WAIWERA_FIELDMAP,
                            simulator='waiwera',
                            basePath=os.path.realpath(model_dir))
model_run.jobParams['nproc'] = num_procs
problem1_test.mSuite.addRun(model_run, run_name)

problem1_test.setupEmptyTestCompsList()
digitised_time_result = {}
digitised_r_result = {}

run_base_name = model_name
run_filename = os.path.join(model_dir, run_base_name + ".listing")
AUTOUGH2_result = T2ModelResult("AUTOUGH2",
                                run_filename,
                                geo_filename=t2geo_filename,
                                ordering_map=map_out_atm)
Exemplo n.º 3
0
test_source_fields = ["Enthalpy"]
field_scale = {'Pressure': 1.e5, 'Temperature': 1., 'Vapour saturation': 1., 'Enthalpy': 1.e3}
field_unit = {'Pressure': 'bar', 'Temperature': '$^{\circ}$C', 'Vapour saturation': '',
              'Enthalpy': 'kJ/kg'}

minc_column_test = SciBenchmarkTest(model_name + "_test", nproc = args.np)
minc_column_test.description = """1-D MINC column problem, production run starting
from steady-state solution, with single-porosity results included for comparison.
"""

for run_index, run_name in enumerate(run_names):
    base_path = os.path.realpath(model_dir)
    run_base_name = model_name + '_' + run_name
    run_filename = run_base_name + '.json'
    model_run = WaiweraModelRun(run_name, run_filename,
                                fieldname_map = WAIWERA_FIELDMAP,
                                simulator = simulator,
                                basePath = base_path)
    model_run.jobParams['nproc'] = args.np
    minc_column_test.mSuite.addRun(model_run, run_name)

obs_cell_elev = -350.
obs_position = np.array([50., 50., obs_cell_elev])
obs_blk = geo.block_name_containing_point(obs_position)
obs_cell_index = geo.block_name_index[obs_blk] - geo.num_atmosphere_blocks
source_index = -1

minc_column_test.setupEmptyTestCompsList()
AUTOUGH2_result = {}

for run_index, run_name in enumerate(run_names):
    run_base_name = model_name + '_' + run_name
Exemplo n.º 4
0
    basePath=os.path.realpath(MODELDIR))
jrunner = SimpleJobRunner()
jmeta = jrunner.submitRun(mrun_t)
mres_t = jrunner.blockResult(mrun_t, jmeta)
# can directly load ModelResult instead
# mres_t = T2ModelResult("aut2",
#                        "CC6/CC6C001.LISTING",
#                        geo_filename="CC6/"+t2geo_fn,
#                        ordering_map=map_out_atm,
#                        fieldname_map=AUT2_FIELDMAP)

# ---------------------------------------------------------------------------
# construct Waiwera run and benchamrk test
mrun_s = WaiweraModelRun(
    "waiwera",
    waiwera_fn,
    fieldname_map=WAIWERA_FIELDMAP,
    # simulator='Waiwera.exe',  # AY_CYGWIN
    basePath=os.path.realpath(MODELDIR))
mrun_s.jobParams['nproc'] = 6

# TODO: specifying nproc in SciBenchmarkTest does not seem to work, model runs'
# jobParams not updated, so a.t.m. this is only for report
sciBTest = SciBenchmarkTest("CC6", nproc=mrun_s.jobParams['nproc'])
sciBTest.description = """Mike's test problem 6, CC6"""
sciBTest.mSuite.addRun(mrun_s, "Waiwera")

sciBTest.setupEmptyTestCompsList()
for runI, mRun in enumerate(sciBTest.mSuite.runs):
    sciBTest.addTestComp(
        runI, "pressu",
        FieldWithinTolTC(fieldsToTest=["Pressure"],