Skip to content

Commit

Permalink
Merge pull request #2 from noaa-oar-arl/zm
Browse files Browse the repository at this point in the history
Tweak readme; pass linting/formatting
  • Loading branch information
angehung5 authored Sep 17, 2024
2 parents 17f6489 + f571d68 commit 773b708
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ repos:
rev: "7.1.1"
hooks:
- id: flake8
args: [--max-line-length=88]
args: [--max-line-length=88, "--ignore=E203,W503"]

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: [--ignore-words-list=readin]
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

Repository for a fire spread forecast model, generating hourly fire radiative power (FRP) prediction for air quality forecasting applications.

## Required python libraries
## Required Python libraries

- Numpy
- pandas
- SciPy
- Keras
- Matplotlib (for output plotting only)
- MetPy
- datetime
- netCDF4
- Matplotlib (for output plotting only)
- NumPy
- pandas
- SciPy
- Tensorflow
- Keras
- xarray
- XGBoost

## Components
Expand Down Expand Up @@ -73,7 +73,7 @@ Trained machine learning models are available in `model/fira_models.zip`
1. Filename format: `[input name].[start time].f[simuluation time].nc`
`input name` and `start time` can be specified in namelist.

2. Input netcdf file components:
2. Input netCDF file components:

| **Variable Name** | **Variable Description** |
| ------------------- | ---------------------------------------------------------------------------------- |
Expand Down Expand Up @@ -110,7 +110,7 @@ Trained machine learning models are available in `model/fira_models.zip`
1. Filename format: `[output name].[start time].f[forecast hour].nc`
`output name` and `start time` can be specified in namelist.

2. Output netcdf file components:
2. Output netCDF file components:

| **Variable Name** | **Variable Description** |
| ------------------- | ---------------------------------------------------------------------- |
Expand Down
3 changes: 2 additions & 1 deletion src/fire_inputgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ def main_driver(initial_hour, forecast_hour, f_input, f_output, lat_lim, lon_lim
lw[lw == 0] = np.nan

# fire frame
INPUTFRAME = LATFRAME = LONFRAME = None
for j in np.arange(1, num + 1, 1):
total = total + 1
index = np.argwhere(lw == j)
Expand Down Expand Up @@ -680,7 +681,7 @@ def main_driver(initial_hour, forecast_hour, f_input, f_output, lat_lim, lon_lim
loc[0] - fsize : loc[0] + fsize + 1, loc[1] - fsize : loc[1] + fsize + 1
]

if "INPUTFRAME" in locals():
if INPUTFRAME is not None:
INPUTFRAME = np.append(INPUTFRAME, np.expand_dims(X_fire, axis=0), axis=0)
LATFRAME = np.append(LATFRAME, np.expand_dims(X_lat, axis=0), axis=0)
LONFRAME = np.append(LONFRAME, np.expand_dims(X_lon, axis=0), axis=0)
Expand Down

0 comments on commit 773b708

Please sign in to comment.