Skip to content

Commit

Permalink
minor changes for aquastat field name
Browse files Browse the repository at this point in the history
  • Loading branch information
doc78 committed Nov 15, 2024
1 parent d903aca commit b5d9adf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def main():
for jj in np.arange(country_codes.shape[0]):
country_code = country_codes.iloc[jj]['country-code']
for ii in np.arange(len(years)):
sel = (aquastat['Area Id']==country_code) & (aquastat['Variable Name']=='Industrial water withdrawal') & (aquastat['Year']==years[ii])
sel = (aquastat['M49']==country_code) & (aquastat['Variable Name']=='Industrial water withdrawal') & (aquastat['Year']==years[ii])
if np.sum(sel)==0: continue
table_aquastat_industry_withdrawal[jj,ii] = aquastat['Value'][sel].values # km3/year

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ def main():
for jj in np.arange(country_codes.shape[0]):
country_code = country_codes.iloc[jj]['country-code']
for ii in np.arange(len(years)):
sel_ir = (aquastat['Area Id']==country_code) & (aquastat['Variable Name']=='Irrigation water withdrawal') & (aquastat['Year']==years[ii])
sel_ir = (aquastat['M49']==country_code) & (aquastat['Variable Name']=='Irrigation water withdrawal') & (aquastat['Year']==years[ii])
if np.sum(sel_ir)>0:
table_aquastat_irrigation_withdrawal[jj,ii] = aquastat['Value'][sel_ir].values # km3/year
sel_ag = (aquastat['Area Id']==country_code) & (aquastat['Variable Name']=='Agricultural water withdrawal') & (aquastat['Year']==years[ii])
sel_ag = (aquastat['M49']==country_code) & (aquastat['Variable Name']=='Agricultural water withdrawal') & (aquastat['Year']==years[ii])
if np.sum(sel_ag)>0:
table_aquastat_agriculture_withdrawal[jj,ii] = aquastat['Value'][sel_ag].values # km3/year

Expand Down

0 comments on commit b5d9adf

Please sign in to comment.