ngiab-data-preprocess 4.2.1__py3-none-any.whl → 4.3.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.
@@ -1,19 +1,17 @@
1
- from data_sources.source_validation import validate_all
2
- from ngiab_data_cli.custom_logging import setup_logging
3
- from data_processing.forcings import compute_zonal_stats
4
- from data_processing.dataset_utils import check_local_cache, save_to_cache, clip_dataset_to_bounds
5
- from data_processing.datasets import load_aorc_zarr, load_v3_retrospective_zarr
6
- from data_processing.file_paths import file_paths
7
1
  import argparse
8
2
  import logging
3
+ import shutil
9
4
  import time
10
- import xarray as xr
11
- import geopandas as gpd
12
5
  from datetime import datetime
13
6
  from pathlib import Path
14
- import shutil
15
7
 
16
- from dask.distributed import Client, LocalCluster
8
+ import geopandas as gpd
9
+ from data_processing.dask_utils import shutdown_cluster
10
+ from data_processing.dataset_utils import check_local_cache, clip_dataset_to_bounds, save_to_cache
11
+ from data_processing.datasets import load_aorc_zarr, load_v3_retrospective_zarr
12
+ from data_processing.forcings import compute_zonal_stats
13
+ from data_sources.source_validation import validate_all
14
+ from ngiab_data_cli.custom_logging import setup_logging
17
15
 
18
16
  # Constants
19
17
  DATE_FORMAT = "%Y-%m-%d" # used for datetime parsing
@@ -69,6 +67,7 @@ def parse_arguments() -> argparse.Namespace:
69
67
 
70
68
  return parser.parse_args()
71
69
 
70
+
72
71
  def main() -> None:
73
72
  time.sleep(0.01)
74
73
  setup_logging()
@@ -111,15 +110,7 @@ def main() -> None:
111
110
  # remove the working directory
112
111
  shutil.rmtree(forcing_working_dir)
113
112
 
114
- try:
115
- client = Client.current()
116
- except ValueError:
117
- cluster = LocalCluster()
118
- client = Client(cluster)
119
- cluster.close()
120
-
121
- # shut down the client and cluster
122
- client.close()
113
+ shutdown_cluster()
123
114
 
124
115
 
125
116
  if __name__ == "__main__":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngiab_data_preprocess
3
- Version: 4.2.1
3
+ Version: 4.3.0
4
4
  Summary: Graphical Tools for creating Next Gen Water model input data.
5
5
  Author-email: Josh Cunningham <jcunningham8@ua.edu>
6
6
  Project-URL: Homepage, https://github.com/CIROH-UA/NGIAB_data_preprocess
@@ -15,7 +15,7 @@ Requires-Dist: pyogrio>=0.7.2
15
15
  Requires-Dist: pyproj>=3.6.1
16
16
  Requires-Dist: Flask==3.0.2
17
17
  Requires-Dist: geopandas>=1.0.0
18
- Requires-Dist: requests==2.32.2
18
+ Requires-Dist: requests==2.32.4
19
19
  Requires-Dist: igraph==0.11.4
20
20
  Requires-Dist: s3fs==2024.3.1
21
21
  Requires-Dist: xarray==2024.2.0
@@ -23,8 +23,6 @@ Requires-Dist: zarr==2.17.1
23
23
  Requires-Dist: netCDF4>=1.6.5
24
24
  Requires-Dist: dask==2024.4.1
25
25
  Requires-Dist: dask[distributed]==2024.4.1
26
- Requires-Dist: black==24.3.0
27
- Requires-Dist: isort==5.13.2
28
26
  Requires-Dist: h5netcdf==1.3.0
29
27
  Requires-Dist: exactextract==0.2.0
30
28
  Requires-Dist: numpy>=1.26.4
