|
|
|
@ -324,8 +324,15 @@ def extract_definitions(input_dir, output_dir):
|
|
|
|
|
sites = sites.set_index('ID')
|
|
|
|
|
|
|
|
|
|
# Get basin from master site dataframe
|
|
|
|
|
try:
|
|
|
|
|
sites['Basin name'] = basins.loc[sites.index, 'Basin name']
|
|
|
|
|
sites['Basin code'] = basins.loc[sites.index, 'Basin code']
|
|
|
|
|
except ValueError:
|
|
|
|
|
# FIXME: Some bores have duplicate IDs!
|
|
|
|
|
# Get basin name from input directory
|
|
|
|
|
sites['Basin name'] = input_dir
|
|
|
|
|
basin_idx = basins['Basin name'] == input_dir
|
|
|
|
|
sites['Basin code'] = basins.loc[basin_idx, 'Basin code'].values[0]
|
|
|
|
|
|
|
|
|
|
# Save variable definitions
|
|
|
|
|
variables = pd.DataFrame(
|
|
|
|
|