Skip to content

Commit 3d92948

Browse files
fix path bug
1 parent 936f228 commit 3d92948

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

pyflowline/pyflowline_generate_template_configuration_json_file.py

+13-14
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
from pyflowline.classes.pycase import flowlinecase
88
from pyflowline.classes.basin import pybasin
99

10-
sPath = str(Path(__file__).parent.resolve())
11-
sPath_data = realpath(sPath + '/../data/susquehanna/' )
1210

13-
def pyflowline_generate_basin_template_configuration_json_file(sFilename_basins_json, nBasin, sWorkspace_output):
11+
12+
def pyflowline_generate_basin_template_configuration_json_file(sFilename_basins_json, nBasin, sWorkspace_output, sPath_data):
1413
aBasin_out = list()
1514
for i in range(nBasin):
1615
sBasin = "{:03d}".format(i+1)
@@ -24,13 +23,13 @@ def pyflowline_generate_basin_template_configuration_json_file(sFilename_basins_
2423
aConfig_basin['dThreshold_small_river'] = 90
2524

2625
aConfig_basin['sFilename_dam'] = str(Path(sPath_data) / 'ICoM_dams.csv')
27-
#"/qfs/people/liao313/data/hexwatershed/susquehanna/auxiliary/ICoM_dams.csv"
26+
2827
aConfig_basin['sFilename_flowline_filter'] = str(Path(sPath_data) / 'streamord7above.shp')
29-
#"/qfs/people/liao313/data/hexwatershed/susquehanna/vector/hydrology/streamord7above.shp"
28+
3029
aConfig_basin['sFilename_flowline_raw'] = str(Path(sPath_data) / 'allflowline.shp')
31-
#"/qfs/people/liao313/data/hexwatershed/susquehanna/vector/hydrology/allflowline.shp"
30+
3231
aConfig_basin['sFilename_flowline_topo'] = str(Path(sPath_data) / 'flowline.csv')
33-
#"/qfs/people/liao313/data/hexwatershed/susquehanna/auxiliary/flowline.csv"
32+
3433
aConfig_basin['sWorkspace_output_basin'] = str(Path(sWorkspace_output) / sBasin )
3534
pBasin = pybasin(aConfig_basin)
3635
aBasin_out.append(pBasin)
@@ -47,7 +46,7 @@ def pyflowline_generate_basin_template_configuration_json_file(sFilename_basins_
4746

4847

4948
return aBasin_out
50-
def pyflowline_generate_template_configuration_json_file(sFilename_json):
49+
def pyflowline_generate_template_configuration_json_file(sFilename_json, sPath_data):
5150

5251
if os.path.exists(sFilename_json):
5352
os.remove(sFilename_json)
@@ -74,11 +73,11 @@ def pyflowline_generate_template_configuration_json_file(sFilename_json):
7473
aConfig['dLatitude_top'] = 90
7574
aConfig['sFilename_model_configuration'] = sFilename_json
7675
aConfig['sWorkspace_data'] = sPath_data
77-
#'/people/liao313/data'
76+
7877
aConfig['sWorkspace_project'] = 'pyflowline'
79-
#aConfig['sWorkspace_bin'] = '/people/liao313/bin'
78+
8079
aConfig['sWorkspace_output'] = str(Path(sPath_data) / 'output')
81-
#"/compyfs/liao313/04model/pyflowline/susquehanna"
80+
8281
aConfig['sRegion'] = 'susquehanna'
8382
aConfig['sModel'] = 'pyflowline'
8483
aConfig['iCase_index'] = 1
@@ -87,13 +86,13 @@ def pyflowline_generate_template_configuration_json_file(sFilename_json):
8786
aConfig['sJob'] = 'pyflowline'
8887
aConfig['sDate']= '20220110'
8988
aConfig['sFilename_mesh'] = str(Path(sPath_data) / 'lnd_cull_mesh.nc')
90-
#"/qfs/people/liao313/data/icom/mesh/delaware_lnd_60_30_5_2_v2/lnd_cull_mesh.nc"
89+
9190
aConfig['flowline_info'] = 'flowline_info.json'
9291
aConfig['sFilename_mesh_info'] = 'mesh_info.json'
9392
aConfig['sFilename_elevation'] = 'elevation.json'
94-
#aConfig['sFilename_dem'] = '/qfs/people/liao313/data/hexwatershed/susquehanna/raster/dem/dem_ext.tif'
93+
9594
aConfig['sFilename_spatial_reference'] = str(Path(sPath_data) / 'boundary_proj.shp')
96-
#'/qfs/people/liao313/data/hexwatershed/susquehanna/vector/hydrology/boundary_proj.shp'
95+
9796

9897

9998
oModel = flowlinecase(aConfig)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
AUTHOR = "Chang Liao"
1313
AUTHOR_EMAIL = "[email protected]"
1414
URL = "https://github.com/changliao1025/pyflowline"
15-
VERSION = "0.1.6"
15+
VERSION = "0.1.7"
1616
REQUIRES_PYTHON = ">=3.8.0"
1717
KEYWORDS = "Earth Science"
1818

0 commit comments

Comments
 (0)