2. Quickstart
Installing and running PyFlowline requires some basic knowledge of the Python ecosystem.
Besides, configuring a PyFlowline simulation requires some knowledge of Geographic Information System (GIS) and computational hydrology.
Users can run a PyFlowline simulation in the following steps:
Create a new Python environment using Conda, and activate the new environment.
Install the package using conda install -c conda-forge pyflowline. Conda will automatically install all the required dependencies.
Clone the latest PyFlowline repository from https://github.com/changliao1025/pyflowline.
Download the additional large MPAS mesh file lnd_cull_mesh.nc from https://github.com/changliao1025/pyflowline/releases/tag/0.2.0 and move it under the data/susquehanna/input folder.
Open the examples/susquehanna/pyflowline_susquehanna_mpas.json file and make the following changes: - Change sWorkspace_output to the full path to the directory where you want to save the output (e.g. /full/path/to/pyflowline/data/susquehanna/output). - Change “sFilename_mesh_netcdf” to the full path to lnd_cull_mesh.nc. - Change “sFilename_mesh_boundary” to the full path to data/susquehanna/input/boundary_wgs.geojson. - Change “sFilename_basins” to the full path to examples/susquehanna/pyflowline_susquehanna_basins.json.
Open the examples/susquehanna/pyflowline_susquehanna_basins.json file and change “sFilename_flowline_filter” to the full path to data/susquehanna/input/flowline.geojson. Ignore the other settings in these json files for now.
Open the preferred Python IDE (Visual Studio Code recommended) and run the examples/susquehanna/run_simulation_mpas.py Python script. Optionally, you can also run the notebooks/mpas_example.ipynb notebook. The visualization of the model outputs is only experimental, and you can use other tools to visualize the model outputs.
You should produce a list of model outputs in the data/susquehanna/output folder or the user-specified output folder.
If you encounter any issues, refer to the FAQ or submit a GitHub issue (https://github.com/changliao1025/pyflowline/issues).