pypromice 1.5.3__py3-none-any.whl → 1.6.0__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.

Potentially problematic release.


This version of pypromice might be problematic. Click here for more details.

Files changed (65) hide show
  1. pypromice/__init__.py +2 -0
  2. pypromice/{qc → core/qc}/percentiles/compute_thresholds.py +2 -2
  3. pypromice/{qc → core/qc}/persistence.py +22 -29
  4. pypromice/{process → core/qc}/value_clipping.py +3 -3
  5. pypromice/core/variables/__init__.py +1 -0
  6. pypromice/core/variables/air_temperature.py +64 -0
  7. pypromice/core/variables/gps.py +221 -0
  8. pypromice/core/variables/humidity.py +111 -0
  9. pypromice/core/variables/precipitation.py +108 -0
  10. pypromice/core/variables/pressure_transducer_depth.py +79 -0
  11. pypromice/core/variables/radiation.py +422 -0
  12. pypromice/core/variables/station_boom_height.py +49 -0
  13. pypromice/core/variables/station_pose.py +375 -0
  14. pypromice/io/bufr/__init__.py +0 -0
  15. pypromice/{postprocess → io/bufr}/bufr_to_csv.py +1 -1
  16. pypromice/{postprocess → io/bufr}/create_bufr_files.py +2 -2
  17. pypromice/{postprocess → io/bufr}/get_bufr.py +6 -6
  18. pypromice/{postprocess → io/bufr}/real_time_utilities.py +3 -3
  19. pypromice/io/ingest/__init__.py +0 -0
  20. pypromice/{utilities → io/ingest}/git.py +1 -3
  21. pypromice/io/ingest/l0.py +294 -0
  22. pypromice/io/ingest/l0_repository.py +103 -0
  23. pypromice/io/ingest/toa5.py +87 -0
  24. pypromice/{process → io}/write.py +1 -1
  25. pypromice/pipeline/L0toL1.py +291 -0
  26. pypromice/pipeline/L1toL2.py +233 -0
  27. pypromice/{process → pipeline}/L2toL3.py +97 -118
  28. pypromice/pipeline/__init__.py +4 -0
  29. pypromice/{process → pipeline}/aws.py +10 -82
  30. pypromice/{process → pipeline}/get_l2.py +2 -2
  31. pypromice/{process → pipeline}/get_l2tol3.py +19 -22
  32. pypromice/{process → pipeline}/join_l2.py +31 -32
  33. pypromice/{process → pipeline}/join_l3.py +16 -14
  34. pypromice/{process → pipeline}/resample.py +58 -45
  35. pypromice/{process → pipeline}/utilities.py +0 -22
  36. pypromice/resources/file_attributes.csv +4 -4
  37. pypromice/resources/variables.csv +27 -24
  38. {pypromice-1.5.3.dist-info → pypromice-1.6.0.dist-info}/METADATA +1 -2
  39. pypromice-1.6.0.dist-info/RECORD +64 -0
  40. pypromice-1.6.0.dist-info/entry_points.txt +12 -0
  41. pypromice/get/__init__.py +0 -1
  42. pypromice/get/get.py +0 -211
  43. pypromice/get/get_promice_data.py +0 -56
  44. pypromice/process/L0toL1.py +0 -564
  45. pypromice/process/L1toL2.py +0 -824
  46. pypromice/process/__init__.py +0 -4
  47. pypromice/process/load.py +0 -161
  48. pypromice-1.5.3.dist-info/RECORD +0 -54
  49. pypromice-1.5.3.dist-info/entry_points.txt +0 -13
  50. /pypromice/{postprocess → core}/__init__.py +0 -0
  51. /pypromice/{utilities → core}/dependency_graph.py +0 -0
  52. /pypromice/{qc → core/qc}/__init__.py +0 -0
  53. /pypromice/{qc → core/qc}/github_data_issues.py +0 -0
  54. /pypromice/{qc → core/qc}/percentiles/__init__.py +0 -0
  55. /pypromice/{qc → core/qc}/percentiles/outlier_detector.py +0 -0
  56. /pypromice/{qc → core/qc}/percentiles/thresholds.csv +0 -0
  57. /pypromice/{process → core/variables}/wind.py +0 -0
  58. /pypromice/{utilities → io}/__init__.py +0 -0
  59. /pypromice/{postprocess → io/bufr}/bufr_utilities.py +0 -0
  60. /pypromice/{postprocess → io/bufr}/positions_seed.csv +0 -0
  61. /pypromice/{station_configuration.py → io/bufr/station_configuration.py} +0 -0
  62. /pypromice/{postprocess → io}/make_metadata_csv.py +0 -0
  63. {pypromice-1.5.3.dist-info → pypromice-1.6.0.dist-info}/WHEEL +0 -0
  64. {pypromice-1.5.3.dist-info → pypromice-1.6.0.dist-info}/licenses/LICENSE.txt +0 -0
  65. {pypromice-1.5.3.dist-info → pypromice-1.6.0.dist-info}/top_level.txt +0 -0
