Skip to content

Commit 3b3c298

Browse files
Merge pull request #20 from supathdhitalGEO/main
downgrade the OWP HAND framework in git
2 parents ae3cc3a + 5b7b6e6 commit 3b3c298

File tree

6 files changed

+633
-621
lines changed

6 files changed

+633
-621
lines changed
42.7 KB
Binary file not shown.

dist/fimserve-0.1.82.tar.gz

38.2 KB
Binary file not shown.

poetry.lock

Lines changed: 611 additions & 610 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "fimserve"
3-
version = "0.1.81"
3+
version = "0.1.82"
44
description = "Framework which is developed with the purpose of quickly generating Flood Inundation Maps (FIM) for emergency response and risk assessment. It is developed under Surface Dynamics Modeling Lab (SDML)."
55
authors = ["Supath Dhital <sdhital@crimson.ua.edu>"]
66
license = "GPL-3.0"

src/fimserve/datadownload.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,30 @@ def setup_directories():
1717

1818
return code_dir, data_dir, output_dir
1919

20+
# def clone_repository(code_dir):
21+
# repo_path = os.path.join(code_dir)
22+
23+
# # Check if repository folder exists and has files in it
24+
# if os.path.exists(repo_path) and os.listdir(repo_path):
25+
# print(
26+
# f"Repository already exists at {repo_path} and contains files. Skipping clone."
27+
# )
28+
# else:
29+
# # Clone the repository if it doesn't exist or is empty
30+
# repo_url = "https://github.com/NOAA-OWP/inundation-mapping.git"
31+
# subprocess.run(["git", "clone", repo_url, repo_path], check=True)
32+
# print(f"Repository cloned into: {repo_path}")
2033

2134
def clone_repository(code_dir):
2235
repo_path = os.path.join(code_dir)
36+
repo_url = "https://github.com/NOAA-OWP/inundation-mapping.git"
37+
version_tag = "v4.6.1.4"
2338

24-
# Check if repository folder exists and has files in it
2539
if os.path.exists(repo_path) and os.listdir(repo_path):
26-
print(
27-
f"Repository already exists at {repo_path} and contains files. Skipping clone."
28-
)
40+
print(f"Repository already exists at {repo_path}. Skipping clone.")
2941
else:
30-
# Clone the repository if it doesn't exist or is empty
31-
repo_url = "https://github.com/NOAA-OWP/inundation-mapping.git"
3242
subprocess.run(["git", "clone", repo_url, repo_path], check=True)
43+
subprocess.run(["git", "checkout", version_tag], cwd=repo_path, check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
3344
print(f"Repository cloned into: {repo_path}")
3445

3546

tests/test_03020202.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fimserve as fm
22
import pandas as pd
33

4-
huc = "03020201"
4+
huc = "03020202"
55

66
# Download the data
77
fm.DownloadHUC8(huc)
@@ -12,7 +12,7 @@
1212
# #Hindcast data
1313
# Get the NWM data
1414
start_date = "2016-01-01"
15-
end_date = "2016-01-02"
15+
end_date = "2016-01-03"
1616

1717
# #For 12060202
1818
feature_id = ["5513784", "5513550", "5512092", "5512484"]
@@ -27,7 +27,7 @@
2727
# # usgs_sites = ['0209205053', '02091814', '02089500', '02089000']
2828

2929
# for fixed date or day data
30-
value_times = ["2016-01-01"]
30+
value_times = ["2016-01-02"]
3131
fm.getNWMretrospectivedata(huc, start_date, end_date, value_times)
3232

3333

@@ -52,4 +52,4 @@
5252
# # )
5353

5454
# Run the FIM model
55-
# fm.runOWPHANDFIM(huc)
55+
fm.runOWPHANDFIM(huc, depth=True)

0 commit comments

Comments
 (0)