Skip to content

Commit

Permalink
fix copy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanLaserGit committed Oct 17, 2024
1 parent bbaf45e commit 13f9793
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions forcingprocessor/src/forcingprocessor/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ def forcing_grid2catchment(nwm_files: list, fs=None):
data_allvars = np.zeros(shape=(nvar, dy, dx), dtype=np.float32)
for var_dx, jvar in enumerate(nwm_variables):
if "retrospective-2-1" in nwm_file:
data_allvars[var_dx, :, :] = np.flip(np.squeeze(nwm_data[jvar].isel(west_east=slice(x_min, x_max + 1), south_north=slice(shp[1] - y_max, shp[1] - y_min + 1))),0)
data_allvars[var_dx, :, :] = np.flip(np.squeeze(nwm_data[jvar].isel(west_east=slice(x_min, x_max + 1), south_north=slice(shp[1] - y_max, shp[1] - y_min + 1)).values),axis=0)
t = datetime.strftime(datetime.strptime(nwm_file.split('/')[-1].split('.')[0],'%Y%m%d%H'),'%Y-%m-%d %H:%M:%S')
else:
data_allvars[var_dx, :, :] = np.flip(np.squeeze(nwm_data[jvar].isel(x=slice(x_min, x_max + 1), y=slice(shp[1] - y_max, shp[1] - y_min + 1))),0)
data_allvars[var_dx, :, :] = np.flip(np.squeeze(nwm_data[jvar].isel(x=slice(x_min, x_max + 1), y=slice(shp[1] - y_max, shp[1] - y_min + 1)).values),axis=0)
time_splt = nwm_data.attrs["model_output_valid_time"].split("_")
t = time_splt[0] + " " + time_splt[1]
t_list.append(t)
Expand Down

0 comments on commit 13f9793

Please sign in to comment.