Skip to content

Commit 773b708

Browse files
authoredSep 17, 2024
Merge pull request #2 from noaa-oar-arl/zm
Tweak readme; pass linting/formatting
2 parents 17f6489 + f571d68 commit 773b708

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed
 

‎.pre-commit-config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ repos:
2828
rev: "7.1.1"
2929
hooks:
3030
- id: flake8
31-
args: [--max-line-length=88]
31+
args: [--max-line-length=88, "--ignore=E203,W503"]
3232

3333
- repo: https://github.com/codespell-project/codespell
3434
rev: v2.3.0
3535
hooks:
3636
- id: codespell
37+
args: [--ignore-words-list=readin]

‎README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

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

5-
## Required python libraries
5+
## Required Python libraries
66

7-
- Numpy
8-
- pandas
9-
- SciPy
7+
- Keras
8+
- Matplotlib (for output plotting only)
109
- MetPy
11-
- datetime
1210
- netCDF4
13-
- Matplotlib (for output plotting only)
11+
- NumPy
12+
- pandas
13+
- SciPy
1414
- Tensorflow
15-
- Keras
15+
- xarray
1616
- XGBoost
1717

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

76-
2. Input netcdf file components:
76+
2. Input netCDF file components:
7777

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

113-
2. Output netcdf file components:
113+
2. Output netCDF file components:
114114

115115
| **Variable Name** | **Variable Description** |
116116
| ------------------- | ---------------------------------------------------------------------- |

‎src/fire_inputgen.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,7 @@ def main_driver(initial_hour, forecast_hour, f_input, f_output, lat_lim, lon_lim
645645
lw[lw == 0] = np.nan
646646

647647
# fire frame
648+
INPUTFRAME = LATFRAME = LONFRAME = None
648649
for j in np.arange(1, num + 1, 1):
649650
total = total + 1
650651
index = np.argwhere(lw == j)
@@ -680,7 +681,7 @@ def main_driver(initial_hour, forecast_hour, f_input, f_output, lat_lim, lon_lim
680681
loc[0] - fsize : loc[0] + fsize + 1, loc[1] - fsize : loc[1] + fsize + 1
681682
]
682683

683-
if "INPUTFRAME" in locals():
684+
if INPUTFRAME is not None:
684685
INPUTFRAME = np.append(INPUTFRAME, np.expand_dims(X_fire, axis=0), axis=0)
685686
LATFRAME = np.append(LATFRAME, np.expand_dims(X_lat, axis=0), axis=0)
686687
LONFRAME = np.append(LONFRAME, np.expand_dims(X_lon, axis=0), axis=0)

0 commit comments

Comments
 (0)