Commit db8a2692 authored by Antoine Berchet's avatar Antoine Berchet
Browse files

Merge branch 'TM5' of gitlab.in2p3.fr:satinv/cif into TM5

parents f9a08f52 c3556e05
Pipeline #128 failed with stage
in 0 seconds
......@@ -26,6 +26,7 @@ docker run -it -v $config_file:/config/config.yml \
$extra_volumns \
pycif/pycif-tm5:latest
# --entrypoint /bin/bash pycif/pycif-ubuntu:0.1
# --entrypoint /bin/bash pycif/pycif-tm5:latest
......@@ -184,9 +184,7 @@ def make_obs(self, datastore, runsubdir, mode, tracer, ddi, do_simu=True):
+ datetime.timedelta(minutes=30)
# <<< JvP 20211022.
# Number of observations in data2write
n_obs = len(data2write)
......
......@@ -30,16 +30,11 @@ def init_reindex(
# interpolation
prec_dates = tmp_dict.get("input_dates", [])
ref_dates = trid_dict.get("input_dates", [])
try:
same_index = [
np.all(ref_dates[ddi]
== prec_dates.get(ddi, []))
for ddi in ref_dates
]
except:
print(__file__)
import code
code.interact(local=dict(locals(), **globals()))
same_index = [
np.all(ref_dates[ddi]
== prec_dates.get(ddi, []))
for ddi in ref_dates
]
if sum(same_index) == len(same_index):
return
......
......@@ -187,12 +187,7 @@ def do_regridding(datastore_out, data, nlat_out, nlon_out, weights,
for c in column2add:
data_out = datastore_out.iloc[mask,
datastore_out.columns.get_loc(c)].to_numpy()
try:
np.add.at(data_out, out_indexes, data[c].values * wgts.flatten())
except:
print(__file__)
import code
code.interact(local=dict(locals(), **globals()))
np.add.at(data_out, out_indexes, data[c].values * wgts.flatten())
datastore_out.iloc[mask,
datastore_out.columns.get_loc(c)] = data_out
......
......@@ -202,7 +202,7 @@ def calc_indexes(mapper, trid_out, all_transforms, general_mapper):
and len(tmp_indexes[ddi]) != 0
for ddi in tmp_indexes]
do_interpolation[datei] = \
~np.all(same_periods) or (sum(full_periods) > 1)
(tmp_indexes != {}) and (~np.all(same_periods) or (sum(full_periods) != 1))
# Check whether the transform is only a re-ordering of sub-periods
# Applies only if there is no interpolation to do
......
......@@ -59,7 +59,6 @@ requirements = [
'bottleneck',
]
setup(
name='pyCIF',
version='0.0.2',
......
Markdown is supported
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