Skip to content

Commit 65ff503

Browse files
Merge pull request #19 from supathdhitalGEO/main
Update the filename convention for forecasted data and, tool usage instructions in readme
2 parents 811a254 + 168d9f2 commit 65ff503

File tree

6 files changed

+23
-7
lines changed

6 files changed

+23
-7
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,30 @@ Although not mandatory,
6565
**we strongly recommend users create a virtual environment and install this package on that virtual environment to avoid the conflict between system dependencies and package dependencies.**
6666

6767
**‼️ If your system doesnot have git, install it first. Download link of git for windows or MacOS: https://git-scm.com/downloads**
68+
69+
**For conda users**
6870
```bash
6971
#creating a virtual environment using conda
7072
conda create --name fimserve python==3.10
7173

7274
#Activate environment
7375
conda activate fimserve
7476
```
75-
**Install or add fimserve into your workflows**
77+
78+
**If you don't have conda**
79+
```bash
80+
#create a virtual env using 'venv'
81+
python -m venv fimserve python==3.10
82+
83+
#activate environment
84+
#For MAC Users
85+
source fimserve/bin/activate
86+
87+
#For WINDOW Users
88+
fimserve\Scripts\activate
89+
```
90+
91+
**Once Virtual env is ready, install or add fimserve into your workflows**
7692
```bash
7793
#Using pip
7894
pip install fimserve

dist/fimserve-0.1.81-py3-none-any.whl

42.5 KB
Binary file not shown.

dist/fimserve-0.1.81.tar.gz

37.8 KB
Binary file not shown.

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.80"
3+
version = "0.1.81"
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/streamflowdata/forecasteddata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def ProcessForecasts(
217217
combined_df.groupby("feature_id")["discharge"].max().reset_index()
218218
)
219219

220-
sorted_file_name = f"{hour:02d}UTC_{forecast_range}_{group_date}.csv"
220+
sorted_file_name = f"{hour:02d}UTC_{forecast_range}_{group_date}_{huc}.csv"
221221
sorted_file_path = os.path.join(data_dir, sorted_file_name)
222222
sorted_df.to_csv(sorted_file_path, index=False)
223223

tests/test_forecasteddata.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
# mention the forecast range as shortrange or mediumrange or longrange
88
# Download the data if user wants to download the data for fixed date and hour otherwise it will download the data by taking current date and time fore forecasted data
9-
fm.getNWMForecasteddata(
10-
huc, forecast_range="shortrange", forecast_date="2021-09-01", hour=6
11-
)
9+
# fm.getNWMForecasteddata(
10+
# huc, forecast_range="shortrange", forecast_date="2021-09-01", hour=6
11+
# )
1212

1313
# For current date and time forecasted data
1414
# fm.getNWMForecasteddata(huc, forecast_range="shortrange")
@@ -17,4 +17,4 @@
1717
# By default the data will be filtered based on maximum discharge value
1818
# Otherwise user need to mention
1919

20-
# fm.getNWMForecasteddata(huc, forecast_range="longrange", sort_by="minimum")
20+
fm.getNWMForecasteddata(huc, forecast_range="longrange", sort_by="minimum")

0 commit comments

Comments
 (0)