Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak readme; pass linting/formatting #2

Merged
merged 11 commits into from
Sep 17, 2024
Prev Previous commit
Next Next commit
Alternative approach
since otherwise it complains about the vars not being defined
later
zmoon committed Sep 9, 2024
commit b82d8ee00471c07b7dcb8db984024f96d42e5f73
21 changes: 5 additions & 16 deletions src/fire_inputgen.py
Original file line number Diff line number Diff line change
@@ -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)
@@ -680,22 +681,10 @@ 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():
INPUTFRAME = np.append(
INPUTFRAME,
np.expand_dims(X_fire, axis=0),
axis=0,
) # noqa: F821
LATFRAME = np.append(
LATFRAME,
np.expand_dims(X_lat, axis=0),
axis=0,
) # noqa: F821
LONFRAME = np.append(
LONFRAME,
np.expand_dims(X_lon, axis=0),
axis=0,
) # noqa: F821
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)
else:
INPUTFRAME = np.expand_dims(X_fire, axis=0)
LATFRAME = np.expand_dims(X_lat, axis=0)