Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tests/__pycache__/
tests/data/
tests/*.txt
docs/examples/*/forcings
data/forcing/*
*.txt
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,22 @@ The motivation for this tool is NWM data is gridded and stored within netCDFs fo

![forcing_gif](docs/gifs/T2D_2_TMP_2maboveground_cali.gif)

## Install
From root
## Install UV early
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading "Install UV early" contains a grammatical error. It should be "Install UV First" or "Install UV" for better clarity and professional tone.

Suggested change
## Install UV early
## Install UV

Copilot uses AI. Check for mistakes.
```
pip install -e .
curl -LsSf https://astral.sh/uv/install.sh | sh
```
## install requirement files
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading "install requirement files" should be capitalized consistently with other section headings. It should be "Install Requirement Files" or "Install Requirements".

Suggested change
## install requirement files
## Install Requirement Files

Copilot uses AI. Check for mistakes.

## Run the forcingprocessor
```
python src/forcingprocessor/processor.py ./configs/conf.json
uv add --dev -r requirements.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This installs all the dependencies, which is nice and makes the following command uv run python src/forcingprocessor/processor.py ./configs/conf_fp.json work fine, but if the purpose of this pull request was to make uv install forcingprocessor as a package, I don't think this command does that. However, I am not sure what the purpose of this PR was or what issue it closes, so this comment is just a comment and not a criticism

```
## make directory for output data
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading "make directory for output data" should be capitalized consistently with other section headings. It should be "Make Directory for Output Data" or "Create Output Directory".

Suggested change
## make directory for output data
## Make Directory for Output Data

Copilot uses AI. Check for mistakes.
```
mkdir -p data/forcing
```
## Run the forcingprocessor with UV
```
uv run python src/forcingprocessor/processor.py ./configs/conf_fp.json
```
Prior to executing the processor, the user will need to obtain a geopackage file to define the spatial domain. The user will define the time domain by generating the forcing filenames for `processor.py` via `nwm_filenames_generator.py`, which is explained [here](#nwm_file). Note that `forcingprocessor` will calcuate weights if not found within the geopackage file.

Expand Down
6 changes: 3 additions & 3 deletions configs/conf_fp.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"forcing" : {
"nwm_file" : "/home/user/data/filenamelist.txt",
"gpkg_file" : ["your-geopackage.gpkg"]
"nwm_file" : "./docs/examples/cfe-nom_example/filenamelist.txt",
"gpkg_file" : ["./docs/examples/cfe-nom_example/cat-1555522_subset.gpkg"]
},

"storage":{
"storage_type" : "local",
"output_path" : "/home/user/data/forcings",
"output_path" : "./data/forcing/",
"output_file_type" : ["csv","tar"]
},

Expand Down
109 changes: 104 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,105 @@
[project]
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description lists "uv.lock" as an addition, but this file is not included in the pull request diff. The uv.lock file is critical for reproducible builds and should be included when migrating to UV package management. Please ensure uv.lock is properly added to the repository.

Copilot uses AI. Check for mistakes.
name = "forcingprocessor"
version = "0.1.0"
description = "Tool to convert nwm forcing netcdfs to ngen compatible files"
readme ="README.md"
authors = [
{ name = "Jordan J. Laser", email = " jlaser@lynker.com" }
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an extra space in the email address " jlaser@lynker.com" (space before 'jlaser'). This should be corrected to "jlaser@lynker.com" without the leading space.

Suggested change
{ name = "Jordan J. Laser", email = " jlaser@lynker.com" }
{ name = "Jordan J. Laser", email = "jlaser@lynker.com" }

Copilot uses AI. Check for mistakes.
]
requires-python = ">=3.11"
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Python version requirement changed from ">=3.9" (in setup.cfg) to ">=3.11" (in pyproject.toml). This is a breaking change that should be documented in the PR description or CHANGELOG, as it may affect users running Python 3.9 or 3.10. Please ensure this change is intentional and properly communicated.

Suggested change
requires-python = ">=3.11"
requires-python = ">=3.9"

Copilot uses AI. Check for mistakes.
dependencies = [
"affine==2.4.0",
"aiohappyeyeballs==2.6.1",
"aiohttp==3.13.3",
"aiosignal==1.4.0",
"attrs==25.4.0",
"boto3==1.42.49",
"botocore==1.42.49",
"certifi==2026.1.4",
"cffi==2.0.0",
"cftime==1.6.5",
"charset-normalizer==3.4.4",
"click==8.3.1",
"click-plugins==1.1.1.2",
"cligj==0.7.2",
"cloudpickle==3.1.2",
"contourpy==1.3.3",
"cryptography==46.0.5",
"cycler==0.12.1",
"dask==2026.1.2",
"decorator==5.2.1",
"exactextract==0.3.0",
"fonttools==4.61.1",
"frozenlist==1.8.0",
"fsspec==2026.2.0",
"gcsfs==2026.2.0",
"geopandas==1.1.2",
"google-api-core==2.29.0",
"google-auth==2.48.0",
"google-auth-oauthlib==1.2.4",
"google-cloud-core==2.5.0",
"google-cloud-storage==3.9.0",
"google-cloud-storage-control==1.10.0",
"google-crc32c==1.8.0",
"google-resumable-media==2.8.0",
"googleapis-common-protos==1.72.0",
"grpc-google-iam-v1==0.14.3",
"grpcio==1.78.0",
"grpcio-status==1.78.0",
"h5netcdf==1.8.1",
"h5py==3.15.1",
"idna==3.11",
"imageio==2.37.2",
"importlib-metadata==8.7.1",
"jmespath==1.1.0",
"kiwisolver==1.4.9",
"locket==1.0.0",
"matplotlib==3.10.8",
"multidict==6.7.1",
"netcdf4==1.7.4",
"numpy==2.4.2",
"nwmurl==1.0.1",
"oauthlib==3.3.1",
"packaging==26.0",
"pandas==3.0.0",
"partd==1.4.2",
"pillow==12.1.1",
"propcache==0.4.1",
"proto-plus==1.27.1",
"protobuf==6.33.5",
"psutil==7.2.2",
"pyarrow==23.0.0",
"pyasn1==0.6.2",
"pyasn1-modules==0.4.2",
"pycparser==3.0",
"pyogrio==0.12.1",
"pyparsing==3.3.2",
"pyproj==3.7.2",
"pysam==0.23.3",
"python-dateutil==2.9.0.post0",
"pyyaml==6.0.3",
"rasterio==1.4.4",
"requests==2.32.5",
"requests-oauthlib==2.0.0",
"rioxarray==0.19.0",
"rsa==4.9.1",
"rust==1.3.1",
"s3fs==0.4.2",
"s3transfer==0.16.0",
"scipy==1.17.0",
"shapely==2.1.2",
"six==1.17.0",
"toolz==1.1.0",
"typing-extensions==4.15.0",
"urllib3==2.6.3",
"xarray==2026.1.0",
"yarl==1.22.0",
"zipp==3.23.0",
]
Comment on lines +10 to +98
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The migration from flexible version constraints (e.g., "pandas" without version) in setup.cfg to pinned exact versions (e.g., "pandas==3.0.0") represents a significant change in dependency management philosophy. While this provides reproducibility, it may cause compatibility issues and makes maintenance harder. Consider using version ranges (e.g., "pandas>=2.0,<4.0") instead of exact pins for better compatibility and easier updates, especially for a library package.

Copilot uses AI. Check for mistakes.

[project.scripts]
forcingprocessor = "forcingprocessor:main"
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project.scripts entry "forcingprocessor = 'forcingprocessor:main'" references a 'main' function in the forcingprocessor module, but this function does not appear to exist in init.py. You need to either define a main() function in init.py or update the entry point to reference the correct module and function (e.g., "forcingprocessor.processor:main" if there's a main function in processor.py).

Suggested change
forcingprocessor = "forcingprocessor:main"
forcingprocessor = "forcingprocessor.processor:main"

Copilot uses AI. Check for mistakes.

[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=42",
"wheel",
]
requires = ["uv_build>=0.9.28,<0.10.0"]
build-backend = "uv_build"
Comment on lines +104 to +105
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build backend "uv_build" specified here may not be the correct package name. The standard UV build backend should be specified as "hatchling" or another established build backend, as UV itself is a package manager and installer, not a build backend. Please verify the correct build backend configuration for UV-based projects.

Suggested change
requires = ["uv_build>=0.9.28,<0.10.0"]
build-backend = "uv_build"
requires = ["hatchling"]
build-backend = "hatchling"

Copilot uses AI. Check for mistakes.
87 changes: 87 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
affine==2.4.0
aiohappyeyeballs==2.6.1
aiohttp==3.13.3
aiosignal==1.4.0
attrs==25.4.0
boto3==1.42.49
botocore==1.42.49
certifi==2026.1.4
cffi==2.0.0
cftime==1.6.5
charset-normalizer==3.4.4
click==8.3.1
click-plugins==1.1.1.2
cligj==0.7.2
cloudpickle==3.1.2
contourpy==1.3.3
cryptography==46.0.5
cycler==0.12.1
dask==2026.1.2
decorator==5.2.1
exactextract==0.3.0
fonttools==4.61.1
frozenlist==1.8.0
fsspec==2026.2.0
gcsfs==2026.2.0
geopandas==1.1.2
google-api-core==2.29.0
google-auth==2.48.0
google-auth-oauthlib==1.2.4
google-cloud-core==2.5.0
google-cloud-storage==3.9.0
google-cloud-storage-control==1.10.0
google-crc32c==1.8.0
google-resumable-media==2.8.0
googleapis-common-protos==1.72.0
grpc-google-iam-v1==0.14.3
grpcio==1.78.0
grpcio-status==1.78.0
h5netcdf==1.8.1
h5py==3.15.1
idna==3.11
imageio==2.37.2
importlib-metadata==8.7.1
jmespath==1.1.0
kiwisolver==1.4.9
locket==1.0.0
matplotlib==3.10.8
multidict==6.7.1
netcdf4==1.7.4
numpy==2.4.2
nwmurl==1.0.1
oauthlib==3.3.1
packaging==26.0
pandas==3.0.0
partd==1.4.2
pillow==12.1.1
propcache==0.4.1
proto-plus==1.27.1
protobuf==6.33.5
psutil==7.2.2
pyarrow==23.0.0
pyasn1==0.6.2
pyasn1-modules==0.4.2
pycparser==3.0
pyogrio==0.12.1
pyparsing==3.3.2
pyproj==3.7.2
pysam==0.23.3
python-dateutil==2.9.0.post0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have pytest in here or the pyproject.toml, whichever one you end up using to install dependencies or build the forcingprocessor package

pyyaml==6.0.3
rasterio==1.4.4
requests==2.32.5
requests-oauthlib==2.0.0
rioxarray==0.19.0
rsa==4.9.1
rust==1.3.1
s3fs==0.4.2
s3transfer==0.16.0
scipy==1.17.0
shapely==2.1.2
six==1.17.0
toolz==1.1.0
typing-extensions==4.15.0
urllib3==2.6.3
xarray==2026.1.0
yarl==1.22.0
zipp==3.23.0
Loading