diff --git a/doc/source/tutorials.rst b/doc/source/tutorials.rst index 727a348..03854cd 100644 --- a/doc/source/tutorials.rst +++ b/doc/source/tutorials.rst @@ -11,30 +11,35 @@ For this example, we will set up the RUBEM model for ten years: 2000 to 2009. Fo Create a new project ````````````````````` -Create a new project in the downloaded dataset directory named :file:`Iguazu.ini` or another appropriate filename. +Create a new project in the downloaded dataset directory named :file:`Iguazu.json` or another appropriate filename. .. _initial-settings: Initial Settings ```````````````` -Open the created :file:`Iguazu.ini` file and enter the following fields into the file to specify a directory to store the model output files. The output directory is the directory where the model will store the results: +Open the created :file:`Iguazu.json` file and enter the following fields into the file to specify a directory to store the model output files. The output directory is the directory where the model will store the results: -.. code-block:: dosini - - [DIRECTORIES] - output = /Iguazu/output/ +.. code-block:: json -Enable ``Export results to station locations (tss)`` option to export of results at the locations of the gauging stations as CSV files. Then define the file containing the map of the stations locations ``samples``: + { + "DIRECTORIES": { + "output": "/Iguazu/output/", + } + } -.. code-block:: dosini - - [GENERATE_FILE] - tss = True +Enable ``Export results to station locations (tss)`` option to export of results at the locations of the gauging stations as CSV files. Then define the file containing the map of the stations locations ``samples``: - [RASTERS] - samples = /Iguazu/maps/stations/samples.map +.. code-block:: json + { + "GENERATE_FILE": { + "tss": true, + }, + "RASTERS": { + "samples": "Iguazu/maps/stations/samples.map" + }, + } Now let's fill in the other fields with the appropriate maps from the input directory (Dataset :file:`maps` folder), as indicated in the table below: @@ -50,25 +55,28 @@ Now let's fill in the other fields with the appropriate maps from the input dire In the part ``Grid`` set 500.000 m as size value and in the part Simulation Period, set the ``start`` and ``end`` of the simulation, from January 2000 until December 2009. -.. code-block:: dosini - - [GRID] - grid = 500.00 - - [SIM_TIME] - start = 01/01/2000 - end = 01/12/2009 - - [DIRECTORIES] - output = /Iguazu/output/ - - [GENERATE_FILE] - tss = True - - [RASTERS] - dem = /Iguazu/input/maps/dem/dem.map - clone = /Iguazu/input/maps/clone/clone.map - samples = /Iguazu/maps/stations/samples.map +.. code-block:: json + + { + "GRID": { + "grid": 500.00, + }, + "SIM_TIME": { + "start": "01/01/2000", + "end": "01/12/2009", + }, + "DIRECTORIES": { + "output": "Iguazu/output/", + }, + "GENERATE_FILE": { + "tss": true, + }, + "RASTERS": { + "dem": "Iguazu/input/maps/dem/dem.map", + "clone": "Iguazu/input/maps/clone/clone.map", + "samples": "Iguazu/maps/stations/samples.map", + }, + } Soil settings `````````````` @@ -91,40 +99,43 @@ Set the following values for ``Initial Soil Conditions`` fields: | Initial Soil Moisture Content | ``0.5`` | +--------------------------------+---------+ -.. code-block:: dosini - - [GRID] - grid = 500.00 - - [SIM_TIME] - start = 01/01/2000 - end = 01/12/2009 - - [DIRECTORIES] - output = /Iguazu/output/ - - [GENERATE_FILE] - tss = True - - [RASTERS] - dem = /Iguazu/input/maps/dem/dem.map - clone = /Iguazu/input/maps/clone/clone.map - samples = /Iguazu/maps/stations/samples.map - soil = /Iguazu/input/maps/soil/soil.map - - [TABLES] - bulk_density = /Iguazu/input/txt/soil/Bdens.txt - K_sat = /Iguazu/input/txt/soil/Ksat.txt - T_fcap = /Iguazu/input/txt/soil/Tfc.txt - T_sat = /Iguazu/input/txt/soil/Tsat.txt - T_wp = /Iguazu/input/txt/soil/Twp.txt - rootzone_depth = /Iguazu/input/txt/soil/Dpz.txt - - [INITIAL_SOIL_CONDITIONS] - T_ini = 0.5 - bfw_ini = 10.0 - bfw_lim = 150.0 - S_sat_ini = 151.0 +.. code-block:: json + + { + "GRID": { + "grid": 500.00, + }, + "SIM_TIME": { + "start": "01/01/2000", + "end": "01/12/2009", + }, + "DIRECTORIES": { + "output": "Iguazu/output/", + }, + "GENERATE_FILE": { + "tss": true, + }, + "RASTERS": { + "dem": "Iguazu/input/maps/dem/dem.map", + "clone": "Iguazu/input/maps/clone/clone.map", + "samples": "Iguazu/maps/stations/samples.map ", + "soil": "Iguazu/input/maps/soil/soil.map", + }, + "TABLES": { + "bulk_density": "Iguazu/input/txt/soil/Bdens.txt", + "K_sat": "Iguazu/input/txt/soil/Ksat.txt", + "T_fcap": "Iguazu/input/txt/soil/Tfc.txt", + "T_sat": "Iguazu/input/txt/soil/Tsat.txt", + "T_wp": "Iguazu/input/txt/soil/Twp.txt", + "rootzone_depth": "Iguazu/input/txt/soil/Dpz.txt", + }, + "INITIAL_SOIL_CONDITIONS": { + "T_ini": 0.5, + "bfw_ini": 10.0, + "bfw_lim": 150.0, + "S_sat_ini": 151.0, + }, + } Land Use settings `````````````````` @@ -149,131 +160,135 @@ Use the default values for ``FPAR``, ``LAI`` and ``Impervious Area Interception` | Impervious Area Interception | ``2.5`` | +------------------------------+-----------+ -.. code-block:: dosini - - [GRID] - grid = 500.00 - - [SIM_TIME] - start = 01/01/2000 - end = 01/12/2009 - - [DIRECTORIES] - output = /Iguazu/output/ - ndvi = /Iguazu/input/maps/ndvi/ - landuse = /Iguazu/input/maps/landuse/ - - [FILENAME_PREFIXES] - ndvi_prefix = ndvi - landuse_prefix = cov - - [GENERATE_FILE] - tss = True - - [RASTERS] - dem = /Iguazu/input/maps/dem/dem.map - clone = /Iguazu/input/maps/clone/clone.map - samples = /Iguazu/maps/stations/samples.map - soil = /Iguazu/input/maps/soil/soil.map - ndvi_max = /Iguazu/input/maps/ndvi/ndvi_max.map - ndvi_min = /Iguazu/input/maps/ndvi/ndvi_min.map - - [TABLES] - bulk_density = /Iguazu/input/txt/soil/Bdens.txt - K_sat = /Iguazu/input/txt/soil/Ksat.txt - T_fcap = /Iguazu/input/txt/soil/Tfc.txt - T_sat = /Iguazu/input/txt/soil/Tsat.txt - T_wp = /Iguazu/input/txt/soil/Twp.txt - rootzone_depth = /Iguazu/input/txt/soil/Dpz.txt - a_i = /Iguazu/input/txt/landuse/a_i.txtF - a_o = /Iguazu/input/txt/landuse/a_o.txt - a_s = /Iguazu/input/txt/landuse/a_s.txt - a_v = /Iguazu/input/txt/landuse/a_v.txt - manning = /Iguazu/input/txt/landuse/manning.txt - K_c_min = /Iguazu/input/txt/landuse/kcmin.txt - K_c_max = /Iguazu/input/txt/landuse/kcmax.txt - - - [INITIAL_SOIL_CONDITIONS] - T_ini = 0.5 - bfw_ini = 10.0 - bfw_lim = 150.0 - S_sat_ini = 151.0 - - [CONSTANTS] - fpar_max = 0.950 - fpar_min = 0.001 - lai_max = 12.000 - i_imp = 2.500 +.. code-block:: json + + { + "GRID": { + "grid": 500.00, + }, + "SIM_TIME": { + "start": "01/01/2000", + "end": "01/12/2009", + }, + "DIRECTORIES": { + "output": "Iguazu/output/", + "ndvi": "Iguazu/input/maps/ndvi/", + "landuse": "Iguazu/input/maps/landuse/", + }, + "FILENAME_PREFIXES": { + "ndvi_prefix": "ndvi", + "landuse_prefix": "cov", + }, + "GENERATE_FILE": { + "tss": true, + }, + "RASTERS": { + "dem": "Iguazu/input/maps/dem/dem.map", + "clone": "Iguazu/input/maps/clone/clone.map", + "samples": "Iguazu/maps/stations/samples.map", + "soil": "Iguazu/input/maps/soil/soil.map", + "ndvi_max": "Iguazu/input/maps/ndvi/ndvi_max.map", + "ndvi_min": "Iguazu/input/maps/ndvi/ndvi_min.map", + }, + "TABLES": { + "bulk_density": "Iguazu/input/txt/soil/Bdens.txt", + "K_sat": "Iguazu/input/txt/soil/Ksat.txt", + "T_fcap": "Iguazu/input/txt/soil/Tfc.txt", + "T_sat": "Iguazu/input/txt/soil/Tsat.txt", + "T_wp": "Iguazu/input/txt/soil/Twp.txt", + "rootzone_depth": "Iguazu/input/txt/soil/Dpz.txt", + "a_i": "Iguazu/input/txt/landuse/a_i.txtF", + "a_o": "Iguazu/input/txt/landuse/a_o.txt", + "a_s": "Iguazu/input/txt/landuse/a_s.txt", + "a_v": "Iguazu/input/txt/landuse/a_v.txt", + "manning": "Iguazu/input/txt/landuse/manning.txt", + "K_c_min": "Iguazu/input/txt/landuse/kcmin.txt", + "K_c_max": "Iguazu/input/txt/landuse/kcmax.txt", + }, + "INITIAL_SOIL_CONDITIONS": { + "T_ini": 0.5, + "bfw_ini": 10.0, + "bfw_lim": 150.0, + "S_sat_ini": 151.0, + }, + "CONSTANTS": { + "fpar_max": 0.950, + "fpar_min": 0.001, + "lai_max": 12.000, + "i_imp": 2.500, + }, + } Climate settings ````````````````` In the ``Climate`` section define the appropriate map-series from :file:`/input/maps/prec/` for ``Precipitation [mm/month]``, :file:`/input/maps/etp/` for ``Potential Evapotranspiration [mm/month]``, and :file:`/input/maps/kp/` for ``Class A Pan Coefficient [-]``. In the ``Rainy days`` section select the appropriate file from :file:`/input/txt/`. It should be noted that the start date always has to correspond with the first climate forcing file (:file:`*.001`). -.. code-block:: dosini - - [GRID] - grid = 500.00 - - [SIM_TIME] - start = 01/01/2000 - end = 01/12/2009 - - [DIRECTORIES] - output = /Iguazu/output/ - ndvi = /Iguazu/input/maps/ndvi/ - landuse = /Iguazu/input/maps/landuse/ - etp = /Iguazu/input/maps/etp/ - prec = /Iguazu/input/maps/prec/ - kp = /Iguazu/input/maps/kp/ - - [FILENAME_PREFIXES] - etp_prefix = etp - prec_prefix = prec - kp_prefix = kp - ndvi_prefix = ndvi - landuse_prefix = cob - - [GENERATE_FILE] - tss = True - - [RASTERS] - dem = /Iguazu/input/maps/dem/dem.map - clone = /Iguazu/input/maps/clone/clone.map - samples = /Iguazu/maps/stations/samples.map - soil = /Iguazu/input/maps/soil/soil.map - ndvi_max = /Iguazu/input/maps/ndvi/ndvi_max.map - ndvi_min = /Iguazu/input/maps/ndvi/ndvi_min.map - - [TABLES] - rainydays = /Iguazu/input/txt/rainydays.txt - bulk_density = /Iguazu/input/txt/soil/Bdens.txt - K_sat = /Iguazu/input/txt/soil/Ksat.txt - T_fcap = /Iguazu/input/txt/soil/Tfc.txt - T_sat = /Iguazu/input/txt/soil/Tsat.txt - T_wp = /Iguazu/input/txt/soil/Twp.txt - rootzone_depth = /Iguazu/input/txt/soil/Dpz.txt - a_i = /Iguazu/input/txt/landuse/a_i.txt - a_o = /Iguazu/input/txt/landuse/a_o.txt - a_s = /Iguazu/input/txt/landuse/a_s.txt - a_v = /Iguazu/input/txt/landuse/a_v.txt - manning = /Iguazu/input/txt/landuse/manning.txt - K_c_min = /Iguazu/input/txt/landuse/kcmin.txt - K_c_max = /Iguazu/input/txt/landuse/kcmax.txt - - - [INITIAL_SOIL_CONDITIONS] - T_ini = 0.5 - bfw_ini = 10.0 - bfw_lim = 150.0 - S_sat_ini = 151.0 - - [CONSTANTS] - fpar_max = 0.950 - fpar_min = 0.001 - lai_max = 12.000 - i_imp = 2.500 +.. code-block:: json + + { + "GRID": { + "grid": 500.00, + }, + "SIM_TIME": { + "start": "01/01/2000", + "end": "01/12/2009", + }, + "DIRECTORIES": { + "output": "Iguazu/output/", + "ndvi": "Iguazu/input/maps/ndvi/", + "landuse": "Iguazu/input/maps/landuse/", + "etp": "Iguazu/input/maps/etp/", + "prec": "Iguazu/input/maps/prec/", + "kp": "Iguazu/input/maps/kp/", + }, + "FILENAME_PREFIXES": { + "etp_prefix": "etp", + "prec_prefix": "prec", + "kp_prefix": "kp", + "ndvi_prefix": "ndvi", + "landuse_prefix": "cob", + }, + "GENERATE_FILE": { + "tss": true, + }, + "RASTERS": { + "dem": "Iguazu/input/maps/dem/dem.map", + "clone": "Iguazu/input/maps/clone/clone.map", + "samples": "Iguazu/maps/stations/samples.map", + "soil": "Iguazu/input/maps/soil/soil.map", + "ndvi_max": "Iguazu/input/maps/ndvi/ndvi_max.map", + "ndvi_min": "Iguazu/input/maps/ndvi/ndvi_min.map", + }, + "TABLES": { + "rainydays": "Iguazu/input/txt/rainydays.txt", + "bulk_density": "Iguazu/input/txt/soil/Bdens.txt", + "K_sat": "Iguazu/input/txt/soil/Ksat.txt", + "T_fcap": "Iguazu/input/txt/soil/Tfc.txt", + "T_sat": "Iguazu/input/txt/soil/Tsat.txt", + "T_wp": "Iguazu/input/txt/soil/Twp.txt", + "rootzone_depth": "Iguazu/input/txt/soil/Dpz.txt", + "a_i": "Iguazu/input/txt/landuse/a_i.txt", + "a_o": "Iguazu/input/txt/landuse/a_o.txt", + "a_s": "Iguazu/input/txt/landuse/a_s.txt", + "a_v": "Iguazu/input/txt/landuse/a_v.txt", + "manning": "Iguazu/input/txt/landuse/manning.txt", + "K_c_min": "Iguazu/input/txt/landuse/kcmin.txt", + "K_c_max": "Iguazu/input/txt/landuse/kcmax.txt", + }, + "INITIAL_SOIL_CONDITIONS": { + "T_ini": 0.5, + "bfw_ini": 10.0, + "bfw_lim": 150.0, + "S_sat_ini": 151.0, + }, + "CONSTANTS": { + "fpar_max": 0.950, + "fpar_min": 0.001, + "lai_max": 12.000, + "i_imp": 2.500, + }, + } Parameters Settings ```````````````````` @@ -302,80 +317,82 @@ Values in this tab correspond to calibrated parameters in the basin. For the dat | Flow Recession Coefficient (x) | ``0.307`` | +-------------------------------------------+-----------+ -.. code-block:: dosini - - [GRID] - grid = 500.00 - - [SIM_TIME] - start = 01/01/2000 - end = 01/12/2009 - - [DIRECTORIES] - output = /Iguazu/output/ - ndvi = /Iguazu/input/maps/ndvi/ - landuse = /Iguazu/input/maps/landuse/ - etp = /Iguazu/input/maps/etp/ - prec = /Iguazu/input/maps/prec/ - kp = /Iguazu/input/maps/kp/ - - [FILENAME_PREFIXES] - etp_prefix = etp - prec_prefix = prec - kp_prefix = kp - ndvi_prefix = ndvi - landuse_prefix = cob - - [GENERATE_FILE] - tss = True - - [RASTERS] - dem = /Iguazu/input/maps/dem/dem.map - clone = /Iguazu/input/maps/clone/clone.map - samples = /Iguazu/maps/stations/samples.map - soil = /Iguazu/input/maps/soil/soil.map - ndvi_max = /Iguazu/input/maps/ndvi/ndvi_max.map - ndvi_min = /Iguazu/input/maps/ndvi/ndvi_min.map - - [TABLES] - rainydays = /Iguazu/input/txt/rainydays.txt - bulk_density = /Iguazu/input/txt/soil/Bdens.txt - K_sat = /Iguazu/input/txt/soil/Ksat.txt - T_fcap = /Iguazu/input/txt/soil/Tfc.txt - T_sat = /Iguazu/input/txt/soil/Tsat.txt - T_wp = /Iguazu/input/txt/soil/Twp.txt - rootzone_depth = /Iguazu/input/txt/soil/Dpz.txt - a_i = /Iguazu/input/txt/landuse/a_i.txt - a_o = /Iguazu/input/txt/landuse/a_o.txt - a_s = /Iguazu/input/txt/landuse/a_s.txt - a_v = /Iguazu/input/txt/landuse/a_v.txt - manning = /Iguazu/input/txt/landuse/manning.txt - K_c_min = /Iguazu/input/txt/landuse/kcmin.txt - K_c_max = /Iguazu/input/txt/landuse/kcmax.txt - - - [INITIAL_SOIL_CONDITIONS] - T_ini = 0.5 - bfw_ini = 10.0 - bfw_lim = 150.0 - S_sat_ini = 151.0 - - [CONSTANTS] - fpar_max = 0.950 - fpar_min = 0.001 - lai_max = 12.000 - i_imp = 2.500 - - [CALIBRATION] - alpha = 4.41 - b = 0.07 - w1 = 0.51 - w2 = 0.12 - w3 = 0.37 - rcd = 5.37 - f = 0.58 - alpha_gw = 0.92 - x = 0.307 +.. code-block:: json + + { + "GRID": { + "grid": 500.00, + }, + "SIM_TIME": { + "start": "01/01/2000", + "end": "01/12/2009", + }, + "DIRECTORIES": { + "output": "Iguazu/output/", + "ndvi": "Iguazu/input/maps/ndvi/", + "landuse": "Iguazu/input/maps/landuse/", + "etp": "Iguazu/input/maps/etp/", + "prec": "Iguazu/input/maps/prec/", + "kp": "Iguazu/input/maps/kp/", + }, + "FILENAME_PREFIXES": { + "etp_prefix": "etp", + "prec_prefix": "prec", + "kp_prefix": "kp", + "ndvi_prefix": "ndvi", + "landuse_prefix": "cob", + }, + "GENERATE_FILE": { + "tss": true, + }, + "RASTERS": { + "dem": "Iguazu/input/maps/dem/dem.map", + "clone": "Iguazu/input/maps/clone/clone.map", + "samples": "Iguazu/maps/stations/samples.map", + "soil": "Iguazu/input/maps/soil/soil.map", + "ndvi_max": "Iguazu/input/maps/ndvi/ndvi_max.map", + "ndvi_min": "Iguazu/input/maps/ndvi/ndvi_min.map", + }, + "TABLES": { + "rainydays": "Iguazu/input/txt/rainydays.txt", + "bulk_density": "Iguazu/input/txt/soil/Bdens.txt", + "K_sat": "Iguazu/input/txt/soil/Ksat.txt", + "T_fcap": "Iguazu/input/txt/soil/Tfc.txt", + "T_sat": "Iguazu/input/txt/soil/Tsat.txt", + "T_wp": "Iguazu/input/txt/soil/Twp.txt", + "rootzone_depth": "Iguazu/input/txt/soil/Dpz.txt", + "a_i": "Iguazu/input/txt/landuse/a_i.txt", + "a_o": "Iguazu/input/txt/landuse/a_o.txt", + "a_s": "Iguazu/input/txt/landuse/a_s.txt", + "a_v": "Iguazu/input/txt/landuse/a_v.txt", + "manning": "Iguazu/input/txt/landuse/manning.txt", + "K_c_min": "Iguazu/input/txt/landuse/kcmin.txt", + "K_c_max": "Iguazu/input/txt/landuse/kcmax.txt", + }, + "INITIAL_SOIL_CONDITIONS": { + "T_ini": 0.5, + "bfw_ini": 10.0, + "bfw_lim": 150.0, + "S_sat_ini": 151.0, + }, + "CONSTANTS": { + "fpar_max": 0.950, + "fpar_min": 0.001, + "lai_max": 12.000, + "i_imp": 2.500, + }, + "CALIBRATION": { + "alpha": 4.41, + "b": 0.07, + "w1": 0.51, + "w2": 0.12, + "w3": 0.37, + "rcd": 5.37, + "f": 0.58, + "alpha_gw": 0.92, + "x": 0.307, + }, + } Model Execution Settings @@ -385,139 +402,122 @@ Within this section it's necessary to specify for each variable if you want this In the example below it can be seen that ``Recharge``, ``Accumulated Total Runoff`` and ``Total Interception`` are checked to be reported. If ``Export Results to stations locations (tss)`` was defined as ``True``, time-series for the selected variables will be generated. -The default format the generated raster files is PCRaster map format ``map_raster_series = True``. +The default format the generated raster files is PCRaster map format ``map_raster_series": true,``. The complete project configuration file should look like this: -.. code-block:: dosini - - [GRID] - grid = 500.00 - - [SIM_TIME] - start = 01/01/2000 - end = 01/12/2009 - - [DIRECTORIES] - output = /Iguazu/output/ - ndvi = /Iguazu/input/maps/ndvi/ - landuse = /Iguazu/input/maps/landuse/ - etp = /Iguazu/input/maps/etp/ - prec = /Iguazu/input/maps/prec/ - kp = /Iguazu/input/maps/kp/ - - [FILENAME_PREFIXES] - etp_prefix = etp - prec_prefix = prec - kp_prefix = kp - ndvi_prefix = ndvi - landuse_prefix = cob - - [RASTERS] - dem = /Iguazu/input/maps/dem/dem.map - clone = /Iguazu/input/maps/clone/clone.map - samples = /Iguazu/maps/stations/samples.map - soil = /Iguazu/input/maps/soil/soil.map - ndvi_max = /Iguazu/input/maps/ndvi/ndvi_max.map - ndvi_min = /Iguazu/input/maps/ndvi/ndvi_min.map - - [TABLES] - rainydays = /Iguazu/input/txt/rainydays.txt - bulk_density = /Iguazu/input/txt/soil/Bdens.txt - K_sat = /Iguazu/input/txt/soil/Ksat.txt - T_fcap = /Iguazu/input/txt/soil/Tfc.txt - T_sat = /Iguazu/input/txt/soil/Tsat.txt - T_wp = /Iguazu/input/txt/soil/Twp.txt - rootzone_depth = /Iguazu/input/txt/soil/Dpz.txt - a_i = /Iguazu/input/txt/landuse/a_i.txt - a_o = /Iguazu/input/txt/landuse/a_o.txt - a_s = /Iguazu/input/txt/landuse/a_s.txt - a_v = /Iguazu/input/txt/landuse/a_v.txt - manning = /Iguazu/input/txt/landuse/manning.txt - K_c_min = /Iguazu/input/txt/landuse/kcmin.txt - K_c_max = /Iguazu/input/txt/landuse/kcmax.txt - - - [INITIAL_SOIL_CONDITIONS] - T_ini = 0.5 - bfw_ini = 10.0 - bfw_lim = 150.0 - S_sat_ini = 151.0 - - [CONSTANTS] - fpar_max = 0.950 - fpar_min = 0.001 - lai_max = 12.000 - i_imp = 2.500 - - [CALIBRATION] - alpha = 4.41 - b = 0.07 - w1 = 0.51 - w2 = 0.12 - w3 = 0.37 - rcd = 5.37 - f = 0.58 - alpha_gw = 0.92 - x = 0.307 - - [GENERATE_FILE] - itp = True - bfw = False - srn = False - eta = False - lfw = False - rec = True - smc = False - rnf = False - arn = True - tss = True - - [RASTER_FILE_FORMAT] - map_raster_series = True - tiff_raster_series = False +.. code-block:: json + + { + "GRID": { + "grid": 500.00, + }, + "SIM_TIME": { + "start": "01/01/2000", + "end": "01/12/2009", + }, + "DIRECTORIES": { + "output": "Iguazu/output/", + "ndvi": "Iguazu/input/maps/ndvi/", + "landuse": "Iguazu/input/maps/landuse/", + "etp": "Iguazu/input/maps/etp/", + "prec": "Iguazu/input/maps/prec/", + "kp": "Iguazu/input/maps/kp/", + }, + "FILENAME_PREFIXES": { + "etp_prefix": "etp", + "prec_prefix": "prec", + "kp_prefix": "kp", + "ndvi_prefix": "ndvi", + "landuse_prefix": "cob", + }, + "GENERATE_FILE": { + "tss": true, + }, + "RASTERS": { + "dem": "Iguazu/input/maps/dem/dem.map", + "clone": "Iguazu/input/maps/clone/clone.map", + "samples": "Iguazu/maps/stations/samples.map", + "soil": "Iguazu/input/maps/soil/soil.map", + "ndvi_max": "Iguazu/input/maps/ndvi/ndvi_max.map", + "ndvi_min": "Iguazu/input/maps/ndvi/ndvi_min.map", + }, + "TABLES": { + "rainydays": "Iguazu/input/txt/rainydays.txt", + "bulk_density": "Iguazu/input/txt/soil/Bdens.txt", + "K_sat": "Iguazu/input/txt/soil/Ksat.txt", + "T_fcap": "Iguazu/input/txt/soil/Tfc.txt", + "T_sat": "Iguazu/input/txt/soil/Tsat.txt", + "T_wp": "Iguazu/input/txt/soil/Twp.txt", + "rootzone_depth": "Iguazu/input/txt/soil/Dpz.txt", + "a_i": "Iguazu/input/txt/landuse/a_i.txt", + "a_o": "Iguazu/input/txt/landuse/a_o.txt", + "a_s": "Iguazu/input/txt/landuse/a_s.txt", + "a_v": "Iguazu/input/txt/landuse/a_v.txt", + "manning": "Iguazu/input/txt/landuse/manning.txt", + "K_c_min": "Iguazu/input/txt/landuse/kcmin.txt", + "K_c_max": "Iguazu/input/txt/landuse/kcmax.txt", + }, + "INITIAL_SOIL_CONDITIONS": { + "T_ini": 0.5, + "bfw_ini": 10.0, + "bfw_lim": 150.0, + "S_sat_ini": 151.0, + }, + "CONSTANTS": { + "fpar_max": 0.950, + "fpar_min": 0.001, + "lai_max": 12.000, + "i_imp": 2.500, + }, + "CALIBRATION": { + "alpha": 4.41, + "b": 0.07, + "w1": 0.51, + "w2": 0.12, + "w3": 0.37, + "rcd": 5.37, + "f": 0.58, + "alpha_gw": 0.92, + "x": 0.307, + }, + "GENERATE_FILE": { + "itp": true, + "bfw": false, + "srn": false, + "eta": false, + "lfw": false, + "rec": true, + "smc": false, + "rnf": false, + "arn": true, + "tss": true, + }, + "RASTER_FILE_FORMAT": { + "map_raster_series": true, + "tiff_raster_series": false, + }, + } In a proper Conda environment, run the following command: .. code-block:: console - - $ python rubem -c Iguazu.ini + + $ python rubem -c Iguazu.json If all the project's configuration file is specified correctly, the user should be faced with the following: .. code-block:: console - - RUBEM::Started - RUBEM::Reading configuration file... OK - RUBEM::Running dynamic model... - RUBEM::Reading input files... OK - .Time: 1 - Interception... OK - Evapotranspiration... OK - Surface Runoff... OK - Lateral Flow... OK - Recharge Flow... OK - Baseflow... OK - Soil Balance... OK - Runoff... OK - Exporting variables to files... OK - Ending cycle 1 of 122 - - [This part was purposely omitted because of limited space] - - .Time: 120 - Interception... OK - Evapotranspiration... OK - Surface Runoff... OK - Lateral Flow... OK - Recharge Flow... OK - Baseflow... OK - Soil Balance... OK - Runoff... OK - Exporting variables to files... OK - Ending cycle 120 of 120 - RUBEM::Dynamic model runtime: 9.38 seconds - RUBEM::Converting *.tss files to *.csv... OK - RUBEM::Finished + + Loading configuration and validating inputs... + Simulation started... + .## Timestep 1 of 120 + .## Timestep 2 of 120 + + -- Omited for brevity -- + + .## Timestep 120 of 120 + Simulation finished successfully! + Elapsed time: 5 seconds The files generated by the model will be in the directory specified in the ``output`` parameter. diff --git a/doc/source/userguide.rst b/doc/source/userguide.rst index 1fc3525..88f12b2 100644 --- a/doc/source/userguide.rst +++ b/doc/source/userguide.rst @@ -22,30 +22,39 @@ Data Output Directory Mandatory path to the output folder. Must be a valid path to an existing **empty** directory. -.. code-block:: dosini +.. code-block:: json - [DIRECTORIES] - output = /Dataset/UIGCRB/output/ + { + "DIRECTORIES": { + "output": "/Dataset/UIGCRB/output/", + } + } Digital Elevation Map (DEM) ``````````````````````````` Mandatory path to Digital Elevation Map (DEM) file `[masl] `_ in PCRaster map format :file:`*.map`: this map contains topographic ground elevation in meters. Must be a valid file path to a PCRaster map format :file:`*.map` file. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [RASTERS] - dem = /Dataset/UIGCRB/input/maps/dem/dem.map + { + "RASTERS": { + "dem": "/Dataset/UIGCRB/input/maps/dem/dem.map", + } + } Mask of Catchment (Clone) `````````````````````````` Mandatory path to Mask of Catchment (Clone) file in PCRaster map format :file:`*.map`. This map defines the basin area to simulate in the model. Must be a valid file path to a PCRaster boolean map format file. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [RASTERS] - clone = /Dataset/UIGCRB/input/maps/clone/clone.map + { + "RASTERS": { + "clone": "/Dataset/UIGCRB/input/maps/clone/clone.map", + } + } Local Drain Direction (LDD) @@ -59,10 +68,13 @@ Optional path to Local Drain Direction (LDD) file in PCRaster map format :file:` In some circumstances, it may happen that PCRaster generates different LDDs each time the model runs (difference in value in a few pixels), so the stipulated demand zones may present different values between runs. In this case, it is recommended to use the same LDD for all runs. -.. code-block:: dosini +.. code-block:: json - [RASTERS] - ldd = /Dataset/UIGCRB/input/maps/ldd/ldd.map + { + "RASTERS": { + "ldd": "/Dataset/UIGCRB/input/maps/ldd/ldd.map", + } + } Gauge Station Location Map `````````````````````````` @@ -72,30 +84,39 @@ Export Results to Station Locations Map Optional, if enabled, export time series data of selected output variables (comma-separated values :file:`*.csv` files) for each valid pixel in stations maps. :ref:`A station location map file must be defined. ` -.. code-block:: dosini +.. code-block:: json - [GENERATE_FILE] - tss = True + { + "GENERATE_FILE": { + "tss": true, + }, + } Stations Locations (Samples) '''''''''''''''''''''''''''' Mandatory if ``Export Results to Station Locations`` is enabled. Path to Stations file in PCRaster map format :file:`*.map` and nominal format. This file is a nominal map with unique Ids for cells identified as being a location where time-series output is required. Non-station cells have a value of ``-9999``. Must be a valid path to an existing PCRaster map format :file:`*.map` file. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [RASTERS] - samples = /Dataset/UIGCRB/input/maps/postosFlu/stationsFluCalib.map + { + "RASTERS": { + "samples": "/Dataset/UIGCRB/input/maps/postosFlu/stationsFluCalib.map", + } + } Grid ````` Mandatory cell dimension value in meters. Value has to correspond to the pixel resolution of the dataset's DEM map file. -.. code-block:: dosini +.. code-block:: json - [GRID] - grid = 500.0 + { + "GRID": { + "grid": 500.0, + }, + } Simulation Period ````````````````` @@ -109,10 +130,13 @@ Start Date Mandatory date of the first time step of the simulation scenario (day, month and year of the start period of simulation scenario). -.. code-block:: dosini +.. code-block:: json - [SIM_TIME] - start = 01/01/2000 + { + "SIM_TIME": { + "start": "01/01/2000", + }, + } .. warning:: @@ -123,10 +147,13 @@ End Date Mandatory date of the last time step of the simulation scenario (day, month and year of the last period of simulation scenario). -.. code-block:: dosini +.. code-block:: json - [SIM_TIME] - end = 01/08/2000 + { + "SIM_TIME": { + "end": "01/08/2000", + }, + } .. warning:: @@ -137,10 +164,13 @@ Alignment Date Optional date of the alignment time step of the simulation scenario (day, month and year of the alignment period of simulation scenario). If not specified, the alignment date will be the same as the :ref:`start date. ` -.. code-block:: dosini +.. code-block:: json - [SIM_TIME] - alignment = 01/01/2000 + { + "SIM_TIME": { + "alignment": "01/01/2000", + }, + } .. warning:: @@ -158,70 +188,91 @@ Soil Map Mandatory path to Soil map in PCRaster map format :file:`*.map` and nominal format. It represents the soil classes of the study area. The number of classes is defined by the user and is related to hydraulic properties. Must be a valid path to an existing PCRaster map format :file:`*.map` file. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [RASTER] - soil = /Dataset/UIGCRB/input/maps/soil/soil.map + { + "RASTERS": { + "soil": "/Dataset/UIGCRB/input/maps/soil/soil.map", + } + } Bulk Density ```````````` Mandatory path to a tabular file with values :raw-html:`[g/cm3]` of Bulk density for each soil class. Must be a valid path to an existing text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv`. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [TABLES] - bulk_density = /Dataset/UIGCRB/input/txt/soil/dg.txt + { + "TABLES": { + "bulk_density": "/Dataset/UIGCRB/input/txt/soil/dg.txt", + }, + } :raw-html:`Saturated Hydraulic Conductivity (KSAT)` ```````````````````````````````````````````````````````````````````````````````` Mandatory path to a tabular file with values [mm/month] of saturated hydraulic conductivity for each soil class. Must be a valid path to an existing text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv`. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [TABLES] - K_sat = /Dataset/UIGCRB/input/txt/soil/Tsat.txt + { + "TABLES": { + "K_sat": "/Dataset/UIGCRB/input/txt/soil/Tsat.txt", + }, + } :raw-html:`Field Capacity (θFC)` ````````````````````````````````````````````````````````````` Mandatory path to a tabular file with values :raw-html:`[θ (cm3/cm3)]` of field capacity water content (θ) for each soil class. Must be a valid path to an existing text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv`. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [TABLES] - T_fcap = /Dataset/UIGCRB/input/txt/soil/Tcc.txt + { + "TABLES": { + "T_fcap": "/Dataset/UIGCRB/input/txt/soil/Tcc.txt", + }, + } :raw-html:`Wilting Point (θWP)` ``````````````````````````````````````````````````````````` Mandatory path to a tabular file with values :raw-html:`[θ (cm3/cm3)]` of Wilting Point for each soil class. Must be a valid path to an existing text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv`. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [TABLES] - T_wp = /Dataset/UIGCRB/input/txt/soil/Tw.txt + { + "TABLES": { + "T_wp": "/Dataset/UIGCRB/input/txt/soil/Tw.txt", + }, + } :raw-html:`Saturated Content (θSAT)` ```````````````````````````````````````````````````````````````` Mandatory path to a tabular file with values :raw-html:`[θ (cm3/cm3)]` of saturated content for each soil class. Must be a valid path to an existing text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv`. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [TABLES] - T_sat = /Dataset/UIGCRB/input/txt/soil/Tsat.txt + { + "TABLES": { + "T_sat": "/Dataset/UIGCRB/input/txt/soil/Tsat.txt", + }, + } Depth Rootzone ```````````````` Mandatory path to a tabular file with values [cm] of depth rootzone for each soil class. Must be a valid path to an existing text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv`. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [TABLES] - rootzone_depth = /Dataset/UIGCRB/input/txt/soil/Zr.txt + { + "TABLES": { + "rootzone_depth": "/Dataset/UIGCRB/input/txt/soil/Zr.txt", + }, + } Initial Soil Conditions ``````````````````````` @@ -245,10 +296,13 @@ where: - :math:`A`- Contribution area of the gauge station (:raw-html:`m2`); - :math:`N_{cell}` - Number of cells of the contribution area (calculated by the ratio of :math:`A` and the grid area (:raw-html:`m2`)). -.. code-block:: dosini +.. code-block:: json - [INITIAL_SOIL_CONDITIONS] - bfw_ini = 10.0 + { + "INITIAL_SOIL_CONDITIONS": { + "bfw_ini": 10.0, + }, + } .. _baseflow-threshold-userguide-section: @@ -271,20 +325,26 @@ where: - :math:`A`- Contribution area of the gauge station (:raw-html:`m2`); - :math:`N_{cell}` - Number of cells of the contribution area (calculated by the ratio of :math:`A` and the grid area (:raw-html:`m2`)). -.. code-block:: dosini +.. code-block:: json - [INITIAL_SOIL_CONDITIONS] - bfw_lim = 5.0 + { + "INITIAL_SOIL_CONDITIONS": { + "bfw_lim": 5.0, + }, + } :raw-html:`Initial Soil Moisture Content (θINI)` '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Mandatory float value :raw-html:`[θ (cm3/cm3)]` representing the Rootzone Soil Moisture Content value at the beginning of the simulation. -.. code-block:: dosini +.. code-block:: json - [INITIAL_SOIL_CONDITIONS] - T_ini = 0.5 + { + "INITIAL_SOIL_CONDITIONS": { + "T_ini": 0.5, + }, + } :raw-html:`Initial Saturated Zone Storage (SSAT)` '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' @@ -296,10 +356,13 @@ Mandatory Saturated Zone Moisture Content value [mm] at the beginning of the sim To generate baseflow at the initial step this value must be much greater than the baseflow threshold (:math:`S_{sat} \gg BF_{thresh}`), see :ref:`baseflow-threshold-userguide-section`. -.. code-block:: dosini +.. code-block:: json - [INITIAL_SOIL_CONDITIONS] - S_sat_ini = 100.0 + { + "INITIAL_SOIL_CONDITIONS": { + "S_sat_ini": 100.0, + }, + } Land Use Parameters @@ -316,13 +379,16 @@ Land Use Map-series Mandatory path to a directory containing the land use map-series. The directory containing these files must contain the maps that representing the mean monthly LUC, where each map represents the variable's value at a particular time step. If some file is missing, the map of the previous step will be used. Must be a valid path to an existing directory. Note that it is also necessary to indicate the prefix of the filenames of the series. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [DIRECTORIES] - landuse = /Dataset/UIRB/input/maps/landuse/ - - [FILENAME_PREFIXES] - landuse_prefix = ldu + { + "DIRECTORIES": { + "landuse": "/Dataset/UIRB/input/maps/landuse/", + }, + "FILENAME_PREFIXES": { + "landuse_prefix": "ldu", + }, + } Normalized Difference Vegetation Index (NDVI) ````````````````````````````````````````````` @@ -338,43 +404,55 @@ NDVI Map-series Mandatory path to a directory containing the monthly Normalized Difference Vegetation Index (NDVI) map-series format. The directory containing these files must contain the maps representing the mean monthly NDVI, where each map represents the variable's value at a particular time step. If some file is missing, the map of the previous step will be used. Must be a valid path to an existing directory. Note that it is also necessary to indicate the prefix of the filenames of the series. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [FILES] - ndvi = /Dataset/UIRB/input/maps/ndvi/ - - [FILENAME_PREFIXES] - ndvi_prefix = ndvi + { + "FILES": { + "ndvi": "/Dataset/UIRB/input/maps/ndvi/", + }, + "FILENAME_PREFIXES": { + "ndvi_prefix": "ndvi", + }, + } Maximum NDVI Map ''''''''''''''''' Mandatory path to maximum NDVI file in PCRaster map format :file:`*.map`. This file is a scalar pcraster map with values for each cell, representing the maximum value of NDVI in the historic series available for the cell. Must be a valid path to an existing PCRaster map format :file:`*.map` file. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [RASTERS] - ndvi_max = /Dataset/UIGCRB/input/maps/ndvi/ndvi_max.map + { + "RASTERS": { + "ndvi_max": "/Dataset/UIGCRB/input/maps/ndvi/ndvi_max.map", + } + } Minimum NDVI Map '''''''''''''''' Mandatory path to minimum NDVI file in PCRaster map format :file:`*.map`. This file is a scalar pcraster map with values for each cell, representing the minimum value of NDVI in the historic series available for the cell. Must be a valid path to an existing PCRaster map format :file:`*.map` file. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [RASTERS] - ndvi_min = /Dataset/UIGCRB/input/maps/ndvi/ndvi_min.map + { + "RASTERS": { + "ndvi_min": "/Dataset/UIGCRB/input/maps/ndvi/ndvi_min.map", + } + } Manning's Roughness Coefficient ```````````````````````````````` Mandatory path to a tabular file with values of Manning's roughness coefficient values for each land-use class. Must be a valid path to an existing text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv`. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [TABLES] - manning = /Dataset/UIGCRB/input/txt/landuse/manning.txt + { + "TABLES": { + "manning": "/Dataset/UIGCRB/input/txt/landuse/manning.txt", + }, + } Area Fractions `````````````` @@ -384,40 +462,52 @@ Impervious Area Fraction (ai) Mandatory path to file with values of fraction of impervious surface area values for each land-use class. This file is a text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv` with values, representing the fraction of impervious surface area for each land-use class. Must be a valid path to an existing text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv`. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [TABLES] - a_i = /Dataset/UIGCRB/input/txt/landuse/a_i.txt + { + "TABLES": { + "a_i": "/Dataset/UIGCRB/input/txt/landuse/a_i.txt", + }, + } Open Water Area Fraction (ao) '''''''''''''''''''''''''''''' Mandatory path to file with values of fraction of open-water area values for each land-use class. This file is a text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv` with values, representing the fraction of open-water area for each land-use class. Must be a valid path to an existing text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv`. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [TABLES] - a_o = /Dataset/UIGCRB/input/txt/landuse/a_o.txt + { + "TABLES": { + "a_o": "/Dataset/UIGCRB/input/txt/landuse/a_o.txt", + }, + } Bare Soil Area Fraction (as) ''''''''''''''''''''''''''''' Mandatory path to file with values of fraction of bare soil area values for each land-use class. This file is a text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv` with values, representing the fraction of bare soil area for each land-use class. Must be a valid path to an existing text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv`. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [TABLES] - a_s = /Dataset/UIGCRB/input/txt/landuse/a_s.txt + { + "TABLES": { + "a_s": "/Dataset/UIGCRB/input/txt/landuse/a_s.txt", + }, + } Vegetated Area Fraction (av) '''''''''''''''''''''''''''' Mandatory path to file with values of fraction of vegetated area values for each land-use class. This file is a text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv` with values, representing the fraction of vegetated area for each land-use class. Must be a valid path to an existing text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv`. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [TABLES] - a_v = /Dataset/UIGCRB/input/txt/landuse/a_v.txt + { + "TABLES": { + "a_v": "/Dataset/UIGCRB/input/txt/landuse/a_v.txt", + }, + } Crop Coefficient (K\ :sub:`C`\) @@ -428,20 +518,26 @@ Crop Coefficient (K\ :sub:`C`\) Mandatory path to a tabular file with values of maximum crop coefficient for each land-use class. Must be a valid path to an existing text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv`. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [TABLES] - K_c_max = /Dataset/UIGCRB/input/txt/landuse/kcmax.txt + { + "TABLES": { + "K_c_max": "/Dataset/UIGCRB/input/txt/landuse/kcmax.txt", + }, + } :raw-html:`Minimum KC` '''''''''''''''''''''''''''''''''''''''''''''''''''' Mandatory path to a tabular file with values of minimum crop coefficient for each land-use class. Must be a valid path to an existing text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv`. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [TABLES] - K_c_min = /Dataset/UIGCRB/input/txt/landuse/kcmin.txt + { + "TABLES": { + "K_c_min": "/Dataset/UIGCRB/input/txt/landuse/kcmin.txt", + }, + } :raw-html:`Maximum Leaf Area Index (LAIMAX)` ```````````````````````````````````````````````````````````````````````` @@ -450,10 +546,13 @@ Mandatory maximum float value [dimensionless quantity] that characterizes plant .. math:: 1 \leq LAI_{MAX} \leq 12 -.. code-block:: dosini +.. code-block:: json - [CONSTANTS] - lai_max = 12.0 + { + "CONSTANTS": { + "lai_max": 12.0, + }, + } :raw-html:`Impervious Area Interception (II)` `````````````````````````````````````````````````````````````````````````` @@ -462,10 +561,13 @@ Mandatory float value [mm] that represents the rainfall interception in impervio .. math:: 1 < I_I < 3 -.. code-block:: dosini +.. code-block:: json - [CONSTANTS] - i_imp = 2.5 + { + "CONSTANTS": { + "i_imp": 2.5, + }, + } Fraction Photosynthetically Active Radiation (FPAR) ``````````````````````````````````````````````````` @@ -479,20 +581,26 @@ Maximum FPAR Mandatory maximum float value [dimensionless quantity] of fraction photosynthetically active radiation. This parameter is related to the maximum Leaf Area Index and allows the calculation of canopy storage. -.. code-block:: dosini +.. code-block:: json - [CONSTANTS] - fpar_max = 0.95 + { + "CONSTANTS": { + "fpar_max": 0.95, + }, + } Minimum FPAR ''''''''''''' Mandatory minimum float value [dimensionless quantity] of fraction photosynthetically active radiation. This parameter is related to the minimum Leaf Area Index and allows the calculation of canopy storage. -.. code-block:: dosini +.. code-block:: json - [CONSTANTS] - fpar_min = 0.001 + { + "CONSTANTS": { + "fpar_min": 0.001, + }, + } @@ -510,49 +618,61 @@ Climate Data Series Mandatory path to a directory containing the Monthly Rainfall map-series format [mm/month]. The directory containing these files must contain the maps representing the variable's value at a particular time step the mean monthly :raw-html:`PM`, where each map represents the variable's value at a particular time step. If some file is missing, the map of the previous step will be used. Must be a valid path to an existing directory. Note that it is also necessary to indicate the prefix of the filenames of the series. :ref:`See more. ` -.. code-block:: dosini - - [FILES] - prec = /Dataset/UIRB/input/maps/prec/ +.. code-block:: json - [FILENAME_PREFIXES] - prec_prefix = prec + { + "FILES": { + "prec": "/Dataset/UIRB/input/maps/prec/", + }, + "FILENAME_PREFIXES": { + "prec_prefix": "prec", + }, + } :raw-html:`Monthly Potential Evapotranspiration (ETP)` `````````````````````````````````````````````````````````````````` Mandatory path to a directory containing the Monthly Potential Evapotranspiration map-series format [mm/month]. The directory containing these files must contain the maps representing the mean monthly :raw-html:`ETP`, where each map represents the variable's value at a particular time step. If some file is missing, the map of the previous step will be used. Must be a valid path to an existing directory. Note that it is also necessary to indicate the prefix of the filenames of the series. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [FILES] - etp = /Dataset/UIRB/input/maps/etp/ - - [FILENAME_PREFIXES] - etp_prefix = etp + { + "FILES": { + "etp": "/Dataset/UIRB/input/maps/etp/", + }, + "FILENAME_PREFIXES": { + "etp_prefix": "etp", + }, + } :raw-html:`Class A Pan Coefficient (KP)` ```````````````````````````````````````````````````` Mandatory path to a directory containing the Class A Pan Coefficient map-series format[mm/month]. The directory containing these files must contain the maps representing the mean monthly :raw-html:`KP`, where each map represents the variable's value at a particular time step. If some file is missing, the map of the previous step will be used. Must be a valid path to an existing directory. Note that it is also necessary to indicate the prefix of the filenames of the series. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [FILES] - kp = /Dataset/UIRB/input/maps/kp/ - - [FILENAME_PREFIXES] - kp_prefix = kp + { + "FILES": { + "kp": "/Dataset/UIRB/input/maps/kp/", + }, + "FILENAME_PREFIXES": { + "kp_prefix": "kp", + }, + } Monthly Rainy Days ``````````````````` Mandatory path to a tabular file [days/month] with values representing the mean value of rainy days for each month of the simulation period. Must be a valid path to an existing text file :file:`*.txt` or comma-separated values (CSV) file :file:`*.csv`. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [TABLES] - rainydays = /Dataset/UIGCRB/input/txt/rainydays.txt + { + "TABLES": { + "rainydays": "/Dataset/UIGCRB/input/txt/rainydays.txt", + }, + } Model Parameters ----------------- @@ -566,10 +686,13 @@ Mandatory float value [dimensionless quantity] that affects the daily intercepti Surface runoff is directly related to interception, an optimal value can be obtained by calibration surface runoff against direct runoff separated from streamflow observations. -.. code-block:: dosini +.. code-block:: json - [CALIBRATION] - alpha = 4.5 + { + "CALIBRATION": { + "alpha": 4.5, + }, + } Rainfall Intensity Coefficient (b) `````````````````````````````````` @@ -580,10 +703,13 @@ Mandatory float exponent value [dimensionless quantity] that represents the eff The value is higher for low rainfall intensities resulting in less surface runoff, and approaches to one for high rainfall intensities. If :math:`b = 1`, a linear relationship is assumed between rainfall excess and soil moisture. -.. code-block:: dosini +.. code-block:: json - [CALIBRATION] - b = 0.5 + { + "CALIBRATION": { + "b": 0.5, + }, + } Regional Consecutive Dryness Level (RCD) ````````````````````````````````````````` @@ -594,10 +720,13 @@ Mandatory float value [mm] that incorporates the intensity of rain and the numbe :math:`RCD = 1.0` can be used for very heavy or torrential rainfall and more than 10 consecutive rainy days/month, and :math:`RCD = 10.0` for low regional intensity rainfall less than 2 consecutive rainy days per month. -.. code-block:: dosini +.. code-block:: json - [CALIBRATION] - rcd = 5.0 + { + "CALIBRATION": { + "rcd": 5.0, + }, + } Flow Direction Factor (f) `````````````````````````` @@ -608,10 +737,13 @@ Mandatory float value [dimensionless quantity] used to partition the flow out of :math:`f = 1.0` corresponds to a 100% horizontal flow direction, and :math:`f = 0` corresponds to a 100% vertical flow direction. -.. code-block:: dosini +.. code-block:: json - [CALIBRATION] - f = 0.5 + { + "CALIBRATION": { + "f": 0.5, + }, + } :raw-html:`Baseflow Recession Coefficient (αGW)` ```````````````````````````````````````````````````````````````````````````` @@ -622,10 +754,13 @@ Mandatory float value [dimensionless quantity] that relates the baseflow respons Therefore, lower values for :math:`\alpha_{GW}` therefore correspond to areas that respond slowly to groundwater recharge, whereas higher values indicate areas that rapidly respond to groundwater recharge. -.. code-block:: dosini +.. code-block:: json - [CALIBRATION] - alpha_gw = 0.5 + { + "CALIBRATION": { + "alpha_gw": 0.5, + }, + } Flow Recession Coefficient (x) ```````````````````````````````` @@ -636,10 +771,13 @@ Mandatory float value [dimensionless quantity] that incorporates a flow delay in :math:`x \approx 0` corresponds to a fast responding catchment, and :math:`x \approx 1` corresponds to a slow responding catchment. -.. code-block:: dosini +.. code-block:: json - [CALIBRATION] - x = 0.5 + { + "CALIBRATION": { + "x": 0.5, + }, + } Weight Factors `````````````` @@ -653,46 +791,58 @@ Land Use (:math:`w_1`), Soil Moisture (:math:`w_2`) and Slope (:math:`w_3`) are Mandatory float value [dimensionless quantity] that contributes to calculating permeables areas runoff, and is related to the Manning coefficient for each land use class. It measures the effect of the land use on the potential runoff produced. -.. code-block:: dosini +.. code-block:: json - [CALIBRATION] - w_1 = 0.333 + { + "CALIBRATION": { + "w_1": 0.333, + }, + } :raw-html:`Soil Factor Weight (w2)` '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Mandatory float value [dimensionless quantity] that contributes to calculating permeables area runoff, and is related to wilting points for each soil class. It measures the effect of the soil class on the potential runoff produced. -.. code-block:: dosini +.. code-block:: json - [CALIBRATION] - w_2 = 0.333 + { + "CALIBRATION": { + "w_2": 0.333, + }, + } :raw-html:`Slope Factor Weight (w3)` ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Mandatory float value [dimensionless quantity] that contributes to calculating of permeables areas runoff, and is related to pixel slope. It measures the effect of the slope on the potential runoff produced. -.. code-block:: dosini +.. code-block:: json - [CALIBRATION] - w_3 = 0.334 + { + "CALIBRATION": { + "w_3": 0.334, + }, + } Model Output Formats --------------------- -At least one of these two options must be set to ``True`` to define the format of the generated raster files. The default format option is PCRaster map format ``map_raster_series = True``. +At least one of these two options must be set to ``True`` to define the format of the generated raster files. The default format option is PCRaster map format ``map_raster_series": true,``. PCRaster Map Format ```````````````````` Default ``True`` boolean, the raster data generated by the model will be exported in PCRaster map format. See the `related documentation `__ for more information. -.. code-block:: dosini +.. code-block:: json - [RASTER_FILE_FORMAT] - map_raster_series = True + { + "RASTER_FILE_FORMAT": { + "map_raster_series": true, + }, + } TIFF/GeoTIFF @@ -700,10 +850,13 @@ TIFF/GeoTIFF Default ``True`` boolean, the raster data generated by the model will be exported in TIFF/GeoTIFF map format. See the `related documentation `__ for more information. -.. code-block:: dosini +.. code-block:: json - [RASTER_FILE_FORMAT] - tiff_raster_series = True + { + "RASTER_FILE_FORMAT": { + "tiff_raster_series": true, + }, + } Model Output Parameters @@ -720,30 +873,39 @@ Total Interception Optional boolean value. If enabled, this option allows the generation of Total Interception (ITP) [mm] result maps in raster format for each of the time steps included in the simulation period. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [GENERATE_FILE] - itp = True + { + "GENERATE_FILE": { + "itp": true, + }, + } Baseflow ```````` Optional boolean value. If enabled, this option allows the generation of Baseflow (BFW) [mm] result maps in raster format for each of the time steps included in the simulation period. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [GENERATE_FILE] - bfw = True + { + "GENERATE_FILE": { + "bfw": true, + }, + } Surface Runoff `````````````` Optional boolean value. If enabled, this option allows the generation of Surface runoff (SRN) [mm] result maps in raster format for each of the time steps included in the simulation period. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [GENERATE_FILE] - srn = True + { + "GENERATE_FILE": { + "srn": true, + }, + } Actual Evapotranspiration `````````````````````````` @@ -751,50 +913,65 @@ Actual Evapotranspiration Optional boolean value. If enabled, this option allows the generation of Actual Evapotranspiration (ETA) [mm] result maps in raster format for each of the time steps included in the simulation period. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [GENERATE_FILE] - eta = True + { + "GENERATE_FILE": { + "eta": true, + }, + } Lateral Flow ```````````` Optional boolean value. If enabled, this option allows to generate the resulting maps of Lateral Flow (LFW) [mm] result maps in raster format for each of the time steps included in the simulation period. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [GENERATE_FILE] - lfw = True + { + "GENERATE_FILE": { + "lfw": true, + }, + } Recharge ````````` Optional boolean value. If enabled, this option allows the generation of Recharge (REC) [mm] result maps in raster format for each of the time steps included in the simulation period. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [GENERATE_FILE] - rec = True + { + "GENERATE_FILE": { + "rec": true, + }, + } Soil Moisture Content `````````````````````` Optional boolean value. If enabled, this option allows the generation of Soil Moisture Content (SMC) [mm] result maps in raster format for each of the time steps included in the simulation period. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [GENERATE_FILE] - smc = True + { + "GENERATE_FILE": { + "smc": true, + }, + } Total Runoff ```````````` Optional boolean value. If enabled, this option allows the generation of Total Runoff (RNF) [mm] result maps in raster format for each of the time steps included in the simulation period. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [GENERATE_FILE] - rnf = True + { + "GENERATE_FILE": { + "rnf": true, + }, + } Accumulated Total Runoff @@ -802,102 +979,107 @@ Accumulated Total Runoff Optional boolean value. If enabled, this option allows the generation of Accumulated Total Runoff (ARN) [:raw-html:`m3s-1`] result maps in raster format for each of the time steps included in the simulation period. :ref:`See more. ` -.. code-block:: dosini +.. code-block:: json - [GENERATE_FILE] - arn = True + { + "GENERATE_FILE": { + "arn": true, + }, + } Configuration File Template --------------------------- -.. code-block:: dosini - - [SIM_TIME] - start = 01/01/2000 - end = 01/02/2000 - - [DIRECTORIES] - input = /Dataset/UIRB/ - output = /Dataset/UIRB/output/ - etp = /Dataset/UIRB/input/maps/etp/ - prec = /Dataset/UIRB/input/maps/prec/ - ndvi = /Dataset/UIRB/input/maps/ndvi/ - Kp = /Dataset/UIRB/input/maps/kp/ - landuse = /Dataset/UIRB/input/maps/landuse/ - - [FILENAME_PREFIXES] - etp_prefix = etp - prec_prefix = prec - ndvi_prefix = ndvi - kp_prefix = kp - landuse_prefix = ldu - - [RASTERS] - dem = /Dataset/UIRB/input/maps/dem/dem.map - clone = /Dataset/UIRB/input/maps/clone/clone.map - ndvi_max = /Dataset/UIRB/input/maps/ndvi/ndvi_max.map - ndvi_min = /Dataset/UIRB/input/maps/ndvi/ndvi_min.map - soil = /Dataset/UIRB/input/maps/soil/soil.map - samples = /Dataset/UIRB/input/maps/samples/samples.map - - [TABLES] - rainydays = /Dataset/UIRB/input/tables/rainydays.txt - a_i = /Dataset/UIRB/input/tables/landuse/a_i.txt - a_o = /Dataset/UIRB/input/tables/landuse/a_o.txt - a_s = /Dataset/UIRB/input/tables/landuse/a_s.txt - a_v = /Dataset/UIRB/input/tables/landuse/a_v.txt - manning = /Dataset/UIRB/input/tables/landuse/manning.txt - bulk_density = /Dataset/UIRB/input/tables/soil/dg.txt - K_sat = /Dataset/UIRB/input/tables/soil/Kr.txt - T_fcap = /Dataset/UIRB/input/tables/soil/Tcc.txt - T_sat = /Dataset/UIRB/input/tables/soil/Tsat.txt - T_wp = /Dataset/UIRB/input/tables/soil/Tw.txt - rootzone_depth = /Dataset/UIRB/input/tables/soil/Zr.txt - K_c_min = /Dataset/UIRB/input/tables/landuse/kcmin.txt - K_c_max = /Dataset/UIRB/input/tables/landuse/kcmax.txt - - - [GRID] - grid = 500.0 - - [CALIBRATION] - alpha = 4.5 - b = 0.5 - w_1 = 0.333 - w_2 = 0.333 - w_3 = 0.334 - rcd = 5.0 - f = 0.5 - alpha_gw = 0.5 - x = 0.5 - - [INITIAL_SOIL_CONDITIONS] - T_ini = 1.0 - bfw_ini = 10.0 - bfw_lim = 5.0 - S_sat_ini = 100.0 - - [CONSTANTS] - fpar_max = 0.95 - fpar_min = 0.001 - lai_max = 12.0 - i_imp = 2.5 - - [GENERATE_FILE] - itp = True - bfw = True - srn = True - eta = True - lfw = True - rec = True - smc = True - rnf = True - arn = True - tss = True - - [RASTER_FILE_FORMAT] - map_raster_series = True - tiff_raster_series = True +.. code-block:: json + + { + "SIM_TIME": { + "start": "01/01/2000", + "end": "01/02/2000", + + "DIRECTORIES": { + "input": "/Dataset/UIRB/", + "output": "/Dataset/UIRB/output/", + "etp": "/Dataset/UIRB/input/maps/etp/", + "prec": "/Dataset/UIRB/input/maps/prec/", + "ndvi": "/Dataset/UIRB/input/maps/ndvi/", + "Kp": "/Dataset/UIRB/input/maps/kp/", + "landuse": "/Dataset/UIRB/input/maps/landuse/", + }, + "FILENAME_PREFIXES": { + "etp_prefix": "etp", + "prec_prefix": "prec", + "ndvi_prefix": "ndvi", + "kp_prefix": "kp", + "landuse_prefix": "ldu", + }, + "RASTERS": { + "dem": "/Dataset/UIRB/input/maps/dem/dem.map", + "clone": "/Dataset/UIRB/input/maps/clone/clone.map", + "ndvi_max": "/Dataset/UIRB/input/maps/ndvi/ndvi_max.map", + "ndvi_min": "/Dataset/UIRB/input/maps/ndvi/ndvi_min.map", + "soil": "/Dataset/UIRB/input/maps/soil/soil.map", + "samples": "/Dataset/UIRB/input/maps/samples/samples.map", + }, + "TABLES": { + "rainydays": "/Dataset/UIRB/input/tables/rainydays.txt", + "a_i": "/Dataset/UIRB/input/tables/landuse/a_i.txt", + "a_o": "/Dataset/UIRB/input/tables/landuse/a_o.txt", + "a_s": "/Dataset/UIRB/input/tables/landuse/a_s.txt", + "a_v": "/Dataset/UIRB/input/tables/landuse/a_v.txt", + "manning": "/Dataset/UIRB/input/tables/landuse/manning.txt", + "bulk_density": "/Dataset/UIRB/input/tables/soil/dg.txt", + "K_sat": "/Dataset/UIRB/input/tables/soil/Kr.txt", + "T_fcap": "/Dataset/UIRB/input/tables/soil/Tcc.txt", + "T_sat": "/Dataset/UIRB/input/tables/soil/Tsat.txt", + "T_wp": "/Dataset/UIRB/input/tables/soil/Tw.txt", + "rootzone_depth": "/Dataset/UIRB/input/tables/soil/Zr.txt", + "K_c_min": "/Dataset/UIRB/input/tables/landuse/kcmin.txt", + "K_c_max": "/Dataset/UIRB/input/tables/landuse/kcmax.txt", + }, + "GRID": { + "grid": 500.0, + }, + "CALIBRATION": { + "alpha": 4.5, + "b": 0.5, + "w_1": 0.333, + "w_2": 0.333, + "w_3": 0.334, + "rcd": 5.0, + "f": 0.5, + "alpha_gw": 0.5, + "x": 0.5, + }, + "INITIAL_SOIL_CONDITIONS": { + "T_ini": 1.0, + "bfw_ini": 10.0, + "bfw_lim": 5.0, + "S_sat_ini": 100.0, + }, + "CONSTANTS": { + "fpar_max": 0.95, + "fpar_min": 0.001, + "lai_max": 12.0, + "i_imp": 2.5, + }, + "GENERATE_FILE": { + "itp": true, + "bfw": true, + "srn": true, + "eta": true, + "lfw": true, + "rec": true, + "smc": true, + "rnf": true, + "arn": true, + "tss": true, + }, + "RASTER_FILE_FORMAT": { + "map_raster_series": true, + "tiff_raster_series": true, + }, + } ------------------ @@ -932,7 +1114,7 @@ Use ``-h`` or ``--help`` to get a brief description of RUBEM and each argument. -s, --skip-inputs-validation disable input files validation before running the model - RUBEM 0.2.3-beta.2 Copyright (C) 2020-2024 - LabSid/PHA/EPUSP -This program comes with ABSOLUTELY NO WARRANTY.This is free software, and you are welcome to redistribute it under + RUBEM 0.9.0-beta.3 Copyright (C) 2020-2024 - LabSid/PHA/EPUSP -This program comes with ABSOLUTELY NO WARRANTY.This is free software, and you are welcome to redistribute it under certain conditions. Use ``-V`` or ``--version`` to get the version of the RUBEM. @@ -940,13 +1122,13 @@ Use ``-V`` or ``--version`` to get the version of the RUBEM. .. code-block:: console $ python rubem --version - RUBEM v0.2.3-beta.2 + RUBEM v0.9.0-beta.3 Use ``-c`` or ``--configfile`` to set the path of the RUBEM configuration file. .. code-block:: console - $ python rubem --configfile project-config.ini + $ python rubem --configfile project-config.json .## Timestep 1 of 24 .## Timestep 2 of 24 .## Timestep 3 of 24