@@ -1,4 +0,0 @@
1
- from pypromice.process.aws import *
2
- from pypromice.process import L0toL1
3
- from pypromice.process import L1toL2
4
- from pypromice.process import L2toL3
pypromice/process/load.py DELETED
@@ -1,161 +0,0 @@
1
- #!/usr/bin/env python3
2
- # -*- coding: utf-8 -*-
3
- """
4
- Load module
5
- """
6
- from datetime import timedelta
7
- from typing import Sequence, Optional
8
-
9
- import logging
10
- import os
11
- import pandas as pd
12
- import toml
13
- import xarray as xr
14
-
15
- logger = logging.getLogger(__name__)
16
-
17
-
18
- def getConfig(
19
- config_file, inpath, default_columns: Sequence[str] = ("msg_lat", "msg_lon")
20
- ):
21
- """Load configuration from .toml file. PROMICE .toml files support defining
22
- features at the top level which apply to all nested properties, but do not
23
- overwrite nested properties if they are defined
24
-
25
- Parameters
26
- ----------
27
- config_file : str
28
- TOML file path
29
- inpath : str
30
- Input folder directory where L0 files can be found
31
-
32
- Returns
33
- -------
34
- conf : dict
35
- Configuration dictionary
36
- """
37
- conf = toml.load(config_file) # Move all top level keys to nested properties,
38
- top = [
39
- _ for _ in conf.keys() if not type(conf[_]) is dict
40
- ] # if they are not already defined in the nested properties
41
- subs = [
42
- _ for _ in conf.keys() if type(conf[_]) is dict
43
- ] # Insert the section name (config_file) as a file property and config file
44
- for s in subs:
45
- for t in top:
46
- if t not in conf[s].keys():
47
- conf[s][t] = conf[t]
48
-
49
- conf[s]["conf"] = config_file
50
- conf[s]["file"] = os.path.join(inpath, s)
51
- conf[s]["columns"].extend(default_columns)
52
-
53
- for t in top:
54
- conf.pop(t) # Delete all top level keys beause each file
55
- # should carry all properties with it
56
- for k in conf.keys(): # Check required fields are present
57
- for field in ["columns", "station_id", "format", "skiprows"]:
58
- assert field in conf[k].keys(), field + " not in config keys"
59
- return conf
60
-
61
-
62
- def getL0(
63
- infile: str,
64
- nodata,
65
- cols,
66
- skiprows,
67
- file_version,
68
- delimiter=",",
69
- comment="#",
70
- time_offset: Optional[float] = None,
71
- ) -> xr.Dataset:
72
- """Read L0 data file into pandas DataFrame object
73
-
74
- Parameters
75
- ----------
76
- infile : str
77
- L0 file path
78
- nodata : list
79
- List containing value for nan values and reassigned value
80
- cols : list
81
- List of columns in file
82
- skiprows : int
83
- Skip rows value
84
- file_version : int
85
- Version of L0 file
86
- delimiter : str
87
- String delimiter for L0 file
88
- comment : str
89
- Notifier of commented sections in L0 file
90
- time_offset : Optional[float]
91
- Time offset in hours for correcting for non utc time data.
92
- Returns
93
- -------
94
- ds : xarray.Dataset
95
- L0 Dataset
96
- """
97
- if file_version == 1:
98
- df = pd.read_csv(
99
- infile,
100
- comment=comment,
101
- index_col=0,
102
- na_values=nodata,
103
- names=cols,
104
- sep=delimiter,
105
- skiprows=skiprows,
106
- skip_blank_lines=True,
107
- usecols=range(len(cols)),
108
- low_memory=False,
109
- )
110
- df["time"] = pd.to_datetime(
111
- df.year.astype(str)
112
- + df.doy.astype(str).str.zfill(3)
113
- + df.hhmm.astype(str).str.zfill(4),
114
- format="%Y%j%H%M",
115
- )
116
- df = df.set_index("time")
117
-
118
- else:
119
- df = pd.read_csv(
120
- infile,
121
- comment=comment,
122
- index_col=0,
123
- na_values=nodata,
124
- names=cols,
125
- parse_dates=True,
126
- sep=delimiter,
127
- skiprows=skiprows,
128
- skip_blank_lines=True,
129
- usecols=range(len(cols)),
130
- low_memory=False,
131
- )
132
- try:
133
- df.index = pd.to_datetime(df.index)
134
- except ValueError as e:
135
- logger.info("\n" + infile)
136
- logger.info("\nValueError:")
137
- logger.info(e)
138
- logger.info("\t\t> Trying pd.to_datetime with format=mixed")
139
- try:
140
- df.index = pd.to_datetime(df.index, format="mixed")
141
- except Exception as e:
142
- logger.info("\nDateParseError:")
143
- logger.info(e)
144
- logger.info(
145
- "\t\t> Trying again removing apostrophes in timestamp (old files format)"
146
- )
147
- df.index = pd.to_datetime(df.index.str.replace('"', ""))
148
-
149
- if time_offset is not None:
150
- df.index = df.index + timedelta(hours=time_offset)
151
-
152
- # Drop SKIP columns
153
- for c in df.columns:
154
- if c[0:4] == "SKIP":
155
- df.drop(columns=c, inplace=True)
156
-
157
- # Carry relevant metadata with ds
158
- ds = xr.Dataset.from_dataframe(df)
159
- ds.attrs["level"] = "L0"
160
-
161
- return ds
@@ -1,54 +0,0 @@
1
- pypromice/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- pypromice/station_configuration.py,sha256=h0ap21-dCeU9kboktgYeziGvcni4OoJBi82fStV3se0,4009
3
- pypromice/get/__init__.py,sha256=n2L6P9EeUsdjsHaeU7BEanBjlkCBX9csGseT8z-laew,32
4
- pypromice/get/get.py,sha256=8tdIbvdeXCpRWU7KmcKGIP9ZPdqIry3MjtJp9krumvo,7705
5
- pypromice/get/get_promice_data.py,sha256=bluNCaP50iRlWBzdEOXLrSPepOQdGB7SeQLkTWiqK4c,1806
6
- pypromice/postprocess/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- pypromice/postprocess/bufr_to_csv.py,sha256=ntTJZhfBRYPbLn2u9GzO5PFCkg9DIypUZONYEs2XrqA,507
8
- pypromice/postprocess/bufr_utilities.py,sha256=O1vnpKipUC6nMPmSrPvWECJocjdsB9FAb2ILXD8b8fs,21264
9
- pypromice/postprocess/create_bufr_files.py,sha256=GizmNAW_v54MkvelPVzqIklBNHWH6nTRQC2qOo5amys,5657
10
- pypromice/postprocess/get_bufr.py,sha256=98BZ7tTbmvvrVAzhxJ8LgHib3w7Q3S_x757pCubHToU,16693
11
- pypromice/postprocess/make_metadata_csv.py,sha256=lUw8fZC6dzG10IePZ4d7eZIrTbquHYCDuppYP4r_dF0,9776
12
- pypromice/postprocess/positions_seed.csv,sha256=0kVCQ8UfEALdeXNYCddmwxpseRqLRudbFStqp_bZRBw,224
13
- pypromice/postprocess/real_time_utilities.py,sha256=2GZUua5R8ocp-TnIjEA4ig8lC4TlI3SkiimzLxoHXFE,9476
14
- pypromice/process/L0toL1.py,sha256=U7TLoB3UfV7BcR4iReVA1FheR1WD_OBXk0faBV3QEW0,24022
15
- pypromice/process/L1toL2.py,sha256=0xy54wmTetZKpQ4NkqTb57tt4ERuONMbvwFMncaOrjU,30174
16
- pypromice/process/L2toL3.py,sha256=P7abSejGmq22L9Urv78K0wXnevG05GDGvnhabTMQql8,61424
17
- pypromice/process/__init__.py,sha256=xvd0I-9nIyVw4M4qjgkQ5vXYpNuKcVSkIVIROQsZDo0,147
18
- pypromice/process/aws.py,sha256=5N4rLptO23Ic9mgyR5K8NhtNmGPa9xb9Cu7SgzAgoi8,7561
19
- pypromice/process/get_l2.py,sha256=ALXJCMJ8qgg0_dEKx-dV5TQ9IAJnLLLGPUxlr5QVfpk,3076
20
- pypromice/process/get_l2tol3.py,sha256=4Qu2d5rT25H2dObyCc70ivtJg3vw6WA-hzI-kRD6ybQ,4544
21
- pypromice/process/join_l2.py,sha256=ifjuhFR9scVvZt3xuy-ELp-iRchxV1dEK9qJ4UNh5bE,4567
22
- pypromice/process/join_l3.py,sha256=F90uvcy85iSl6GWxyj6C3K4j2eAoQvhQB8XqOXpShvo,20221
23
- pypromice/process/load.py,sha256=iaFvJeaDanAA60caVj4BWupZpqgQNj3CiNU4csz9FdU,4585
24
- pypromice/process/resample.py,sha256=yydbsSQeUpTSyrsY3tZN0uZzp0Ddbe5HKrW-onB3Yos,7329
25
- pypromice/process/utilities.py,sha256=1pqSaF3bIbvRNtOjb25mbegHfuW9MY4KpCBDVXWyML8,1773
26
- pypromice/process/value_clipping.py,sha256=_pTAxogsqfkjwBQslGyyE3jZzhYY6_Wp-g5ZPHcudMc,1506
27
- pypromice/process/wind.py,sha256=-dpaBOtqGyPDIU4O1HbbWRzlLNRC2a50OdnZhIaWdeI,1701
28
- pypromice/process/write.py,sha256=ZpA9NAgtnzJIbnjEiJ0sOtsE0J1haHASbjHqzMvBDJE,15818
29
- pypromice/qc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
- pypromice/qc/github_data_issues.py,sha256=gbbF62oMMWbXiLnsrs60vXbwfAqSUP113plhidVeqCU,13353
31
- pypromice/qc/persistence.py,sha256=2ruS5w_QXt8730jwh6dwN1F3h7MGKFYStfO3T0YmmCY,6582
32
- pypromice/qc/percentiles/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
- pypromice/qc/percentiles/compute_thresholds.py,sha256=CjopJRMr8g36SqMS5QB9BGxFr4ohnNvsduZ-Q0xY7S0,6086
34
- pypromice/qc/percentiles/outlier_detector.py,sha256=5_458aMm9MAubfYv7oIz1Lp9ME6Sn1xiSiAQmIe-riY,3370
35
- pypromice/qc/percentiles/thresholds.csv,sha256=KTQcYsg2VCZmR-Rf1Zzx1Jn-ZmR5yPPWWXYZ0Z03PDQ,9516
36
- pypromice/resources/__init__.py,sha256=MpKmvV11R4tcqmyvJpXQt-_It3oRI0WEIQNbMST--4w,907
37
- pypromice/resources/file_attributes.csv,sha256=NFqfg6u0PmPzY2bqE2bp646E4LUiPLqvzhyxDauXoPU,7014
38
- pypromice/resources/variable_aliases_GC-Net.csv,sha256=ts10e0AI1Fz_TtEj8qdRFIZBTkE8pt_VtJGp5hSBUBI,993
39
- pypromice/resources/variables.csv,sha256=cW8JbQMb5rlge9I3EjbWuKACg3nvbVmbd84W3ouFJdI,13282
40
- pypromice/tx/__init__.py,sha256=-62bhHWJGfzFh5JwHcLqRj2jcGzmqzYOLWByhO706YY,30
41
- pypromice/tx/get_l0tx.py,sha256=b34-96KGshTyTN2tBFaAIBl7oZZzbRB_JR7sXtDNfXA,6957
42
- pypromice/tx/get_msg.py,sha256=OGS60OHjy4Wf8JExTfOdK-9xhjFdjhuChxoTSPe_MjI,3417
43
- pypromice/tx/payload_formats.csv,sha256=A46-XcYdpe9-gzmADylP2UVizLi_UphF-BPT5u3Lyn8,7903
44
- pypromice/tx/payload_types.csv,sha256=C1-xCmHytAqqAzgzPwBLWqabzWu6s6tKAd8AjVd935s,457
45
- pypromice/tx/tx.py,sha256=asbgXVI5vurKM-WVACTfpKRt-70wtzVvSbvjvYufajI,34416
46
- pypromice/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
- pypromice/utilities/dependency_graph.py,sha256=bqoXasC8pg5ipjBd6rqDhfHwIq11t2_cFlNT72ncw4w,3135
48
- pypromice/utilities/git.py,sha256=7EUGjDs_VZucrckakXKyZEclDAZ_mKIxhTWzhopCIxM,1785
49
- pypromice-1.5.3.dist-info/licenses/LICENSE.txt,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
50
- pypromice-1.5.3.dist-info/METADATA,sha256=-WPlDUHP4MXavNOtyK8ANhUD486iYbaPArw-V4Vt4fQ,4992
51
- pypromice-1.5.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
52
- pypromice-1.5.3.dist-info/entry_points.txt,sha256=ufX1npmY3nqMPtSVRKVxn3MhG9IyFHD5FjPZQcELVXo,618
53
- pypromice-1.5.3.dist-info/top_level.txt,sha256=cBdfwgSbWDQq3a07nKRjrfmLC7jdaYXs98GG58HpTks,10
54
- pypromice-1.5.3.dist-info/RECORD,,
@@ -1,13 +0,0 @@
1
- [console_scripts]
2
- bufr_to_csv = pypromice.postprocess.bufr_to_csv:main
3
- create_bufr_files = pypromice.postprocess.create_bufr_files:main
4
- get_bufr = pypromice.postprocess.get_bufr:main
5
- get_l0tx = pypromice.tx.get_l0tx:get_l0tx
6
- get_l2 = pypromice.process.get_l2:main
7
- get_l2tol3 = pypromice.process.get_l2tol3:main
8
- get_msg = pypromice.tx.get_msg:get_msg
9
- get_promice_data = pypromice.get.get_promice_data:get_promice_data
10
- get_watsontx = pypromice.tx.get_watsontx:get_watsontx
11
- join_l2 = pypromice.process.join_l2:main
12
- join_l3 = pypromice.process.join_l3:main
13
- make_metadata_csv = pypromice.postprocess.make_metadata_csv:main
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes