Giter VIP home page Giter VIP logo

swatip's Introduction

swat-ip

swat-ip (swat input preparation)

This code introduces how to prepare forcing inputs data to create a SWAT project(s) step by step. This code is suitable for a large-sample SWAT modelling project purpose.

Motivation

The hydrological SWAT model, like other semi-distributed hydrological models, requires a large amount of input datasets with restricted format. If we consider a completed SWAT project includes input preparation (step 1), model setup (step 2), and model calibration (step 3), the input preparation, interestingly, accounts for 60-70% of total time ( based on my experience). This is a considerable workload if you want to run SWAT in multiple seperately catchments. However, most of publicaly available codes I found is to focus on how to run and calibrate SWAT model (step 2 and 3 mentioned above) but not a single document working on input preparation. Therfore, this code aims to fill in this gap. I provide datasets in Central and South East Asia region (8.5N-34N, 93.5E-109.6E) but you can apply this code framework for your own interested regions if you use the same datasets as I used (see Datasets and SWAT version section). In the end, you may see this code being useful as you can prepare inputs for multiple SWAT projects faster, so that you will have more time spending on more fun parts (run and calibrate SWAT).

Datasets and SWAT version

Forcing inputs include:

  • Catchment Attributes
    • Digital elevation model (hydroshed dem)
    • Land use (modis land use)
    • Soil (FAO)
    • They are used to: delinate watershed (dem), and create hydrologic response unit (hru) (dem, land use, soil) when you use QGIS and QSWAT to initally setup the SWAT model.
  • Climatic Datasets
    • Daily precipitation (GPM IMERG Final run)
    • Daily air maximum and minimum tempeature (CFSV2)
    • They are used as forcing input in SWAT Editor
  • These forcing inputs have been tested successfully with QGIS 2.61 and QSWAT v1.7, and SWAT Editor 2012.10_5.21
  • Demo data in this code is from Le et al. 2022 (see Citations section)

Citations

If you find my codes useful, please stars, and cite related references as below:

  • Le, M. H., Lakshmi, V., Bolten, J., & Bui, D. D. (2020). Adequacy of Satellite-derived Precipitation Estimate for Hydrological modeling in Vietnam Basins. Journal of Hydrology, 124820

  • Le, M.H., Nguyen Q.B., Pham, H.T., Patil, A.A., Do H.X., Ramsankaran R., Bolten, J.& Lakshmi, V (2022). Assimilation of SMAP products in streamflow simulations โ€“ Is spatial information more important than temporal information. Remote Sensing, 14(7), 1607

Software requirements

  • Shapefile of your study area (optional) or general coordinations of your study area (in latitude, longitude)
  • R software

Datasets

  • Data needed for this code is available at https://drive.google.com/drive/u/1/folders/1nIzLyRCBKgl3f2tGvXgSKBOGqTj7qs3X
  • You can download these datasets and change path folder in the code accordingly.
  • Folder explaination:
    • 0_inputPreparation: folder contains datasets for step 0, step 1, step 2, step 3, and step 4
    • rasters_precip: folder contains daily precipitation from GPM IMERG Final run (in .tif format), which requires for step 5
    • rasters_airtemp: folder contains daily maximum and minimum air temperature from CFSV2 (in .tif format), which requires for step 6
    • demo_results: completely input files after running this code (for reference).

Step by steps

  1. Folder creation <run 00_swatFoldercreation_multi.r>: automatically create folders for different SWAT projects
  2. Get to know your study
  • <01_getKnowyourStudy_multi.r>: create a "study box" for different SWAT projects. All catchment attributes (DEM, land cover, soil) will be extracted for that "study box".
  1. DEM preparation
  • <02_swatInput_catchatr_dem_multi.r>: create DEM input datasets for mutiple SWAT projects from a DEM source (geographical coordinates, WGS 84).
  1. Land cover preparation
  • <03_1_preProcessing_landuse_modis.r>: from a source of Land cover (geographical coordinates, WGS 84), preparing a land use meta data with SWAT format
  • <03_2_swatInput_catchatr_lu_multi.r>: create land cover input datasets for mutiple SWAT projects from the land use data in step 03_1
  1. Soil preparation
  • <04_1_preProcessing_soil_fao.r> from a source of soil data (geographical coordinates, WGS 84), preparing soil meta data with SWAT formart
  • After running 04_1, you will have soilreclassification.csv. Use this csv file to create usersoil (for SWAT 2012) version with a template founded in usersoil_fao_vnbasin_final.xls.
  • <04_2_swatInput_catchatr_soil_multi.r> create soil input datasets for mutiple SWAT projects from the soil data in step 04_1
  1. Precipitation
  • <05_1_dataPreprocessing_precipExtraction_imerg_knownShp_multi.r> this step is optional, it can only work if you delinate watersheds and have subbasins for your catchments. It can help you to estimate rainfall timeseries for each subbasin (at subbasin's centroid). The subbasins in 0_inputPrepration/knownSubbasins are required for 05_1
  • <05_2_swatInput_climaticdat_rainformat_imerg_multi.r> this step create rainfall timeseries with SWAT format.
  1. Air temperature
  • <06_1_dataPreprocessing_airtempExtraction_ncep_knownShp_multi.r> this step is optional, it can only work if you delinate watersheds and have subbasins for your catchments. It can help you to estimate air temperature (maximum and minimum) timeseries for each subbasin (at subbasin's centroid). The subbasins in 0_inputPrepration/knownSubbasins are required for 06_1
  • <06_2_swatInput_climaticdat_airtemp_ncep_multi.r> this step create air temperature timeseries with SWAT format.

swatip's People

Contributors

mhle510 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.