Commit 68f6b8bb authored by Antoine Berchet's avatar Antoine Berchet
Browse files

Test plot fluxes

parent dd73de9b
#!/usr/bin/env bash
export PYCIF_DATATEST=/home/chimereges/aberchet/PYCIF_TEST_DATA/
#export PYCIF_DATATEST=/home/chimereges/aberchet/PYCIF_TEST_DATA/
export PYCIF_DATATEST=/homel/aberchet/test_article/
dir_out=/home/satellites13/aberchet/cif_paper/simulations_`date +'%Y%m%d'`
#pytest -s --basetemp=$dir_out/ \
# --html reports/pytest.html --self-contained-html ../tests/dummy/
dir_out=/homel/aberchet/test_article/simulations_`date +'%Y%m%d'`
mkdir -p $dir_out
cd ..
pytest -s -m "(dummy and article and inversion and not adjtltest) or (fwd and ref_config)" \
--html reports/pytest.html --self-contained-html --basetemp=$dir_out/ ./
verbose: 2
logfile: pycif.logtest
workdir: /home/satellites13/aberchet/cif_paper/simulations_20210324/test_integration_inversion_dum0
workdir: /homel/aberchet/test_article/simulations_20210324/test_integration_inversion_dum0
datei: 2010-01-01
datef: 2010-01-05 00:00:00
mode:
......@@ -30,12 +30,12 @@ model:
chemistry:
acspecies:
CH4: null
file_pg: /home/users/aberchet/CIF/model_sources/dummy_gauss/Pasquill-Gifford.txt
file_pg: /homel/aberchet/Projects/cif/model_sources/dummy_gauss/Pasquill-Gifford.txt
plugin:
name: dummy
version: std
obsvect:
dir_obsvect: /home/satellites13/aberchet/cif_paper/simulations_20210324/test_integration_inversion_dum0/../ref_obsvect/
dir_obsvect: /homel/aberchet/test_article/simulations_20210324/test_integration_inversion_dum0/../ref_obsvect/
dump_type: nc
plugin:
name: standard
......@@ -77,7 +77,7 @@ datavect:
square: null
variable: zlon
hcorrelations:
dircorrel: /home/satellites13/aberchet/cif_paper/simulations_20210324/test_integration_inversion_dum0/datavect/
dircorrel: /homel/aberchet/test_article/simulations_20210324/test_integration_inversion_dum0/datavect/
dump_hcorr: true
evalmin: 0
landsea: false
......@@ -114,5 +114,5 @@ domain:
ymin: 0
platform:
plugin:
name: LSCE
version: obelix
name: docker
version: cif
......@@ -35,7 +35,7 @@ model:
name: dummy
version: std
obsvect:
dir_obsvect: /home/satellites13/aberchet/cif_paper/simulations_20210324/test_integration_fwd_dummy_con0/../ref_obsvect/
dir_obsvect: /homel/aberchet/test_article/simulations_20210324/test_integration_fwd_dummy_con0/../ref_obsvect/
dump_type: nc
plugin:
name: standard
......@@ -81,7 +81,7 @@ datavect:
sin: null
variable: zlon
hcorrelations: &id001
dircorrel: /home/satellites13/aberchet/cif_paper/simulations_20210324/test_integration_fwd_dummy_con0/datavect/
dircorrel: /homel/aberchet/test_article/simulations_20210324/test_integration_fwd_dummy_con0/datavect/
dump_hcorr: true
evalmin: 0
landsea: false
......@@ -143,7 +143,7 @@ datavect:
square: null
variable: zlon
hcorrelations:
dircorrel: /home/satellites13/aberchet/cif_paper/simulations_20210324/test_integration_fwd_dummy_con0/datavect/
dircorrel: /homel/aberchet/test_article/simulations_20210324/test_integration_fwd_dummy_con0/datavect/
dump_hcorr: true
evalmin: 0
landsea: false
......
import subprocess
import os
def submit_job(self, exe, job_file):
"""Submit a job as an external command"""
process = subprocess.Popen(
exe.split(),
cwd=os.path.dirname(job_file),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
stdout, stderr = process.communicate()
return stdout.decode('utf-8').strip()
def check_jobs(self, list_jobs):
return True
......@@ -31,7 +31,6 @@ def forward(
for trid in out_mapper:
comp = trid[0]
trcr = trid[1]
print('99999999999999999999',comp,trcr)
force_loadin = out_mapper[trid].get("force_loadin", False)
in_files = out_mapper[trid]["input_files"].get(ddi, [])
......@@ -42,7 +41,6 @@ def forward(
# Skip parameters not in the control space
if not getattr(tracer, "iscontrol", False):
# TODO: deal with error if tracer has no read method
print('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
if force_loadin and hasattr(tracer, "read"):
inputs = tracer.read(
trcr,
......
......@@ -453,7 +453,6 @@ class Plugin(object):
plg = cls()
for key in def_dict:
print('QQQQQQQQQQQQQQQQQQQQQQQQQ',key)
if isinstance(def_dict[key], dict):
setattr(
plg,
......
......@@ -75,7 +75,7 @@ def test_integration_inversion(dummy_config_inversion, settings):
posterior_dir = os.path.join(tmpdir, "obsvect_posterior")
config["mode"] = mode
config["platform"] = {"plugin": {"name": "LSCE", "version": "obelix"}}
config["platform"] = {"plugin": {"name": "docker", "version": "cif"}}
# Removing MCF to make computation quicker
del config["model"]["chemistry"]["acspecies"]["MCF"]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment