Skip to content

Commit

Permalink
Merge pull request #22 from gsflow/issue-21
Browse files Browse the repository at this point in the history
Fixing Issue 21
  • Loading branch information
cgmorton authored Oct 31, 2018
2 parents 67945e1 + 282f15c commit f615988
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
8 changes: 4 additions & 4 deletions scripts/dem_2_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ def flow_parameters(config_path, overwrite_flag=False, debug_flag=False):
logging.error('\nERROR: Unsupported model point type(s) found, exiting')
logging.error('\n Model point types: {}\n'.format(model_point_types))
sys.exit()
## elif not set(model_point_types).issubset(set(['OUTLET', 'SWALE'])):
## logging.error(
## '\nERROR: At least one model point must be an OUTLET or SWALE, '
## 'exiting\n')
elif not set(model_point_types).intersection(set(['OUTLET', 'SWALE'])):
logging.error(
'\nERROR: At least one model point must be an OUTLET or SWALE, '
'exiting\n')
sys.exit()
else:
logging.debug(' {}'.format(', '.join(model_point_types)))
Expand Down
4 changes: 1 addition & 3 deletions scripts/dem_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,16 +312,14 @@ def dem_parameters(config_path, overwrite_flag=False, debug_flag=False):
logging.error('\nERROR: Unsupported model point type(s) found, exiting')
logging.error('\n Model point types: {}\n'.format(model_point_types))
sys.exit()
elif not set(model_point_types).issubset(set(['OUTLET', 'SWALE'])):
elif not set(model_point_types).intersection(set(['OUTLET', 'SWALE'])):
logging.error(
'\nERROR: At least one model point must be an OUTLET or SWALE, '
'exiting\n')
sys.exit()
else:
logging.debug(' {}'.format(', '.join(model_point_types)))



# Check DEM field
logging.info('\nAdding DEM fields if necessary')
support.add_field_func(hru.polygon_path, hru.dem_mean_field, 'DOUBLE')
Expand Down
3 changes: 1 addition & 2 deletions scripts/hru_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,7 @@ def hru_parameters(config_path, overwrite_flag=False, debug_flag=False):
logging.error('\nERROR: Unsupported model point type(s) found, exiting')
logging.error('\n Model point types: {}\n'.format(model_point_types))
sys.exit()
elif 'OUTLET' not in model_point_types and 'SWALE' not in model_point_types:
#elif not set(model_point_types).issubset(set(['OUTLET', 'SWALE'])):
elif not set(model_point_types).intersection(set(['OUTLET', 'SWALE'])):
logging.error(
'\nERROR: At least one model point must be an OUTLET or SWALE, '
'exiting\n')
Expand Down

0 comments on commit f615988

Please sign in to comment.