pthelma 1.1.0__cp311-cp311-win32.whl → 2.1.0__cp311-cp311-win32.whl
Sign up to get free protection for your applications and to get access to all the features.
- enhydris_cache/cli.py +0 -2
- evaporation/cli.py +5 -7
- evaporation/evaporation.py +1 -1
- haggregate/haggregate.py +6 -6
- haggregate/regularize.cp311-win32.pyd +0 -0
- hspatial/cli.py +2 -4
- pthelma/_version.py +2 -2
- {pthelma-1.1.0.dist-info → pthelma-2.1.0.dist-info}/METADATA +2 -2
- {pthelma-1.1.0.dist-info → pthelma-2.1.0.dist-info}/RECORD +14 -14
- {pthelma-1.1.0.dist-info → pthelma-2.1.0.dist-info}/WHEEL +1 -1
- rocc/calculation.cp311-win32.pyd +0 -0
- {pthelma-1.1.0.dist-info → pthelma-2.1.0.dist-info}/LICENSE.rst +0 -0
- {pthelma-1.1.0.dist-info → pthelma-2.1.0.dist-info}/entry_points.txt +0 -0
- {pthelma-1.1.0.dist-info → pthelma-2.1.0.dist-info}/top_level.txt +0 -0
enhydris_cache/cli.py
CHANGED
@@ -2,7 +2,6 @@ import configparser
|
|
2
2
|
import datetime as dt
|
3
3
|
import logging
|
4
4
|
import os
|
5
|
-
import sys
|
6
5
|
import traceback
|
7
6
|
|
8
7
|
import click
|
@@ -81,7 +80,6 @@ class AppConfig:
|
|
81
80
|
try:
|
82
81
|
self._parse_config()
|
83
82
|
except (OSError, configparser.Error) as e:
|
84
|
-
sys.stderr.write(str(e))
|
85
83
|
raise click.ClickException(str(e))
|
86
84
|
|
87
85
|
def _parse_config(self):
|
evaporation/cli.py
CHANGED
@@ -2,7 +2,6 @@ import configparser
|
|
2
2
|
import datetime as dt
|
3
3
|
import logging
|
4
4
|
import os
|
5
|
-
import sys
|
6
5
|
import traceback
|
7
6
|
from glob import glob
|
8
7
|
from io import StringIO
|
@@ -100,7 +99,6 @@ class AppConfig:
|
|
100
99
|
try:
|
101
100
|
self._parse_config()
|
102
101
|
except (OSError, configparser.Error) as e:
|
103
|
-
sys.stderr.write(str(e))
|
104
102
|
raise click.ClickException(str(e))
|
105
103
|
|
106
104
|
def _parse_config(self):
|
@@ -155,10 +153,10 @@ class AppConfig:
|
|
155
153
|
self.time_step = s
|
156
154
|
|
157
155
|
def _check_time_step(self, s):
|
158
|
-
if s not in ("D", "
|
156
|
+
if s not in ("D", "h"):
|
159
157
|
raise WrongValueError(
|
160
158
|
'"{}" is not an appropriate time step; in this version of '
|
161
|
-
"vaporize, the step must be either D or
|
159
|
+
"vaporize, the step must be either D or h.".format(s)
|
162
160
|
)
|
163
161
|
|
164
162
|
def _parse_unit_converters(self):
|
@@ -412,11 +410,11 @@ class ProcessAtPoint:
|
|
412
410
|
self.pet.unit = "mm"
|
413
411
|
self.pet.timezone = self.timezone
|
414
412
|
self.pet.variable = "Potential Evapotranspiration"
|
415
|
-
self.pet.precision = 2 if self.config.time_step == "
|
413
|
+
self.pet.precision = 2 if self.config.time_step == "h" else 1
|
416
414
|
self.pet.location = self.location
|
417
415
|
|
418
416
|
def _determine_variables_to_use_in_calculation(self):
|
419
|
-
if self.config.time_step == "
|
417
|
+
if self.config.time_step == "h":
|
420
418
|
vars = ["temperature", "humidity", "wind_speed", "solar_radiation"]
|
421
419
|
if "pressure" in self.input_timeseries:
|
422
420
|
vars.append("pressure")
|
@@ -571,7 +569,7 @@ class ProcessSpatial:
|
|
571
569
|
self._read_input_geofile(var, timestamp)
|
572
570
|
|
573
571
|
def _get_variables(self):
|
574
|
-
if self.config.time_step == "
|
572
|
+
if self.config.time_step == "h":
|
575
573
|
return {
|
576
574
|
"temperature",
|
577
575
|
"humidity",
|
evaporation/evaporation.py
CHANGED
@@ -45,7 +45,7 @@ class PenmanMonteith(object):
|
|
45
45
|
self.unit_converters = unit_converters
|
46
46
|
|
47
47
|
def calculate(self, **kwargs):
|
48
|
-
if self.time_step == "
|
48
|
+
if self.time_step == "h":
|
49
49
|
return self.calculate_hourly(**kwargs)
|
50
50
|
elif self.time_step == "D":
|
51
51
|
return self.calculate_daily(**kwargs)
|
haggregate/haggregate.py
CHANGED
@@ -75,8 +75,8 @@ class Aggregation:
|
|
75
75
|
def get_result_flags(self):
|
76
76
|
max_count = int(pd.Timedelta(self.result.time_step) / self.source.freq)
|
77
77
|
values_count = self.resampler.count()
|
78
|
-
self.result.data["flags"] = (
|
79
|
-
lambda x: self.missing_flag if x else ""
|
78
|
+
self.result.data["flags"] = (max_count - values_count).apply(
|
79
|
+
lambda x: self.missing_flag.format(x) if x else ""
|
80
80
|
)
|
81
81
|
|
82
82
|
|
@@ -106,7 +106,7 @@ class SourceTimeseries(HTimeseries):
|
|
106
106
|
)
|
107
107
|
except ValueError:
|
108
108
|
raise CannotInferFrequency()
|
109
|
-
first_timestamp = (current_range[0] - pd.Timedelta("
|
109
|
+
first_timestamp = (current_range[0] - pd.Timedelta("1s")).floor(target_step)
|
110
110
|
end_timestamp = current_range[-1].ceil(target_step)
|
111
111
|
new_range = pd.date_range(first_timestamp, end_timestamp, freq=self.freq)
|
112
112
|
self.data = self.data.reindex(new_range)
|
@@ -116,8 +116,8 @@ class AggregatedTimeseries(HTimeseries):
|
|
116
116
|
def set_metadata(self, source_timeseries):
|
117
117
|
for attr in attrs:
|
118
118
|
setattr(self, attr, getattr(source_timeseries, attr, None))
|
119
|
-
if self.time_step not in ("
|
120
|
-
raise AggregateError("The target step can currently only be
|
119
|
+
if self.time_step not in ("1h", "1D"):
|
120
|
+
raise AggregateError("The target step can currently only be 1h or 1D")
|
121
121
|
if hasattr(source_timeseries, "title"):
|
122
122
|
self.title = "Aggregated " + source_timeseries.title
|
123
123
|
if hasattr(source_timeseries, "comment"):
|
@@ -140,7 +140,7 @@ class AggregatedTimeseries(HTimeseries):
|
|
140
140
|
|
141
141
|
|
142
142
|
def _get_offset_in_minutes(timestamp_offset):
|
143
|
-
m = re.match(r"(-?)(\d*)
|
143
|
+
m = re.match(r"(-?)(\d*)min$", timestamp_offset)
|
144
144
|
if not m:
|
145
145
|
raise AggregateError(
|
146
146
|
"The target timestamp offset can currently only be a number of minutes "
|
Binary file
|
hspatial/cli.py
CHANGED
@@ -2,7 +2,6 @@ import configparser
|
|
2
2
|
import datetime as dt
|
3
3
|
import logging
|
4
4
|
import os
|
5
|
-
import sys
|
6
5
|
import traceback
|
7
6
|
from glob import glob
|
8
7
|
from io import StringIO
|
@@ -100,7 +99,7 @@ class App:
|
|
100
99
|
0, iso8601.parse_date(datestring, default_timezone=timezone)
|
101
100
|
)
|
102
101
|
except iso8601.ParseError as e:
|
103
|
-
raise
|
102
|
+
raise click.ClickException(
|
104
103
|
str(e)
|
105
104
|
+ " (file {}, {} lines from the end)".format(filename, i + 1)
|
106
105
|
)
|
@@ -146,7 +145,7 @@ class App:
|
|
146
145
|
"""
|
147
146
|
Determine date_fmt based on time series time step.
|
148
147
|
"""
|
149
|
-
if self._time_step.endswith("min") or self._time_step.endswith("
|
148
|
+
if self._time_step.endswith("min") or self._time_step.endswith("h"):
|
150
149
|
return "%Y-%m-%d %H:%M%z"
|
151
150
|
elif self._time_step.endswith("D"):
|
152
151
|
return "%Y-%m-%d"
|
@@ -221,7 +220,6 @@ class AppConfig:
|
|
221
220
|
try:
|
222
221
|
self._parse_config()
|
223
222
|
except (OSError, configparser.Error) as e:
|
224
|
-
sys.stderr.write(str(e))
|
225
223
|
raise click.ClickException(str(e))
|
226
224
|
|
227
225
|
def _parse_config(self):
|
pthelma/_version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: pthelma
|
3
|
-
Version:
|
3
|
+
Version: 2.1.0
|
4
4
|
Summary: Utilities for hydrological and meteorological time series processing
|
5
5
|
Author-email: Antonis Christofides <antonis@antonischristofides.com>
|
6
6
|
Maintainer-email: Antonis Christofides <antonis@antonischristofides.com>
|
@@ -1,30 +1,30 @@
|
|
1
1
|
enhydris_api_client/__init__.py,sha256=TQQD2zgSAl-7eXOOHjgvHEqMW1D3GSmf9nI9cmR31c8,9592
|
2
2
|
enhydris_cache/__init__.py,sha256=n3mAFeXUINSGpRkO-ZL1tkxyAuEabnMdlNPpmKur0AU,157
|
3
|
-
enhydris_cache/cli.py,sha256=
|
3
|
+
enhydris_cache/cli.py,sha256=BEFBYdrfdJbEUyeY87BLWw7igKlfB2qzkpopPZrAIUQ,4743
|
4
4
|
enhydris_cache/enhydris_cache.py,sha256=Mvpk2JxF6hSgk0qmGWEVFjIAoehFbdK41LyBJjAYhZc,2691
|
5
5
|
evaporation/__init__.py,sha256=ekZNT_-GEt1lDmwbX_RIaOvHSRjX05iVWeupaxZV75Y,126
|
6
|
-
evaporation/cli.py,sha256=
|
7
|
-
evaporation/evaporation.py,sha256=
|
6
|
+
evaporation/cli.py,sha256=06TIjd6Jr_p6YjM0bOGgKqSufj5exvHXElSEAvleaNA,28392
|
7
|
+
evaporation/evaporation.py,sha256=87kNBAplijIEk_kzPWHBOYtWDWqNAK7_oZL_U2gaV9g,16702
|
8
8
|
haggregate/__init__.py,sha256=KfFmAI6bvEsnaflhq9pK1nzOdoyySFiXnw9o1-Nmcus,70
|
9
9
|
haggregate/cli.py,sha256=Ou2zQRnj9ZsNM6it7HFGLavrdGaExZDartlPGPuaNLc,3363
|
10
|
-
haggregate/haggregate.py,sha256=
|
11
|
-
haggregate/regularize.cp311-win32.pyd,sha256=
|
10
|
+
haggregate/haggregate.py,sha256=TSPm-pVW9LYs1AJU84MZMOix2DND3pgp7y4ZbvjEwuo,5206
|
11
|
+
haggregate/regularize.cp311-win32.pyd,sha256=z0b19029Egf95qvs-KeR8cLUBgCV7H9JG7V6lvSUtuI,91136
|
12
12
|
haggregate/regularize.pyx,sha256=aaxx-3wJtuo51G9n7GIzFb2qt6m7rXuoAES9zoI7Zcw,5800
|
13
13
|
hspatial/__init__.py,sha256=dlTLFy7IqQwun4nz01qtYMQbU9kBmHEKoOXGIgCRf9c,123
|
14
|
-
hspatial/cli.py,sha256=
|
14
|
+
hspatial/cli.py,sha256=1iAY9-ATkO_xzlGCC_WSw42S9w2ca0uRLSxWG3WIat8,10638
|
15
15
|
hspatial/hspatial.py,sha256=fv9xia23D9W5kXG00XlDrXYMF8KotUlIfL9ZjuGEyPg,16348
|
16
16
|
hspatial/test.py,sha256=_YZzfgEtlCJmOGOdnxwpsPC48EBZ_QaKKBdyJRmg014,1050
|
17
17
|
htimeseries/__init__.py,sha256=by-XbIt4Q-lHHKlHEcgXLi7AjEGNv0VGNmM0ZMl8L7M,75
|
18
18
|
htimeseries/htimeseries.py,sha256=y8rIFabSCdBwmS3vWGEuyRMtQvIZy81jqg304-kIg3w,19771
|
19
19
|
htimeseries/timezone_utils.py,sha256=jTWhKljHXQuD_drNgfI2ytD6atf6dwnsL4qCVK8wpgA,1282
|
20
20
|
pthelma/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
|
-
pthelma/_version.py,sha256=
|
21
|
+
pthelma/_version.py,sha256=RNKDW89EC1jx19YzwFi-xpYjE252Ld4fuY3bcovr8-s,427
|
22
22
|
rocc/__init__.py,sha256=KfFB3rfJXgYL4HnVa7MNYcotG3am-CajVvh65gm9v_s,281
|
23
|
-
rocc/calculation.cp311-win32.pyd,sha256=
|
23
|
+
rocc/calculation.cp311-win32.pyd,sha256=dSvztUsNQgaklZ68AUfK06A80xNwXHGT6ELjTXLjGtI,86016
|
24
24
|
rocc/calculation.pyx,sha256=tWWSB1u2JTCnYv6mb_YwK97vPrL7JT_ymx_5TlmG_9Y,5938
|
25
|
-
pthelma-
|
26
|
-
pthelma-
|
27
|
-
pthelma-
|
28
|
-
pthelma-
|
29
|
-
pthelma-
|
30
|
-
pthelma-
|
25
|
+
pthelma-2.1.0.dist-info/LICENSE.rst,sha256=v1ndaPoHsiO-q3mq-ibN0HooeO-LCZBvKPfwlJRIMWs,1379
|
26
|
+
pthelma-2.1.0.dist-info/METADATA,sha256=7iwlTCCxJeUkJ00e8o1RoaJIs9uiX-Asu1wlw8xHD7I,2018
|
27
|
+
pthelma-2.1.0.dist-info/WHEEL,sha256=bhXcIFNv4T-G4Sw4ACrAXSbqmVpqO5W3nspTDhg-PJ4,97
|
28
|
+
pthelma-2.1.0.dist-info/entry_points.txt,sha256=Kh2gKKRhObmmOASJWIwX9dDEZQ5htc3ftBlqeoGer-s,155
|
29
|
+
pthelma-2.1.0.dist-info/top_level.txt,sha256=kWL0AYuVd_5KzKWRBkAG576ag46gKbojnWdeH_c-bzo,92
|
30
|
+
pthelma-2.1.0.dist-info/RECORD,,
|
rocc/calculation.cp311-win32.pyd
CHANGED
Binary file
|
File without changes
|
File without changes
|
File without changes
|