From ed251f9d1db37e0c15e381484b6d9e3bcb05d0b0 Mon Sep 17 00:00:00 2001 From: Farhan Alam <163492086+farhan11166@users.noreply.github.com> Date: Mon, 27 Jul 2026 17:43:11 +0530 Subject: [PATCH 1/2] Add requirements.txt with project dependencies --- requirements.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a24a0f2 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +netCDF4>=1.5.3 +numpy>=1.19.0 +matplotlib>=3.3.0 +torch>=1.5.0 +torchvision>=0.6.0 +scikit-image>=0.17.0 +tensorboard>=2.3.0 From abdab506613676f83f7543f94482fba70e2b1140 Mon Sep 17 00:00:00 2001 From: user Date: Mon, 27 Jul 2026 19:34:08 +0530 Subject: [PATCH 2/2] fixed the weather api site as last one has been shut down --- .gitignore | 1 + PrepareData.py | 6 +++--- requirements.txt | 7 +++++++ 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..adbb97d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +data/ \ No newline at end of file diff --git a/PrepareData.py b/PrepareData.py index 7cc1927..e4081be 100644 --- a/PrepareData.py +++ b/PrepareData.py @@ -23,10 +23,10 @@ ### Download data for i in range(2557): try: - url = 'http://water.weather.gov/precip/archive/{dt:%Y/%m/%d}/nws_precip_conus_{dt:%Y%m%d}.nc'.format(dt=curdt) + url ='https://water.noaa.gov/resources/downloads/precip/stageIII/{dt:%Y/%m/%d}/nws_precip_conus_{dt:%Y%m%d}.nc'.format(dt=curdt) urlretrieve(url, 'data/nws_precip_conus_{dt:%Y%m%d}.nc'.format(dt=curdt)) - curdt = dt + timedelta(days=i) - except: + curdt = curdt + timedelta(days=1) + except Exception: pass diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..961928c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +netCDF4>=1.5.3 +numpy>=1.19.0 +matplotlib>=3.3.0 +torch>=1.5.0 +torchvision>=0.6.0 +scikit-image>=0.17.0 +tensorboard>=2.3.0 \ No newline at end of file