using predfined watershed/stream(NHDPLUS) in QSWAT

230 views
Skip to first unread message

kson

unread,
Mar 12, 2021, 5:35:56 PM3/12/21
to SWAT-user
Hello, I have tried to create predefined watershed/stream shapefiles (based on the NDHPLUS) for my study watershed, and I believe that I create all required variables.
However, I am not still able to complete the delineate the watershed processes (using QSWAT). I will appreciate it if anyone succeeded in completing the delineating processes with predefined shapefiles. 

FYI, I followed the direction;  https://swat.tamu.edu/media/116095/qswat-manual_v17.pdf (page 87). 

I copied the error or warning message:

\Project\Columbia_SWAT\HJAdrew_QSWAT\HJAndrew_NHD\Source\lidar10m_andrew_Albersang.tif

2021-03-12T14:28:12     INFO    gdal_rasterize -a PolygonId -tr 10.0 10.0 -te -2067288.3985087615 2640079.656331783 -2051118.3985087615 2653129.656331783 -a_nodata -9999 -l "nhd_hj_catchment2sp_swat" "C:\Project\Columbia_SWAT\HJAdrew_QSWAT\HJAndrew_NHD\Source\nhd_hj_catchment2sp_swat.shp" "C:/Project/Columbia_SWAT/HJAdrew_QSWAT/HJAndrew_NHD/Source/lidar10m_andrew_Albersw.tif"

2021-03-12T14:28:13     INFO    Factor is 1, cell width is 10.0, cell depth is 10.0

2021-03-12T14:28:13     INFO    Outlet at start is False

Chris George

unread,
Mar 13, 2021, 8:48:14 AM3/13/21
to kson, SWAT-user
These are log messages and do not indicate any error.
> --
> You received this message because you are subscribed to the Google
> Groups "SWAT-user" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swatuser+u...@googlegroups.com
> <mailto:swatuser+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/swatuser/7b558634-e6c7-408e-ac19-2e5260fe195en%40googlegroups.com
> <https://groups.google.com/d/msgid/swatuser/7b558634-e6c7-408e-ac19-2e5260fe195en%40googlegroups.com?utm_medium=email&utm_source=footer>.

kson

unread,
Mar 13, 2021, 2:37:38 PM3/13/21
to SWAT-user
With the current setup, I am able to create the stream shapefile, but the watershed (redefined by QSWAT) did not generate. Even created stream shapefile's Subbasin R variable are all zero. 

I copied the more warning messages below:
2021-03-13T11:32:08     INFO    Factor is 1, cell width is 10.0, cell depth is 10.0

2021-03-13T11:32:08     INFO    Outlet at start is False

2021-03-13T11:33:41     INFO    DEM horizontal and vertical block sizes are 1617 and 1

2021-03-13T11:33:41     INFO    ESRI:102039

2021-03-13T11:33:41     INFO    Topology setup took 0 seconds

2021-03-13T11:33:41     INFO    Outlet links: set()

2021-03-13T11:33:41     INFO    Inlet links: set()

2021-03-13T11:33:41     INFO    Reservoir links: set()

2021-03-13T11:33:41     INFO    Point source links: set()

2021-03-13T11:33:41     INFO    Empty basins: set()

2021-03-13T11:33:41     INFO    Topology drainage took 0 seconds

2021-03-13T11:33:41     INFO    Writing Reach table took 0 seconds

2021-03-13T11:33:42     INFO    Writing MonitoringPoint table took 0 seconds

2021-03-13T11:33:43     INFO    Existing watershed is True

2021-03-13T11:33:43     INFO    Use grid model is False

2021-03-13T11:33:43     INFO    DEM horizontal and vertical block sizes are 1617 and 1

2021-03-13T11:33:43     INFO    ESRI:102039

2021-03-13T11:33:43     INFO    mpiexec found



Capture.PNG

Chris George

unread,
Mar 14, 2021, 7:36:20 AM3/14/21
to kson, SWAT-user
Again, these are log messages and do not indicate any error. Do you not
get any user warnings or errors?

Send me your project and I will investigate.

Chris
> <https://groups.google.com/d/msgid/swatuser/7b558634-e6c7-408e-ac19-2e5260fe195en%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/swatuser/7b558634-e6c7-408e-ac19-2e5260fe195en%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "SWAT-user" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swatuser+u...@googlegroups.com
> <mailto:swatuser+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/swatuser/455c9b60-82b5-4787-ab63-3964b92e21c0n%40googlegroups.com
> <https://groups.google.com/d/msgid/swatuser/455c9b60-82b5-4787-ab63-3964b92e21c0n%40googlegroups.com?utm_medium=email&utm_source=footer>.