@@ -49,15 +47,19 @@ This repository contains tools for preparing data to run a [next gen](https://gi
49
47
  ## Table of Contents
50
48
 
51
49
  1. [What does this tool do?](#what-does-this-tool-do)
52
- 2. [Requirements](#requirements)
53
- 3. [Installation and Running](#installation-and-running)
54
- 4. [Development Installation](#development-installation)
55
- 5. [Usage](#usage)
56
- 6. [CLI Documentation](#cli-documentation)
50
+ 2. [What does it not do?](#what-does-it-not-do)
51
+ - [Evaluation](#evaluation)
52
+ - [Visualisation](#visualisation)
53
+ 3. [Requirements](#requirements)
54
+ 4. [Installation and Running](#installation-and-running)
55
+ - [Running without install](#running-without-install)
56
+ 5. [For legacy pip installation](#for-legacy-pip-installation)
57
+ 6. [Development Installation](#development-installation)
58
+ 7. [Usage](#usage)
59
+ 8. [CLI Documentation](#cli-documentation)
57
60
  - [Arguments](#arguments)
61
+ - [Usage Notes](#usage-notes)
58
62
  - [Examples](#examples)
59
- - [File Formats](#file-formats)
60
- - [Output](#output)
61
63
 
62
64
  ## What does this tool do?
63
65
 
@@ -231,12 +233,12 @@ Once all the steps are finished, you can run NGIAB on the folder shown underneat
231
233
 
232
234
  3. Create realization using a lat/lon pair and output to a named folder:
233
235
  ```bash
234
- python -m ngiab_data_cli -i 54.33,-69.4 -l -r --start 2022-01-01 --end 2022-02-28 -o custom_output
236
+ python -m ngiab_data_cli -i 33.22,-87.54 -l -r --start 2022-01-01 --end 2022-02-28 -o custom_output
235
237
  ```
236
238
 
237
239
  4. Perform all operations using a lat/lon pair:
238
240
  ```bash
239
- python -m ngiab_data_cli -i 54.33,-69.4 -l -s -f -r --start 2022-01-01 --end 2022-02-28
241
+ python -m ngiab_data_cli -i 33.22,-87.54 -l -s -f -r --start 2022-01-01 --end 2022-02-28
240
242
  ```
241
243
 
242
244
  5. Subset hydrofabric using gage ID:
@@ -0,0 +1,43 @@
1
+ data_processing/create_realization.py,sha256=WZCnYps-d3xd6_F4-Fy95nyXoh3GX4DzpUBWXvSvzKY,14953
2
+ data_processing/dask_utils.py,sha256=A2IP94WAz8W9nek3etXKEKTOxGPf0NWSFLh8cZ5S-xU,2454
3
+ data_processing/dataset_utils.py,sha256=CMDy-YfjFQ9FM_BbRHnRKUFwERWK9ATJ0wn4wI0gUwY,10024
4
+ data_processing/datasets.py,sha256=_EJ1uZSWTU1HWpvF7TQSikneJqWZFikTrdo9usCV8A0,4665
5
+ data_processing/file_paths.py,sha256=l2iCUFt_pk-jjzl7OS7npROAnQxwqFfZ7b2wRjViqiU,4720
6
+ data_processing/forcings.py,sha256=k-JhBncTnXcdjSieam1Q2cDx5Xt9hH5Aywv0gDY4O2U,19010
7
+ data_processing/gpkg_utils.py,sha256=tSSIMlHeqqgxTJQyF3X9tPmunQTJYx0xrCNHqUBQxkg,20590
8
+ data_processing/graph_utils.py,sha256=-0vmLZvuhi9jLFSUfA-3Lo-wGfX4hMfB2QQ6A2D2FO8,8362
9
+ data_processing/s3fs_utils.py,sha256=ki1EmA0ezV0r26re6dRWIGzL5FudGdwF9Qw1eVLR0Bc,2747
10
+ data_processing/subset.py,sha256=15rzjKlTPAHtFYZusKDtb4-zhG-8sTKU68ou9BA-_9Q,2610
11
+ data_sources/cfe-nowpm-realization-template.json,sha256=8an6q1drWD8wU1ocvdPab-GvZDvlQ-0di_-NommH3QI,3528
12
+ data_sources/cfe-template.ini,sha256=6e5-usqjWtm3MWVvtm8CTeZTJJMxO1ZswkOXq0L9mnc,2033
13
+ data_sources/em-catchment-template.yml,sha256=M08ixazEUHYI2PNavtI0xPZeSzcQ9bg2g0XzNT-8_u4,292
14
+ data_sources/em-config.yml,sha256=y0J8kEA70rxLWXJjz-CQ7sawcVyhQcayofeLlq4Svbo,1330
15
+ data_sources/em-realization-template.json,sha256=DJvB7N8lCeS2vLFenmbTzysBDR-xPaJ09XA8heu1ijY,1466
16
+ data_sources/forcing_template.nc,sha256=uRuVAqX3ngdlougZINavtwl_wC2VLD8fHqG7_CLim1s,85284
17
+ data_sources/ngen-routing-template.yaml,sha256=RV28MAbyQNx9U8FAYmZhD2Fv8Yu6o_08Ekoc77KNdH4,4622
18
+ data_sources/noah-owp-modular-init.namelist.input,sha256=Vb7mp40hFpJogruOrXrDHwVW1bKi9h1ciDNyDvTzn20,3045
19
+ data_sources/source_validation.py,sha256=vrCuh2nFy9x-8MKqbUtxpdWCm3ohKK6UFcGR87n4I7I,9029
20
+ data_sources/template.sql,sha256=ZnFqAqleEq9wgmAhNO90Wue_L9k0JAn8KF99DYtcxgs,10457
21
+ data_sources/triggers.sql,sha256=G0d_175eNsamKAFhsbphPATvzMPuPL_iCleIhlToduQ,14906
22
+ map_app/__init__.py,sha256=OarJao9X98kcbLyiwewN4ObWNAYkKDichcxbuWywTsA,818
23
+ map_app/__main__.py,sha256=Uj7__cJUyPQkZo2tNQ2x2g6rwizsyg1DcNtJkQniHzY,1650
24
+ map_app/views.py,sha256=SMrnXDjoIMk8yMrBsrif41GLS-QLuN79cWYbA-uqKX8,5138
25
+ map_app/static/css/console.css,sha256=xN6G2MMFyKc9YW9HEVpUUTUjx2o2nokBR4nCX5c18UM,803
26
+ map_app/static/css/main.css,sha256=HmRIfhWeHTrNLOCHGpaKuzwGj05LkkUiQy538D-ZRLY,6464
27
+ map_app/static/css/toggle.css,sha256=Ep6tXT7gCrPRRITuEMpXyisuiTQgiLIEKFFTWRmC82o,1913
28
+ map_app/static/js/console.js,sha256=BnG0pED5B9d563sLWshDNt_q-SyoTY48sETvVoOVJkU,1377
29
+ map_app/static/js/data_processing.js,sha256=X6NSuggOGNIJUF-LEyGGYJjtiA5J29xmkXgFFmfBw18,6711
30
+ map_app/static/js/main.js,sha256=JkvZqDuzYQaNtVmGeOdg0Za6OUBIG7hGOR3CB-uoviQ,9691
31
+ map_app/static/resources/loading.gif,sha256=ggdkZf1AD7rSwIpSJwfiIqANgmVV1WHlxGuKxQKv7uY,72191
32
+ map_app/static/resources/screenshot.jpg,sha256=Ia358aX-OHM9BP4B8lX05cLnguF2fHUIimno9bnFLYw,253730
33
+ map_app/templates/index.html,sha256=Jy2k1Ob2_et--BPpfmTYO22Yin3vrG6IOeNlwzUoEqY,7878
34
+ ngiab_data_cli/__main__.py,sha256=LIRuzYCT2bF1eeW51hJIrAeeMmyHL7MevpTftcWbvR0,10605
35
+ ngiab_data_cli/arguments.py,sha256=yBULJnFgUvgP4YZmZ5HhR7g0EfdMtBCdQuDkDuYSXCQ,4322
36
+ ngiab_data_cli/custom_logging.py,sha256=iS2XozaxudcxQj17qAsrCgbVK9LJAYAPmarJuVWJo1k,1280
37
+ ngiab_data_cli/forcing_cli.py,sha256=eIWRxRWUwPqR16fihFDEIV4VzGlNuvcD6lJW5VYjkPU,3635
38
+ ngiab_data_preprocess-4.3.0.dist-info/licenses/LICENSE,sha256=6dMSprwwnsRzEm02mEDbKHD9dUbL8bPIt9Vhrhb0Ulk,1081
39
+ ngiab_data_preprocess-4.3.0.dist-info/METADATA,sha256=zzIirFNOmhxVhaYD09onH14VbLTRV3EUIVxdCnh1EdA,10465
40
+ ngiab_data_preprocess-4.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
41
+ ngiab_data_preprocess-4.3.0.dist-info/entry_points.txt,sha256=spwlhKEJ3ZnNETQsJGeTjD7Vwy8O_zGHb9GdX8ACCtw,128
42
+ ngiab_data_preprocess-4.3.0.dist-info/top_level.txt,sha256=CjhYAUZrdveR2fOK6rxffU09VIN2IuPD7hk4V3l3pV0,52
43
+ ngiab_data_preprocess-4.3.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5