year_str assignment not making it through basin loop.
jmframe opened this issue · 0 comments
I have no idea why, but adding year_str
on line 210 does not make it into the arguments for generate_forcing on line 141.
I make a temporary fix by just duplicating the year_str assignment inside the for loop on line 237.
return ogr_read(
/home/jmframe/CIROH_DL_NextGen/forcing_prep/venv/lib/python3.11/site-packages/pyogrio/raw.py:196: RuntimeWarning: File /vsimem/349b4f8e68604edfb8caed939bcc9029 has GPKG application_id, but non conformant file extension
return ogr_read(
10234500
{'cvar': 36, 'ctime_max': 120, 'cid': -1, 'redo': False, 'x_lon_dim': 'longitude', 'y_lat_dim': 'latitude', 'out_dir': PosixPath('/home/jmframe/data/AORC/camels/1980_to_1982')}
{'cvar': 36, 'ctime_max': 120, 'cid': -1, 'redo': False, 'x_lon_dim': 'longitude', 'y_lat_dim': 'latitude', 'out_dir': PosixPath('/home/jmframe/data/AORC/camels/1980_to_1982'), 'name': np.str_('10234500')}
{'cvar': 36, 'ctime_max': 120, 'cid': -1, 'redo': False, 'x_lon_dim': 'longitude', 'y_lat_dim': 'latitude', 'out_dir': PosixPath('/home/jmframe/data/AORC/camels/1980_to_1982'), 'name': np.str_('10234500')}
Traceback (most recent call last):
File "/home/jmframe/CIROH_DL_NextGen/forcing_prep/generate.py", line 256, in
generate_forcing(gdf, config)
File "/home/jmframe/CIROH_DL_NextGen/forcing_prep/generate.py", line 141, in generate_forcing
year_str = kwargs.pop('year_str')
^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'year_str'