ladim 2.0.0__py3-none-any.whl → 2.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ladim/__init__.py +1 -1
- ladim/__main__.py +2 -0
- ladim/release.py +9 -2
- {ladim-2.0.0.dist-info → ladim-2.0.1.dist-info}/METADATA +1 -1
- {ladim-2.0.0.dist-info → ladim-2.0.1.dist-info}/RECORD +9 -8
- {ladim-2.0.0.dist-info → ladim-2.0.1.dist-info}/LICENSE +0 -0
- {ladim-2.0.0.dist-info → ladim-2.0.1.dist-info}/WHEEL +0 -0
- {ladim-2.0.0.dist-info → ladim-2.0.1.dist-info}/entry_points.txt +0 -0
- {ladim-2.0.0.dist-info → ladim-2.0.1.dist-info}/top_level.txt +0 -0
ladim/__init__.py
CHANGED
ladim/__main__.py
ADDED
ladim/release.py
CHANGED
|
@@ -53,7 +53,7 @@ class TextFileReleaser(Releaser):
|
|
|
53
53
|
self._dataframe = None
|
|
54
54
|
|
|
55
55
|
# Continuous release variables
|
|
56
|
-
self._frequency = read_timedelta(frequency)
|
|
56
|
+
self._frequency = read_timedelta(frequency) / np.timedelta64(1, 's')
|
|
57
57
|
self._last_release_dataframe = pd.DataFrame()
|
|
58
58
|
self._last_release_time = np.int64(-4611686018427387904)
|
|
59
59
|
|
|
@@ -80,6 +80,12 @@ class TextFileReleaser(Releaser):
|
|
|
80
80
|
stop_time=self.model.solver.time + self.model.solver.step,
|
|
81
81
|
).copy(deep=True)
|
|
82
82
|
|
|
83
|
+
# If there are no new particles, but the state is empty, we should
|
|
84
|
+
# still initialize the state by adding the appropriate columns
|
|
85
|
+
if (len(df) == 0) and ('X' not in self.model.state):
|
|
86
|
+
self.model.state.append(df.to_dict(orient='list'))
|
|
87
|
+
self._last_release_dataframe = df
|
|
88
|
+
|
|
83
89
|
# If there are no new particles and we don't use continuous release,
|
|
84
90
|
# we are done.
|
|
85
91
|
continuous_release = bool(self._frequency)
|
|
@@ -99,7 +105,7 @@ class TextFileReleaser(Releaser):
|
|
|
99
105
|
return
|
|
100
106
|
|
|
101
107
|
# If we have continuous release, but there are no new particles and
|
|
102
|
-
# the last release is NOT recent, we should replace
|
|
108
|
+
# the last release is NOT recent, we should replace empty
|
|
103
109
|
# dataframe with the previously released dataframe
|
|
104
110
|
if continuous_release:
|
|
105
111
|
if (len(df) == 0) and not last_release_is_recent:
|
|
@@ -148,6 +154,7 @@ class TextFileReleaser(Releaser):
|
|
|
148
154
|
self._dataframe = self._csv_fname
|
|
149
155
|
|
|
150
156
|
else:
|
|
157
|
+
# noinspection PyArgumentList
|
|
151
158
|
with open_or_relay(self._csv_fname, 'r', encoding='utf-8') as fp:
|
|
152
159
|
self._dataframe = load_release_file(
|
|
153
160
|
stream=fp,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
ladim/__init__.py,sha256=
|
|
1
|
+
ladim/__init__.py,sha256=gItkgENsZYTMR2SxeAgoMMvJ9uTjFAJA29jZoVWvM2k,51
|
|
2
|
+
ladim/__main__.py,sha256=8f07EMfxQllDZSgpak5ECyYHnfQFy8LaHl2xdC-aO9c,23
|
|
2
3
|
ladim/config.py,sha256=6b0ikBrBnq_sSElgO2YcVtJHjQU0nyZsVyPV3q9fy5I,4233
|
|
3
4
|
ladim/forcing.py,sha256=f4PpSwyilSScXeNyorTWLMgVTiat9htSLkCwAkRlJVM,3048
|
|
4
5
|
ladim/grid.py,sha256=m6bQrGJ3cux7rqC8pbRXD86cOI-VQKF-XjP9m1jCIcY,2221
|
|
5
6
|
ladim/main.py,sha256=wO91-nLd1gvF3V20XK5qRvvOIV4xoTOKiWFcbwV2oag,2812
|
|
6
7
|
ladim/model.py,sha256=jpjq_ZSh7ULpwi3_RqDb-p5SG8WcdgCPaBkSpnNWblU,3137
|
|
7
8
|
ladim/output.py,sha256=Rz7iujvS7Z3LoABiJduQqyb3zPswNqhhFsywr3MLsBY,8373
|
|
8
|
-
ladim/release.py,sha256=
|
|
9
|
+
ladim/release.py,sha256=1j__9Gj0BD0CqVCM2KLZhio1Ia-hz1gbUIhTsa0J3Rg,8451
|
|
9
10
|
ladim/sample.py,sha256=n8wRGd_VsW_qyQe1ZoTpmfZcdcwB929vsM8PoKG6JTs,8292
|
|
10
11
|
ladim/solver.py,sha256=sZvYgOxzJ-EItI-IB2y8_z8Tf-SJAQSrmydlhDRa7ZQ,755
|
|
11
12
|
ladim/state.py,sha256=5ICIiujsV3KOAUYagGLK7YdmhcItgJmtntZeR11nIpw,3781
|
|
@@ -23,9 +24,9 @@ postladim/cellcount.py,sha256=nCFu9iJmprubn4YmPB4W0VO02GfEb90Iif7D49w1Kss,2054
|
|
|
23
24
|
postladim/kde_plot.py,sha256=GvMWzT6VxIeXKh1cnqaGzR-4jGG_WIHGMLPpRMXIpo4,1628
|
|
24
25
|
postladim/particlefile.py,sha256=0aif9wYUJ-VrpQKeCef8wB5VCiBB-gWY6sxNCUYviTA,4889
|
|
25
26
|
postladim/variable.py,sha256=-2aihoppYMMmpSpCqaF31XvpinTMaH3Y01-USDIkbBc,6587
|
|
26
|
-
ladim-2.0.
|
|
27
|
-
ladim-2.0.
|
|
28
|
-
ladim-2.0.
|
|
29
|
-
ladim-2.0.
|
|
30
|
-
ladim-2.0.
|
|
31
|
-
ladim-2.0.
|
|
27
|
+
ladim-2.0.1.dist-info/LICENSE,sha256=BgtXyjNr6Ly9nQ7ZLXKpV3r5kWRLnh5MiN0dxp0Bvfc,1085
|
|
28
|
+
ladim-2.0.1.dist-info/METADATA,sha256=-183UhMhVbBOfOcjonoP1P8l2q500OF8vexlV1SDAEg,1841
|
|
29
|
+
ladim-2.0.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
30
|
+
ladim-2.0.1.dist-info/entry_points.txt,sha256=JDlNJo87GJaOkH0-BpAzTPLCrZcuPSdSlHNQ4XmnoRg,41
|
|
31
|
+
ladim-2.0.1.dist-info/top_level.txt,sha256=TK8Gl7d6MsrAQvqKG4b6YJCbB4UL46Se3SzsI-sJAuc,16
|
|
32
|
+
ladim-2.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|