kson

unread,
Mar 14, 2021, 1:12:06 PM3/14/21
to SWAT-user

Thank you, Chris.
I just attached the prepared stream/catchment shapefile I used in this project. the whole project file is too big to be attached to the email.

I copied python warming messages below too.

2021-03-13T12:12:33     WARNING    warning:C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\proc\isochrones_layer_proc.py:72: DeprecationWarning: QgsCoordinateReferenceSystem constructor is deprecated
              crs_out = QgsCoordinateReferenceSystem(4326)
             
             traceback: File "", line 1, in
              File "C:/PROGRA~1/QGIS3~1.16/apps/qgis-ltr/./python\qgis\utils.py", line 354, in startPlugin
              if not _startPlugin(packageName):
              File "C:/PROGRA~1/QGIS3~1.16/apps/qgis-ltr/./python\qgis\utils.py", line 334, in _startPlugin
              plugins[packageName] = package.classFactory(iface)
              File "C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\__init__.py", line 43, in classFactory
              from .ORStoolsPlugin import ORStools
              File "C:/PROGRA~1/QGIS3~1.16/apps/qgis-ltr/./python\qgis\utils.py", line 792, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              File "", line 983, in _find_and_load
              File "", line 967, in _find_and_load_unlocked
              File "", line 677, in _load_unlocked
              File "", line 728, in exec_module
              File "", line 219, in _call_with_frames_removed
              File "C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\ORStoolsPlugin.py", line 33, in
              from .proc import provider
              File "C:/PROGRA~1/QGIS3~1.16/apps/qgis-ltr/./python\qgis\utils.py", line 792, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              File "", line 1035, in _handle_fromlist
              File "", line 219, in _call_with_frames_removed
              File "", line 983, in _find_and_load
              File "", line 967, in _find_and_load_unlocked
              File "", line 677, in _load_unlocked
              File "", line 728, in exec_module
              File "", line 219, in _call_with_frames_removed
              File "C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\proc\provider.py", line 34, in
              from .isochrones_layer_proc import ORSisochronesLayerAlgo
              File "C:/PROGRA~1/QGIS3~1.16/apps/qgis-ltr/./python\qgis\utils.py", line 792, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              File "", line 983, in _find_and_load
              File "", line 967, in _find_and_load_unlocked
              File "", line 677, in _load_unlocked
              File "", line 728, in exec_module
              File "", line 219, in _call_with_frames_removed
              File "C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\proc\isochrones_layer_proc.py", line 53, in
              class ORSisochronesLayerAlgo(QgsProcessingAlgorithm):
              File "C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\proc\isochrones_layer_proc.py", line 72, in ORSisochronesLayerAlgo
              crs_out = QgsCoordinateReferenceSystem(4326)
             

2021-03-13T12:12:33     WARNING    warning:C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\proc\isochrones_point_proc.py:69: DeprecationWarning: QgsCoordinateReferenceSystem constructor is deprecated
              crs_out = QgsCoordinateReferenceSystem(4326)
             
             traceback: File "", line 1, in
              File "C:/PROGRA~1/QGIS3~1.16/apps/qgis-ltr/./python\qgis\utils.py", line 354, in startPlugin
              if not _startPlugin(packageName):
              File "C:/PROGRA~1/QGIS3~1.16/apps/qgis-ltr/./python\qgis\utils.py", line 334, in _startPlugin
              plugins[packageName] = package.classFactory(iface)
              File "C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\__init__.py", line 43, in classFactory
              from .ORStoolsPlugin import ORStools
              File "C:/PROGRA~1/QGIS3~1.16/apps/qgis-ltr/./python\qgis\utils.py", line 792, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              File "", line 983, in _find_and_load
              File "", line 967, in _find_and_load_unlocked
              File "", line 677, in _load_unlocked
              File "", line 728, in exec_module
              File "", line 219, in _call_with_frames_removed
              File "C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\ORStoolsPlugin.py", line 33, in
              from .proc import provider
              File "C:/PROGRA~1/QGIS3~1.16/apps/qgis-ltr/./python\qgis\utils.py", line 792, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              File "", line 1035, in _handle_fromlist
              File "", line 219, in _call_with_frames_removed
              File "", line 983, in _find_and_load
              File "", line 967, in _find_and_load_unlocked
              File "", line 677, in _load_unlocked
              File "", line 728, in exec_module
              File "", line 219, in _call_with_frames_removed
              File "C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\proc\provider.py", line 35, in
              from .isochrones_point_proc import ORSisochronesPointAlgo
              File "C:/PROGRA~1/QGIS3~1.16/apps/qgis-ltr/./python\qgis\utils.py", line 792, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              File "", line 983, in _find_and_load
              File "", line 967, in _find_and_load_unlocked
              File "", line 677, in _load_unlocked
              File "", line 728, in exec_module
              File "", line 219, in _call_with_frames_removed
              File "C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\proc\isochrones_point_proc.py", line 51, in
              class ORSisochronesPointAlgo(QgsProcessingAlgorithm):
              File "C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\proc\isochrones_point_proc.py", line 69, in ORSisochronesPointAlgo
              crs_out = QgsCoordinateReferenceSystem(4326)
             

