Skip to content

Commit 6b23c5b

Browse files
authored
Merge pull request #14 from OpenGeoscience/lfs
Store files in Git LFS
2 parents 59fb486 + b66f04d commit 6b23c5b

16 files changed

+69
-67
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Track all files in uvdat_flood_sim/data/ with Git LFS
2+
uvdat_flood_sim/data/** filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ __pycache__
33
downloads
44
outputs
55
venv
6+
dist/

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,26 @@ This is a proof of concept for the Charles River in Boston that could be transla
2626

2727
6. Ground Water Percentile: Select the 25th, 50th, 75th, or 90th percentile value for ground water
2828

29+
## Prerequisites
30+
31+
This project uses [Git LFS](https://git-lfs.github.com/) to store large data files. Before cloning the repository, install Git LFS:
32+
33+
```bash
34+
# On Ubuntu/Debian
35+
sudo apt-get install git-lfs
36+
37+
# On macOS with Homebrew
38+
brew install git-lfs
39+
40+
# On Windows, download from https://git-lfs.github.com/
41+
```
42+
43+
After installation, initialize Git LFS:
44+
45+
```bash
46+
git lfs install
47+
```
48+
2949
## Example usage
3050

3151
Install requirements with `pip install -e .`.

uvdat_flood_sim/constants.py

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,19 @@
11
from datetime import timedelta
2+
import importlib.resources
23
from pathlib import Path
34

45

5-
DOWNLOADS_FOLDER = Path('downloads')
6+
DATA_FOLDER = importlib.resources.files('uvdat_flood_sim.data')
67

7-
DOWNSCALING_MODEL_URL = 'https://data.kitware.com/api/v1/item/68c463cb7d52b0d5b570f348/download'
8-
DOWNSCALING_MODEL_PATH = DOWNLOADS_FOLDER / 'downscaling_model.pkl'
9-
10-
HYDROLOGICAL_MODEL_URL = 'https://data.kitware.com/api/v1/item/68c463bd7d52b0d5b570f345/download'
11-
HYDROLOGICAL_MODEL_PATH = DOWNLOADS_FOLDER / 'hydrological_model.npy'
12-
13-
RATING_CURVE_URL = 'https://data.kitware.com/api/v1/item/68c463bd7d52b0d5b570f342/download'
14-
RATING_CURVE_PATH = DOWNLOADS_FOLDER / 'rating_curve.csv'
15-
16-
HAND_URL = 'https://data.kitware.com/api/v1/item/68e59bc1e5c7892678d7f036/download'
17-
HAND_PATH = DOWNLOADS_FOLDER / 'boston_hand.tif'
18-
19-
PERCENTILES_URL = 'https://data.kitware.com/api/v1/item/68e7be67e5c7892678d7f03c/download'
20-
PERCENTILES_PATH = DOWNLOADS_FOLDER / 'flood_param_percentiles.json'
8+
DOWNSCALING_MODEL_PATH = DATA_FOLDER / 'downscaling_model.pkl'
9+
HYDROLOGICAL_MODEL_PATH = DATA_FOLDER / 'hydrological_model.npy'
10+
RATING_CURVE_PATH = DATA_FOLDER / 'rating_curve.csv'
11+
HAND_PATH = DATA_FOLDER / 'boston_hand.tif'
12+
PERCENTILES_PATH = DATA_FOLDER / 'flood_param_percentiles.json'
2113

2214
CESM_DATA = {
23-
'2031-2050': dict(
24-
filename=DOWNLOADS_FOLDER / 'boston_cesm2-001_2031_2050.npy',
25-
url='https://data.kitware.com/api/v1/item/68c463cb7d52b0d5b570f34b/download',
26-
),
27-
'2041-2060': dict(
28-
filename=DOWNLOADS_FOLDER / 'boston_cesm2-001_2041_2060.npy',
29-
url='https://data.kitware.com/api/v1/file/6900c8808c59593f4ceaecf2/download',
30-
)
15+
'2031-2050': DATA_FOLDER / 'boston_cesm2-001_2031_2050.npy',
16+
'2041-2060': DATA_FOLDER / 'boston_cesm2-001_2041_2060.npy',
3117
}
3218

3319
HYDROGRAPHS = dict(
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:f85f6f6e70d87ce0274f71cb1c320f27cf30be868a07b384520bae547b5d96c4
3+
size 700928
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:bc7a093764d8404d35b2c1a8df98808b511b5bc8a91d88946c9e8f12520cb0e5
3+
size 700928
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:8e51f5bf2eaef40f79cee3eff7a5de8dec1113f887aec2cb31246289c75eca75
3+
size 9160882
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:f3d4d2dad103b9e0795d33d3dac93452a5d8fccb8683ca4b48e0496ba20f327b
3+
size 75313340
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:7d0ec87f43cb4a49a25c1b68a895bfcf970b6e7eda4e40df715ef59c6dbee453
3+
size 7910
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:89f7c8c0c9594aebe13f35e1a438cf15f381328cfb83b00b8dfde8336926021c
3+
size 184

0 commit comments

Comments
 (0)