Skip to content

Commit f81593b

Browse files
committed
Added mctrivers as command in bin folder, to run in command line mode
1 parent ffd03ca commit f81593b

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

bin/mctrivers

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!python
2+
3+
import os
4+
import sys
5+
6+
current_dir = os.path.dirname(os.path.abspath(__file__))
7+
src_dir = os.path.normpath(os.path.join(current_dir, '../src/'))
8+
if os.path.exists(src_dir):
9+
sys.path.append(src_dir)
10+
11+
from lisfloodutilities.mctrivers.mctrivers import main
12+
13+
if __name__ == '__main__':
14+
main()

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ def run(self):
132132
'gridding: interpolate meteo variables observations; '
133133
'decumulate: decumulate daily grids into 6 hourly grids in kiwis format; '
134134
'ncextract: extract values from netCDF files; '
135-
'catchstats: calculates catchment statistics; ',
135+
'catchstats: calculates catchment statistics; '
136+
'mctrivers: creates a river mask for MCT diffusive river routing in LISFLOOD; ',
136137
long_description=long_description,
137138
long_description_content_type='text/markdown',
138139
setup_requires=[
@@ -149,7 +150,7 @@ def run(self):
149150
keywords=['netCDF4', 'PCRaster', 'mapstack', 'lisflood', 'efas', 'glofas', 'ecmwf', 'copernicus'],
150151
license='EUPL 1.2',
151152
url='https://github.com/ec-jrc/lisflood-utilities',
152-
scripts=['bin/pcr2nc', 'bin/cutmaps', 'bin/compare', 'bin/nc2pcr', 'bin/thresholds', 'bin/gridding', 'bin/decumulate', 'bin/cddmap', 'bin/ncextract','bin/catchstats',],
153+
scripts=['bin/pcr2nc', 'bin/cutmaps', 'bin/compare', 'bin/nc2pcr', 'bin/thresholds', 'bin/gridding', 'bin/decumulate', 'bin/cddmap', 'bin/ncextract','bin/catchstats','bin/mctrivers'],
153154
zip_safe=True,
154155
classifiers=[
155156
# complete classifier list: http://pypi.python.org/pypi?%3Aaction=list_classifiers

0 commit comments

Comments
 (0)