2021-03-13T12:12:36     WARNING    warning:C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\PyQt5\uic\objcreator.py:152: DeprecationWarning: 'U' mode is deprecated
              plugin = open(filename, 'rU')
             
             traceback: File "", line 1, in
              File "C:/PROGRA~1/QGIS3~1.16/apps/qgis-ltr/./python\qgis\utils.py", line 354, in startPlugin
              if not _startPlugin(packageName):
              File "C:/PROGRA~1/QGIS3~1.16/apps/qgis-ltr/./python\qgis\utils.py", line 334, in _startPlugin
              plugins[packageName] = package.classFactory(iface)
              File "C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATMOD2\__init__.py", line 34, in classFactory
              from .QSWATMOD2 import QSWATMOD2
              File "C:/PROGRA~1/QGIS3~1.16/apps/qgis-ltr/./python\qgis\utils.py", line 792, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              File "", line 983, in _find_and_load
              File "", line 967, in _find_and_load_unlocked
              File "", line 677, in _load_unlocked
              File "", line 728, in exec_module
              File "", line 219, in _call_with_frames_removed
              File "C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATMOD2\QSWATMOD2.py", line 57, in
              from .QSWATMOD_dialog import QSWATMODDialog
              File "C:/PROGRA~1/QGIS3~1.16/apps/qgis-ltr/./python\qgis\utils.py", line 792, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              File "", line 983, in _find_and_load
              File "", line 967, in _find_and_load_unlocked
              File "", line 677, in _load_unlocked
              File "", line 728, in exec_module
              File "", line 219, in _call_with_frames_removed
              File "C:/Users/sonk739/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATMOD2\QSWATMOD_dialog.py", line 29, in
              os.path.dirname(__file__), 'QSWATMOD_dialog_base.ui'))
              File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\PyQt5\uic\__init__.py", line 198, in loadUiType
              winfo = compiler.UICompiler().compileUi(uifile, code_string, from_imports, resource_suffix, import_from)
              File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\PyQt5\uic\Compiler\compiler.py", line 53, in __init__
              qtproxies.QtWidgets, CompilerCreatorPolicy())
              File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\PyQt5\uic\uiparser.py", line 177, in __init__
              self.factory = QObjectCreator(creatorPolicy)
              File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\PyQt5\uic\objcreator.py", line 85, in __init__
              if self.load_plugin(filename, plugin_globals, plugin_locals):
              File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\PyQt5\uic\objcreator.py", line 152, in load_plugin
              plugin = open(filename, 'rU')
             

predefined.zip

kson

unread,
Mar 14, 2021, 1:20:18 PM3/14/21
to SWAT-user
Hi Chris, I also attached the created stream reach files.
I manually check the connectivity between upstream and downstream reach. they are well connected, even though the reach link number has more than 5 digital numbers.
QSWAT manual does not suggest that the stream reach id number should be corresponding to the subbasin id number, which is different in the ArcSWAT case. That is also why I prefer to using QSWAT to prepare for the watershed delineation using predefined catchment/stream shapefiles.
Shapes.zip

kson

unread,
Jul 15, 2022, 5:22:42 PM7/15/22
to SWAT-user
Hi Chris, 
I wonder if there is an easy way to identify the upstreams's subbasins at any outlet points.
I understand that fig.fig file should contain all routing info regarding the subbasin/reaches, but it is not easy to grab the list of the subbasin/reach numbers if I want to find the upstream subbasins of a particular reach.
I would appreciate it if you could offer me any hints.

Thank you. 
Reply all
Reply to author
Forward
0 new messages