diff --git a/.coveragerc b/.coveragerc index 9adae452..a7cba45f 100755 --- a/.coveragerc +++ b/.coveragerc @@ -1,4 +1,3 @@ [run] omit = - src/lisflood/hydrological_modules/compile_kinematic_wave_parallel_tools.py tests/* diff --git a/.gitattributes b/.gitattributes index e69de29b..1037d9a4 100755 --- a/.gitattributes +++ b/.gitattributes @@ -0,0 +1,6 @@ +docs/assets/fonts/* linguist-vendored +docs/assets/js/main.min.js linguist-vendored +docs/assets/js/lunr/* linguist-vendored +docs/assets/js/plugins/* linguist-vendored +docs/assets/js/vendor/* linguist-vendored +docs/_sass/minimal-mistakes/vendor/* linguist-vendored diff --git a/.github/workflows/ci_env.yml b/.github/workflows/ci_env.yml new file mode 100644 index 00000000..0e2944bd --- /dev/null +++ b/.github/workflows/ci_env.yml @@ -0,0 +1,47 @@ +name: Lisflood OS Unit Tests + +on: [push] + +jobs: + tests: + runs-on: ubuntu-20.04 + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v3 + - uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + python-version: 3.7 + - name: Conda info + shell: bash -el {0} + run: conda info + - name: Install python and gcc + shell: bash -el {0} + run: | + conda install -c conda-forge python=3.7 + conda install -c conda-forge gcc=12.1.0 + - name: Install gdal and pcraster + shell: bash -el {0} + run: | + conda install -c conda-forge gdal pcraster + - name: Install dependencies + shell: bash -el {0} + run: | + pip install -r requirements.txt + - name: Install lisflood-module + shell: bash -el {0} + run: | + pip install . + - name: Check installation + shell: bash -el {0} + run: | + gdal-config --version + python -c "from osgeo import gdal; print(gdal.__version__)" + conda list + - name: Test with pytest + shell: bash -el {0} + run: | + pip install pytest pytest-cov + pytest \ No newline at end of file diff --git a/.gitignore b/.gitignore index ee52626b..222e9834 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,27 @@ +*.gem +*.sublime-project +*.sublime-workspace +.bundle +.DS_Store +.jekyll-metadata +.sass-cache +_asset_bundler_cache +_site +codekit-config.json +example/_site +Gemfile.lock +node_modules +npm-debug.log* .idea *.py[cod] __pycache__/ build/ *.so -kinematic_wave_parallel_tools.html lisflood_model.egg-info /dist/ .eggs .tox /src/dist/ -/src/lisflood/hydrological_modules/kinematic_wave_parallel_tools.c .coverage *.tox.ini .vscode/ diff --git a/Dockerfile b/Dockerfile index b6c2bb7d..92ad8fb4 100755 --- a/Dockerfile +++ b/Dockerfile @@ -27,9 +27,6 @@ COPY src/lisfloodSettings_reference.xml / COPY LICENSE / COPY VERSION / -# Compile kwpt -RUN cd /lisflood/hydrological_modules && conda run -n lisflood python compile_kinematic_wave_parallel_tools.py build_ext --inplace - # RUN Tests COPY tests/. /tests/ COPY pytest.ini /tests diff --git a/MANIFEST.in b/MANIFEST.in index f83ba9a5..bb1d0bd5 100755 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,3 @@ -include src/lisflood/hydrological_modules/kinematic_wave_parallel_tools.pyx include requirements.txt include *.xml include VERSION diff --git a/README.md b/README.md index 79582933..2abad27b 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ You can use conda environment to easily install dependencies. ```bash conda create --name lisflood python=3.7 -c conda-forge conda activate lisflood -conda install -c conda-forge pcraster +conda install -c conda-forge pcraster gdal ``` * Install lisflood-model pypi package @@ -61,30 +61,12 @@ pip install -r requirements.txt If you don't use conda but a plain virtualenv, you need to install PCRaster and GDAL by your own and include its python interface in PYTHONPATH environment variable. For details, please follow instruction on [official docs](http://pcraster.geo.uu.nl). - -3. Compile the cython module kinematic_wave_parallel_tool - -To compile this Cython module to enable OpenMP multithreading (parallel kinematic wave): - -* Delete the files *.so (if any) in directory hydrological-modules - -* Inside the hydrological_modules folder, execute "python compile_kinematic_wave_parallel_tools.py build_ext --inplace" - -Important: the module has to be compiled on the machine where the model is run - the resulting binary is not portable. - -Then in the settings file the option "numberParallelThreadsKinematicWave" may take the following values: - - "0" : auto-detection of the machine/node's number of CPUs (all CPUs are used minus 1) (do not set it if other simulations are running on the same machine/node) - - "1" : serial execution (not parallel) - - "2", "3", ... : manual setting of the number of parallel threads. - (if exceeding the number of CPUs, the option is set to "0") --> -```xml - -``` -4. Run a cold run for the test catchment +3. Run a cold run for the test catchment Now your environment should be set up to run lisflood. Try with a prepared settings file for one of the two test catchments: ```bash +mkdir tests/data/LF_ETRS89_UseCase/out python src/lisf1.py tests/data/LF_ETRS89_UseCase/settings/cold.xml ``` diff --git a/VERSION b/VERSION index 2582dddf..ecedc98d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.1.1 \ No newline at end of file +4.3.1 \ No newline at end of file diff --git a/docs/.editorconfig b/docs/.editorconfig new file mode 100644 index 00000000..3a287c45 --- /dev/null +++ b/docs/.editorconfig @@ -0,0 +1,13 @@ +# editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = false + +[*.md] +trim_trailing_whitespace = false diff --git a/docs/0_disclaimer/index.md b/docs/0_disclaimer/index.md new file mode 100644 index 00000000..8df0913f --- /dev/null +++ b/docs/0_disclaimer/index.md @@ -0,0 +1,3 @@ +# Disclaimer + +Both the program code and the LISFLOOD documentation (including the [LISFLOOD Model Documentation](https://ec-jrc.github.io/lisflood-model/), the [LISFLOOD User Guide](https://ec-jrc.github.io/lisflood-code/) and the [LISVAP documentation](https://ec-jrc.github.io/lisflood-lisvap/)) have been carefully inspected before publishing. However, no warranties, either expressed or implied, are made concerning the accuracy, completeness, reliability, usability, performance, or fitness for any particular purpose of the information contained in this documentation, to the software described in this documentation, and to other material supplied in connection therewith. The material is provided \"as is\". The entire risk as to its quality and performance is with the user. diff --git a/docs/0_references/index.md b/docs/0_references/index.md new file mode 100644 index 00000000..f4d1afad --- /dev/null +++ b/docs/0_references/index.md @@ -0,0 +1,101 @@ +[//]: # (References) + +Allen, R. G., Pereira, L. S., Raes, D., and Smith, M.: FAO Irrigation and Drainage Paper No. 56: Crop Evapotranspiration (guidelines for computing crop water requirements), 1998. [available online: https://www.researchgate.net/publication/284300773_FAO_Irrigation_and_drainage_paper_No_56, last accessed: 13.05.2021.] + +Anderson, 2006Anderson, E., 2006. *Snow Accumulation and Ablation Model -- SNOW-17*. Technical report. + +Aston, A.R., 1979. Rainfall interception by eight small trees. Journal of Hydrology 42, 383-396. + +Bódis, K., 2009. *Development of a data set for continental hydrologic modelling*. Technical Report EUR 24087 EN JRC Catalogue number: LB-NA-24087-EN-C, Institute for Environment and Sustainability, Joint Research Centre of the European Commission Land Management and Natural Hazards Unit Action FLOOD. Input layers related to topography, channel geometry, land cover and soil characteristics of European and African river basins. + +Buchhorn, M., Lesiv, M., Tsendbazar, N.-E., Herold, M., Bertels, L., and Smets, B.: Copernicus Global Land Cover Layers - Collection 2. Remote Sensing 2020, 12Volume 108, 1044. doi:10.3390/rs12061044 + +Burek, P., Bianchi, A., and Gentile, A.: A pan-European Data Set for hydrological modelling. JRC Technical Reports, 2014 [available online: https://ec-jrc.github.io/lisflood/pdfs/Dataset_hydro.pdf, last accessed: 13.05.2021.]. + +Burek, P., Van Der Knijff, J., and De Roo, A.: LISFLOOD - Distributed Water Balance and Flood Simulation Model - Revised User Manual. Luxembourg: Publications Office of the European Union, 2013, JRC78917 [available online: https://publications.jrc.ec.europa.eu/repository/handle/JRC78917, last accessed: 02.06.2021.]. + +Büttner, G., Kosztra, B., Maucha, G., Pataki, R., Kleeschulte, S., Hazeu, G., Vittek, M., and Schröder, C.: CORINE Land Cover Product User Manual – Final draft, Version 1.2. Environment Agency Austria, 2021 [available online: https://land.copernicus.eu/user-corner/technical-library/clc-product-user-manual, last accessed: 13.05.2021.] + +Carneiro Freire, S., Macmanus, K., Pesaresi, M., Doxsey-Whitfield, E., and Mills, J.: Development of new open and free multi-temporal global population grids at 250 m resolution. Geospatial Data in a Changing World; Association of Geographic Information Laboratories in Europe (AGILE) (Organiser). AGILE; 2016. JRC100523 + +Chow, V.T., Maidment, D.R., Mays, L.M., 1988. Applied Hydrology, McGraw-Hill, Singapore, 572 pp. + +De Roo, A., Thielen, J., Gouweleeuw, B., 2003. LISFLOOD, a Distributed Water-Balance, Flood Simulation, and Flood Inundation Model, User Manual version 1.2. Internal report, Joint Research Center of the European Communities, Ispra, Italy, 74 pp. + +de Sousa, L. M., Poggio, L., Batjes, N. H., Heuvelink, G. B. M., Kempen, B., Riberio, E., and Rossiter, D.: SoilGrids 2.0: producing quality-assessed soil information for the globe, SOIL Discuss. [preprint], https://doi.org/10.5194/soil-2020-65, in review, 2020. + +Fröhlich, W., 1996. Wasserstandsvorhersage mit dem Prgramm ELBA. Wasserwirtschaft Wassertechnik, ISSN: 0043-0986, Nr. 7, 1996, 34-37. + +Goudriaan, J., 1977. Crop micrometeorology: a simulation study. Simulation Monographs. Pudoc, Wageningen. + +Hock, 2003Hock, R., 2003. Temperature index melt modelling in mountain areas. *Journal of Hydrology*, 282(1-4), 104--115. + +Laborte, A., Gutierrez, M., Balanza, J. et al. RiceAtlas, a spatial database of global rice calendars and production. Sci Data 4, 170074 (2017). https://doi.org/10.1038/sdata.2017.74 + +Lehner, B., and Döll, P.: Development and validation of a global database of lakes, reservoirs and wetlands, Journal of Hydrology, Volume 296, Issues 1–4, 20 August 2004, Pages 1-22, http://dx.doi.org/10.1016/j.jhydrol.2004.03.028. + +Lindström, G., Johansson, B., Persson, M., Gardelin, M., Bergström, S., Development and test of the distributed HBV-96 hydrological model. Journal of Hydrology 201, 272-288. + +Maidment, D.R. (ed.), 1993. Handbook of Hydrology, McGraw-Hill. + +Martinec, J., Rango, A., Roberts, R.T., 1998. Snowmelt Runoff Model (SRM) User\'s Manual (Updated Edition 1998, Version 4.0). Geographica Bernensia, Department of Geography - University of Bern, 1999. 84pp. + +Merriam, R.A., 1960. A note on the interception loss equation. Journal of Geophysical Research 65, 3850-3851. + +Moiret-Guigand, A.: CLC2018 / CLCC1218 VALIDATION REPORT, Issue 1.3, 2021 [available online: https://land.copernicus.eu/user-corner/technical-library/clc-2018-and-clc-change-2012-2018-validation-report/view, last accessed:13.05.2021.]. + +Molnau, M., Bissell, V.C., 1983. A continuous frozen ground index for flood forecasting. In: Proceedings 51^st^ Annual Meeting Western Snow Conference, 109-119. + +Rao, C.X. and Maurer, E.P., 1996. A simplified model for predicting daily transmission losses in a stream channel. Water Resources Bulletin, Vol. 31, No. 6., 1139-1146. + +Schiavina, M., Freire, S., and MacManus, K.: GHS-POP R2019A - GHS population grid multitemporal (1975-1990-2000-2015). European Commission, Joint Research Centre (JRC), 2019. [Dataset] doi:10.2905/0C6B9751-A71F-4062-830B-43C9F432370F PID: http://data.europa.eu/89h/0c6b9751-a71f-4062-830b-43c9f432370f + +Smets, B., Verger, A., Camacho, F., Van der Goten, R., and Jacobs, T.: Copernicus Global Land Operations ”Vegetation and Energy”: Product User Manual, Issue 1.33, 2019 [available online: https://land.copernicus.eu/global/sites/cgls.vito.be/files/products/CGLOPS1_PUM_LAI1km-V2_I1.33.pdf, last accessed: 13.05.2021.]. + +Speers, D.D. , Versteeg, J.D., 1979. Runoff forecasting for reservoir operations -- the past and the future. In: Proceedings 52^nd^ Western Snow Conference, 149-156. + +Stroosnijder, L., 1982. Simulation of the soil water balance. In: Penning de Vries, F.W.T., Van Laar, H.H. (eds), Simulation of Plant Growth and Crop Production, Simulation Monographs, Pudoc, Wageningen, pp. 175-193. + +Stroosnijder, L., 1987. Soil evaporation: test of a practical approach under semi-arid conditions. Netherlands Journal of Agricultural Science 35, 417-426. + +Supit, I., Hoojer, A.A., and Van Diepen, C.A.: System description of the Wofost 6.0 crop simulation model implemented in CGMS. Volume 1: Theory and Algorithms, 1994. [available online: https://www.researchgate.net/publication/282287246_System_description_of_the_Wofost_60_crop_simulation_model_implemented_in_CGMS_Volume_1_Theory_and_Algorithms, last accessed: 13.05.2021.]. + +Supit, I. , van der Goot, E. (eds.), 2003. Updated System Description of the WOFOST Crop Growth Simulation Model as Implemented in the Crop Growth Monitoring System Applied by the European Commission, Treemail, Heelsum, The Netherlands, 120 pp. + +Todini, E., 1996. The ARNO rainfall-runoff model. Journal of Hydrology 175, 339-382. + +Tóth, B., Weynants, M., Nemes, A., Makó, A., Bilas, G., and Toth, G.: New generation of hydraulic pedotransfer functions for Europe. EUROPEAN JOURNAL OF SOIL SCIENCE 66 (1); 2015. p. 226-238. JRC91453 + +Van Der Knijff, J., De Roo, A., 2006. LISFLOOD -- Distributed Water Balance and Flood Simulation Model, User Manual. EUR 22166 EN, Office for Official Publications of the European Communities, Luxembourg, 88 +pp. + +Van der Knijff, J., 2008. LISVAP-- Evaporation Pre-Processor for the LISFLOOD Water Balance and Flood Simulation Model, Revised User Manual. EUR 22639 EN/2, Office for Official Publications of the European Communities, Luxembourg, 31 pp. + +Van Der Knijff, J., De Roo, A., 2008. LISFLOOD -- Distributed Water Balance and Flood Simulation Model, Revised User Manual. EUR 22166 EN/2, Office for Official Publications of the European Communities, Luxembourg, 109 pp. + +Van der Knijff, J. M., Younis, J. and de Roo, A. P. J.: LISFLOOD: A GIS-based distributed model for river basin scale water balance and flood simulation, Int. J. Geogr. Inf. Sci., 24(2), 189--212, 2010. + +Van Genuchten, M.Th., 1980. A closed-form equation for predicting the hydraulic conductivity of unsaturated soils. Soil Science Society of America Journal 44, 892-898. + +Viviroli et al., 2009Viviroli, D., Zappa, M., Gurtz, J., & Weingartner, R., 2009. An introduction to the hydrological modelling system PREVAH and its pre- and post-processing-tools. *Environmental Modelling & Software*, 24(10), 1209--1222. + +Vogt et al., 2007Vogt, J., Soille, P., de Jager, A., Rimaviciute, E., Mehl, W., Foisneau, S., Bodis, K., Dusart, M., Parachini, M., Hasstrup, P.,2007. *A pan-European River and Catchment Database*. JRC Reference Report EUR 22920 EN, Institute for Environment and Sustainability, Joint Research Centre of the European Commission. + +Von Hoyningen-Huene, J., 1981. Die Interzeption des Niederschlags in landwirtschaftlichen Pflanzenbeständen (Rainfall interception in agricultural plant stands). In: Arbeitsbericht Deutscher Verband für Wasserwirtschaft und Kulturbau, DVWK, Braunschweig, p.63. + +Wesseling, C.G., Karssenberg, D., Burrough, P.A. , Van Deursen, W.P.A., Integrating dynamic environmental models in GIS: The development of a Dynamic Modelling language. Transactions in GIS 1, 40-48. + +World Meteorological Organization, 1986. Intercomparison of models of snowmelt runoff. Operational Hydrology Report No. 23. + +Yamazaki, D., Ikeshima, D., Sosa, J., Bates, P.D., Allen, G.H., and Pavelsky, T.M.: MERIT Hydro: A high-resolution global hydrography map based on latest topography datasets. Water Resources Research, vol.55, pp.5053-5073, 2019, DOI: 10.1029/2019WR024873 + +Yamazaki, D., Ikeshima, D., Tawatari, R., Yamaguchi, T., O'Loughlin, F., Neal, J. C., Sampson, C. C., Kanae, S., and Bates, P. D.: A high-accuracy map of global terrain elevations. Geophysical Research Letters, vol.44, pp.5844-5853, 2017, DOI: 10.1002/2017GL072874 + +Young, G.J. (ed), 1985. Techniques for prediction of runoff from glacierized areas. IAHS Publication 149, Institute of Hydrology, Wallingford. + +Yu, Q., You, L., Wood-Sichra, U., Ru, Y., Joglekar, A. K. B., Fritz, S., Xiong, W., Lu, M., Wu, W., and Yang, P.: A cultivated planet in 2010: 2. the global gridded agricultural production maps, Earth Syst. Sci. Data Discuss., https://doi.org/10.5194/essd-2020-11, in review, 2020. doi: 10.5194/essd-2020-11 + +Zhao, R.J., Liu, X.R., 1995. The Xinanjiang model. In: Singh, V.P. (ed.), Computer Models of Watershed Hydrology, pp. 215-232. + + + diff --git a/docs/1_introduction_LISFLOOD/index.md b/docs/1_introduction_LISFLOOD/index.md new file mode 100644 index 00000000..a273bfbc --- /dev/null +++ b/docs/1_introduction_LISFLOOD/index.md @@ -0,0 +1,27 @@ +## About LISFLOOD + +LISFLOOD is a spatially distributed, semi-physical hydrological rainfall-runoff model that has been developed by the Joint Research Centre (JRC) of the European Commission in late 90s. +Since then, LISFLOOD has been applied to a wide range of applications such as all kind of water resources assessments looking at e.g. +the effects of climate and land-use change as well as river regulation measures. +Its most prominent application is probably within the [European Flood Awareness System, EFAS](https://www.efas.eu/en) and the [Global Flood Awareness System, GloFAS](https://www.globalfloods.eu/) +operated under [Copernicus Emergency Management System, EMS](https://emergency.copernicus.eu/). + +Its wide applicability is due to its modular structure as well as its temporal and spatial flexibility. +The model can be extended with additional modules when need arises, to satisfy the new target objective. +In that sense it can be extended to include anything from a better representation of a particular hydrological flow to the implementation of anthropogenic-influenced processes. +At the same time the model has been designed to be applied across a wide range of spatial and temporal scales. +LISFLOOD is grid-based, and applications so far have employed grid cells of as little as 100 metres for medium-sized catchments, to 5000 metres for modelling +the whole of Europe and up to 0.1° (around 10 km) for modelling globally. Long-term water balance can be simulated (using a daily time step), +as well as individual flood events (using hourly time intervals, or even smaller). + +Although LISFLOOD's primary output product is channel discharge, all internal rate and state variables (soil moisture, for example) can be written as output as well. + All output can be written as grids, or time series at user-defined points or areas. + The user has complete control over how output is written, thus minimising any waste of disk space or CPU time. + +LISFLOOD is implemented in Python and PCRaster Model Framework, wrapped in a Python based interface. + +The Python wrapper of LISFLOOD enables the user to control the model inputs and outputs and the selection of the model modules. +LISFLOOD runs on any operating system for which Python and PCRaster are available. + + +[🔝](#top) diff --git a/docs/1_introduction_usermanual/index.md b/docs/1_introduction_usermanual/index.md new file mode 100644 index 00000000..6bd74282 --- /dev/null +++ b/docs/1_introduction_usermanual/index.md @@ -0,0 +1,20 @@ +## About this user guide + + +This guide is hosted on GitHub Pages platform and it's the most up-to-date and complete user instruction of the LISFLOOD model. +It contains a detailed step-by-step guide on what you need to do and know through the whole chain from the system requirements to receiving the LISFLOOD output. + +In order to apply this knowledge into practice, we provide two fully implemented test cases: [LISFLOOD User Cases](https://github.com/ec-jrc/lisflood-usecases/). By running the test cases, you can verify that the model has been installed and used by you correctly. Then it will be time for you to move onto your own set-up. + +Note, this document is **not a LISFLOOD model documentation**. The [lisflood-model official documentation](https://ec-jrc.github.io/lisflood-model/) contains the most up-to-date and complete technical documentation of the LISFLOOD model. This includes all the concepts and model equations of all the standard LISFLOOD processes, but also all the optional modules. + +Lastly, we also share with you two other tools: + +* LISVAP, our tool to calculate the evapotranspiration and +* our calibration tool that we've developed. + +LISVAP Source code is on LISVAP [GitHub repository](https://github.com/ec-jrc/lisflood-lisvap) while its documentation can be found at [LISVAP GitHub pages](https://ec-jrc.github.io/lisflood-lisvap/). + +Calibration tool source code is on his dedicated [repository](https://github.com/ec-jrc/lisflood-calibration) while documentation is at [Calibration Tool GitHub Pages](https://ec-jrc.github.io/lisflood-calibration/). + +[🔝](#top) diff --git a/docs/2_ESSENTIAL_setting-file/index.md b/docs/2_ESSENTIAL_setting-file/index.md new file mode 100644 index 00000000..e4e4b861 --- /dev/null +++ b/docs/2_ESSENTIAL_setting-file/index.md @@ -0,0 +1,53 @@ +# LISFLOOD settings file (Settings.xml) + +## Purpose + +In LISFLOOD, all file and parameter specifications are defined in a settings file. The purpose of the settings file is to link variables and parameters in the model to in- and output files (maps, time series, tables) and numerical values. In addition, the settings file can be used to specify several *options*. The settings file has a special (XML) structure. In the next sections the general layout of the settings file is explained. Although the file layout is not particularly complex, a basic understanding of the general principles explained here is essential for doing any successful model runs. + + +## Layout of the settings file + +A LISFLOOD settings file is made up of 4 elements, each of which has a specific function. The general structure of the file is described using XML. + +For a LISFLOOD settings file, the basic structure looks like this: +
+**\**    Start of settings elements
+   **\**    Start of element with options
+                         LISFLOOD options (switches)
+   **\**    End of element with options
+   **\**    Start of element with user-defined variables
+                         User's specific parameters and settings
+   **\**    End of element with user-defined variables
+   **\**    Start of element with 'binding' variables
+                         LISFLOOD model general settings
+   **\**    End of element with 'binding' variables
+**\
**    End of settings element
+ + +## Main elements of the settings file +This file contains settings for LISFLOOD model. It is made up of 3 elements ‘lfuser’, ‘lfoptions’ and ‘lfbinding’ whose function can be briefly described as follows: + ++ **lfoptions:** it contains **switches to turn on/off specific components of the model**. Within LISFLOOD, there are two categories of options: + - Options that activate special LISFLOOD features, such as simulate reservoirs, perform split routing, etc. + - Options to activate the reporting of additional output maps and time series (e.g. soil moisture maps) + + The complete list of available options and default values is contained in the [Annex: settings and options](https://ec-jrc.github.io/lisflood-code/4_annex_settings_and_options/). + + Users are not obliged to include all available options in Settings.xml file: if one option is not specified in Settings.xml, the default option will be automatically used. + If Users leave the ‘lfoptions’ element empty, LISFLOOD will simply run using default options (i.e. run model without optional modules; only report most basic output files). + However, the ‘lfoptions’ element itself (i.e. ) has to be present, even if empty. + + ++ **lfuser:** it contains user-defined definition of **paths** to all in- and output files, and main model parameters (calibration + time-related). + + The ‘lfuser’ element is used to define (user-defined) text variables. These text variables are used to substitute repeatedly used expressions in the binding element. The only function of the ‘lfuser’ element is to define text variables. Users cannot use any of these text variables within the ‘lfuser’ element. + + The variables in the ‘lfuser’ elements are all text variables, and they are used simply to substitute text in the ‘lfbinding’ element. In practice, it is sometimes convenient to use the same name for a text variable that is defined in the ‘lfuser’ element and a ‘lfbinding’ variable. + + ++ **lfbinding:** it contains definition of **all parameter values** of LISFLOOD model as well as **all in- and output maps, time series and tables**. + + It is possible to define everything directly in the ‘lfbinding’ element without using any text variables at al. In that case, the ‘lfuser’ element can remain empty, even though it has to be present (i.e. ) [NOT recommended] + + In general, it is a good idea to use user-defined variables for everything that needs to be changed on a regular basis (paths to input maps, tables, meteorological data, and parameter values). This way Users only have to deal with the variables in the ‘lfuser’ element, without having to worry about anything in ‘lfbinding’ at all. “lfuser” allows to have all the important variables defined in the same element. + diff --git a/docs/2_ESSENTIAL_time-management/index.md b/docs/2_ESSENTIAL_time-management/index.md new file mode 100644 index 00000000..8f71627c --- /dev/null +++ b/docs/2_ESSENTIAL_time-management/index.md @@ -0,0 +1,93 @@ +# Time management (start, end, re-start simulations) + +## Time convention within LISFLOOD model + +**LISFLOOD model follows an "end of timestep" naming convention** for timestamps of both input (forcings) and output data. + +Accordingly, if timestamp "02/01/2017 06:00" is used for naming a time step of daily accumulated rainfall data, that time step will contain rainfall accumulation between "01/01/2017 06:00" and "02/01/2017 06:00" (see following figure) + +![](../media/image62.png) + +Outputs of LISFLOOD model will use the same naming convention. If timestamp "02/01/2017 06:00" is used for naming a time step of daily discharge (output), that time step will contain average discharge over the period between "01/01/2017 06:00" and "02/01/2017 06:00" (see following figure) + +![](../media/image63.png) + +In Settings file, three different keys are used to specify start date, end date and state file date for LISFLOOD simulation: + +- **StepStart:** this key specifies the starting date of the simulation. The starting date is also the date of the first LISFLOOD output. + In Settings.xml*: * + For example, if we set StepStart to "02/01/2017 06:00", this means that LISFLOOD will automatically use forcing data with timestamp "02/01/2017 06:00" (i.e. accumulated rainfall over the period between "01/01/2017 06:00" and "02/01/2017 06:00") and it will also store outputs with the same timestamp (i.e. average discharge over the period between "01/01/2017 06:00" and "02/01/2017 06:00"). +- **StepEnd:** this key specifies the end date of the simulation. The end date is also the date of the last LISFLOOD output. + In Settings.xml*: * + For example, if we set StepEnd to "05/01/2017 06:00", this means that last output from LISFLOOD run will have timestamp "05/01/2017 06:00" +- **timestepInit:** this key is used to specify which timestamp must be used to retrieve information from existing state files (i.e. from a previous simulation) + For example, if we want to start a new simulation at "03/01/2017 06:00" and we want to use hydrological state information from the last time step, we will set timestepInit to "02/01/2017 06:00". Outputs with timestamp "02/01/2017 06:00" will be used to initialize the model, while the first output of the simulation will be be store with timestamp "03/01/2017 06:00" + +![](../media/image64.png) + +> **Both timestamps and time steps ALWAYS refer to the END of the TIME INTERVAL!** + + +## Using timestamps + +Timestamps (dates) can now be used to set start date and end date of LISFLOOD simulation. Dates can be used for keys: StepStart, StepEnd and timestepInit in Settings.xml file. ReportSteps can only be provided as time steps numbers and are referred to CalendarDayStart. + +If hours:minutes are not specified, LISFLOOD will automatically set them to 00:00 + +When using timestamps, CalendarDayStart key in Settings.xml is only used internally to transform timestamps to model's time steps and it is usually set equal to StepStart, + +StepStart, StepEnd and timestepInit are used to access NetCDF files containing forcings and state variables, and to create output NetCDF files. + +## Using time steps + +Time steps can still be used to set start step and end step of LISFLOOD simulation. ReportSteps can only be provided as time steps numbers. + +All steps numbers are referred to CalendarDayStart + +When using time steps, dates (including hours and minutes) to retrieve data for forcings and state variables are automatically determined by LISFLOOD. + +```xml + + ************************************************************** + TIME-RELATED CONSTANTS + ************************************************************** + + + + Calendar day of 1st day in model run + Day of the year of first map (e.g. xx0.001) even if the model start + from map e.g. 500 + e.g. 1st of January: 1; 1st of June 151 (or 152 in leap year) + Needed to read out LAI tables correctly + + + + + timestep [seconds] + + + + + Sub time step used for kinematic wave channel routing [seconds] + Within the model,the smallest out of DtSecChannel and DtSec is used + + + + + Number of first time step in simulation + + + + + Number of last time step in simulation + + + + + Time steps at which to write model state maps (i.e. only + those maps that would be needed to define initial conditions + for succeeding model run) + + +``` + diff --git a/docs/3_step2_installation/index.md b/docs/3_step2_installation/index.md new file mode 100644 index 00000000..db2054ec --- /dev/null +++ b/docs/3_step2_installation/index.md @@ -0,0 +1,112 @@ +## Step 1: Installation of the LISFLOOD model + +There are several ways to get lisflood model and to run it on your machines: + +1. Using the Docker image `jrce1/lisflood` +2. Using pip tool together with conda to easily install dependencies +3. Obtaining the source code, by cloning repository or downloading source distribution, and install dependencies. + +The suggested way is using the official Docker image, since it's not trivial to install PCRaster and GDAL for average users. + +In this page all different options are described. Feel free to pick up what suits you best. + + +### A) Docker image (suggested) + + +You can use the updated docker image to run lisflood, so without taking care to install dependencies on your system. +First, you pull image from repository. + +```bash +docker pull jrce1/lisflood +``` + +Copy Test catchment files from container to your host, using mapped volumes. `usecases` is the folder in docker where test catchments are. + +```bash +docker run -v /absolute_path/to/my/local/folder:/usecases jrce1/lisflood:latest usecases +``` + +After this command, you can find all files to run tests against a catchment under the directory you mapped: `/absolute_path/to/my/local/folder/`, + +```bash +/absolute_path/to/my/local/folder/LF_ETRS89_UseCase +/absolute_path/to/my/local/folder/LF_lat_lon_UseCase +``` + +where `LF_ETRS89_UseCase` and `LF_lat_lon_UseCase` are folders containing test data. + +Now, you can run LISFLOOD as a docker container to test the catchment. Only thing you need to do is to map a test folder to the container folder `input`, by using Docker `-v` option. +In the XML settings file, all paths are adjusted to be relative to the very same settings file, so you don't need to edit paths, as long as you keep same folder's structure. + + +Execute the following docker command to run the simulation: + +```bash +docker run -v /absolute_path/to/my/local/folder/LF_ETRS89_UseCase:/input jrce1/lisflood /input/settings/cold.xml +``` + +Once LISFLOOD finished, you can find reported maps in `/absolute_path/to/my/local/folder/LF_ETRS89_UseCase/out/` folder. + + +### B) Pypi packaged LISFLOOD and conda env + +Using conda environment is very handy since installing latest PCRaster and its dependencies is pretty straightforward. + +1. Install [miniconda](https://docs.conda.io/en/latest/miniconda.html) +2. Create a conda env named "lisflood" and install dependencies: +``` +conda create --name lisflood python=3.7 -c conda-forge +conda activate lisflood +conda install -c conda-forge pcraster +pip install lisflood-model +``` + +Command above will also install the executable `lisflood` in the conda env, so that you can run LISFLOOD with the following: +```bash +lisflood /absolute_path/to/my/local/folder//settings/cold_day_base.xml +``` + +*Note:* You can use a straight python virtualenvironment to install lisflood-model package but then you have to setup PCRaster/GDAL/NetCDF libraries. + +### C) Using the python source code + +You can download code and dataset for testing the model (or to contribute with bug fixes or new features). +Follow this instruction for a basic test (some sample catchments are included in this repository under +[tests/data](https://github.com/ec-jrc/lisflood-code/tree/master/tests/data) folder) + +1. **Clone the master branch of this repository (you need to have git installed on your machine).** + + ```bash + git clone --single-branch --branch master https://github.com/ec-jrc/lisflood-code.git + ``` + +2. **Install requirements into a python 3 conda env** + +```bash +conda create --name lisflood python=3.7 -c conda-forge +conda activate lisflood +conda install -c conda-forge pcraster +cd lisflood-code +pip install -r requirements.txt +``` + +If you don't use conda but a plain virtualenv, you need to install PCRaster and GDAL by your own and include its python interface in PYTHONPATH environment variable. +For details, please follow instruction on [official docs](https://pcraster.geo.uu.nl/pcraster/4.3.1/documentation/pcraster_project/install.html). + + +3. **Run a cold run for the test catchment** + + Now that your environment should be set up to run lisflood, you may try with a prepared settings file for test catchment included into the tests/data folder: + + ```bash + python src/lisf1.py tests/data//settings/cold.xml + ``` +4. **Run LISFLOOD unit tests** + + ```bash + pytest tests/ + ``` + You may need to install ```pytest```, ```pytest-cov```, ```pytest-mock``` and ```gdal``` packages before running the tests, using the command ```pip install ``` for each one. + +If commands above succeeded without errors, producing dis.nc into `tests/data//outputs` folder, your lisflood installation was correct. diff --git a/docs/3_step3_preparing-setting-file/index.md b/docs/3_step3_preparing-setting-file/index.md new file mode 100644 index 00000000..baa75acb --- /dev/null +++ b/docs/3_step3_preparing-setting-file/index.md @@ -0,0 +1,687 @@ +# Step 2: Preparing the Settings file + +This page describes how to prepare your own settings file. Instead of writing the settings file completely from scratch, we suggest to use the settings template that is provided with LISFLOOD as a starting point. In order to use the template, you should make sure the following requirements are met: + + - All input maps and tables are named according to default file names + - All base maps are in the right directories + - All tables are in one directory + - All meteo input is in one directory + - All Leaf Area Index input is in the right directories + - An (empty) directory where all model data can be written exists + +If this is all true, the settings file can be prepared very quickly by editing the items in the 'lfuser' element. The following is a detailed description of the different sections of the 'lfuser' element. The present LISFLOOD version contains process-related parameters (not taking into account the parameters that are defined through the maps). These are all defined in the 'lfuser' element, and default values are given for each of them. Even though *any* of these parameters can be treated as calibration constants, doing so for *all* of them would lead to serious over-parameterisation problems. In the description of these parameters we will therefore provide some suggestions as to which parameters should be used for calibration, and which one are better left untouched. + +For simplicity reasons, we suggest to follow the following steps: +1) specify the file path +2) time related specifications +3) parameter options +4) chose optional model routines (which ones are available; what they do; and how to “activate” them) + +In order to facilitate the preparation of the settings file, a complete example is provided [here](https://ec-jrc.github.io/lisflood-code/3_step3_preparing-setting-file/lisfloodSettings_reference.xml). The user is encouraged to update the paths, the names of the maps and of the tables in the provided template. Please note that the template contains all the settings for a warm start run; the paths to the initial maps must be replaced with the initial bogus values in order to perform a pre-run or a cold start run. +TIP: *$(ProjectDir)* or *$(ProjectPath)* cab used as built-in variable in the XML settings, to refer the project folder. + +### Time-related constants + +The 'lfuser' section starts with a number of constants that are related to the simulation period and the time interval used. These are all defined as single values. + +```xml + + ************************************************************** + TIME-RELATED CONSTANTS + ************************************************************** + + + + Calendar day of 1st day in model run + Day of the year of first map (e.g. xx0.001) even if the model start + from map e.g. 500 + e.g. 1st of January: 1; 1st of June 151 (or 152 in leap year) + Needed to read out LAI tables correctly + + + + + timestep [seconds] + + + + + Sub time step used for kinematic wave channel routing [seconds] + Within the model,the smallest out of DtSecChannel and DtSec is used + + + + + Number of first time step in simulation + + + + + Number of last time step in simulation + + + + + Time steps at which to write model state maps (i.e. only + those maps that would be needed to define initial conditions + for succeeding model run) + + +``` + + +- **CalendarDayStart** is the calendar day of the first timestep of input mapstacks. + Even if you start the model from time step 500, this has to be set to the calendar day of the first map. + Format can be a date in several formats, as long as day number is in first position. eg: +
*Value="01/01/1990" = $1^{st}$ January 1990* +
*Value="05.07.1990" = $5^{st}$July 1990* +
*Value="15-11-1990" = $15^{st}$ November 1990* + +- **DtSec** is the simulation time interval in seconds. It has a value of 86400 for a daily time interval, 3600 for an hourly interval, etcetera. + +- **DtSecChannel** is the simulation time interval used by the kinematic wave channel routing (in seconds). Using a value that is smaller than **DtSec** may result in a better simulation of the overall shape the calculated hydrograph (at the expense of requiring more computing time). + +- **StepStart** is the date of the first time step in your simulation. + +- **StepEnd** is the date of the last time step in your simulation. + +**ReportSteps** defines the time step number(s) at which the model state (i.e. all maps that you would need to define the initial conditions of a succeeding model run) is written. +Note that this option only impacts the output frequency of the model state variables (activated by the "repStateMaps" option), not to the auxiliary variables. The full list of the affected variables is [here](../4_annex_state-variables). You can define this parameter in the following ways: + +1) **At specific time steps**. If you like to have the state maps being written at certain time steps you can define those in a (comma separated) list. For example if you like to have the state maps for the time steps 10, 20 and 40, you need to write: + +```xml + +``` + +2) If you like to have the state maps for the **last time step** of a model run you can use the special 'endtime' keyword, e.g.: + +```xml + +``` + +3) Alternatively, in some cases you may need the state maps **at regular intervals**. In that case you can use the following syntax: + +```xml + +``` + +For instance, in the following example state maps are written every $5^{st}$ time step, starting at time step 10, until the last time step: + +```xml + +``` + +### Parameters related to evapo(transpi)ration and interception + +The following parameters are all related to the simulation of evapo(transpi)ration and rainfall interception. Although they can all be defined as either a single value or as a map, we recommend using the single values that are included in the template. We do not recommend using any of these parameters as calibration constants. + +```xml + + ************************************************************** + PARAMETERS RELATED TO EVAPO(TRANSPI)RATION AND INTERCEPTION + ************************************************************** + + + + Multiplier applied to potential precipitation rates + + + + + Multiplier applied to potential evapo(transpi)ration rates + + + + + Time constant for water in interception store [days] + + + + + Average extinction coefficient for the diffuse radiation flux + varies with crop from 0.4 to 1.1 (Goudriaan (1977)) + + + + + Critical amount of available water (expressed in [mm/day]!), above + which 'Days Since Last Rain' parameter is set to 1 + + + + + maximum depression storage for water on impervious surface + which is not immediately causing surface runoff [mm] + + +``` + +- **PrScaling** is a multiplier that is applied to precipitation input (pr) [-] + +- **CalEvaporation** is a multiplier that is applied to the potential evapo(transpi)ration input ([**ET0**, **EW0** and **ES0**](https://ec-jrc.github.io/lisflood-lisvap/) [-] + +- **LeafDrainageTimeConstant** ([$T_{int}$](https://ec-jrc.github.io/lisflood-model/2_03_stdLISFLOOD_evaporation-intercepted-water/)) is the time constant for the interception store $[days]$ + +- **kdf** is the average extinction for the diffuse radiation flux (Goudriaan, 1977). it is used to calculate the extinction coefficient for global radiation, $κ_{gb}$ ,which is used in Equations for [$EW_{max}$](https://ec-jrc.github.io/lisflood-model/2_03_stdLISFLOOD_evaporation-intercepted-water/), [$T_{max}$](https://ec-jrc.github.io/lisflood-model/2_07_stdLISFLOOD_plant-water-uptake/) and [$ES_{max}$](https://ec-jrc.github.io/lisflood-model/2_08_stdLISFLOOD_soil-evaporation/) [-] + +- **AvWaterRateThreshold** defines a critical amount of water that is used as a threshold for resetting the variable $D_{slr}$ in the Equation for[$ES_a$](https://ec-jrc.github.io/lisflood-model/2_08_stdLISFLOOD_soil-evaporation/). Because the equation was originally developed for daily timesteps only, the threshold is currently defined (somewhat confusingly) as an equivalent **intensity** in $[\frac{mm}{day}]$ + +- **SMaxSealed** is the maximum depression storage on impervious surface $[mm]$. This [storage](https://ec-jrc.github.io/lisflood-model/2_06_stdLISFLOOD_water_infiltration/) is emptied by evaporation (EW0). + + +### Parameters related to snow and frost + +The following parameters are all related to the simulation of [snow accumulation, snowmelt](https://ec-jrc.github.io/lisflood-model/2_04_stdLISFLOOD_snowmelt/) and [frost](https://ec-jrc.github.io/lisflood-model/2_05_stdLISFLOOD_frost-index/). All these parameters can be defined as either single values or maps. We recommend to start out by leaving them all at their default values. If prior data suggest major under- or overcatch problems in the observed snowfall, *SnowFactor* can be adjusted accordingly. *SnowMeltCoef* may be used as a calibration constant, but since snow observations are typically associated with large uncertainty bands, the calibration may effectively just be compensating for these input errors. + +```xml + + + Multiplier applied to precipitation that falls as snow + + + + + range [mm C-1 d-1] of the seasonal variation + SnowMeltCoef is the average value + + + + + Snowmelt coefficient [mm/deg C /day] + See also Martinec et al., 1998. + + + + + Average temperature at which snow melts + + + + + Average temperature below which precipitation is snow + + + + + Temperature lapse rate with altitude [deg C / m] + + + + + Daily decay coefficient, (Handbook of Hydrology, p. 7.28) + + + + + Snow depth reduction coefficient, [cm-1], (HH, p. 7.28) + + + + + Snow water equivalent, (based on snow density of 450 kg/m3) (e.g. + Tarboton and Luce, 1996) + + + + + Degree Days Frost Threshold (stops infiltration, percolation and + capillary rise) + Molnau and Bissel found a value 56-85 for NW USA. + + +``` + +- **SnowFactor** is a multiplier that is applied to the rate of precipitation in case the precipitation falls as snow. Since snow is commonly underestimated in meteorological observation data, setting this multiplier to some value greater than 1 can counteract for this [-] + +- **SnowSeasonAdj** is the range [mm C-1 d-1] of the seasonal variation of snow melt. SnowMeltCoef is the average value. + +- **SnowMeltCoef** ([$C_m$](https://ec-jrc.github.io/lisflood-model/2_04_stdLISFLOOD_snowmelt/)) is the degree-day factor that controls the rate of snowmelt $[\frac{mm}{°C \cdot day}]$ + +- **TempMelt** ([$T_m$](https://ec-jrc.github.io/lisflood-model/2_04_stdLISFLOOD_snowmelt/)) is the average temperature above which snow starts to melt $[°C]$ + +- **TempSnow** is the average temperature below which precipitation is assumed to be snow $[°C]$ + +- **TemperatureLapseRate** (**L**) is the temperature lapse rate that is used to estimate average temperature at the centroid of each pixel's elevation zones ([last Figure](https://ec-jrc.github.io/lisflood-model/2_04_stdLISFLOOD_snowmelt/))$[\frac{°C}{m}]$ + +- **Afrost** ([$A$](https://ec-jrc.github.io/lisflood-model/2_05_stdLISFLOOD_frost-index/)) is the frost index decay coefficient $[day^{-1}]$. It has a value in the range 0-1. + +- **Kfrost** ([$K$](https://ec-jrc.github.io/lisflood-model/2_05_stdLISFLOOD_frost-index/)) is a snow depth reduction coefficient $[cm^{-1}]$ + +- **SnowWaterEquivalent** ([$we_s$](https://ec-jrc.github.io/lisflood-model/2_05_stdLISFLOOD_frost-index/)) is the equivalent water depth of a given snow cover, expressed as a fraction [-] + +- **FrostIndexThreshold** is the critical value of the [frost index](https://ec-jrc.github.io/lisflood-model/2_05_stdLISFLOOD_frost-index/) above which the soil is considered frozen $[\frac{°C}{day}]$ + + +### Infiltration parameters + +The following two parameters control the simulation of infiltration and preferential flow. Both are empirical parameters that are treated as calibration constants, and both can be defined as single values or maps. + +```xml + + ************************************************************** + INFILTRATION PARAMETERS + ************************************************************** + + + + Power in Xinanjiang distribution function + + + + + Power that controls increase of proportion of preferential + flow with increased soil moisture storage + +``` + +- **b\_Xinanjiang** (**b**) is the power in the [infiltration equation](https://ec-jrc.github.io/lisflood-model/2_10_stdLISFLOOD_infiltration/) [-] + +- **PowerPrefFlow** ($c_{pref}$) is the power in the [preferential flow equation](https://ec-jrc.github.io/lisflood-model/2_09_stdLISFLOOD_preferential-bypass/) [-] + + +### Groundwater parameters + +The following parameters control the [simulation of shallow and deeper groundwater](https://ec-jrc.github.io/lisflood-model/2_13_stdLISFLOOD_groundwater/) *GwLossFraction* should be kept at 0 unless prior information clearly indicates that groundwater is lost beyond the catchment boundaries (or to deep groundwater systems). The other parameters are treated as calibration constants. All these parameters can be defined as single values or maps. + +```xml + + ************************************************************** + GROUNDWATER RELATED PARAMETERS + ************************************************************** + + + + Time constant for water in upper zone [days] + + + + + Time constant for water in lower zone [days] + This is the average time a water \'particle\' remains in the + reservoir + if we had a stationary system (average inflow=average outflow) + + + + + Maximum rate of percolation going from the Upper to the Lower + response box [mm/day] + + + + + Maximum rate of percolation from the Lower response box (groundwater + loss) [mm/day]. + A value of 0 (closed lower boundary) is recommended as a starting + value + + +``` + +- **UpperZoneTimeConstant** ([$T_{uz}$](https://ec-jrc.github.io/lisflood-model/2_13_stdLISFLOOD_groundwater/)) is the time constant for the upper groundwater zone $[days]$ + +- **LowerZoneTimeConstant** ([$T_{lz}$](https://ec-jrc.github.io/lisflood-model/2_13_stdLISFLOOD_groundwater/)) is the time constant for the lower groundwater zone $[days]$ + +- **GwPercValue** ([$GW_{perc}$](https://ec-jrc.github.io/lisflood-model/2_13_stdLISFLOOD_groundwater/)) is the maximum rate of percolation going from the upper to the lower groundwater zone $[\frac{mm}{day}]$ + +- **GwLoss** ([$f_{loss}$](https://ec-jrc.github.io/lisflood-model/2_13_stdLISFLOOD_groundwater/)) is the maximum rate of percolation from the lower groundwater zone (groundwater loss) zone $[\frac{mm}{day}]$. A value of 0 (closed lower boundary) is recommended as a starting value. + + +### Routing parameters + +These parameters are all related to the [routing of water in the channels](https://ec-jrc.github.io/lisflood-model/2_16_stdLISFLOOD_channel-routing/) as well as the [routing of surface runoff](https://ec-jrc.github.io/lisflood-model/2_14_stdLISFLOOD_surface-runnoff-routing/). The multiplier *CalChanMan* can be used to fine-tune the timing of the channel routing, and it may be defined as either a single value or a map. All other parameters should be kept at their default values. + +```xml + + ************************************************************** + ROUTING PARAMETERS + ************************************************************** + + + + Multiplier applied to Channel Manning's n + + + + + kinematic wave parameter: 0.6 is for broad sheet flow + + + + + Reference depth of overland flow [mm], used to compute + overland flow Alpha for kin. wave + + + + + Minimum slope gradient (for kin. wave: slope cannot be 0) + + + + + Minimum channel gradient (for kin. wave: slope cannot be 0) + + +``` + +- **CalChanMan** is a multiplier that is applied to the Manning's roughness maps of the [channel system](https://ec-jrc.github.io/lisflood-model/2_16_stdLISFLOOD_channel-routing/) [-] + +- **beta** is routing coefficient [$β_k$](https://ec-jrc.github.io/lisflood-model/2_14_stdLISFLOOD_surface-runnoff-routing/) [-] + +- **OFDepRef** is a [reference flow depth](https://ec-jrc.github.io/lisflood-model/2_14_stdLISFLOOD_surface-runnoff-routing/) from which the flow velocity of the surface runoff is calculated $[mm]$ + +- **GradMin** is a lower limit for the slope gradient used in the calculation of the surface runoff flow velocity $[\frac{m}{m}]$ + +- **ChanGradMin** is a lower limit for the channel gradient used in the calculation of the channel flow velocity $[\frac{m}{m}]$ + + + +### Parameters related to numerics + +This category only contains one parameter at the moment, which can only be a single value. We strongly recommend keeping this parameter at its default value. + +```xml + + ********************************** + **************************** + PARAMETERS RELATED TO NUMERICS + ********************************** + **************************** + + + + Minimum value for Courant condition in soil moisture routine + + +``` + +- **CourantCrit** ($C_{crit}$) is the critical Courant number which controls the numerical accuracy of the [simulated soil moisture fluxes](https://ec-jrc.github.io/lisflood-model/2_12_stdLISFLOOD_soilmoisture-redistribution/) [-]. Any value between 0 and 1 can be used, but using values that are too high can lead to unrealistic "jumps" in the simulated soil moisture, whereas very low values result in reduced computational performance (because many iterations will be necessary to obtain the required accuracy). Values above 1 should never be used, as they will result in a loss of mass balance. In most cases the default value of 0.4 results in sufficiently realistic simulations using just a few iterations. + + + + +### Prefixes of meteo, vegetation, and water use related variables + +Here you can define the prefix that is used for each meteorological variable, LAI and water use. + +```xml + + ************************************************************** + PREFIXES OF METEO AND VEGETATION RELATED VARIABLES + ************************************************************** + + + + prefix precipitation maps + + + + + prefix average temperature maps + + + + + prefix E0 maps + + + + + prefix ES0 maps + + + + + prefix ET0 maps + + + + + prefix LAI maps + + + + + prefix forest LAI maps + + + + + prefix water use maps + + +``` + +- **PrefixPrecipitation** is the prefix of the precipitation maps + +- **PrefixTavg** is the prefix of the daily average temperature maps + +- **PrefixE0** is the prefix of the potential open-water evaporation maps + +- **PrefixES0** is the prefix of the potential bare-soil evaporation maps + +- **PrefixET0** is the prefix of the potential (reference) evapotranspiration maps + +- **PrefixLAI** is the prefix of the Leaf Area Index maps + +- **PrefixLAIForest** is the prefix of the forest Leaf Area Index maps + +- **PrefixWaterUse** is the prefix of the [water use maps](https://ec-jrc.github.io/lisflood-model/2_18_stdLISFLOOD_water-use/) (optional) + + + +### Initial conditions + +As with the calibration parameters you can use both maps and single values to define the catchment conditions at the start of a simulation. +Note that a couple of variables can be [initialized internally](https://ec-jrc.github.io/lisflood-code/3_step5_model-initialisation/) in the model. Also, be aware that the initial conditions define the state of the model at *t=(StepStart -1)*. As long as *StepStart* equals 1 this corresponds to *t=0*, but for larger values of *StepStart* this is (obviously) not the case! + +```xml + + ************************************************************** + INITIAL CONDITIONS + (maps or single values) + ************************************************************** + + + + initial overland flow water depth [mm] + + + + + initial snow depth in snow zone A [mm] + + + + + initial snow depth in snow zone B [mm] + + + + + initial snow depth in snow zone C [mm] + + + + + initial Frost Index value + + + + + cumulative interception [mm] + + + + + water in upper store [mm] + + + + + days since last rainfall + + + + + cumulative depression storage [mm] + + + +************************************************************** + The following variables can also be initialized in the model internally. if you want this to happen set them to bogus value of -9999 + ************************************************************** + + + + water in lower store [mm] + -9999: use steady-state storage + + + + + initial cross-sectional area of flow in channel[m2] + -9999: use half bankfull + + + + + initial soil moisture content layer 1 + -9999: use field capacity values + + + + + initial soil moisture content layer 2 + -9999: use field capacity values + + + + + initial soil moisture content layer 3 + -9999: use field capacity values + + + + + initial discharge from previous run for lakes, reservoirs and + transmission loss + only needed for lakes reservoirs and transmission loss + -9999: use discharge of half bankfull + + +``` + +- **WaterDepthInitValue** is the initial amount of water on the soil surface $[mm]$ + +- **SnowCoverInitAValue** is the initial snow cover on the soil surface in elevation zone **A** $[mm]$ + +- **SnowCoverInitBValue** is the initial snow cover on the soil surface in elevation zone **B** $[mm]$ + +- **SnowCoverInitCValue** is the initial snow cover on the soil surface in elevation zone **C** $[mm]$ + +- **FrostIndexInitValue** ([**F**](https://ec-jrc.github.io/lisflood-model/2_05_stdLISFLOOD_frost-index/)) initial value of the frost index $[\frac{°C}{day}]$ + +- **CumIntInitValue** is the initial interception storage $[mm]$ + +- **UZInitValue** is the initial storage in the upper groundwater zone $[mm]$ + +- **DSLRInitValue** ([$D_{slr}$](https://ec-jrc.github.io/lisflood-model/2_08_stdLISFLOOD_soil-evaporation/)) is the initial number of days since the last rainfall event $[days]$ + +- **CumIntSealedInitValue** is the initial value of the depression storage for the sealed part of a pixel $[mm]$ + +- **LZInitValue** is the initial storage in the lower groundwater zone $[mm]$. In order to avoid initialization problems it is possible to let the model calculate a 'steady state' storage that will usually minimize any initialization problems. This feature is described in detail in Chapter 7 of this User Manual. To activate it, set the lfoptions element InitLisflood to 1. + +- **TotalCrossSectionAreaInitValue** is the initial cross-sectional area $[m^2]$ of the water in the river channels (a substitute for initial discharge, which is directly dependent on this). A value of **-9999 ** sets the initial amount of water in the channel to half bankfull. + +- **ThetaInit1Value** is the initial moisture content $[\frac{mm^3} {mm^3}]$ of the superficial soil layer (1a). A value of -**9999** will set the initial soil moisture content to field capacity. + +- **ThetaInit2Value** is the initial moisture content $[\frac{mm^3} {mm^3}]$ of the upper soil layer (1b). A value of -**9999** will set the initial soil moisture content to field capacity. + +- **ThetaInit3Value** is the initial moisture content $[\frac{mm^3} {mm^3}]$ of the lower soil layer (2). A value of -**9999** will set the initial soil moisture content to field capacity. + +- **PrevDischarge** is the initial discharge from previous run $[\frac{m^3} {s}]$ used for lakes, reservoirs and transmission loss (only needed if option is on for lakes or reservoirs or transmission loss). Note that PrevDischarge is discharge as an average over the time step (a flux) . A value of **-9999** sets the initial amount of discharge to equivalent of half bankfull. + +```xml + + ************************************************************** + INITIAL CONDITIONS FOREST + (maps or single values) + ************************************************************** + + + + cumulative interception [mm] + + + + + water in upper store [mm] + + + + + days since last rainfall + + + + + water in lower store [mm] + -9999: use steady-state storage + + + + + initial soil moisture content layer 1 + -9999: use field capacity values + + + + + initial soil moisture content layer 2 + -9999: use field capacity values + + + + + initial soil moisture content layer 3 + -9999: use field capacity values + +``` +CumIntForestInitValue, UZForestInitValue, DSLRForestInitValue, LZForestInitValue, ThetaForestInit1Value, ThetaForestInit2Value, ThetaForestInit3Value are the initial value for the forest part of a pixel. + + +### Using options + +As explained in [Step 0](../2_ESSENTIAL_setting-file/), the 'lfoptions' element gives you additional control over what LISFLOOD is doing. Using options it is possible to switch certain parts of the model on or off. You can decide which output files are reported and which ones aren't. Moreover, you can activate a number of additional model features, such as the simulation of reservoirs and inflow hydrographs. + +A list of all currently implemented options and their corresponding defaults can be found in the [LISFLOOD model documentation](https://ec-jrc.github.io/lisflood-model/). +All currently implemented options are switches (1= on, 0=off). +You can set as many options as you want (or none at all). Note that each option generally requires additional items in the settings file. + +For instance, using the inflow hydrograph option requires an input map and time series, which have to be specified in the settings file. +If you want to report discharge maps at each time step, you will first have to specify under which name they will be written. + +The template settings file that is provided with LISFLOOD always contains file definitions for all optional output maps and time series. +The use of the *output* options is described in detail in [a dedicated section](../4_annex_output-files/). + +Within the 'lfoptions' element of the settings file, each option is defined using a 'setoption' element, which has the attributes 'name' and 'choice' (i.e. the actual value). For example: + +```xml + + + +``` + +### Options to manage input and output files + ++ **NetCDFTimeChunks**: chunking size in the time dimension. Recommended value is “auto" but chunking size can be specified manually or set to “-1" to load the whole time series into memory (very fast but expensive in terms of memory). ++ **MapsCaching** (True or False): option designed for the lisflood calibration. If set to True, all the static maps and forcings will be stored in a cache so that they don't have to be loaded by each lisflood instance. This option sets the value of NetCDFTimeChunks to "-1", meaning that the whole time series in the NetCDF inputs is loaded into memory. ++ **OutputMapsChunks**: this option is used to dump outputs to disk every X steps (default 1). + +### Reference settings file +In order to facilitate the preparation of the settings file, a complete example is provided [here](../3_step3_preparing-setting-file/lisfloodSettings_reference.xml). The user is encouraged to update the paths, the names of the maps and of the tables in the provided template. + +[:top:](#top) diff --git a/docs/3_step3_preparing-setting-file/lisfloodSettings_reference.xml b/docs/3_step3_preparing-setting-file/lisfloodSettings_reference.xml new file mode 100644 index 00000000..3d941084 --- /dev/null +++ b/docs/3_step3_preparing-setting-file/lisfloodSettings_reference.xml @@ -0,0 +1,5805 @@ + + + + + + +#----------------------------------------------------------- +# modelling and reporting options +#----------------------------------------------------------- + + + + # options to turn hydrological modules on/off + + + + + + + + + + + + + + + + + # use inflow data + + + # option to compute indicators + + + # option to initialize Lisflood + + + + # option to read/write NetCDF + + + + + + #----------------------------------------------------------- + # report time series + #----------------------------------------------------------- + # report discharge TS + + + # report gauges and sites + + + + + + + # report reservoirs and lakes + + + + #----------------------------------------------------------- + # report maps + #----------------------------------------------------------- + # report state maps + + + # report end maps + + + # report maps + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +************************************************************** +netCDF parameters +************************************************************** + +!-- Optimization of netCDF I/O through chunking and caching. + +The option "NetCDFTimeChunks" may take the following values: + - "-1" : Load everything upfront + - "[positive integer number]" : Chunk size defined by user + - "auto" : Let xarray to decide + + + + + +The option "MapsCaching" may take the following values: + - "True" : Cache maps during execution + - "False" : No caching + + + + + +The option "OutputMapsChunks" may take the following values: + - "[positive integer number]" : Dump outputs to disk every X steps (default 1) + + + + +************************************************************** +PARALLELISATION WITH NUMBA (USED IN ROUTING AND SOILLOOP) +************************************************************** + + +!-- Parallelisation of using Numba runtime compiled library . +The option "numCPUs_parallelNumba" may take the following values: + - "0" : set to NUMBA_NUM_THREADS Environment Variable + (if NUMBA_NUM_THREADS is not set, will take the number of CPU cores determined by python's multiprocessing.cpu_count()) + - "1" : serial execution (not parallel) + - "2", "3", ... : manual setting of the number of parallel threads. + (if exceeding NUMBA_NUM_THREADS, the value is set to NUMBA_NUM_THREADS) --> + + + +************************************************************** +AREA AND OUTLETS +************************************************************** + + + + +This is necessary when using projected coordinates (x,y) + + + + + + /perm/mo/mocm/proj/efas/xdom/data/staticData/lisflood +Root directory (tables and parameters) + + + + + + /perm/mo/mocm/proj/efas/hprot/staticMaps/areawithdeadsea.map + /perm/mo/mocm/proj/efas/hprot/staticMaps/work/DrinaMask.map + /sbsDrina/DrinaMask.map + /perm/mo/mocm/proj/efas/xdom/data/staticData/lisflood/area + /perm/mo/mocm/proj/efas/hprot/staticMaps/areawithdeadsea.map + /perm/mo/mocm/proj/efas/hprot/sbs/pontelagoscuro_sbs.map +70 40 0.1 -8.6 43.3 # Douro +30 30 0.1 6.0 52.0 +Clone map +col row cellsize xupleft yupleft +300 200 0.1 -15 25 -> Niger +3600 1500 0.1 -180 90 -> World +$(PathRoot)\areamaps\areaEurope.map +$(PathRoot)\areamaps\AreaPo.map +or pcraster maps or netcdf maps +e.g. +Rhine areaLobith.map +Niger areaLokoja.map +Po areaPo.map +Danube areaDanube.map +Sava areaSava.map + + + + + + 4447500 2422500 Pontelagoscuro + 4227500 2437500 Isola + /perm/mo/mocm/proj/efas/hprot/staticMaps/work/pontelagoscuro.nc + /perm/mo/mocm/proj/efas/hprot/staticMaps/ec_outlets.nc + /perm/mo/mocm/proj/efas/xdom/data/staticData/lisflood/outlets.nc" +-7.85 41.15 -7.75 41.15 -7.35 41.15 -7.25 41.15 -7.15 41.15 -7.05 41.15 -5.85 41.75 # Duoro +6.15 51.85 +12.25 44.95 9.95 45.15 # Po +Nominal map with gauge locations (i.e cells for which simulated discharge +is written to file(1,2,3 etc) +lat lon (lat2 lon2 ...) +or pcraster maps or netcdf maps +./mapsNetcdf/maps/outlets_World.map +$(PathMaps)/outlets.map +e.g. +Lobith/Rhine 6.15 51.85 +Bratislava/Danube 17.15 48.15 +Niger/Lokoja 6.75 7.85 0.45 15.65 + + + + + +netcdf template used to copy metadata information for writing netcdf +$(PathEvapo)/$(PrefixE0) + + + + + +latitude map to be used for snow/ice modelling + + + + + +************************************************************** +TIME-RELATED CONSTANTS +************************************************************** + + + + +Calendar convention + + + + + +Reference day and time + + + + + +timestep [seconds] + + + + + +17280 5 times subrouting +21600 4 times +Sub time step used for kinematic wave channel routing [seconds] +Within the model,the smallest out of DtSecChannel and DtSec is used + + + + + +Number of first time step in simulation + + + + + +Number of last time step in simulation + + + + + + 1..9999 +Time steps at which to write model state maps (i.e. only +those maps that would be needed to define initial conditions +for succeeding model run) + + + + + + + + + + +************************************************************** +MONTE CARLO, KALMAN FILTER +************************************************************** + + + + +Number of sample to use in MonteCarlo simulations + + + + + +Number of cores of the computer to use in MonteCarlo simulations +This only works with Linux, if set to 1 no forking will be used + + + + + + +Time steps at which to write model state maps (i.e. only +those maps that would be needed to define initial conditions +for succeeding model run) + + + + + + + + + + + + + + +************************************************************** +CALIBRATION PARAMETERS +with .nc format: than working with smaller sub-areas is possible +************************************************************** + + + +default: 10 +$(PathParams)/params_UpperZoneTimeConstant.nc +Time constant for water in upper zone [days] +This is the average time a water 'particle' remains in the reservoir +if we had a stationary system (average inflow=average outflow) + + + + + +default: 100 +$(PathParams)/params_LowerZoneTimeConstant.nc +Time constant for water in lower zone [days] +This is the average time a water 'particle' remains in the reservoir +if we had a stationary system (average inflow=average outflow) + + + + + +default: 0.5 +$(PathParams)/params_GwPercValue.nc +Maximum rate of percolation going from the Upper to the Lower +response box [mm/day] + + + + + +default: 0.0 +$(PathParams)/params_GwLoss.nc +Maximum percolation rate from the lower groundwater zone [mm/days]. GWLoss +it’s lost beyond the catchment boundaries or to deep groundwater systems. +A value of 0 (closed lower boundary) is recommended as a starting value. + + + + + +threshold value [mm] of the water storage in the lower groundwater zone. +If the water storage in the lower groundwater zone decreases below LZThreshold, +the flow from the lower zone to the nearby rivers (base-flow) stops. + + + + + +default: 0.7 [-] +$(PathParams)/params_b_Xinanjiang.nc +Power in Xinanjiang distribution function [-] + + + + + +default: 3.5 [-] +$(PathParams)/params_PowerPrefFlow.nc +Power that controls increase of proportion of preferential +flow with increased soil moisture storage [-] + + + + + +default: 2.0 [-] +$(PathParams)/params_CalChanMan1.nc +Multiplier [-] applied to Channel Manning's n + + + + + +default: 4.0 [mm C-1 day-1] +$(PathParams)/params_SnowMeltCoef.nc +SRM: 0.45 cm C-1 day-1 ( = 4.50 mm C-1 day-1), Kwadijk: 18 mm C-1 month-1 (= 0.59 mm C-1 day-1) +See also Martinec et al., 1998. + + + + + +default: 3.0 [-] +$(PathParams)/params_CalChanMan2.nc +Multiplier [-] applied to Channel Manning's n for second line of routing + + + + + +default: 1.0 [-] +$(PathParams)/params_LakeMultiplier.nc +Multiplier applied to the lake parameter A + + + + + +default: 0.8 [-] +$(PathParams)/params_adjust_Normal_Flood.nc +adjusting the balance between normal and flood storage +big values (= closer to 1.0 = close to flood) results in keeping the outflow longer at rnormq +Range 0.01 - 0.99 + + + + + +default: 1.0 [-] +$(PathParams)/params_ReservoirRnormqMult.nc +Reservoir rnormq (normal outflow) +fraction of the value in table rnormq.txt range: 0.5 - 2 + + + + + +default: 5.0 [mm/day] (not included in calibration) +Critical amount of available water (expressed in [mm/day]!), above which 'Days Since Last Rain' parameter is +set to 1 + + + + + +PBchange +Multiplier applied to average Q to split into a second line of routing +THIS NEEDS TO BE AMENDED BY ADDING THE RIGHT PATH TO $(PathParams) + + + + + +PBchange +Multiplier applied to ChanBottomWidth + + + + + +Multiplier [] applied to ChanDepthThreshold + + + + + +Multiplier [] applied to ChanSdXdY + + + + + + + +************************************************************** +FILE PATHS +************************************************************** + + + + +Output path (org=$(PathRoot)/out) + + + + + +Path of the initial value maps e.g. lzavin.map (org=$(PathRoot)/outPo) + + + + + + Static maps path + /perm/mo/mocm/proj/efas/xdom/data/staticData/lisflood +Maps path + + + + + +Inflow path + + + + + +Calibration parameter path + + + + + +Tables path + + + + + +Maps instead of tables path + + + + + +Maps instead of tables for soil hydraulics path + + + + + +Maps for transient land use changes every 5 years + + + + + +Maps for land use fractions and related land use maps + + + + + +Water use maps path +$(PathMaps)/waterdemand19902014 + + + + + +./meteoWatch +Meteo path + + + + + +Leaf Area Index maps path + + + + + +variable water fraction maps path + + + + + + + + + +************************************************************** +INITIAL CONDITIONS +(maps or single values) +************************************************************** + + + + +if init. condition are stored as netCDF with different time steps +this variable indicates which time step to use +Either as date e.g. 1/1/2010 or as number e.g. 5 + + + + + +Initial overland flow storage [m3], direct runoff fraction + + + + + +Initial overland flow storage [m3], other fraction + + + + + +Initial overland flow storage [m3], forest fraction + + + + + +initial snow depth in snow zone A [mm] + + + + + +initial snow depth in snow zone B [mm] + + + + + +initial snow depth in snow zone C [mm] + + + + + +initial Frost Index value [degC/day] + + + + + +cumulative interception [mm] + + + + + +water in upper store [mm] + + + + + +days since last rainfall [days] + + + + + + + +************************************************************** +The following variables can also be initialized in the model +internally. if you want this to happen set them to bogus value +of -9999 +************************************************************** + + + + +water in lower store [mm] +-9999: use steady-state storage + + + + + +initial cross-sectional area of flow in channel[m2] +-9999: use half bankfull + + + + + +initial soil moisture content layer 1a (superficial soil layer) [mm3/mm3] +-9999: use field capacity values + + + + + +initial soil moisture content layer 1b (upper soil layer) [mm3/mm3] +-9999: use field capacity values + + + + + +initial soil moisture content layer 2 (lower soil layer) [mm3/mm3] +-9999: use field capacity values + + + + + +initial channel cross-section area [m2] for 2nd routing channel +-9999: use 0 + + + + + +initial lateral inflow for 1st line of routing [m2/s] +-9999: use 0 + + + + + +Initial lake level [m] +-9999 sets initial value to steady-state level + + + + + +Lake inflow at previous routing sub-step (ChanQ(t-1)) [m3/s] +-9999 sets initial value equal to PrevDischarge (ChanQ(t)) + + + + + +Lake outflow at previous routing sub-step (ChanQ(t-1)) [m3/s] +-9999 sets initial value + + + + + +initial discharge [m3/s] from previous run for lakes, reservoirs and transmission loss ChanQ +only needed for lakes reservoirs and transmission loss +-9999: use 0 + + + + + + + + + +************************************************************** +INITIAL CONDITIONS FOREST +(maps or single values) +************************************************************** + + + + +cumulative interception [mm] + + + + + +water in upper groundwater store [mm] + + + + + +days since last rainfall + + + + + +initial soil moisture content [mm3/mm3] layer 1a (superficial soil layer) +-9999: use field capacity values + + + + + +initial soil moisture content [mm3/mm3] layer 1b (upper soil layer) +-9999: use field capacity values + + + + + +initial soil moisture content [mm3/mm3] layer 2 (lower soil layer) +-9999: use field capacity values + + + + + + + + +************************************************************** +INITIAL CONDITIONS IRRIGATION +(maps or single values) +************************************************************** + + + + +cumulative interception [mm] + + + + + +water in groundwater upper store [mm] + + + + + +days since last rainfall + + + + + +initial soil moisture content [mm3/mm3] layer 1a (superficial soil layer) +-9999: use field capacity values + + + + + +initial soil moisture content [mm3/mm3] layer 1b (upper soil layer) +-9999: use field capacity values + + + + + +initial soil moisture content [mm3/mm3] layer 2 (lower soil layer) +-9999: use field capacity values + + + + + + + + +************************************************************** +INITIAL CONDITIONS IMPERVIOUS AREAS +(maps or single values) +************************************************************** + + + + +cumulative interception [mm] + + + + + + + + +************************************************************** +PREFIXES OF METEO AND VEGETATION RELATED VARIABLES +************************************************************** + + + + +prefix precipitation maps + + + + + +prefix average temperature maps + + + + + +prefix E0 maps + + + + + +prefix ES0 maps + + + + + +prefix ET0 maps + + + + + +prefix LAI maps + + + + + +prefix LAI forest maps + + + + + +prefix LAI irrigation maps + + + + + +prefix domestic water use maps + + + + + +prefix livestock water use maps + + + + + +prefix energy water use maps + + + + + +prefix industry water use maps + + + + + +prefix variable water fraction + + + + + + + + + + + +************************************************************** +PARAMETERS RELATED TO EVAPO(TRANSPI)RATION AND Interception +************************************************************** + +Suggested parameterisation strategy: + +- leave all these parameters at their default values. + in some very special cases CalEvaporation may be set to some + value other than one + + + + + +Multiplier [-] applied to potential precipitation rates + + + + + +Multiplier [-] applied to potential evapo(transpi)ration rates + + + + + +Time constant for water in interception store [days] + + + + + +Average extinction coefficient for the diffuse radiation flux +varies with crop from 0.4 to 1.1 (Goudriaan (1977)) + + + + + +maximum depression storage for water on impervious surface +which is not immediatly causing surface runoff [mm] + + + + + + + + + +************************************************************** +SNOW AND FROST RELATED PARAMETERS +************************************************************** + +Suggested parameterisation strategy: + +- estimate SnowFactor from prior data (if available), otherwise use 1 +- use SnowMeltCoef as a calibration constant +- leave all other parameters at default + + + + + +Multiplier [-] applied to precipitation that falls as snow + + + + + +range [mm C-1 day-1] of the seasonal variation +SnowMeltCoef is the average value + + + + + +Average temperature [deg C] at which snow melts + + + + + +Average temperature [deg C] below which precipitation is snow + + + + + +Temperature lapse rate with altitude [C / m] + + + + + +Daily decay coefficient [day-1], (Handbook of Hydrology, p. 7.28) + + + + + +Snow depth reduction coefficient, [cm-1], (HH, p. 7.28) + + + + + +Snow water equivalent, (based on snow density of 450 kg/m3) (e.g. Tarboton and Luce, 1996) + + + + + +Degree Days Frost Threshold (stops infiltration, percolation and capillary rise) +Molnau and Bissel found a value 56-85 for NW USA. + + + + + + + + + +************************************************************** +IRRIGATION AND WATER ABSTRACTION RELATED PARAMETERS +************************************************************** + + + + + + 0.75 +Field application irrigation efficiency [-]: max 1, ~0.90 drip irrigation, ~0.75 sprinkling + + + + + +conveyance efficiency [-]: around 0.80 for average channel + + + + + +IrrigationType (value between 0 and 1) is used here to distinguish between additional adding water until fieldcapacity (value set to 1) or not (value set to 0) + + + + + +Factor [-] to irrigation water demand +More than the transpiration is added e.g to prevent salinisation + + + + + +Annual amount (m3) of treated wastewater reused for irrigation + + + + + +Number of days over which the annual amount of treated wastewater for irrigation is used + + + + + +Consumptive Use (1-Recycling ratio) for livestock water use (0-1) [-] + + + + + +Consumptive Use (1-Recycling ratio) for industrial water use (0-1) [-] + + + + + + # Consumptive Use (1-Recycling ratio) for energy water use (0-1) [-] + # Source: Torcellini et al. (2003) "Consumptive Use for US Power Production" + # map advised by Neil Edwards, Energy Industry + # the UK and small French rivers the consumptive use varies between 1:2 and 1:3, so 0.33-0.50 + # For plants along big rivers like Rhine and Danube the 0.025 is ok + EnergyConsumptiveUseFraction=0.025 + + + + + + Consumptive Use (1-Recycling ratio) for domestic water use (0-1) [-] + Source: EEA (2005) State of Environment + + + + + + 0.2 +$(PathMaps)/leakage.map + Fraction of leakage of public water supply (0=no leakage, 1=100% leakage) + + + + + + The water that is lost from leakage (lost) (0-1) [-] + + + + + + Leakage reduction fraction (e.g. 50% = 0.5 as compared to current Leakage) (baseline=0, maximum=1) [-] + + + + + + Water savings fraction (e.g. 10% = 0.1 as compared to current Use (baseline=0, maximum=1) [-] + scenwsav.map + + + + + + Fraction of water re-used in industry (e.g. 50% = 0.5 = half of the water is re-used, used twice (baseline=0, maximum=1) [-] + scenruse.map + + + + + + + +table with days for each water use maps +1st column: range of days; 2nd column: suffix of wuse map + + + + + +Irrigation crop coefficient [-] + + + + + +Irrigation crop group number [-] + + + + + +Population [units] + + + + + +Population + + + + + +Land Use Mask + + + + + +Reported water use [cu m/s], depending on the availability of discharge + + + + + +Time series of upstream water use at gauging stations + + + + + +Number of sub-steps needed for water use +routine + + + + + + maximum number of loops for calculating the use of water + = distance water is taken for water consuption + + + + + + percentage of water which remains in the channel + e.g. 0.2 -> 20 percent of discharge is not taken out + + + + + + + + + + + + + +************************************************************** +GROUNDWATER RELATED PARAMETERS +************************************************************** + +Suggested parameterisation strategy: + +- leave GwLossFraction at 0 unless prior information show groundwater loss + is important +- use UpperZoneTimeConstant, LowerZoneTimeConstant, + GwPercValue as calibration constants +- calibrate on GwLossFraction if necessary + + + + + + +length of the window used to smooth the LZ zone [number of cell length] + + + + + + $(PathMaps)/gwbodiesNew.map +map of aquifers (0/1), used to smoothen LZ near extraction areas + + + + + + + + + +************************************************************** +EVAPORATION FROM OPEN WATER +************************************************************** + + + + + +Fraction of maximum extend of water + + + + + +Mask with Lakes from GLWD database + + + + + + + + + + + +************************************************************** +TRANSMISSION LOSS PARAMETERS +************************************************************** + +Suggested parameterisation strategy: + +- Use TransSub as calibration constant leave all other parameters at default values + + + + +Transmission loss function parameter + + + + + +PBchange +Transmission loss function parameter + + + + + +PBchange +downstream area taking into account for transmission loss + + + + + +upstream area + + + + + + + + + +************************************************************** +ROUTING PARAMETERS +************************************************************** + +Suggested parameterisation strategy: + +- Use CalChanMan as calibration constant to fine-tune timing of + channel routing, leave all other parameters at default values + + + + + +kinematic wave parameter beta [-]: 0.6 is for broad sheet flow + + + + + +Reference depth of overland flow [mm], used to compute +overland flow Alpha for kin. wave + + + + + +Minimum slope gradient [-] (for kin. wave: slope cannot be 0) + + + + + +Minimum channel gradient [-] (for kin. wave: slope cannot be 0) + + + + + + + + + + +************************************************************** +PARAMETERS RELATED TO NUMERICS +************************************************************** + +Important: do not change, default value of 0.4 generally combines +sufficient numerical accuracy within a limited number of sub-steps + + + + + +Minimum value for Courant condition in soil moisture routine. Always less than or equal to 1. +Small values result in improved numerical accuracy, at the expense of increased +computing time (more sub-steps needed). If reported time series of soil moisture contain +large jumps, lowering CourantCrit should fix this + + + + + + + + +************************************************************** +VARIABLES RELATED TO OPTIONS +These all need to have some (real or bogus) value, +even for options that are not actually used! +************************************************************** + + + + + +************************************************************** +RESERVOIR OPTION +************************************************************** + + + + +Sub time step used for reservoir simulation [s]. Within the model, +the smallest out of DtSecReservoirs and DtSec is used. + + + + + +Initial reservoir fill fraction [-] +-9999 sets initial fill to normal storage limit +if you're not using the reservoir option, enter some bogus value + + + + + + + + +************************************************************** +LAKE OPTION +************************************************************** + + + + +Estimate of average net inflow into lake (=inflow - evaporation) [cu m / s] +Used to calculated steady-state lake level in case LakeInitialLevelValue +is set to -9999 + + + + + + + + + +************************************************************** +POLDER OPTION +************************************************************** + + + + +Weir constant [-] (Do not change!) + + + + + +Initial water level in polder [m] + + + + + + + + + +************************************************************** +DYNAMIC WAVE OPTION +************************************************************** + + + + +Critical Courant number for dynamic wave +value between 0-1 (smaller values result in greater numerical accuracy, +but also increase computational time) + + + + + +Constant head [m] at most downstream pixel (relative to altitude +at most downstream pixel) + + + + + + + + + +************************************************************** +INFLOW HYDROGRAPH (OPTIONAL) +************************************************************** + + + + +OPTIONAL: nominal map with locations of (measured) +inflow hydrographs [cu m / s] + + + + + +OPTIONAL: observed or simulated input hydrographs as +time series [cu m / s] +Note that identifiers in time series correspond to +InflowPoints map (also optional) + + + + + + + + +************************************************************** +PF REPORTING OPTION +************************************************************** + + + + +Maximum capillary head [cm]. This value is used if Theta equals residual soil +moisture content (value of HeadMax is arbitrary). Only needed for pF computation, +otherwise doesn't influence model results at all) + + + + +PF MAPS + + + + +Reported pF soil layer 1a, other fraction + + + + + +Reported pF soil layer 1b, other fraction + + + + + +Reported pF soil layer 2, other fraction + + + + + +Reported pF soil layer 1a, forest fraction + + + + + +Reported pF soil layer 1b, forest fraction + + + + + +Reported pF layer 2, forest fraction + + + + + +Reported pF soil layer 1a, irrigation fraction + + + + + +Reported pF soil layer 1b, irrigation fraction + + + + + +Reported pF soil layer 2, irrigation fraction + + + + + + + + + + + + + + + + + + + + + +This is necessary when using projected coordinates (x,y) + + + + + + + + + +Clone map + + + + + +netcdf template used to copy metadata information for writing netcdf + + + + + +latitude map to be used for snow/ice modelling + + + + + + +************************************************************** +TIMESTEP RELATED PARAMETERS +************************************************************** + + + + +Calendar convention + + + + + +Calendar day is back! +Calendar day number of 1st day in model run +e.g. 1st of January: 1; 1st of June 151 (or 152 in leap year) +Needed to read out LAI tables correctly + + + + + +timestep [seconds] (60*60*24) + + + + + +Sub time step used for kinematic wave channel routing [seconds] +Within the model,the smallest out of DtSecChannel and DtSec is used + + + + + +Number of first time step in simulation + + + + + +Number of last time step in simulation + + + + + + + + +************************************************************** +PARAMETERS RELATED TO EVAPO(TRANSPI)RATION AND Interception +************************************************************** + +Suggested parameterisation strategy: + +- leave all these parameters at their default values. + in some very special cases CalEvaporation may be set to some + value other than one + + + + + +Multiplier applied to potential precipitation rates [-] + + + + + +Multiplier applied to potential evapo(transpi)ration rates [-] + + + + + +Time constant for water in interception store [days] + + + + + +Average extinction coefficient [-] for the diffuse radiation flux +varies with crop from 0.4 to 1.1 (Goudriaan (1977)) + + + + + +Critical amount of available water (expressed in [mm/day]!), above which 'Days Since Last Rain' parameter is +set to 1 + + + + + +maximum depression storage for water on impervious surface +which is not immediatly causing surface runoff [mm] + + + + + + + + + +************************************************************** +SNOW AND FROST RELATED PARAMETERS +************************************************************** + +Suggested parameterisation strategy: + +- estimate SnowFactor from prior data (if available), otherwise use 1 +- use SnowMeltCoef as a calibration constant +- leave all other parameters at default + + + + + +Multiplier applied to precipitation that falls as snow + + + + + +Snowmelt coefficient [mm C-1 day-1)] +See also Martinec et al., 1998. + + + + + +range [mm C-1 day-1] of the seasonal variation +SnowMeltCoef is the average value + + + + + +Average temperature [deg C] at which snow melts + + + + + +Average temperature [deg C] below which precipitation is snow + + + + + +Temperature lapse rate with altitude [deg C / m] + + + + + +Daily decay coefficient [day-1], (Handbook of Hydrology, p. 7.28) + + + + + +Snow depth reduction coefficient, [cm-1], (HH, p. 7.28) + + + + + +Snow water equivalent, (based on snow density of 450 kg/m3) (e.g. Tarboton and Luce, 1996) + + + + + +Degree Days Frost Threshold (stops infiltration, percolation and capillary rise) +Molnau and Bissel found a value 56-85 for NW USA. + + + + + + + + + +************************************************************** +INFILTRATION PARAMETERS +************************************************************** + +Suggested parameterisation strategy: + +- use b_Xinanjiang and PowerPrefFlow as calibration constants + + + + + +Power in Xinanjiang distribution function [-] + + + + + +Power that controls increase of proportion of preferential +flow with increased soil moisture storage [-] + + + + + + + + + +************************************************************** +GROUNDWATER RELATED PARAMETERS +************************************************************** + +Suggested parameterisation strategy: + +- leave GwLossFraction at 0 unless prior information show groundwater loss + is important +- use all other parameters as calibration constants + + + + + +Time constant for water in upper zone [days] + + + + + +Time constant for water in lower zone [days] +This is the average time a water 'particle' remains in the reservoir +if we had a stationary system (average inflow=average outflow) + + + + + +Maximum rate of percolation going from the Upper to the Lower +response box [mm/day] + + + + + +Maximum percolation rate from the lower groundwater zone [mm/days]. GWLoss +it’s lost beyond the catchment boundaries or to deep groundwater systems. +A value of 0 (closed lower boundary) is recommended as a starting value. + + + + + + + + + + +************************************************************** +EVAPORATION FROM OPEN WATER +************************************************************** + + + + + +water use daily maps with a (in this case negative) volume of water [cu m/s] + + + + + +table with days for each water use maps +1st column: range of days; 2nd column: suffix of wuse map + + + + + +Percentage of maximum extend of water + + + + + +Mask with Lakes from GLWD database + + + + + + maximum number of loops for calculating evaporation + = distance water is taken to satisfy the need of evaporation from open water + + + + + +Reported evaporation from open water [mm] + + + + + +Time series of upstream water evaporation from open water at gauging stations + + + + + + + + + + + + +************************************************************** +TRANSMISSION LOSS PARAMETERS +************************************************************** + +Suggested parameterisation strategy: + +- Use TransSub as calibration constant leave all other parameters at default values + + + + + +PBchange +Transmission loss function parameter + + + + + +PBchange +Transmission loss function parameter + + + + + +PBchange +downstream area taking into account for transmission loss + + + + + +upstream area + + + + + + + + +************************************************************** +ROUTING PARAMETERS +************************************************************** + +Suggested parameterisation strategy: + +- Use CalChanMan as calibration constant to fine-tune timing of + channel routing, leave all other parameters at default values + + + + + +Multiplier applied to Channel Manning's n + + + + + +Multiplier applied to Channel Manning's n for second routing line + + + + + +Multiplier applied to average Q to split into a second line of routing + + + + + +Multiplier applied to ChanBottomWidth + + + + + +Multiplier applied to ChanDepthThreshold + + + + + +Multiplier applied to ChanSdXdY + + + + + +kinematic wave parameter: 0.6 is for broad sheet flow + + + + + +Reference depth of overland flow [mm], used to compute +overland flow Alpha for kin. wave + + + + + +Minimum slope gradient (for kin. wave: slope cannot be 0) + + + + + +Minimum channel gradient (for kin. wave: slope cannot be 0) + + + + + + + +************************************************************** +PARAMETERS RELATED TO NUMERICS +************************************************************** + +Important: do not change, default value of 0.4 generally combines +sufficient numerical accuracy within a limited number of sub-steps + + + + + +Minimum value for Courant condition in soil moisture routine. Always less than or equal to 1. +Small values result in improved numerical accuracy, at the expense of increased +computing time (more sub-steps needed). If reported time series of soil moisture contain +large jumps, lowering CourantCrit should fix this + + + + + + + + +************************************************************** +INITIAL CONDITIONS FOR THE WATER BALANCE MODEL +(can be either maps or single values) +************************************************************** + + + + +$(PathMaps)/lzavin.map +$(PathInit)/lzavin.map +Reported map of average percolation rate from upper to +lower groundwater zone (reported for end of simulation) [mm/day] + + + + + +$(PathMaps)/avgdis.map +$(PathInit)/avgdis.map +CHANNEL split routing in two lines +Average discharge map [m3/s] + + + + + +if init condition are stored as netCDF with different time steps +this variable indicates which time step to use +Either as date e.g. 1/1/2010 or as number e.g. 5 + + + + + +Initial overland flow storage [m3], direct runoff fraction + + + + + +Initial overland flow storage [m3], other fraction + + + + + +Initial overland flow storage [m3], forest fraction + + + + + +initial snow depth in snow zone A [mm] + + + + + +initial snow depth in snow zone B [mm] + + + + + +initial snow depth in snow zone C [mm] + + + + + +initial Frost Index value [degC/day] + + + + + +cumulative interception [mm] + + + + + +water in groundwater upper store [mm] + + + + + +days since last rainfall + + + + + + + +************************************************************** +The following variables can also be initialized in the model +internally. if you want this to happen set them to bogus value +of -9999 +************************************************************** + + + + +water in groundwater lower store [mm] +-9999: use steady-state storage + + + + + +initial cross-sectional area of flow in channel[m2] +-9999: use half bankfull + + + + + +initial soil moisture content [mm3/mm3] layer 1a (superficial layer) +-9999: use field capacity values + + + + + +initial soil moisture content [mm3/mm3] layer 1b (upper layer) +-9999: use field capacity values + + + + + +initial soil moisture content [mm3/mm3] layer 2 (lower layer) +-9999: use field capacity values + + + + + +initial channel cross-section area [m2] for 2nd routing channel +-9999: use 0 + + + + + +initial lateral inflow for 1st line of routing [m2/s] +-9999: use 0 + + + + + +initial discharge [m3/s] from previous run for lakes, reservoirs and transmission loss +only needed for lakes reservoirs and transmission loss +-9999: use 0 + + + + + + + + + +************************************************************** +INITIAL CONDITIONS FOREST +(maps or single values) +************************************************************** + + + + +cumulative interception [mm] + + + + + +water in groundwater upper store [mm] + + + + + +days since last rainfall for forest fraction + + + + + +initial soil moisture content [mm3/mm3] layer 1a (superficial layer) +-9999: use field capacity values + + + + + +initial soil moisture content [mm3/mm3] layer 1b (upper layer) +-9999: use field capacity values + + + + + +initial soil moisture content [mm3/mm3] layer 2 (lower layer) +-9999: use field capacity values + + + + + +cumulative depression storage [mm] + + + + + + + + +************************************************************** +INITIAL CONDITIONS IRRIGATION +(maps or single values) +************************************************************** + + + + +cumulative interception [mm] + + + + + +water in groundwater upper store [mm] + + + + + +days since last rainfall for irrigation + + + + + +initial soil moisture content [mm3/mm3] layer 1a (superficial layer) +-9999: use field capacity values + + + + + +initial soil moisture content [mm3/mm3] layer 1b (upper layer) +-9999: use field capacity values + + + + + +initial soil moisture content [mm3/mm3] layer 2 (lower layer) +-9999: use field capacity values + + + + + + + + + + +************************************************************** +INPUT METEOROLOGICAL AND VEGETATION TIMESERIES AS MAPS +************************************************************** + + + + +precipitation [mm/day] + + + + + +average daily temperature [C] + + + + + +daily reference evaporation (free water) [mm/day] + + + + + +daily reference evaporation (soil) [mm/day] + + + + + +daily reference evapotranspiration (crop) [mm/day] + + + + + +leaf area index [m2/m2] + + + + + +leaf area index [m2/m2] + + + + + +leaf area index [m2/m2] + + + + + +table with days for each LAI maps +1st column: range of days; 2nd column: suffix of LAI map + + + + + + + + +************************************************************** +INPUT WATER USE MAPS AND PARAMETERS +************************************************************** + + + + +table with days for each water use maps +1st column: range of days; 2nd column: suffix of wuse map + + + + + +Domestic water abstraction daily maps [mm] + + + + + +Livestock water abstraction daily maps [mm] + + + + + +Energy water abstraction daily maps [mm] + + + + + +Industry water abstraction daily maps [mm] + + + + + +Consumptive Use (1-Recycling ratio) for livestock water use (0-1) + + + + + +Consumptive Use (1-Recycling ratio) for industrial water use (0-1) + + + + + + # Consumptive Use (1-Recycling ratio) for energy water use (0-1) + # Source: Torcellini et al. (2003) "Consumptive Use for US Power Production" + # map advised by Neil Edwards, Energy Industry + # the UK and small French rivers the consumptive use varies between 1:2 and 1:3, so 0.33-0.50 + # For plants along big rivers like Rhine and Danube the 0.025 is ok + EnergyConsumptiveUseFraction=0.025 + + + + + + Consumptive Use (1-Recycling ratio) for domestic water use (0-1) + Source: EEA (2005) State of Environment + + + + + + Fraction of leakage of public water supply (0=no leakage, 1=100% leakage) + + + + + + The water that is lost from leakage (lost) (0-1) + + + + + + Leakage reduction fraction (e.g. 50% = 0.5 as compared to current Leakage) (baseline=0, maximum=1) + + + + + + Water savings fraction (e.g. 10% = 0.1 as compared to current Use (baseline=0, maximum=1) + scenwsav.map + + + + + + Fraction of water re-used in industry (e.g. 50% = 0.5 = half of the water is re-used, used twice (baseline=0, maximum=1 + scenruse.map + + + + + + +Field application irrigation efficiency max 1, ~0.90 drip irrigation, ~0.75 sprinkling + + + + + +conveyance efficiency, around 0.80 for average channel + + + + + +IrrigationType (value between 0 and 1) is used here to distinguish between additional adding water until fieldcapacity (value set to 1) or not (value set to 0) + + + + + +Factor to irrigation water demand +More than the transpiration is added e.g to prevent salinisation + + + + + +Annual amount (m3) of treated wastewater reused for irrigation + + + + + +Number of days over which the annual amount of treated wastewater for irrigation is used + + + + + +Irrigation crop coefficient + + + + + +Irrigation crop group number + + + + + +Population + + + + + +Population + + + + + +Land Use Mask + + + + + +Reported water use [cu m/s], depending on the availability of discharge + + + + + +Time series of upstream water use at gauging stations + + + + + +Number of sub-steps needed for water use +routine + + + + + + maximum number of loops for calculating the use of water + = distance water is taken for water consuption + + + + + + percentage of water which remains in the channel + e.g. 0.2 -> 20 percent of discharge is not taken out + + + + + + + + + + + + + +************************************************************** +RICE IRRIGATION +************************************************************** + + + + + +water amount in mm per day +10 mm for 10 days (total 10cm water) + + + + + +FAO: percolation for heavy clay soils: PERC = 2 mm/day + + + + + +map with starting day of the year + + + + + +map with starting day of the year + + + + + +map with starting day of the year + + + + + +map with starting day of the year + + + + + + + + +************************************************************** +REPORTED OUTPUT MAPS +************************************************************** + + + + +Reported discharge [cu m/s] (average over the model timesteps) (AvgDis) + + + + + +Reported Topsoil moisture [%] + + + + + +Reported Topsoil moisture [%] + + + + + +Reported discharge [cu m/s] at the end of a timestep + + + + + +Reported discharge [cu m/s] but cut by a discharge mask map + + + + + +Reported water level [m] % False by default + + + + + +STATE VARIABLES AT SELECTED TIME STEPS +ONLY FOR INITIALISATION OF SUCCEEDING RUNS +REPORTING TIME STEPS SET THROUGH "ReportSteps" OPTION + + + + +Reported volumetric soil moisture content for +soil layer 1a (superficial layer) [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for +soil layer 1b (upper layer) [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for +soil layer 2 (lower layer) [V/V] [mm3/mm3] + + + + + +Reported storage in upper response box [mm] + + + + + +Reported storage in lower response box [mm] + + + + + +Reported days since last rain + + + + + +Reported water depth + + + + + +Reported overland flow water volume [m3] for direct fraction on catchment surface + + + + + +Reported overland flow water volume [m3] for other fraction on catchment surface + + + + + +Reported overland flow water volume [m3] for forest fraction on catchment surface + + + + + +Reported chan cross-section area [m2] + + + + + +Reported snow cover in snow zone A [mm] + + + + + +Reported snow cover in snow zone B [mm] + + + + + +Reported snow cover in snow zone C [mm] + + + + + +Reported frost index [degC/day] + + + + + +Reported interception storage [mm] + + + + + + +Reported cross section area 2nd line of routing [m2] + + + + + +Reported channel side flow [m2/s] + + + + + +Reported istantaneous discharge at end of computation step [cu m/s] ChanQ + + + + + +Reported days since last rain + + + + +Reported interception storage [mm] + + + + + +Reported volumetric soil moisture content for +soil layer 1a (superficial layer) [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for +soil layer 1b (upper layer) [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for +soil layer 2 (lower layer) [V/V] [mm3/mm3] + + + + + +Reported storage in upper response box [mm] + + + + + +cumulative interception [mm] + + + + + +Reported days since last rain + + + + +Reported interception storage [mm] + + + + + +Reported volumetric soil moisture content for +soil layer 1a (superficial layer) [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for both +soil layer 1b (upper layer) [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for both +soil layer 2 (lowerupper layer) [V/V] [mm3/mm3] + + + + + +Reported storage in upper response box [mm] + + + + + +Reported transpiration maps, other fraction [mm] + + + + + +Reported transpiration maps, forest fraction [mm] + + + + + +Reported transpiration maps, irrigated fraction [mm] + + + + + +Reported transpiration maps, weighted sum over the fractions of each pixel [mm] + + + + + + + + +"END" MAPS, AKA REPORTED OUTPUT MAPS CALLED "END" +Same as above, but always at last time step +Support for these "end" maps will most likely be +discontinued some time soon + + + + +Reported volumetric soil moisture content for +soil layer 1a (superficial layer) [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for both +soil layer 1b (upper layer) [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for both +soil layer 2 (lower layer) [V/V] [mm3/mm3] + + + + + +Reported storage in upper response box [mm] + + + + + +Reported storage in lower response box [mm] + + + + + +Reported days since last rain + + + + + +Reported water depth [m] + + + + + +Reported overland flow water volume [m3] for direct fraction on catchment surface + + + + + +Reported overland flow water volume [m3] for other fraction on catchment surface + + + + + +Reported overland flow water volume [m3] for forest fraction on catchment surface + + + + + +Reported chan cross-section area [m2] + + + + + +Reported snow cover in snow zone A [mm] + + + + + +Reported snow cover in snow zone B [mm] + + + + + +Reported snow cover in snow zone C [mm] + + + + + +Reported frost index [degC/day] + + + + + +Reported interception storage [mm] + + + + + +Reported lake level [m] + + + + + +Reported lake inflow at previous routing sub-step (ChanQ(t-1)) [m3/s] +-9999 sets initial value equal to PrevDischarge (ChanQ(t)) + + + + + +Reported lake outflow at previous routing sub-step (ChanQ(t-1)) [m3/s] +-9999 sets initial value + + + + + +Reported lake storage [m3] + + + + + + +Reported reservoir filling [-] + + + + + +Reported cross section area 2nd line of rounting [m2] + + + + + +Reported channel side flow [m2/s] + + + + + +Reported istantaneous discharge at end of computation step [cu m/s] ChanQ + + + + + +Reported discharge [cu m/s] (average over the model timesteps) (AvgDis) + + + + + +Reported days since last rain + + + + +Reported interception storage [mm] + + + + +Reported volumetric soil moisture content for +soil layer 1a (superficial layer) [V/V] [mm3/mm3] + + + + +Reported volumetric soil moisture content for both +soil layer 1b (upper layer) [V/V] [mm3/mm3] + + + + +Reported volumetric soil moisture content for both +soil layer 2 (lower layer) [V/V] [mm3/mm3] + + + + + +Reported storage in upper response box [mm] + + + + + +cumulative interception [mm] + + + + + + +Reported days since last rain + + + + +Reported interception storage [mm] + + + + +Reported volumetric soil moisture content for +soil layer 1a (superficial layer) [V/V] [mm3/mm3] + + + + +Reported volumetric soil moisture content for both +soil layer 1b (upper layer) [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for both +soil layer 1c (lower layer) [V/V] [mm3/mm3] + + + + + +Reported storage in upper response box [mm] + + + + + + + + +INDIVIDUAL DRIVING METEOROLOGICAL VARIABLES (AT EVERY TIME STEP) +ONLY IF REPORTING OF EACH RESPECTIVE VARIABLE IS +SWITCHED ON (DEFAULT: ALL SWITCHED OFF) +Note reporting is done as a quantity per time step, not as +an intensity (as in meteo input!) + + + + +Precipitation [mm per time step] + + + + + +Average DAILY temperature [degrees C] + + + + + +Potential reference evapotranspiration [mm per time step] + + + + + +Potential evaporation from bare soil surface [mm per time step] + + + + + +Potential evaporation from open water surface [mm per time step] + + + + + + + +INDIVIDUAL STATE VARIABLES (AT EVERY TIME STEP) +ONLY IF REPORTING OF EACH RESPECTIVE VARIABLE IS +SWITCHED ON (DEFAULT: ALL SWITCHED OFF) + + + + +Reported volumetric soil moisture content for +soil layer 1a (superficial layer) [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for +soil layer 1b (upper layer) [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for +soil layer 2 (lower layer) [V/V] [mm3/mm3] + + + + + +Reported storage in upper response box [mm] + + + + + +Reported storage in lower response box [mm] + + + + + +Reported storage in lower response box [mm] + + + + + +Reported storage in lower response box [mm] + + + + + +Reported storage in lower response box [mm] + + + + + +Reported storage in lower response box [mm] + + + + + +Reported days since last rain + + + + + +Reported water depth [m] + + + + + +Reported overland flow water volume [m3] for direct runoff fraction on catchment surfac + + + + + +Reported overland flow water volume [m3] for other fraction on catchment surfac + + + + + +Reported overland flow water volume [m3] for forest fraction on catchment surfac + + + + + +Reported channel cross-section area [m2] + + + + + +Reported snow cover [mm] + + + + + +Reported frost index [degC/day] + + + + + +Reported interception storage, other fraction [mm] + + + + + + +Reported days since last rain + + + + + +Reported interception storage, forest fraction [mm] + + + + + +Reported volumetric soil moisture content for +soil layer 1a (superficial layer) [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for both +soil layer 1b (upper layer) [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for both +soil layer 2 (lower layer) [V/V] [mm3/mm3] + + + + + +Reported storage in upper response box [mm] + + + + + + +INDIVIDUAL RATE VARIABLES (AT EVERY TIME STEP) +ONLY IF REPORTING OF EACH RESPECTIVE VARIABLE IS +SWITCHED ON (DEFAULT: ALL SWITCHED OFF) + + + + +Reported rain (excluding snow)[mm] + + + + + +Reported snow (excluding rain)[mm] + + + + + +Reported snowmelt [mm] + + + + + +Reported interception [mm] + + + + + +Reported transpiration [mm] + + + + + +Reported soil evaporation [mm] + + + + + +Reported evaporation of intercepted water [mm] + + + + + +Reported actual evapotranspiration [mm] + + + + + +Reported leaf drainage [mm] + + + + + +Reported infiltration [mm] + + + + + +Reported preferential flow [mm] + + + + + +Reported percolation from soil layer 1a to soil layer 1b, other fraction [mm] + + + + + +Reported percolation from soil layer 1a to soil layer 1b, forest fraction [mm] + + + + + +Reported percolation from soil layer 1a to soil layer 1b, irrigation fraction [mm] + + + + + +Reported percolation from soil layer 1b to soil layer 2, other fraction [mm] + + + + + +Reported percolation from soil layer 1b to soil layer 2, forest fraction [mm] + + + + + +Reported percolation from soil layer 1b to soil layer 2, irrigation fraction [mm] + + + + + +Reported seepage to groundwater(from soil layer 2 to groundwater), other fraction [mm] + + + + + +Reported seepage to groundwater(from soil layer 2 to groundwater), forest fraction [mm] + + + + + +Reported seepage to groundwater(from soil layer 2 to groundwater), irrigation fraction [mm] + + + + + +Reported seepage to groundwater(from soil layer 2 to groundwater), weighted sum over the fraction of each pixel [mm] + + + + + +Reported available groundwater LZ+ GWLoss [mm] + + + + + +Reported surface runoff [mm] + + + + + +Reported upper zone outflow [mm] + + + + + +Reported lower zone outflow [mm] + + + + + +Reported fast runoff = surface + UZ [mm] + + + + + +Reported GWloss [mm] + + + + + +Reported total runoff [mm] + + + + + +Reported total runoff that enters the channel: groundwater + surface runoff [mm] + + + + + +Reported Direct Runoff [mm] + + + + + +Reported FlowVelocityMSecMaps [m/s] + + + + + +Reported TravelDistance [m] + + + + + +Reported percolation from upper to lower groundwater zone [mm] + + + + + + +Reported evaporation of intercepted water [mm] + + + + + +Reported soil evaporation [mm] + + + + + +Reported leaf drainage Forest[mm] + + + + + +Reported interception forest [mm] + + + + + +Reported infiltration [mm] + + + + + +Reported transpiration forest [mm] + + + + + +Reported preferential flow [mm] + + + + + +Reported percolation from 1st to 2nd soil layer [mm] + + + + + +Reported seepage to groundwater[mm] + + + + + +Reported upper zone outflow [mm] + + + + + +Reported upper zone outflow [mm] + + + + + +Reported percolation from upper to lower zone [mm] + + + + + +Reported loss from lower zone [mm] + + + + + +Reported loss from lower zone [mm] + + + + + +Reported volumetric soil moisture content for +soil layer 1a [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for both +soil layer 1b [V/V] [mm3/mm3] + + + + + +Reported volumetric soil moisture content for both +soil layer 2 [V/V] [mm3/mm3] + + + + + + + + +MISCELLANEOUS OUTPUT MAPS AND TIME SERIES + + + + +Time series of average percolation rate from upper to +lower groundwater zone (reported at sites) [mm/day] + + + + + +Time series of average percolation rate from upper to +lower groundwater zone (average for upstream area of each gauge) [mm/day] + + + + + +Reported number of days in simulation with soil moisture stress [days] + + + + + +Reported number of days in simulation with soil moisture stress for forest fraction [days] + + + + + +Reported soil transpiration reduction factor [-] for other landuse +values below 1 indicate soil moisture stress + + + + + +Reported soil transpiration reduction factor [-] +values below 1 indicate soil moisture stress + + + + + + + + + + +************************************************************** +REPORTED OUTPUT TIME SERIES +************************************************************** + + + + +Reported discharge [cu m/s] + + + + + +Reported discharge over last routing sub-step [cu m/s] + + + + + +Reported water level [m] + + + + + +OUTPUT AT SITES: STATE VARIABLES + + + + +Water depth on soil surface [mm] + + + + + +Depth of snow cover on soil surface [mm] + + + + + +Water stored as interception [mm] + + + + + + Soil moisture layer 1a [cu mm / cu mm] + + + + + + Soil moisture layer 1b [cu mm / cu mm] + + + + + + Soil moisture layer 2 [cu mm / cu mm] + + + + + +Soil moisture layer 1a [cu mm / cu mm] + + + + + +Soil moisture lower layer [cu mm/cu mm] + + + + + +Soil moisture layer 1b [cu mm / cu mm] + + + + + +Soil moisture layer 2 [cu mm / cu mm] + + + + + +Storage in upper groundwater zone [mm] + + + + + +Storage in lower groundwater zone [mm] + + + + + +Days since last rain [days] + + + + + +Frost index [degC/day] + + + + + +Days since last rain [days] + + + + + + + + +OUTPUT AT SITES: RATE VARIABLES + + + + +Rain (excluding snow) [mm] + + + + + +Snow (excluding rain) [mm] + + + + + +Reported snowmelt [mm] + + + + + +Reported interception [mm] + + + + + +Reported transpiration [mm] + + + + + +Reported soil evaporation [mm] + + + + + +Reported evaporation from interception storage [mm] + + + + + +Reported leaf drainage [mm] + + + + + +Reported infiltration [mm] + + + + + +Reported preferential flow [mm] + + + + + +Reported percolation from 1st to 2nd soil layer [mm] + + + + + +Reported seepage to groundwater[mm] + + + + + +Reported surface runoff [mm] + + + + + +Reported upper zone outflow [mm] + + + + + +Reported lower zone outflow [mm] + + + + + +Reported total runoff [mm] + + + + + +Reported percolation from upper to lower zone [mm] + + + + + +Reported loss from lower zone [mm] + + + + + + + +AVERAGE VALUES OF METEOROLOGICAL FORCING VARIABLES +UPSTREAM OF GAUGES +(only if repMeteoUpsGauges option is activated) + + + + +Precipitation [mm/time step] + + + + + +Average temperature [deg C] + + + + + +Reference evapotranspiration [mm/time step] + + + + + +Potential soil evaporation [mm/time step] + + + + + +Potential open water evaporation [mm/time step] + + + + + + + +AVERAGE VALUES OF MODEL STATE VARIABLES +UPSTREAM OF GAUGES +(only if repStateUpsGauges option is activated) + + + + +Water depth on soil surface [mm] + + + + + +Depth of snow cover on soil surface [mm] + + + + + +Water stored as interception [mm] + + + + + +Storage in upper groundwater zone [mm] + + + + + +Storage in lower groundwater zone [mm] + + + + + +Days since last rain [days] + + + + + +Frost index [degC/day] + + + + + +Days since last rain [days] + + + + + + + + +AVERAGE VALUES OF MODEL RATE VARIABLES +UPSTREAM OF GAUGES +(only if repRateUpsGauges option is activated) + + + + +Rain (excluding snow) [mm] + + + + + +Snow (excluding rain) [mm] + + + + + +Snow melt [mm] + + + + + +Interception [mm] + + + + + +Actual transpiration [mm] + + + + + +Actual evaporation [mm] + + + + + +Evaporation from interception storage [mm] + + + + + +Leaf drainage [mm] + + + + + +Infiltration [mm] + + + + + +Preferential flow [mm] + + + + + +Percolation upper to lower soil layer [mm] + + + + + +Seepage from lower soil layer to groundwater [mm] + + + + + +Surface runoff [mm] + + + + + +Outflow from upper groundwater zone (to channel) [mm] + + + + + +Outflow from lower groundwater zone (to channel) [mm] + + + + + +Total runoff [mm] + + + + + +Reported percolation from upper to lower groundwater zone [mm] + + + + + +Reported loss from lower zone [mm] + + + + + + + +NUMERICS + + + + +Reported mass balance error at outlet [cu m] + + + + + +Reported mass balance error at outlet (as mm water slice) + + + + + +Reported mass balance error due to the split routing module, for each catchment [m3] + + + + + +Reported discharge error at the outlet as a consequence of the mass balance error within the split routing module, for each catchment [m3/s] + + + + + +Reported ratio between the mass balance error and the water volume storage, for each catchment [m3/m3] + + + + + +Average value of the sum of the fractions within a catchment: this value must be 1.0 in order to avoid mass balace errors! [-] + + + + + +Number of cells with Theta lower than +residual soil moisture content +(should ALWAYS be zero, if not something is +seriously wrong!!!) +TEST ONLY!! REMOVE OR HIDE IN FINAL VERSION!! + + + + + +Number of cells with Theta lower than +residual soil moisture content +(should ALWAYS be zero, if not something is +seriously wrong!!!) +TEST ONLY!! REMOVE OR HIDE IN FINAL VERSION!! + + + + + +Number of sub-steps needed for soil moisture +routine + + + + + + + + + +************************************************************** +BASE INPUT MAPS AND TABLES +************************************************************** + + + + +************************************************************** +TOPOGRAPHY MAPS +************************************************************** + + + + +$(PathMaps)/ldd.map +local drain direction map (1-9) + + + + + +slope gradient [-] (0.50 -> tangent=0.5, angle=26.5 degrees) + + + + + +Elevation standard deviation [m], i.e. altitude difference elevation within pixel. +Used for sub-pixel modelling of snow accumulation +and melt + + + + + +outlets.map +Nominal map with gauge locations (i.e cells for which simulated discharge +is written to file(1,2,3 etc) + + + + + +map with monitoring sites (1,2,3 etc) + + + + + +optional map with pixel length [m], only needed in case map attributes +are not in [m] (e.g. lat / lon systems) + + + + + +optional map with pixel area [m2], only needed in case map attributes +are not in [m] (e.g. lat / lon systems) + + + + + + + + + +************************************************************** +SOIL PARAMETERS +************************************************************** + +Suggested parameterisation strategy: + +- use b_Xinanjiang and PowerPrefFlow as calibration constants + + + + + +Soil depth for 1st layer: 1a (superficial layer) +Minimum Soil Depth [mm] for superficial soil layer +For Europe it is 50 mm +For Africa it is 200 mm + + + + + +Soil depth for 2nd layer: 1b (upper layer) +Minimum Soil Depth [mm] for second soil layer + + + + + +Soil depth for 2nd layer: 2 (lower layer) +Minimum Soil Depth [mm] for second soil layer + + + + + +Soil depth for 1st layer: 1a +Minimum Soil Depth [mm] for upper soil layer +For Europe it is 50 mm +For Africa it is 200 mm + + + + + +Soil depth for 2nd layer: 1b +Minimum Soil Depth [mm] for lower soil layer + + + + + +Soil depth for 2nd layer: 2 +Minimum Soil Depth [mm] for lower soil layer 300 + + + + + + + + +************************************************************** +LAND USE RELATED MAPS AND TABLES +************************************************************** + + + + +$(PathMapsLanduse)/fracsealed.map +urban area (0-1) + + + + + +stack of Direct Runoff fraction maps (0-1) + + + + + +$(PathMapsLanduse)/fracforest.map +forest fraction of a pixel (0-1) + + + + + +$(PathMapsLandUseChange)/ +stack of forest fraction maps (0-1) + + + + + +$(PathMapsLanduse)/fracwater.map +forest fraction of a pixel (0-1) + + + + + +$(PathMapsLandUseChange)/ +stack of water fraction maps (0-1) + + + + + +$(PathMapsLanduse)/fracother.map +forest fraction of a pixel (0-1) + + + + + +$(PathMapsLandUseChange)/ +stack of other fraction maps (0-1) + + + + + +$(PathMapsLanduse)/fracirrigated.map +irrigated area fraction of a pixel (0-1) + + + + + +$(PathMapsLandUseChange)/ +stack of Irrigation fraction maps (0-1) + + + + + +$(PathMapsLanduse)/fracDrained.map +drained fraction from irrigated area (0-1) + + + + + +rice fraction of a pixel (0-1) + + + + + +stack of rice fraction maps (0-1) + + + + + +groundwater used fraction of a pixel (0-1) + + + + + +NonConventionalWaterUsed (0-1) + + + + + +lake and reservoir water used, fraction of a pixel (0-1) + + + + + +$(PathMaps)/eflow.map +EFlowThreshold is map with m3/s discharge, e.g. the 10th percentile discharge of the baseline run + + + + + +table with crop coefficient for each land use; values ranging from 0.75 to 1.25; +source: Supit, p.83 CFET + + + + + +table with crop group number; table 6.1 and 6.2 in WOFOST 6.0, Supit, 1994: p. 86 + + + + + +$(PathMapsTables)/manngs_2000_250m.map +table with Manning's roughness [m^(1/3) s^(-1)] for each CORINE landcover class + + + + + +table with crop coefficient for each land use; values ranging from 0.75 to 1.25; +source: Supit, p.83 CFET + + + + + +table with crop group number; table 6.1 and 6.2 in WOFOST 6.0, Supit, 1994: p. 86 + + + + + +$(PathMapsTables)/manngs_2000_250m.map +table with Manning's roughness [m^(1/3) s^(-1)] for each CORINE landcover class + + + + + + + + + +************************************************************** +Variable Channel NoSubStepChannel +************************************************************** + + + + +UpArea do be included in max. celerity + + + + + +variable Number of sub steps for the kinematic wave routing + + + + +************************************************************** +CHANNEL MAPS +************************************************************** + + + + +Boolean map with value 1 at channel pixels and 0 at +all other pixels +IMPORTANT: IF NON-CHANNEL PIXELS HAVE MISSING VALUES +THEN THIS MAY RESULT IN INCORRECT RESULTS + + + + + +Channel gradient (fraction, dy/dx) + + + + + +Channel Manning's n [m^(1/3) s^(-1)] + + + + + +Channel length [m] + + + + + +Channel bottom width [m] + + + + + +Channel side slope, expressed as gradient +!! expressed as dx/dy !!! (NOT dy/dx, which would perhaps be more logical) + + + + + +Floodplain Width [m] + + + + + +Bankfull channel depth [m] + + + + + + + +************************************************************** +TABLES WITH TOPSOIL SOIL PHYSICAL PARAMETERS (HYPRES) +Each parameter is defined for upper (1a and 1b) and +lower (2) soil layers +************************************************************** + + + + +Soil moisture content at saturation [V/V] [mm3/mm3] for soil layer 1a (superficial soil layer) + + + + + +Soil moisture content at saturation [V/V] [mm3/mm3] for soil layer 1b (upper soil layer) + + + + + +Soil moisture content at saturation [V/V] [mm3/mm3] for soil layer 2 (lower soil layer) + + + + + +Residual soil moisture content [V/V] [mm3/mm3] for soil layer 1a (superficial soil layer) + + + + + +Residual soil moisture content [V/V] [mm3/mm3] for soil layer 1b (upper soil layer) + + + + + +Residual soil moisture content [V/V] [mm3/mm3] for soil layer 2 (lower soil layer) + + + + + +Pore-size index (Van Genuchten m and n are calculated from this) +Lambda is acually 1-n [-] + + + + + +Pore-size index (Van Genuchten m and n are calculated from this) +Lambda is acually 1-n [-] + + + + + +Pore-size index (Van Genuchten m and n are calculated from this) +Lambda is acually 1-n [-] + + + + + +Van Genuchten parameter Alpha [1/cm] for soil layer 1a (superficial soil layer) + + + + + +Van Genuchten parameter Alpha [1/cm] for soil layer 1b (upper soil layer) + + + + + +Van Genuchten parameter Alpha [1/cm] for soil layer 2 (lower soil layer) + + + + + +Saturated conductivity [mm/day] for soil layer 1a (superficial soil layer) + + + + + +Saturated conductivity [mm/day] for soil layer 1b (upper soil layer) + + + + + +Saturated conductivity [mm/day] for soil layer 2 (lower soil layer) + + + + + + + +************************************************************** +TABLES WITH TOPSOIL SOIL PHYSICAL PARAMETERS (HYPRES) for Forest +Each parameter is defined for 1a and 1b +Normal parameter is taken for the lower soil layer +************************************************************** + + + + +Soil moisture content at saturation [V/V] [mm3/mm3] for soil layer 1a (superficial soil layer) + + + + + +Soil moisture content at saturation [V/V] [mm3/mm3] + + + + + +Residual soil moisture content [V/V] [mm3/mm3] for soil layer 1a (superficial soil layer) + + + + + +Residual soil moisture content [V/V] [mm3/mm3] for soil layer 1b (upper soil layer) + + + + + +Pore-size index (Van Genuchten m and n are calculated from this) for soil layer 1a (superficial soil layer) +Lambda is acually 1-n [-] for soil layer 1b (upper soil layer) + + + + + +Pore-size index (Van Genuchten m and n are calculated from this) +Lambda is acually 1-n [-] for soil layer 1b (upper soil layer) + + + + + +Van Genuchten parameter Alpha [1/cm] for soil layer 1a (superficial soil layer) + + + + + +Van Genuchten parameter Alpha [1/cm] for soil layer 1b (upper soil layer) + + + + + +Saturated conductivity [mm/day] for soil layer 1a (superficial soil layer) + + + + + +Saturated conductivity [mm/day] for soil layer 1b (upper soil layer) + + + + + + + + + + + +************************************************************** +RESERVOIRS (if used ) +Input maps +************************************************************** + + + + +Sub time step used for reservoir simulation [s]. Within the model, +the smallest out of DtSecReservoirs and DtSec is used. + + + + + +Map with location of reservoirs (number) + + + + + +Initial reservoir storage (fraction) + + + + + +Input tables + + + + +Total reservoir storage capacity [m3] + + + + + +Conservative reservoir storage (fraction, typically 0.07) + + + + + +Normal reservoir storage limit (fraction, typically 0.65) + + + + + +Flood reservoir storage limit (fraction, typically 0.90) + + + + + +Non damaging reservoir outflow Q [m3 / s] + + + + + +Normal outflow Q [m3 / s] + + + + + +Minimum reservoir outflow Q [m3 / s] + + + + +Output time series + + + + +name of output TSS file with Reservoir Inflow + + + + + +name of output TSS file with Reservoir Outflow + + + + + +name of output TSS file with Reservoir Filling + + + + + +name of output TSS file with Reservoir storage [m3] + + + + + + +name of output map(s) with Reservoir Filling + + + + + +adjusting the balance between normal and flood storage [-] +big values (= closer to 1.0 = close to flood) results in keeping the outflow longer at rnormq + + + + + +Multiplier [-] for rservoir rnormq (normal outflow) +fraction of the value in table rnormq.txt range: 0.5 - 2 + + + + + + + + +************************************************************** +LAKES (if used ) +Input maps +************************************************************** + + + + +Map with location of lakes + + + + + +Initial lake level [m] +-9999 sets initial value to steady-state level + + + + + +Lake inflow at previous routing sub-step (ChanQ(t-1)) [m3/s] +-9999 sets initial value equal to PrevDischarge (ChanQ(t)) + + + + + +Lake outflow at previous routing sub-step (ChanQ(t-1)) [m3/s] +-9999 sets initial value + + + + + +Estimate of average net inflow into lake (=inflow - evaporation) [m3 / s] +Used to calculated steady-state lake level in case LakeInitialLevelValue +is set to -9999 + + + + +Input tables + + + + +Lake surface area [m2] + + + + + +Lake parameter A [m/s] + + + + + +Multiplier applied to the lake parameter A + + + + +Output time series + + + + +Output timeseries file with lake inflow [m3 /s] + + + + + +Output timeseries file with lake outflow [m3 /s] + + + + + +Output timeseries file with lake level [m] + + + + + +Output map(s) with lake level [m] + + + + + +Output map with lake inflow at previous routing sub-step (ChanQ(t-1)) [m3/s] +-9999 sets initial value equal to PrevDischarge (ChanQ(t)) + + + + + +Output map with lake outflow at previous routing sub-step (ChanQ(t-1)) [m3/s] +-9999 sets initial value + + + + + + + + +************************************************************** +POLDERS(if used) +************************************************************** + + + + + +Weir constant (fixed) [-] + + + + + +Map with polder locations + + + + + +Initial water level in polders [m] + + + + + +Polder maximum storage capacity [cu m] + + + + + +Area of polder [sq m] + + + + + +Width of polder outlet/inlet [m] + + + + + +Polder bottom level, measured from channel bottom [m] + + + + + +Time step at which polder opens in case of regulated polder (use bogus value of -9999 in table in case of unregulated polder) + + + + + +Time step at which water stored in polder is released again(use bogus value of -9999 in table in case of unregulated polder) + + + + + +name of output TSS file with polder flux [cu m / s]. Positive for flow from channel to polder, negative for polder to channel + + + + + +name of output TSS file with polder level [m] + + + + + +name of output map(s) with polder level + + + + + + + + +************************************************************** +INFLOW HYDROGRAPH (if used) +************************************************************** + + + + +OPTIONAL: nominal map with locations of (measured) +inflow hydrographs + + + + + +Observed or simulated input hydrographs as +time series [m3 / s] +Note that identifiers in time series correspond to +InflowPoints map (also optional) + + + + + + + + +************************************************************** +DYNAMIC WAVE(if used) +************************************************************** + + + + +Critical Courant number for dynamic wave +value between 0-1 (smaller values result in greater numerical accuracy, +but also increase computational time) + + + + + +Constant head [m] at most downstream pixel (relative to altitude +at most downstream pixel) + + + + + +Boolean map with value 1 at channel pixels where dynamic wave is +used, and 0 at all other pixels + + + + + +Channel bottom level [m] + + + + + +Nominal map with channel cross section IDs + + + + + +Table with cross section parameters (H,A,P) + + + + + + + +************************************************************** +PF REPORTING (if used) +************************************************************** + + + +PF PARAMETERS + + + + +Maximum capillary head [cm]. This value is used if Theta equals residual soil +moisture content (value of HeadMax is arbitrary). Only needed for pF computation, +otherwise doesn't influence model results at all) + + + + +PF MAPS + + + + +Reported pF upper soil layer [-] + + + + + +Reported pF lower soil layer [-] + + + + + +Reported pF lower soil layer [-] + + + + + +Reported pF upper soil layer [-] + + + + + +Reported pF lower soil layer [-] + + + + +PF TIMESERIES, VALUES AT SITES + + + + +Reported pF upper soil layer [-] + + + + + +Reported pF lower soil layer [-] + + + + + + +Reported pF upper soil layer [-] + + + + + +Reported pF lower soil layer [-] + + + + +PF TIMESERIES, AVERAGE VALUES UPSTREAM OF GAUGES + + + + +Reported pF upper soil layer [-] + + + + +Reported pF lower soil layer [-] + + + + +Reported pF upper soil layer [-] + + + + +Reported pF lower soil layer [-] + + + + + + + + + + +************************************************************** +Ad'a addition +************************************************************** + + + + +threshold value below which there is no outflow to the channel [mm] + + + + + +length of the window used to smooth the LZ zone [number of cells] + + + + + +map of aquifers (0/1), used to smoothen LZ near extraction areas + + + + + + +************************************************************** +Water demand output maps +************************************************************** + + + + +day of the year when the yearly endcalculation is done e.g. 31/10/xxxx = 304 + + + + + + +TotalAbstractionFromGroundwater [mm] + + + + + +TotalAbstractionFromSurfaceWater [mm] + + + + + +TotalAbstractionFromSurfaceWater [mm] summed up for water regions + + + + + +Total Abstraction From SurfaceWater and Groundwater [mm] summed up for water regions, montly values + + + + + +TotalPaddyRiceIrrigationAbstraction [m3] + + + + + +Water Exploitation Index - Consumption; for water regions (this is the official EU WEI+): consumption / internal and external availability + + + + + +Water Exploitation Index - Abstraction; for water regions: abstraction / internal and external availability + + + + + +Water Exploitation Index - Demand; for water regions: demand / internal and external availability + + + + + +Water Exploitation Index - Consumption; for water regions + + + + + +Internal available water + + + + + +External available water + + + + + +Region Water Consumption + + + + + +Region Water Consumption + + + + + +Reservoir and Lake storage in m3 at end of month + + + + + +Reservoir and Lake abstraction in m3 + + + + + +Irrigation water shortage in m3 for month + + + + + +Surface water availability in m3 for potential irrigation for each day + + + + + +Monthly evapotranspiration deficit in mm + + + + + +Monthly evapotranspiration deficit in mm + + + + + +Monthly evapotranspiration deficit in mm + + + + + +Monthly Water Dependency Index (0-1) (De Roo 2015) +WDI = Upstream Inflow Actually Used / Total Water Demand +Values close to 1 give extreme dependency on upstream water + + + + + +Monthly Water Security Index (0-1) (De Roo 2015) +WSI = Upstream Inflow Actually Used / Upstream Inflow Available +Values close to 1 give extreme vulnerability to upstream water + + + + + +Monthly Water Sustainability Index (0-1) (De Roo 2015) +WTI = 1-SurfaceWaterDeficit / TotalWaterDemand +Values of 1 indicate complete sustainable conditions, no water deficit +Values less than 1 indicate that considerable deep groundwater resources or desalinated water is used + + + + + +Monthly Falkenmark 1 Index (tochanm3) + + + + + +Monthly Falkenmark 2 Index (tochanm3+reservoirlakeabstraction) + + + + + +Monthly Falkenmark 3 Index (tochanm3+reservoirlakeabstraction+externalinflow) + + + + + + +Abstraction from groundwater in m3 per timestep + + + + + +Abstraction from surface water in m3 per timestep + + + + + +Region abstraction from surface water in m3 per timestep + + + + + +Region Total Abstraction From Lakes and Reservoirs in m3, per timestep + + + + + +Lake Abstraction per timestep in m3 + + + + + +ReservoirAbstraction per timestep in M3 + + + + + +ReservoirStorage in M3 + + + + + +LakeStorage in M3 + + + + + +AreatotalIrrigationUseM3 + + + + + +FractionAbstractedFromChannels + + + + + +EFlowIndicator (1 on day with ChanQ smaller than EflowThreshold, 0 on normal days) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +************************************************************** +Peter's addition +************************************************************** + + + + + +[mm] + + + + + +[mm] + + + + + +[mm] + + + + + + + + + + + + + +areamap MaskMap; +timer StepStart StepEnd 1; +ReportSteps=$(ReportSteps); + + + + + diff --git a/docs/3_step4_preparing-input-files/index.md b/docs/3_step4_preparing-input-files/index.md new file mode 100644 index 00000000..1f041c64 --- /dev/null +++ b/docs/3_step4_preparing-input-files/index.md @@ -0,0 +1,129 @@ +## Step 3: Input files (maps and tables) + +In the current version of LISFLOOD, all the model inputs are provided as either maps (grid files in PCRaster format or NetCDF format) or text files (.txt extension). This chapter provides an overview of the data set that is required to run the model. + +### INPUT MAPS + +LISFLOOD requires that all maps must have *identical* location attributes (number of rows, columns, cellsize, upper x and y coordinates). + +The input maps can be classified according to two main cathegories:
++ **meteorological forcings**. These maps provide time series of values for each pixel of the computational domain. More specifically, the meteorological forcings provide the values of precipitation, temperature, reference values of evaporation from water surfaces, reference values of evaporation from open water bodies, reference values of evapotranspiration for each pixel of the modelled area. For each meteorological forcing, one map is required for each computational time step.
++ **static maps**. These maps provide information of morphological, physical, soil, and land use properties for each pixel of the computational domain. + + +### Meteorological forcings + +The meteorological forcing variables are defined in *map stacks*. A *map stack* is simply a series of maps, where each map represents the value of a variable at an individual time step.
It is recommented to use the netcdf format.
The users that prefer to prepare the meteorological forcings maps in pcraster format, must name the files according to the following rules: the name of each map is made up of a total of 11 characters: 8 characters, a dot and a 3-character suffix. Each map name starts with a *prefix*, and ends with the time step number. All character positions in between are filled with zeros ("0").
+ +Generally used prefixes for the meteorological forcings maps are:
++ tp : total precipitation; units: mm/day.
++ ta : average daily temperature at 2m; units: degrees Celsius or Kelvin (the units must be specified in the [settings file](../3_step3_preparing-setting-file/))
++ EW0 : reference value of evaporation from open water bodies; units: mm/day; these data can be prepared using [LISVAP](https://ec-jrc.github.io/lisflood-lisvap/).
++ ES0 : reference value of evaporation from bare soil; units: mm/day; these data can be prepared using [LISVAP](https://ec-jrc.github.io/lisflood-lisvap/).
++ ET0 : reference value of evapotranspiration; units: mm/day; these data can be prepared using [LISVAP](https://ec-jrc.github.io/lisflood-lisvap/).
+ + + +### Static maps +The section [Static Maps](../4_Static-Maps-introduction) provides detailed guidelines for the preparation of the static maps data set. The following paragraph provides an overview of the different piecies of information provided by the static maps. ++ [general maps](../4_Static-Maps_general-maps/): area mask; landuse mask; grid-cell length; grid-cell area. ++ [topography](../4_Static-Maps_topography/): local drain direction; gradient; standard deviation of elevation; upstream area. ++ [land use maps](../4_Static-Maps_land-use/): fraction of forest; fraction of irrigated crops; fraction of rice crops; fraction of inland water; fraction of sealed surfaces; fraction of other land uses. ++ [land use depending](../4_Static-Maps_land-use-depending/):crop coefficient; crop group number; Manning/s's surface roughness; soil depth. ++ [soil hydraulic properties](../4_Static-Maps_soil-hydraulic-properties/): saturated hydraulic conductivity; soil water content at saturation; residual soil water content; parameters alpha and lambda of Van Genuchten's equations. ++ [channel geometry](../4_Static-Maps_channel-geometry/): channels mask; channels side slope; channels length; channels gradient; Manning's rougheness coefficient of the channels; channels bottom width; floodplain width; bankfull channels depth. ++ [leaf area index](../4_Static-Maps_leaf-area-index/): evolution of vegetation over time (leaf area index) for land covers forest, irrigated areas, others. ++ [reservoirs and lakes](../4_Static-Maps_reservoirs-lakes/): lake mask; lakes ID points; reservoirs ID points. These maps are required only upon activation of the [lakes module](https://ec-jrc.github.io/lisflood-model/3_02_optLISFLOOD_lakes/) and/or of the [reservoirs module](https://ec-jrc.github.io/lisflood-model/3_03_optLISFLOOD_reservoirs/). ++ [rice calendar](../4_Static-Maps_rice-calendar/): rice calendar for planting and harvesting seasons. These maps are required only when activating the [rice irrigation module](https://ec-jrc.github.io/lisflood-model/2_17_stdLISFLOOD_irrigation/) ++ inflow points: locations and IDs of the points in which LISFLOOD adds an inflow hydrograph, as explained [here](https://ec-jrc.github.io/lisflood-model/3_09_optLISFLOOD_inflow-hydrograph/) ++ water demand maps: domestic, energetic, livestock, industrial water use. These maps represent the time series of spatially distributed values of water demand for domestic, energetic, livestock, and industrial water use. These maps are required only when activating the [water use module](https://ec-jrc.github.io/lisflood-model/2_18_stdLISFLOOD_water-use/) ++ outlet points: locations and IDs of the points for which LISFLOOD provides the time series of discharge values. + +#### Role of "mask" and "channels" maps + +The mask map (i.e. "area.map") defines the model domain. In order to avoid unexpected results, **it is vital that all maps that are related to topography, land use and soil are defined** (i.e. don't contain a missing value) for each pixel that is "true" (has a Boolean 1 value) on the mask map. The same applies for all meteorological input and the Leaf Area Index maps. Similarly, all pixels that are "true" on the channels map must have some valid (non-missing) value on each of the channel parameter maps. Undefined pixels can lead to unexpected behaviour of the model, output that is full of missing values, loss of mass balance and possibly even model crashes. Some maps needs to have values in a defined range e.g. the gradient map has to be greater than 0. + +#### Geometrical properties of the computational grid cell + +LISFLOOD needs to know the size properties of each grid cell (length, area) in order to calculate water *volumes* from meteorological forcing variables that are all defined as water *depths*. By default, LISFLOOD obtains this information from the location attributes of the input maps. This will only work if all maps are in an "equal area" (equiareal) projection, and the map co-ordinates (and cell size) are defined in meters. For datasets that use, for example, a latitude-longitude system, neither of these conditions is met. In such cases you can still run LISFLOOD if you provide two additional maps that contain the length and area of each grid cell + +##### Table: Optional maps that define grid size + +| **Map** | **Default name** | **Description** | +| --------------- | ------------------ | ------------------------------------------------------------ | +| PixelLengthUser | pixleng.map/nc | Map with pixel length

Unit: $[m]$,
*Range *of values: map \> 0* | +| PixelAreaUser | pixarea.map/nc | Map with pixel area

*Unit:* $[m^2]$,
*Range of values: map \> 0* | + +Both maps should be stored in the same directory where all other input maps are. The values on both maps may vary in space. A limitation is that a pixel is always represented as a square, so length and width are considered equal (no rectangles). In order to tell LISFLOOD to use the maps a, you need to activate the special option "*gridSboveizeUserDefined*", which involves adding the following line to the LISFLOOD settings file: + +```xml + +``` + +LISFLOOD settings files and the use of options are explained in detail in a [dedicated chapter](https://ec-jrc.github.io/lisflood-code/3_step3_preparing-setting-file/) and [annex](https://ec-jrc.github.io/lisflood-code/4_annex_settings_and_options/) of this document. + + +#### Leaf area index maps + +Because Leaf area index maps follow a yearly circle, only a map stack of one year is necessary which is then used again and again for the following years (this approach can be used for all input maps following a yearly circle e.g. water use). LAI is therefore defined as sparse map stack with a map every 10 days or a month. After one year the first map is taken again for simulation. + + +#### Important technical note for the generation of the water regions map + +Water demand and water abstraction are spatially distributed within each water region. As detailed [here](https://ec-jrc.github.io/lisflood-model/2_18_stdLISFLOOD_water-use/), the water resources (surface water bodies and groundwater) are shared inside the water region in order to meet the cumulative requirements of the water region area. For this reason, it is strongly recommended to include the entire water region(s) in the modelled area. If a portion of the water region is not included in the modelled area, then LISFLOOD cannot adequately compute the water demand and abstraction. In other words, LISFLOOD will not be able to account for sources of water outside of the computational domain (it is important to notice that LISFLOOD will not crush but the results will be affected by this discrepancy). +The inclusion of the complete water region in the computational domain becomes compulsory under the specific circumstances of model calibration. +Calibrated parameters are optimised for a specific model set up. It is often required to calibrate the parameters of several subcatchments inside a basin. Each calibration subcatchment must include a finite number of water regions (each water region can belong to only one subctatchment). If this condition is met, the calibrated parameters can be correctly optimised. Conversely, when a water region belongs to one or more calibration sub-catchments, the water resources are allocated and abstracted in different quantities when modelling the calibration subcatchment only or the entire basin. Similarly, the option groundwater smooth leads to different geometries of the cone of depression due to groundwater abstraction when modelling the subcatchment only or the entire basin. These two scenarios impede the correct calibration of the model parameters and must be avoided. The user is advised to switch off the groundwater smooth option and to ensure the consistency between water regions and calibration cacthments. The utility [waterregions](https://github.com/ec-jrc/lisflood-utilities/) can be used to 1) verify the consistency between calibration catchments and water regions or 2) create a water region map which is consistent with a set of calibration points. + + +### INPUT TABLES + +The geographical location of lakes and reservoirs is identified by the two maps described [here](../4_Static-Maps_reservoirs-lakes/). These maps provide the location of lakes and reservoirs. Each lake and each reservoir is identified by its ID (a in integer number). LISFLOOD requires additional information for the adequate modelling of [lakes](https://ec-jrc.github.io/lisflood-model/3_02_optLISFLOOD_lakes/) and [reservoirs](https://ec-jrc.github.io/lisflood-model/3_03_optLISFLOOD_reservoirs/). These additional pieces of information are supplied to the numerical code by using tables in *.txt* format. Each table has 2 colums: the first column is the ID of the lake or of the reservoir, the second column is the quantity required by LISFLOOD. The table below provides the list of the pieces of information which are required for the adequate modelling of lakes and reservoirs. +##### Table: LISFLOOD input tables + +| **Table** | **Default name** | **Description** | +|----------------------------|-----------------------|--------------------------| +| Lake area | Lakearea.txt | Lake syrface area in m2 | +| Lake alpha parameter | lakea.txt | Lake parameter alpha: a detailed descrpition can be found [here](https://ec-jrc.github.io/lisflood-model/3_02_optLISFLOOD_lakes/) | +| Lake average inflow | lakeaverageinflow.txt | Average inflow to the lake: a detailed descrpition can be found [here](https://ec-jrc.github.io/lisflood-model/3_02_optLISFLOOD_lakes/) | +| Reservoir storage | rstor.txt | Volume in m3, total reservoirs storage capacity | +| Reservoir minimum outflow | rminq.txt | Discharge in m3/s. | +| Reservoir normal outflow | rnormq.txt | Discharge in m3/s. | +| Reservoir non damaging outflow | rndq.txt | Discharge in m3/s. | +| Reservoir conservative storage value | rclimq.txt |Fraction, typical value: 0.07 | +| Reservoir storage limit in normal flow condition | rnlim.txt |Fraction, typical values: 0.65-0.67 | +| Reservoir storage limit during floods | rflim.txt |Fraction, typical value: 0.97 | + + +### Organisation of input data + +It is up to the user how the input data are organised. However, it is advised to keep the base maps, meteorological maps and tables separated (i.e. store them in separate directories). For practical reasons the **following input structure is suggested**: + +- all **base maps** are in one directory (e.g. 'maps') + + - fraction maps in a subfolder (e.g. 'fraction') + + - soil hydraulic properties in a subfolder (e.g.'soilhyd') + + - land cover depending maps in a subfolder (e.g.'table2map') + +- all **tables** are in one directory (e.g. 'tables') + +- all **meteorological input** maps are in one directory (e.g. 'meteo') + +- a folder **Leaf Area Index** (e.g. 'lai') + + - all Leaf Area Index for forest in a subfolder (e.g.'forest') + + - all Leaf Area Index for other in a subfolder (e.g.'other') + +- all **output** goes to one directory (e.g. 'out') + +The following Figure illustrates this: + +![](../media/image36.png) + +***Figure:*** *Suggested file structure for LISFLOOD* + + + +[:top:](#top) diff --git a/docs/3_step5_model-initialisation/index.md b/docs/3_step5_model-initialisation/index.md new file mode 100644 index 00000000..a367ba67 --- /dev/null +++ b/docs/3_step5_model-initialisation/index.md @@ -0,0 +1,204 @@ +# Step 4: Initialisation & cold start of LISFLOOD + +Just as any other hydrological model, LISFLOOD needs to know the initial state (i.e. amount of water stored) of its internal state variables in order to be able to produce reasonable discharge simulations. However, in practice we hardly ever know the initial state of all state variables at a given time. Hence, we have to estimate the state of the initial storages in a reasonable way, which is also called the initialisation of a hydrological model. + +In this subsection we will first demonstrate the effect of the model's initial state on the results of a simulation, explain the steady-state storage in practice and then explain you in detail how to initialize LISFLOOD. + + +## The impact of the model's initial state on simulation results + +To better understand the impact of the initial model state on the results of a simulation, let's start with a simple example. The Figure below shows 3 LISFLOOD simulations of soil moisture for the upper soil layer. In the first simulation, it was assumed that the soil is initially completely saturated. In the second one, the soil was assumed to be completely dry (i.e. at residual moisture content). Finally, a third simulation was done where the initial soil moisture content was assumed to be in between these two extremes. + + ![](../media/image37.png) + + **Figure:** *Simulation of soil moisture in upper soil layer for a soil that is initially at saturation (s), at residual moisture content (r) and in between (\[s+r\]/2)* + +What is clear from the Figure is that the initial amount of moisture in the soil only has a marked effect on the start of each simulation; after a few months the three curves converge. In other words, the "memory" of the upper soil layer only goes back a few months (or, more precisely, for time lags of more than about 8 months the autocorrelation in time is negligible). + +In theory, this behaviour provides a convenient and simple way to initialise a model such as LISFLOOD. Suppose we want to do a simulation of the year 1995. We obviously don't know the state of the soil at the beginning of that year. However, we can get around this by starting the simulation a bit earlier than 1995, say one year. In that case we use the year 1994 as a *warm-up* period, assuming that by the start of 1995 the influence of the initial conditions (i.e. 1-1-1994) is negligible. The very same technique can be applied to initialise LISFLOOD's other state variables, such as the amounts of water in the lower soil layer, the upper groundwater zone, the lower groundwater zone, and in the channel. + +## The theory of initialisation + +When setting up a model run that includes a warm-up period, most of the internal state variables can be simply set to 0 at the start of the run. This applies to the initial amount of water on the soil surface (*WaterDepthInitValue*), snow cover (*SnowCoverInitValue*), frost index (*FrostIndexInitValue*), interception storage (*CumIntInitValue*), and storage in the upper groundwater zone (*UZInitValue*). The initial value of the 'days since last rainfall event' (*DSLRInitValue*) is typically set to 1. + +For the remaining state variables, initialisation is somewhat less straightforward. The amount of water in the channel (defined by *TotalCrossSectionAreaInitValue*) is highly spatially variable (and limited by the channel geometry). The amount of water that can be stored in the upper and lower soil layers (*ThetaInit1Value*, *ThetaInit2Value*) is limited by the soil's porosity. The lower groundwater zone poses special problems because of its overall slow response (discussed in a separate section below). Because of this, LISFLOOD provides the possibility to initialise these variables internally, and these special initialisation methods can be activated by setting the initial values of each of these variables to a special 'bogus' value of *-9999*. The following Table summarises these special initialisation methods: + +**Table:** *LISFLOOD special initialisation methods*$^1$ + +| **Variable** | **Description** | **Initialisation method** | +|-------------------------------|-------------------------------|-------------------------------| +| ThetaInit1Value /
ThetaForestInit2Value | initial soil moisture content
upper soil layer (V/V)| set to soil moisture content
at field capacity | +| ThetaInit2Value /
ThetaForestInit2Value | initial soil moisture content
lower soil layer (V/V) | set to soil moisture content
at field capacity | +| LZInitValue /
LZForestInitValue | initial water in lower
groundwater zone (mm) | set to steady-state storage | +| TotalCrossSectionArea
InitValue | initial cross-sectional area
of water in channels | set to half of bankfull depth | +| PrevDischarge | Initial discharge | set to half of bankfull depth | + +$^1$ These special initialisation methods are activated by setting the value of each respective variable to a 'bogus' value of "-9999"* + +Note that the "-9999" 'bogus' value can *only* be used with the variables in the Table above; the use of the 'bogus' value for all the other variables will produce nonsense results! For this reason, the initialisation of the lower groundwater zone is necessary.
+ +*WARNING!* In areas with arid climate and very thick (~10^2) soils, the use of initial soil water content equal to field capacity creates nonrealistic large discharge values in the channels.
+ +To avoid nonrealistic results in such specific contexts, it is recommended to use the end states of the initialization run to initialize the soil and upper groundwater zone storages of the cold run.
+ +The following end states can be used for the initialization of the run: upper groundwater zone water content; water content of soil layers 1,2,3 for the all the land use categories (other, forest, irrigation).
+ +In summary, the initialization of the lower groundwater zone is always necessary (see paragraph below); the use of the end states to initialize the upper groundwater zone water content and the water content of soil layers 1,2,3 is optional.
+This optional, extensive initialization has been implemented in OS-LISFLOOD v4.0.0. The interested users can then use the provided templates as an example to prepare their own [initialization run](../media/lisfloodSettings_reference_prerun_optional_init_v4.0.0.xml) and run with [cold start](../media/lisfloodSettings_reference_coldstart_optional_init_v4.0.0.xml). Please note that the content of this paragraph does not apply to the runs with warm start!
+ +**Initialisation of the lower groundwater zone** +Even though the use of a sufficiently long warm-up period usually results in a correct initialisation, a complicating factor is that the time needed to initialise any storage component of the model is dependent on the average residence time of the water in it. For example, the moisture content of the upper soil layer tends to respond almost instantly to LISFLOOD's meteorological forcing variables (precipitation, evapo(transpi)ration). As a result, relatively short warm-up periods are sufficient to initialise this storage component. At the other extreme, the response of the lower groundwater zone is generally very slow (especially for large values of $T_{lz}$). Consequently, to avoid unrealistic trends in the simulations, very long warm-up periods may be needed. The Figure below shows a typical example for an 8-year simulation, in which a decreasing trend in the lower groundwater zone is visible throughout the whole simulation period. Because the amount of water in the lower zone is directly proportional to the baseflow in the channel, this will obviously lead to an unrealistic long-term simulation of baseflow. Assuming the long-term climatic input is more or less constant, the baseflow (and thus the storage in the lower zone) should be free of any long-term trends (although some seasonal variation is normal). In order to avoid the need for excessive warm-up periods, LISFLOOD is capable of calculating a 'steady-state' storage amount for the lower groundwater zone. This *steady state* storage is very effective for reducing the lower zone's warm-up time. The concept of *steady state* is explained in the [LISFLOOD model description](https://ec-jrc.github.io/lisflood-model/2_13_stdLISFLOOD_groundwater/), here we will show how it can be used to speed up the initialisation of a LISFLOOD run. + + +**Steady-state storage in practice** +An actual LISFLOOD simulation differs from the theoretical *steady state* in 2 ways. First, in any real simulation the inflow into the lower zone is not constant, but varies in time. This is not really a problem, since $LZ_{ss}$ can be computed from the *average* recharge. However, this is something we do not know until the end of the simulation! Also, the inflow into the lower zone is controlled by the availability of water in the upper zone, which, in turn, depends on the supply of water from the soil. Hence, it is influenced by any calibration parameters that control behaviour of soil- and subsoil (e.g. $T_{uz}$, $GW_{perc}$, $b$, and so on). This means that -when calibrating the model- the average recharge will be different for every parameter set. Note, however, that it will *always* be smaller than the value of $GW_{perc}$, which is used as an upper limit in the model. +As an alternative to using the internal initialization (and hence the bogus values), LZavin and AvgDis (LZInitValue and PrevDischarge) can be computed using an initialization run (or pre-run). The pre-run procedure must include a sufficiently long warm-up period to allow the computation of reliable values of LZavin and AvgDis. The set-up of the initialization run is explained below: the protocol differs slightly depending on the settings of the option split routing. + + +## What you need to do: + +### Option 1: If using Kinematic routing only (no split routing): + +1) Set initial state of all state variables to either 0,1 or -9999 (i.e. cold start with default values or internally initialized values) in Settings.XML file + +2) Activate the “InitLisfloodwithoutsplit” and the "InitLisflood" options in section of Settings.XML file using: +```xml + + +``` + +3) Activate reporting maps (in NetCDF format) in section of Settings.XML file using: +```xml + + +``` + +4) Set split routing option to not active in section of Settings.XML file using: +```xml + +``` + +5) Set the name of the reporting map for average percolation rate from upper to lower groundwater zone in section of Settings.XML file using: +```xml + +``` + +6) Run the model for a longer period (if possible more than 3 years, best for the whole modelling period) + +7) Go back to the LISFLOOD settings file, and set the InitLisfloodwithoutsplit to inactive, leaving all other switches as before: + +```xml + + +``` + +### If using Split routing: + +1) Set initial state of all state variables to either 0,1 or -9999 (i.e. cold start with default values or internally initialized values) in Settings.XML file + +2) Activate the “InitLisflood” option in section of Settings.XML file using: +```xml + + +``` + +3) Activate reporting maps (in NetCDF format) in section of Settings.XML file using: +```xml + + +``` + +4) Set split routing option to active in section of Settings.XML file using: +```xml + +``` + +5) Set the name of the reporting map for average percolation rate from upper to lower groundwater zone in section of Settings.XML file using: +```xml + +``` + +6) Set the name of the reporting map for average discharge map in section of Settings.XML file using: +```xml + +``` + +7) Run the model for a longer period (if possible more than 3 years, best for the whole modelling period) + +8) Go back to the LISFLOOD settings file, and set the InitLisflood inactive, leaving all other switches as before: + +```xml + + +``` + +### What to do after the initialization run - Proceed with a LISFLOOD run + + +i) Checking the lower zone initialisation + +The presence of any initialisation problems of the lower zone can be checked by adding the following line to the ‘lfoptions’ element of the settings file: + +```xml + +``` + +This tells the model to write the values of all state variables (averages, upstream of contributing area to each gauge) to time series files. The default name of the lower zone time series is ‘lzUps.tss’. + + + +![initLZDemo](../media/image40.png) + +***Figure:*** *Initialisation of lower groundwater zone with and without using a pre-run. Note the strong decreasing trend in the simulation without pre-run.* + + + + +ii) At the end of the initialization run one file (initialization without split routing) or two files (initialization with split routing) will be created in NetCDF format. Copy those files (found in folder "out", see the setting $(PathOut) above) into the folder "init" ($(PathInit)) + + lzavin.nc + avgdis.nc + +Only the file lzavin.nc is required to run the Lisflood model without split routing. + + +```xml +************************************************************** +INITIAL CONDITIONS FOR THE WATER BALANCE MODEL +(can be either maps or single values) +************************************************************** + + + + +$(PathInit)/lzavin.map +Reported map of average percolation rate from upper to +lower groundwater zone (reported for end of simulation) + + + + + +$(PathInit)/avgdis.map +CHANNEL split routing in two lines +Average discharge map [m3/s] + + +``` + +iii) launch LISFLOOD + +To run the model, start up a command prompt (Windows) or a console window (Linux) and type 'lisflood' followed by the name of the settings file, e.g.: + +```unix +lisflood settings.xml +``` + + + + +> Important note: +> - Calibration parameters obtained with no split routing should never be used to run simulations with split routing and vice versa. +> - Using option InitLisfloodwithoutsplit=1 will result in an AvgDis file with zero values everywhere. +> - In case of doubts, check content of AvgDis file: if it's all zero, then split routing must be off. Note that an AvgDis file containing all zero values will automatically set LISFLOOD to no split routing, even if SplitRouting=1. + diff --git a/docs/3_step6_model-output/index.md b/docs/3_step6_model-output/index.md new file mode 100644 index 00000000..20d893d2 --- /dev/null +++ b/docs/3_step6_model-output/index.md @@ -0,0 +1,49 @@ +# Step 6: Default LISFLOOD output + +LISFLOOD can generate a wide variety of output. Output is generated as either maps or time series (netCDF format, which can be visualised with any netCDF viewer e.g. [Panoply](https://www.giss.nasa.gov/tools/panoply/download/)). +Reporting of output files can be switched on and off using options in the LISFLOOD settings file. For instance, maps of **discharge** at each time step are generated by using the option *repDischargeMaps=1*. Time series of discharge values are generate by activating the option *repDischargeTs=1* + +A number of output files are specific to optional modules, such as the simulation of reservoirs. + +**State maps** + +Output state maps are reported when switching on the option *repStateMaps=1* (note that the file names can always be changed by the user, although this is not recommended). These maps can be used to define the initial conditions of a succeeding simulation.  + +A full list of state maps can be found [here](../4_annex_state-variables) + +To speed up the pre-run, with ‘InitLisflood’ = 1 the output is limited to the maps lzavin, avgdis, and (optionally) the end maps of the states listed [here](../3_step5_model-initialisation) + +**Other output maps** + +This paragraph provide examples of output maps that are not included in the repStateMaps but can be of interest to many users: + +1. Maps of **discharge**; reporting of these maps can be activated using the option *repDischargeMaps=1* + +2. **Surface runoff** maps, that is runoff from both impervious and permeable surfaces can be activated using the option *repSurfaceRunoffMaps=1* + +3. **Total runoff** maps, that is the sum of surface runoff and runoff from upper and lower groundwater zones can be activated using the option *repTotalRunoffMaps=1* + +4. **Seepage** maps, that is flow from the third soil layer to the upper groundwater zone can be activated using the option *repSeepSubToGWMaps=1* + +5. Maps of the **water volume abstracted from surface water bodies to satisfy anthropogenic use** can be activated using the option *repTotalAbs=1* + +**Time series** +Time series file have *.tss* extension and they can be opened with any text editor. These files are organized in a number of columns. Specifically, the first column shows the timestep and the other columns show the values of the selected output variable for each gauge or site. Gauges and sites locations must be defined by the users in the settings file. + +1. Time series with values of **model state variables at user-defined locations** (sites); reporting of these time series can be activated using the option *repStateSites=1.* Note that 'sites' can be either individual pixels or larger areas (e.g. catchments, administrative areas, and so on). In case of larger areas the model reports the average value for each respective area. + +2. Time series with values of **model rate variables at user-defined locations** (sites); reporting of these time series can be activated using the option *repRateSites=1* + +3. Time series with values of **meteorological input variables, averaged over the area upstream of each gauge location**; reporting of these time series can be activated using the option *repMeteoUpsGauges=1* + +4. Time series with values of **model state variables (examples are soil moisture and lower groundwater storage), averaged over area upstream of each gauge location**; reporting of these time series can be activated using the option *repStateUpsGauges=1* + +5. Time series with values of **model rate variables (examples are the outflow from the upper and lower groundwater zones to the channels; the vertical seepage and percolation flows), averaged over area upstream of each gauge location**; reporting of these time series can be activated using the option *repRateUpsGauges=1* + +6. Time series that are specific to other **options** (e.g. simulation of reservoirs). + +> Note that the options *repStateUpsGauges*, *repRateUpsGauges* and *repDischargeMaps* tend to slow down the execution of the model quite dramatically. For applications of the model where performance is critical (e.g. automated calibration runs), we advise to keep them switched off, if possible. + +It is important to be aware of the spatial domain for which each time series is computed. For instance, all *rate variables* are reported as pixel-average values. Soil moisture and groundwater storage are reported for the permeable fraction of each pixel only. The reported snow cover is the average of the snow depths in snow zones A, B and C. + +This [**Annex**](../4_annex_output-files/) summarises most of the options to report additional output maps. diff --git a/docs/3_step6_running-LISFLOOD/index.md b/docs/3_step6_running-LISFLOOD/index.md new file mode 100644 index 00000000..3a880960 --- /dev/null +++ b/docs/3_step6_running-LISFLOOD/index.md @@ -0,0 +1,67 @@ +# Step 5: Running LISFLOOD (warm start) + +Once you have initialized LISFLOOD you can launch a "warm start". That means you can use all internal state variables ('end maps') that you have received during the initialization (see Step 4) as the initial conditions for a succeeding simulation. +This is particularly useful if you are simulating individual flood events on a small time interval (e.g. hourly). For instance, to estimate the initial conditions just before the flood event you can do an initialization also called 'pre-run' on a *daily* time interval for the year before the flood event. Then you can use the resulting 'end maps' as the initial conditions for the hourly simulation of the flood event. + +In any case, you should be aware that values of some **internal state variables of the model** (especially lower zone storage) **are very much dependent on the parameterisation used**. Hence, suppose we have 'end maps' that were created using some parameterisation of the model (let's say parameter set *A*), then these maps should **not** be used as initial conditions for a model run with another parameterisation (parameter set *B*). If you decide to do this anyway, you are likely to encounter serious initialisation problems (but these may not be immediately visible in the output!). If you do this while calibrating the model (i.e. parameter set *B* is the calibration set), this will render the calibration exercise pretty much useless (since the output is the result of a mix of different parameter sets). However, for *FrostIndexInitValue* and *DSLRInitValue* it is perfectly safe to use the 'end maps', since the values of these maps do not depend on any calibration parameters (that is, only if you do not calibrate on any of the frost-related parameters!). If you need to calibrate for individual events (i.e.hourly), you should apply *each* parameterisation on *both * the (daily) pre-run and the 'event' run! This may seem awkward, but there is no way of getting around this (except from avoiding event-based calibration at all, which may be a good idea anyway). + +## What you need to do +1) Save and use state/end maps + +At the end of each model run, LISFLOOD writes maps of all internal state variables. Two different sets of maps can be stored (both sets can be saved at the same time): + +- End maps: NetCDF single maps containing internal state variables values for the last simulation timestep (*StepEnd*) +- State maps: NetCDF stack maps containing internal state variables values for the *ReportSteps* period + +You can use either state maps or end maps as the initial conditions for a succeeding simulation. This is particularly useful if you are simulating individual flood events on a small time interval (e.g. hourly). For instance, to estimate the initial conditions just before the flood you can do a ‘pre-run’ on a daily time interval for the year before the flood. You can then use the ‘end maps’ as the initial conditions for the hourly simulation. + +- **Saving end maps** + To save end maps to be used for later model runs, activate the "repEndMaps" option in section of Settings.XML: + ```xml + + ``` + +- **Saving state maps** + To save state maps to be used for later model runs, activate the "repStateMaps" option in section of Settings.XML: + ```xml + + ``` + +Some internal state variables of the model (especially lower zone storage) are very much dependent on the parametrisation used. Hence, suppose we have ‘end maps’ that were created using some parametrisation of the model (let’s say parameter set A), then these maps should not be used as initial conditions for a model run with another parametrisation (parameter set B). + +2) **Using state/end maps** + +LISFLOOD warm start is managed by two keys in Settings XML file: + +- "StepStart" which is the first output step/date from LISFLOOD model (forecast); +- "timestepInit" which is the step/date to use as the initial state (usually it's one model step before "StepStart", but it can be any date/step). + +3) Two different settings are used to **warm start LISFLOOD** if using dates in Settings XML file; or if using steps numbers in Settings XML file: + + **Option 1 - Using timestamps (dates) with State files:** + + CalendarDayStart = any timestamp before or equal to first output timestamp (date) (forecast); it is usually the same as StepStart (i.e. 2015-01-10 12:00) + + StepStart= timestamp of first output (forecast) (i.e. 2015-01-10 12:00) + + timestepInit= timestamp of the step just before first model output (forecast) (i.e. 2015-01-10 06:00) + + When LISFLOOD is reading "StepStart" and "timestepInit" as timestamps, CalendarDayStart is not used to set model start (forecast) or to set the state values to be used to warm start LISFLOOD model, so any date can be used. CalendarDayStart date must be equal to "StepStart" date or precedent. CalendarDayStart date will be used as time_unit in NetCDF files. + + If "CalendarDayStart" is set to 2015-01-10 12:00 and "StepStart" is set to 2015-01-10 12:00, the first output of the model will be marked 2015-01-10 12:00 and all netCDF state files will be stored using CalendarDayStart as time_unit with "time" array starting with [0]. + + To warm start LISFLOOD for a 6-hourly simulation with first output on 2015-01-10 12:00, state variables values for 2015-01-10 06:00 must be used to initialize the model, so "timestepInit" must be set to 2015-01-10 06:00. + + **Option 2 - Using timesteps (step numbers) with State files:** + + CalendarDayStart = timestamp of first model output (forecast) + + StepStart=1 + + timestepInit=0 + + Step numbers in LISFLOOD are always referred to "CalendarDayStart". If "CalendarDayStart" is 2015-01-10 12:00 and "StepStart" is 1, this means that the first output of the model will be at 2015-01-10 12:00 and all netCDF state files will be now stored using "hours since 2015-01-10 12:00" as time_unit and "time" array starting with [0]. The first step in NetCDF state files stored by this run, will be the same as CalendarDayStart, 2015-01-10 12:00. + + To warm start LISFLOOD for a 6-hourly simulation with first output on 2015-01-10 12:00 (step #1), state variables values for 2015-01-10 06:00 must be used to initialize the model, so "timestepInit" must be set to 0. + +> NOTE: If State files are used to initialize LISFLOOD model run, LISFLOOD will automatically use timestamps in NetCDF files to get data for "timestepInit". If End files are used, LISFLOOD will automatically assign data from NetCDF to "timestepInit". diff --git a/docs/3_step7_commmand-line-flags/index.md b/docs/3_step7_commmand-line-flags/index.md new file mode 100644 index 00000000..8e94474d --- /dev/null +++ b/docs/3_step7_commmand-line-flags/index.md @@ -0,0 +1,43 @@ +# Step 7: Command line flags +LISFLOOD command line takes the following flags as additional arguments after the xml setting file: + +``` + -q --quiet output progression given as . + -v --veryquiet no output progression is given + -l --loud output progression given as time step, date and discharge + -c --checkfiles input maps and stack maps are checked, output for each input map BUT no model run + -n --nancheck check input maps and routing output for any NaN value generated during model run + -h --noheader .tss file have no header and start immediately with the time series + -d --debug debug outputs + -i --initonly only run initialisation, not the dynamic loop + -s --skipvalreplace skip replacement of invalid values in meteo input maps (ignore valid_min and valid_max) +``` + +The flags are utility flags and do not change the behaviour/parameters of the model. Here are the operational details of each flag. + +- **-q --quiet output progression given as .** + The default on-screen output of the lisflood command is the step count and the date/time of each computational step (each step being the run of all the activated modules in sequence for each time step). By setting this "-q" flag only a dot "." will be writtend on stdout for each computational step. + +- **-v --veryquiet no output progression is given** + The default on-screen output of the lisflood command is the step count and the date/time of each computational step (each step being the run of all the activated modules in sequence for each time step). By setting this "-v" flag there will be no output written on stdout showing the model progression. Warnings will still printed out. + +- **-l --loud output progression given as time step, date and discharge** + The default on-screen output of the lisflood command is the step count and the date/time of each computational step (each step being the run of all the activated modules in sequence for each time step). By setting this "-l" flag, the output will show also the discharge value at each step. + +- **-c --checkfiles input maps and stack maps are checked, output for each input map BUT no model run** + Check the correctness of input maps. The option generates also a table of all the input maps specified in the input xml file. The table will show name of the map, the file path (or single value of the variable), the number of non missing values (nonMV) and missing values (MV) after the comparison with the mask map and LDD map, minimum, maximum and average values for each map. In case any map have missing values, a warning will be issued on screen. The model will NOT run, the lisflood command with -c flags will only check the maps. + +- **-n --nancheck check input maps and routing output for any NaN value generated during model run** + Check for NaN values in input maps and routing output values during the model run. This check do not include missing values (e.g. -9999) in input maps. + +- **-h --noheader .tss file have no header and start immediately with the time series** + By default a header including number of values, value type, settings file path and date of creation is printed when generating the output time series files. Using this flag the header will not be printed in Time Series .tss output files, and the file will start immediately with values. + +- **-d --debug debug outputs** + This flags is used to generate extensive debug txt files containing variable values for each time steps. Each file will be named as "Debug_out_<stepnumber>.txt" + +- **-i --initonly only run initialisation, not the dynamic loop** + By adding this flag the model will only run the initialization and will not enter the dynamic loop (i.e. it stops before computing the first time step) + +- **-s --skipvalreplace skip replacement of invalid values in meteo input maps (ignore valid_min and valid_max)** + By adding this flag the model will skip replacement of invalid values in meteo input maps (ignore valid_min and valid_max). In normal execution, values outside valid_min and valid_max range are replaced with NaN \ No newline at end of file diff --git a/docs/4_Static-Maps-introduction/index.md b/docs/4_Static-Maps-introduction/index.md new file mode 100644 index 00000000..e684c0d5 --- /dev/null +++ b/docs/4_Static-Maps-introduction/index.md @@ -0,0 +1,29 @@ +# USER GUIDE FOR THE CREATION OF THE INPUT MAP DATASET + +## About this user guide + +This user guide provides instructions and examples to create static maps required as an input for LISFLOOD hydrological model.
+The examples in this user guide have been derived from the generation of the static input maps for the European and Global Flood Awareness Systems (EFAS and GloFAS) of the Copernicus Emergency Management Service. Users are encouraged to create their own static maps for their region of interest and using local, national or any other type of source data. Possible data sources, used as examples in this user guide, are listed in the [Appendix](../4_Static-Maps_appendix).
+Maps can be elaborated with any GIS/remote sensing software. Examples in this guide have been performed using CDO, GDAL, Python, and Google Earth Engine platform.
+ +## Projection and file type + +All static input maps for LISFLOOD need to have the same model domain, projection, resolution – same number of columns and rows, and same grid of coordinates (i.e. all 4 corners of each pixel must have exactly the same coordinates in degrees or in meters, depending on the reference system). This is a strict requirement of the [LISFLOOD model](https://github.com/ec-jrc/lisflood-code) (here and below ‘the LISFLOOD model’ refers to the version 3.1.0) that at present cannot accept input maps at different spatial resolution or geographical extension.
+All maps should be introduced in the model in NetCDF or PCRaster file format. +This user guide provides the examples for the European and Global domains that are being used in EFAS and GloFAS models, respectively. The static fields structure for EFAS and GloFAS is the following:
+ ++ Projection EPSG:4326 - WGS84: World Geodetic System 1984; ++ Examples of horizontal resolution: 1' (~1.86 km at the Equator) and 3' (~5.57 km at the Equator); ++ Examples of coverage and horizontal resolution: a) global domain: North = 90.00 N; South = 90.00 S; West = 180.00 W; East = 180.00 E; file size in grid-cells: 03' = 7200x3600; b) European domain: North = 72.25 N; South = 22.75 N; West = 25.25 W; East = 50.25 E; file size in grid-cells: 01' = 4530x2970; ++ NoData value: 1) for Byte (Int8) files = 0; 2) for Real (Float32) files = -999999.0. ++ Ocean masked with NoData (except, pixel length and pixel area maps). + + +### Authors of the version compiled in May 2021 +Margarita Choulga, Francesca Moschini, Christel Prudhomme, Cinzia Mazzetti and ECMWF team + +#### Acknowledgements +The authors thank Juliana Disperati (JRC), Stefania Grimaldi (JRC), Peter Salamon (JRC) and Ad De Roo (JRC) for invaluable help with examining the upgraded static map and guidance throughout the work and preparation of this user guide; Dai Yamazaki (The University of Tokyo) and Emanuel Dutra (IPMA) for useful discussions and comments; Damien Decremer (ECMWF) for expert help with file transformation technical work.
+Margarita Choulga, Francesca Moschini, Christel Prudhomme, and Cinzia Mazzetti were funded by Copernicus Emergency Management Service – Early Warning Systems – operational computational centre of EFAS (CEMS-Flood) project which received funding from European Commission Copernicus Emergency Management Service (CEMS) Framework Contract No 198702 awarded to ECMWF. + + diff --git a/docs/4_Static-Maps_appendix/index.md b/docs/4_Static-Maps_appendix/index.md new file mode 100644 index 00000000..a7ee800a --- /dev/null +++ b/docs/4_Static-Maps_appendix/index.md @@ -0,0 +1,55 @@ +# Appendix +## Short description of main possible data sources to create the static maps dataset + ++ **CaMa-Flood**: Global River Hydrodynamics Model maps +The [CaMa-Flood](http://hydro.iis.u-tokyo.ac.jp/~yamadai/cama-flood/index.html) (Catchment-based Macro-scale Floodplain) model is a global-scale distributed river model, which is driven by runoff forcing from a land surface model. In order to represent the process of floodplain inundation, the river channel and floodplain topography are represented by sub-grid-scale topographic parameters. The ground elevation, unit-catchment area, channel length and floodplain elevation profile are explicitly derived from fine-resolution flow direction maps and DEMs using the FLOW method.
+Basic map data and sample input data are provided by the model developers, namely: i) the global river map (i.e. river network map, river topography parameters, high-resolution (1 arc min) topography data) based on MERIT Hydro at 15min, 6min, 5min, 3min, 1min resolutions; ii) pre-processed Earth2Observe (E2O) runoff products (i.e. 0.25 degree, daily, 1980-2014, WRR2 version, 7 Land models) and the runoff climatology data; and iii) the river channel parameters, where the channel cross section parameters (i.e. channel width and channel depth) are derived empirically as a function of river discharge due to the lack of global-scale observations of channel cross sections.
+*Source: http://hydro.iis.u-tokyo.ac.jp/~yamadai/cama-flood/index.html*
+ ++ **MERIT DEM**: Multi-Error-Removed Improved-Terrain DEM
+The [MERIT DEM](http://hydro.iis.u-tokyo.ac.jp/~yamadai/MERIT_DEM/index.html): Multi-Error-Removed Improved-Terrain Digital Elevation Model is a high accuracy global DEM at 3 arc second resolution (~90 m at the Equator) covering land area 90N-60S (referenced to EGM96 geoid) with separated absolute bias, stripe noise, speckle noise and tree height bias (achieved by using the existing spaceborne DEMs (SRTM3 v2.1 and AW3D-30m v1) and filtering techniques). It also contains significant improvements in flat regions, where height errors are larger than topography variability, and landscapes such as river networks and hill-valley structures became clearly represented. +MERIT DEM was developed by processing the following products as baseline data (all are freely available from their web pages): i) NASA SRTM3 DEM v2.1; ii) JAXA AW3D-30m DEM v1; iii) Viewfinder Panoramas' DEM. In addition to the baseline DEMs, following products were used as supplementary data: i) NASA-NSIDC ICESat/GLAS GLA14 data; ii) U-Maryland Landsat forest cover data; iii) NASA Global Forest Height Data; iv) JAMSTEC/U-Tokyo G3WBM water body data.
+Initial data consists of 57 GeoTiff files 30x30 degree region each.
+*Source: http://hydro.iis.u-tokyo.ac.jp/~yamadai/MERIT_DEM/index.html*
+ ++ **CORINE Land Cover 2018** CLC2018
+The [CORINE](https://land.copernicus.eu/pan-european/corine-land-cover) (Coordination of Information on the Environment) Land Cove (CLC) inventory for 2018 (CLC2018) is one of the datasets produced within the Corine Land Cover frame programme referring to land cover / land use status of year 2018. It covers 39 countries with a total area of over 5.8 Mkm 2 . Satellite imagery provides the geometrical and thematic basis for mapping within situ data as essential ancillary information. The basic technical parameters of CLC (i.e. 44 classes in nomenclature, 25 hectares minimum mapping unit (MMU), and 100 meters minimum mapping width) have not changed since the beginning, therefore the results of the different inventories are comparable. The time period covered by CLC2018 asset is 2017 to 2018.
+*Source: https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_CORINE_V20_100m#description*
+ ++ **Copernicus Global Land Cover Layers: CGLS-LC100** collection 2 +The Dynamic Land Cover map [CGLS-LC100](https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_Landcover_100m_Proba-V-C3_Global#description) is a global land cover map at 100 m spatial resolution. The CGLS provides discrete classes of land cover, and continuous field layers for all basic land cover classes that provide percentage of a grid-cell covered by certain land cover type. Provided maps are derived from the PROBA-V 100 m time-series, a database of high quality land cover training sites and several ancillary datasets, reaching an accuracy of 80% at Level1 over all years.
+*Source: https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_Landcover_100m_Proba-V-C3_Global#description* + ++ **Global Lakes and Wetlands Database (GLWD)**: Large Lake Polygons (Level 1 & 2)
+The [Global Lakes and Wetlands Database (GLWD)](https://www.worldwildlife.org/pages/global-lakes-and-wetlands-database) has been created on the basis of existing maps, data and information, such as the Digital Chart of the World, World Conservation Monitoring Centre (WCMC) and others. It draws upon the best available maps, data and information to display lakes and wetlands on a global scale (1:1 to 1:3 million resolution). The application of GIS functionality enables the generation of a database which focuses in three coordinated levels on (1) large lakes and reservoirs, (2) smaller water bodies, and (3) wetlands.
+[Level 1 (GLWD-1)](https://www.worldwildlife.org/publications/global-lakes-and-wetlands-database-large-lake-polygons-level-1) comprises the shoreline polygons of the 3067 largest lakes (area ≥ 50 km2) and 654 largest reservoirs (storage capacity ≥ 0.5 km3) worldwide, and includes extensive attribute data. [Level 2 (GLWD-2)](https://www.worldwildlife.org/publications/global-lakes-and-wetlands-database-small-lake-polygons-level-2) comprises approximately 250,000 permanent open water bodies polygons (attributed as lakes, reservoirs and rivers) with a surface area ≥ 0.1 km2 excluding the water bodies contained in GLWD-1. GLWD-1 and GLWD-2 are delivered with global coverage in shapefile format. [Level 3 (GLWD-3)](https://www.worldwildlife.org/publications/global-lakes-and-wetlands-database-lakes-and-wetlands-grid-level-3) comprises lakes, reservoirs, rivers and different wetland types.
+*Source: http://www.fao.org/land-water/land/land-governance/land-resources-planning-toolbox/category/details/en/c/1043160/* + ++ **Spatial Production Allocation Model (SPAM)** - Global Spatially-Disaggregated Crop Production Statistics Data for 2010 (V 1.0)
+The [Spatial Production Allocation Model (SPAM)](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/PRFF8V) is an effective way to map detailed patterns of crop production using much less specific (e.g. country, subnational provinces) input data. Using a variety of inputs, SPAM uses a cross-entropy approach to make plausible estimates of crop distribution for 42 crops (such as rice, cassava, potatoes, wheat, maize, etc.) and two production systems (i.e. irrigated and rainfed) within disaggregated units. Knowing where in the world individual crops are cultivated, their production patterns, and whether they are irrigated or rainfed is important for improving spatial understanding of crop production systems, and allows policymakers and donors to better target agricultural and rural development policies and investments, increasing food security and growth with minimal environmental impacts.
+*Source: https://nasaharvest.org/news/spam-2010-updated-global-crop-data-aid-food-policy-decisions*
+ ++ **RiceAtlas**, a spatial database of global rice calendars and production Version 3
+The [RiceAtlas](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/JE6R2R) dataset has collected data on the start, peak, and end dates of sowing or transplanting, and the start, peak, and end dates of harvesting of rice for all seasons in all rice-growing countries. In cases where peak planting and harvesting dates were not available, dates were estimated to be at the midpoint between the start and end dates. Planting in a region is not done on a single date but the length of the planting window varies between regions. In the absence of information, the planting window was set to 30 days. Where available, additional data such as crop establishment method and seedling age for transplanted rice were recorded. Data is delivered with global coverage in shapefile format.
+*Source: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5448352/*
+ ++ **Copernicus Global Land Service LAI Collection** Version 2
+The [Copernicus Global Land Service (CGLS) LAI Collection](https://land.copernicus.vgt.vito.be/PDF/portal/Application.html#Browse;Root=512260;Collection=1000083;Time=NORMAL,NORMAL,-1,,,-1,,) 1km Version 2 product is derived from SPOT/VEGETATION and PROBA-V data. The product is provided every 10 days, with a temporal basis for compositing between ±15 and ±60 days depending on the number of available valid observations. The version 2 product is derived from top of canopy daily (S1-TOC) reflectance. The compositing step is performed at the biophysical variable level. This allows reducing sensitivity to missing observations and avoiding the use of a BRDF model. Smoothing and gap filling is achieved over a compositing temporal window that may be dissymmetric depending on the number of valid daily estimates. This version 2 product provides an improved continuity (no missing data in Version 2 due to climatological gap filling) and smoothness and include a Near Real Time computation. Version 2 product is delivered with global coverage in netCDF4 CF-1.6 format.
+Source: https://land.copernicus.eu/global/sites/cgls.vito.be/files/products/CGLOPS1_PUM_LAI1km-V2_I1.33.pdf
+ ++ **SoilGrids250m 2017**
+[SoilGrids](https://data.isric.org/geonetwork/srv/api/records/f36117ea-9be5-4afd-bb7d-7a3e77bf392a) +is a system for automated soil mapping based on global soil profile and covariate data ([Hengl et al. 2017](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0169748). SoilGrids250m is a collection of soil property and class maps of the world (ca. 300 GeoTiffs) produced using machine learning and statistics. SoilGrids predictions are a global soil data product generated at ISRIC.
+Source: https://www.isric.org/explore/soilgrids/faq-soilgrids-2017
+ ++ **FAO Irrigation and Drainage Paper No. 56**: Crop Evapotranspiration (guidelines for computing crop water requirements) by Richard G. ALLEN, Luis S. PEREIRA, Dirk RAES, Martin SMITH
+FAO Irrigation and Drainage Paper No. 56: Crop Evapotranspiration ([guidelines for computing crop water requirements](http://www.fao.org/3/x0490e/x0490e00.htm)) presents an updated procedure for calculating reference and crop evapotranspiration from meteorological data and crop coefficients. Publication contains several pieces of information that were used in this research: i) Lengths of crop development stages for various planting periods and climatic regions (days) (Table 11); ii) Single (time-averaged) crop coefficients (Kc), and mean maximum plant heights for non stressed, well-managed crops in subhumid climates (RHmin ≈ 45%, u2 ≈ 2 m/s) (Table 12); iii) Ranges of maximum effective rooting depth (Zr), and soil water depletion fraction for no stress (p), for common crops (Table 22).
+*Source: https://www.researchgate.net/publication/284300773_FAO_Irrigation_and_drainage_paper_No_56*
+ ++ System description of the **Wofost 6.0 crop simulation model** implemented in CGMS. *Volume 1: Theory and Algorithms by I. Supit, A.A. Hoojer and C.A. Van Diepen*
+System description of the [Wofost 6.0 crop simulation model implemented in CGMS](https://op.europa.eu/en/publication-detail/-/publication/a99325a7-c776-11e6-a6db-01aa75ed71a1). Volume 1: Theory and Algorithms present results from the "Development, validation of crop specific agrometeorological simulation models" project. Projects objectives were "to develop, validate and test new or already existing agrometeorological simulation models for 10-day routine quantitative forecasting of national and NUTS-1 yields and for 10-day wise (regional), but qualitative monitoring of agricultural season conditions over the whole of the EC and for each of the following crops: wheat (spring and winter; hard and soft), barley (spring and winter), oats, maize (grain), rice, potato, sugar beet, pulses (human consumption), soybean, oilseed rape, sunflower, tobacco and cotton." Project has adapted the already existing WOrld FOod STudies (WOFOST) crop growth model to achieve its objectives. From this publication we used following information: i) Soil water depletion fraction (p) as a function of potential evapotranspiration of a closed crop canopy for different crop groups (Table 6.1, p. 87); ii) Example of crops in the different crop groups (Table 6.2, p. 87).
+*Source: System description of the Wofost 6.0 crop simulation model implemented in CGMS. Volume 1: Theory and Algorithms by I. Supit, A.A. Hoojer and C.A. Van Diepen*
+ ++ **OPEN-CHANNEL HYDRAULICS** by Ven Te Chow
+[OPEN-CHANNEL HYDRAULICS](http://web.ipb.ac.id/~erizal/hidrolika/Chow%20-%20OPEN%20CHANNEL%20HYDRAULICS.pdf) presents the knowledge of open-channel hydraulics, which is essential to the design of many hydraulic structures: Part I - basic principles, the type of flow in open channels is classified according to the variation in the parameters of flow with respect to space and time; Part II - on uniform flow; Part III - on gradually varied flow; Part IV - on rapidly varied flow; Part V - on unsteady flow. From this publication we used following information: Values of the roughness coefficient n (Table 5-6, p. 110).
+*Source: http://web.ipb.ac.id/~erizal/hidrolika/Chow%20-%20OPEN%20CHANNEL%20HYDRAULICS.pdf*
diff --git a/docs/4_Static-Maps_channel-geometry/index.md b/docs/4_Static-Maps_channel-geometry/index.md new file mode 100644 index 00000000..638e5b0a --- /dev/null +++ b/docs/4_Static-Maps_channel-geometry/index.md @@ -0,0 +1,170 @@ +# Channel geometry + +In the LISFLOOD model flow through the channel is simulated using the kinematic wave equations. Channel maps describe the sub grid information of the channel geometry, i.e. the length, slope, width and depth of the main channel inside a grid-cell.
++ The **channel mask** map is the Boolean field with '1' for all grid-cells with channels and NoData for all grid-cells with no channels.
++ The **channel side slope** map (referred as 's' in Figure 41) defines the slope of the channel banks.
++ The **channel length** map is the length of the river in each grid-cell, and the value can exceed grid-size to account for meandering rivers.
++ The **channel gradient** (or channel slope) map is the average gradient of the main river inside a cell.
++ The **Manning's roughness coefficient** map can be derived by an empirical relationship of the DEM and the upstream area according to [Burek et al. (2014)](https://ec-jrc.github.io/lisflood/pdfs/Dataset_hydro.pdf). The kinematic wave approach uses the Manning’s formula, an empirical formula for open channel flow or free-surface flow driven by gravity. The Manning’s roughness coefficient is reciprocal proportional to the cross-sectional average velocity (in m/s). A lower Manning’s coefficient results in a faster responding time at the outlet.
++ The **bottom width map** (referred as Wb in Figure 41) is the width of the bottom of the channel.
++ The **floodplain map** (referred as Wfp in Figure 41) is used to calculate water levels in the LISFLOOD model.
++ The **bankfull channel depth** map (referred as Dbf in Figure 41) is the difference between floodplain bottom level (referred as zfp in Figure 41) and the channel bottom level (referred as zbot in Figure 41.
+Channel characteristics, explained above, are shown in the Figure 41 below.
+ +

+ + +

+ +*Figure41: Geometry of channel cross-section in kinematic wave routing (original figure from [Burek et al., 2013](https://publications.jrc.ec.europa.eu/repository/handle/JRC78917)).* + +## General map information and possible source data + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Channel mask | chan.nc;
Type: Boolean | Units: -;
Range: NoData or 1 |Boolean map that identifies the channel grid-cells | +|Side slope |chans.nc;
Type: Float32 | Units: m;
Range>0 |Channel side slope| +|Channel length |chanlength.nc;
Type: Float32 | Units: m;
Range>0 |Channel length (value can exceed grid size, to account for meandering rivers)| +|Channel gradient |changrad.nc;
Type: Float32 |Units: m/m;
Range: [0-1] |Channel longitudinal gradient| +|Manning's roughness coefficient |chanman.nc;
Type: Float32 |Units: m1/3 s-1 |channels Manning's roughness coefficient | +|Bottom width |chanbw.nc;
Type: Float32 |Units: m;
Range>0 |Channel bottom width| +|Floodplain |chanflpn.nc;
Type: Float32 |Units: m;
Range>0 |Width of the area where the surplus of water is distributed when the water level in the channel exceeds the bankfull channel depth +|Bankfull channel depth |chanbnkf.nc;
Type: Float32 |Units: m;
Range>0 |Bankfull channel depth + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|Channel width |[cama-flood](http://hydro.iis.u-tokyo.ac.jp/~yamadai/cama-flood/index.html) |2018 |Global, 1' and 3'| +|River lenght | [cama-flood](http://hydro.iis.u-tokyo.ac.jp/~yamadai/cama-flood/index.html) |2018 |Global, 1' and 3'| +|MERIT DEM: Multi-Error-Removed Improved-Terrain DEM|[MERIT-DEM](http://hydro.iis.u-tokyo.ac.jp/~yamadai/MERIT_DEM/index.html) |2018 |Global, 3" (at about 90 m)| +|Mask map |Can be prepared following [these instructions](../4_Static-Maps_general-maps#area-mask-and-land-use-mask-maps)|NA |Global, 1' and 3'| +|Local drain direction (ldd) |Can be prepared following [these instructions](../4_Static-Maps_topography#local-drain-direction-map)|NA |Global, 1' and 3'| +|Upstream area map |Can be prepared following [these instructions](../4_Static-Maps_topography#upstream-area)|NA |Global, 1' and 3'| + +## Methodology + +### Channel mask (chan) +The channel mask map is used to identify the cells that have channels. The grid-cells that have a channel length (see chanlength map creation below) above zero are assigned to the Boolean field '1', the grid-cells that have a channel length below or equal to zero are assigned with NoData. + +### Side slope (chans) +The channel side slope map is calculated by dividing the horizontal distance (referred as 'dx' in Figure 42) by vertical distance (referred as 'dy' in Figure 42); here ‘1’ was assigned to all the grid cells, which correspond to a 45° angle of the side slope. + +

+ +

+ +*Figure 42: Zoom of Figure 41 with highlighted components dx and dy (in red) used to calculate the channel side slope (original figure is from [Burek et al., 2013](https://publications.jrc.ec.europa.eu/repository/handle/JRC78917)).* + +### Channel length (chanlenght) +The channel length map (in meters) can be created by using the 'rivlen' layers from the CaMa-Flood dataset (for more information see the FLOW method of Yamazaki, link), multiplied by the LISFLOOD model mask. + +### Channel gradient (changrad) +To compute the channel gradient map, the absolute difference (in meters) of the elevation between two grid-cells is first calculated by using i) the local drain direction (ldd) map to extract the connectivity between grid-cells, and ii) the channel length of the upstream grid-cell:
+ +$ \small elevationDifference = elevationUpstreamCell-elevationDownstreamCell $ + +Then, the channel gradient is computed and assigned to the upstream grid-cell: + +$ changrad=\frac{elevationDifference}{chanlength} $ + +$changrad$ is set equal 0 where $ldd$ is 5. + +### Manning's roughness coefficient (chanman) +The Manning's roughness coefficient for channels can be derived by an empirical relationship between the elevation (in $m$) of the grid-cell and its upstream area (in $km^2$) following [Burek et al. (2014)](https://ec-jrc.github.io/lisflood/pdfs/Dataset_hydro.pdf): + +$ chanman =$
+$ 0.025 + 0.015 \cdot \min(\frac{50}{upstreamArea} , 1) + 0.30 \cdot \min(\frac{elevation}{2000} , 1) $ + +### Bottom width (chanbw) +The channel bottom width map can be computed using empirical relationship that relate channel width of the grid-cell with its upstream area (in $km^2$); for example, following [Burek et al. (2014)](https://ec-jrc.github.io/lisflood/pdfs/Dataset_hydro.pdf):
+ +$ chanbw = 0.0032 \cdot upstreamArea $ + +### Floodplain width (Wfp) +The floodplain width (in $m$) can be computed using the following equation from [Burek et al. (2014)](https://ec-jrc.github.io/lisflood/pdfs/Dataset_hydro.pdf):
+ +$ floodplainWidth = 3 \cdot chanbw $ + +### Bankfull channel depth (chanbnkf) +The channel bankfull depth can be computed in two steps. The first step uses the empirical relationship relating the channel bankfull depth of the grid-cell with its upstream area (in $km^2$) following [Burek et al. (2014)](https://ec-jrc.github.io/lisflood/pdfs/Dataset_hydro.pdf):
+ +$ chanbnkf_{step1} = 0.27 \cdot upstreamArea^{0.33} $ + +The second step uses the Manning's equation following [Burek et al. (2014)](https://ec-jrc.github.io/lisflood/pdfs/Dataset_hydro.pdf). The LISFLOOD model first needs to be run for the calibration period length with the initial channel bottom width and bankfull depth parameters to get a long-term average discharge ($avgdis$) which is then used in the Manning's equation:
+ +$ chanbnkf_{step2} =$
+$ 1.004 \cdot chanman^{0.6} \cdot (2 \cdot avgdis)^{0.6} \cdot chanbw^{-0.6} \cdot changrad^{-0.3} $ + + + +## Results (examples) + + +

+ + +

+ +*Figure 43: Channel mask map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right) with coloured areas showing the channel pixels.* + + + +

+ + +

+ +*Figure 44: Channel gradient or slope map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 45: Manning’s roughness coefficient for channels map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 46: Channel length map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 47: Channel bottom width map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 48: Channel side slope map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right) with coloured areas showing channel side slope (equal to 1) pixel.* + + + +

+ + +

+ +*Figure 49: Bankfull channel depth map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 50: Channels floodplain width at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* diff --git a/docs/4_Static-Maps_general-maps/index.md b/docs/4_Static-Maps_general-maps/index.md new file mode 100644 index 00000000..3fc703d0 --- /dev/null +++ b/docs/4_Static-Maps_general-maps/index.md @@ -0,0 +1,91 @@ +# General maps + ++ **Area mask & land use mask maps.**
+The mask maps in the hydrological model are used to detect where model should perform computations and where it shouldn't (skip the grid-cell). Area and land use masks are both Boolean maps which define model boundaries and land use calculation domain respectively.
+ ++ **Grid-cell length & grid-cell area maps.**
+The grid-cell length and grid-cell area maps are used in LISFLOOD model to accurately compute the areal sums over grid-cells (e.g. the upstream area of the river when areas of all connected grid-cells are summed together or the rainfall amount over a certain grid-cell). If projection properties are in meters these maps become optional.
+ + +## Area mask and land use mask maps + +### General map information and possible source data + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +| Mask map| area.nc;
Type: Float32 | Units: -;
Range: NoData or 1 | Boolean map that defines model boundaries| +| Land use mask| landuse.nc;
Type: Float32 | Units: -;
Range: NoData or 1 | Boolean map for land use calculations | + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|Any available map of the region of interest
(e.g. digital elevation map, flow direction map)|NA|NA|Global, 1' and 3'| + +### Methodology + +To create a mask field (mask map or land use mask), source data (e.g. elevation or flow direction) values are changed to ‘1’ and the variable type is forced to be Byte for the mask map (area.nc), and Float32 for the land use mask (lusemask.nc).
+If the source data is at a higher resolution and/or is larger than the required model domain, it needs to be re-scaled to the required grid-cell resolution and/or clipped to the required model domain.
+ + +### Results (examples) + + +

+ + +

+ +*Figure 1: Mask map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right) with coloured areas showing land pixel.* + + + +

+ + +

+ +*Figure 2: Land use mask map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right) with coloured areas showing land pixel.* + + + +## Grid-cell length and grid-cell area maps + + +### General map information and possible source data + + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Pixel length|pixleng.nc;
Type: Float32|Units: -;
Range: >0 |Map with grid-cell (pixel) length along the latitude,
the only pixel size to change (along the longitude the length is constant)| +|Pixel area|pixarea.nc;
Type: Float32|Units: m2;
Range: >0 |Map with grid-cell (pixel) area| + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|Mask map|Can be prepared following the instructions provided [here](../4_Static-Maps_general-maps#area-mask-and-land-use-mask-maps)|NA|Global, 1' and 3'| + +### Methodology + +To create the grid-cell area, the ee.Image.pixelArea() function in Google Earth Engine can be used, that computes the value of each grid-cell in square meters considering all curves of the Globe, and specify the needed grids resolution (e.g. 1 and 3 arc min) along the longitude in meters.
+Grid-cell length is computed dividing grid-cell area by its resolution along the longitude in meters.
+*Note: The pixel area and pixel length maps are given to the whole domain (i.e. not applying the ocean mask map).*
+ + +### Results (examples) + +

+ + +

+ +*Figure 3: Pixel length map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 4: Pixel area map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + diff --git a/docs/4_Static-Maps_land-use-depending/index.md b/docs/4_Static-Maps_land-use-depending/index.md new file mode 100644 index 00000000..511b0bcb --- /dev/null +++ b/docs/4_Static-Maps_land-use-depending/index.md @@ -0,0 +1,245 @@ +# Land use depending + +Crop coefficient, crop group number, and Manning's surface roughness are the land cover depending maps which are calculated considering geographical distribution of each land cover type.
+The LISFLOOD hydrological model can distinguish dependencies for the forested (and also non-forested), irrigated crops (excluding rice), and other land cover type areas. Forest includes evergreen and deciduous needle leaf and broad leaf trees, irrigated crops - all possible crops excluding rice (is modelled separately), and other land cover type - agricultural areas, non-forested natural area, pervious surface of urban areas. Non-forest (also referred to as ’others‘) refers to any other land cover types apart from forest.
++ **Crop coefficient** for forest, irrigated crops and other land use type maps +Crop coefficient is a simple ratio between the potential (reference) evapotranspiration rate, in mm/day, and the potential evaporation rate of a specific crop. In the LISFLOOD model the crop coefficient for forest, irrigated crops and other land cover type maps are used in the computation of the transpiration rate for the forest, irrigated agriculture and other land cover type fractions respectively, e.g. in the computation of the [roots water uptake](https://ec-jrc.github.io/lisflood-model/2_07_stdLISFLOOD_plant-water-uptake/) to support plant transpiration.) ++ **Crop group number** for forest, irrigated crops and other land use type maps +The crop group number represents a vegetation type and is an indicator of its adaptation to dry climate. In the LISFLOOD model the crop group number for forest, irrigated crops and other land cover type maps are used in the computation of the critical amount of soil moisture [$wcrit$](https://ec-jrc.github.io/lisflood-model/2_07_stdLISFLOOD_plant-water-uptake/) below which water uptake from plants is reduced as they start closing their stomata. The crop group number for forest, irrigated crops and other land cover type are applied to the forest, irrigated agriculture and other land cover type fractions respectively. ++ **Manning’s surface roughness coefficient** for forest, irrigated crops and other land cover type maps +Manning's surface roughness coefficient represents the roughness or friction applied to the flow by the surface on which water is flowing. In the LISFLOOD model the Manning's surface roughness coefficients for forest, irrigated crops and other land cover type maps are used to compute surface runoff routing for the forest, irrigated agriculture and other [land cover type fractions](../4_Static-Maps_land-use/) respectively. ++ **Soil depth layers 1, 2 and 3** for forested and non-forested areas maps +Soil depth is used to compute the available water storage volume in the soil. In the LISFLOOD model, three soil layers are used to model the hydrological processes in the soil. The layers take into account forest and non-forest root depths to divide the total soil depth between topsoil (surface layer or layer 1, and middle layer or layer 2) and subsoil (bottom layer or layer 3) hydrological processes. + +## Crop coefficient, crop group number, Manning’s surface roughness coefficient for forest, irrigated crops and other land use type maps + +### General map information and possible source data + + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Crop coefficient|cropcoef_**T**.nc; Type: Float32|Units: -;
Range: 0.20 .. 1.08| Averaged (by time and ecosystem type) crop coefficient for forest/ irrigated crops/ other land cover type| +|Crop group number|cropgrpn_**T**.nc; Type: Float32|Units: -;
Range: 1 .. 5| Averaged (by time and ecosystem type) crop group number for forest/ irrigated crops/ other land cover type| +|Manning's coefficient|mannings_**T**.nc; Type: Float32|Units: m1/3 s-1;
Range: 0.015 .. 0.200|Averaged (by ecosystem type) Manning’s roughness coefficient for forest/ irrigated crops/ other land cover type| + +*where **T** is the landcover type (**T** = ’f’ for forest, **T** = ’i’ for irrigated crops, **T** = ’o’ for other land cover type). + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|Copernicus Global Land Cover Layers: CGLS-LC100 collection 2|[CGLS-LC100](https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_Landcover_100m_Proba-V-C3_Global#description)|2015|Global, 100m| +|Spatial Production Allocation Model (SPAM) - Global Spatially-Disaggregated Crop Production Statistics Data for 2010 (V 1.0)|[Spatial Production Allocation Model](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/PRFF8V)|2010|Global, 5min (~10 km)| +|FAO Irrigation and Drainage Paper No. 56: Crop Evapotranspiration (guidelines for computing crop water requirements) by Richard G. ALLEN, Luis S. PEREIRA, Dirk RAES, Martin SMITH|[FAO Paper No.56](https://www.researchgate.net/publication/284300773_FAO_Irrigation_and_drainage_paper_No_56)|1998|Global, per crop type| +|System description of the Wofost 6.0 crop simulation model implemented in CGMS. Volume 1: Theory and Algorithms by I. Supit, A.A. Hoojer and C.A. Van Diepen|[Wofost 6.0 crop simulation model](https://op.europa.eu/en/publication-detail/-/publication/a99325a7-c776-11e6-a6db-01aa75ed71a1)|1994|Global, per crop type| +|OPEN-CHANNEL HYDRAULICS by Ven Te Chow|[OPEN-CHANNEL HYDRAULICS](http://web.ipb.ac.id/~erizal/hidrolika/Chow%20-%20OPEN%20CHANNEL%20HYDRAULICS.pdf)|1959|Global| + + +### Methodology + +First, different ecosystem type fraction maps are prepared:
+ ++ for **forest**
+The 'discrete_classification' dataset from Copernicus Global Land cover Layers, which provides values representing a dominant cover type per grid-cell (discrete information) can be used. Only tree cover types are selected (i.e. '111' - evergreen needleleaf closed forest, '112' - evergreen broadleaf closed forest, '113' - deciduous needleleaf closed forest, '114' - deciduous broadleaf closed forest, '115' - mixed closed forest, '116' - unknown closed forest, '121' - evergreen needleleaf open forest, '122' - evergreen broadleaf open forest, '123' - deciduous needleleaf open forest, '124' - deciduous broadleaf open forest, '125' - mixed open forest, '126' - unknown open forest). For each of these 12 tree cover types selected a map containing information about forest type was created, assigning '0' to the grid-cells with no forest and '1' to the grid-cells covered with forest type in question. Then, the resolution of these maps is reduced from native 100 m to the needed resolution, e.g. 1 arc min, with mean() reducer.
+ ++ for **irrigated crops**
+The 'spam2010v1r0_global_physical-area_CROP_i' dataset from SPAM dataset can be used. The files represent the actual area in hectares where each crop is grown, not considering how often its production is harvested, 'i' - denotes an irrigated portion of a crop. All 42 crop types are selected and single crop fraction maps are created, assigning '0' to the grid-cells with no crop and '1' to the grid-cells covered with crop type in question. Then, the resolution of these maps is changed from native to the needed resolution, e.g. 1 arc min.
+ ++ for **other** land cover type
+i) The 'discrete_classification' dataset from Copernicus Global Land cover Layers, providing values representing a dominant cover type per grid-cell (discrete information) can be used. Here, only the other land cover types are selected (i.e. '20' - shrubland, '30' - herbaceous vegetation, '40' - cropland, '60' - bare/sparse vegetation, '70' - snow & ice, '90' - herbaceous wetland, '100' - moss & lichen). For other land cover types, 7 fraction maps where created – each map contains information only about one other land cover type ('0' - grid-cell has no other land cover type in question, '1' - grid-cell is covered with other land cover type in question). Then, the resolution of these maps is reduced from native 100 m to the needed resolution, e.g. 1 arc min, with mean() reducer.
+ii) The 'spam2010v1r0_global_physical-area_CROP_r' dataset from the SPAM dataset can be used. The files represent the actual area in hectares where each crop is grown, not considering how often its production is harvested, 'r' - denotes a rainfed portion of a crop. All 42 crop types are selected and 42 fraction maps containing information only about one crop type ('0' - grid-cell has no crop type in question, '1' - grid-cell is covered with crop type in question) are created. Then, the resolution of these maps is changed from native to the needed resolution, e.g. 1 arc min.
+Next, land cover depending parameters are computed according to the formulas in the table below.
+ + +| Parameter| Equation* | Notes | +| :---| :--- | :--- | +|Crop coefficient| $$Kc=\frac{fraction1 \cdot height1 \cdot Kc1 + fraction2 \cdot height2 \cdot Kc2 + .. + fractionN \cdot heightN \cdot KcN}{fraction1 \cdot height1 + fraction2 \cdot height2 + .. + fractionN \cdot heightN}$$|Considers different cover type fractions, default crop coefficient values and default crop height values from [FAO56](https://www.researchgate.net/publication/284300773_FAO_Irrigation_and_drainage_paper_No_56)| +|Crop height|$$H=\frac{fraction1 \cdot height1 + fraction2 \cdot height2 + .. + fractionN \cdot heightN}{fraction1 + fraction2 + .. + fractionN }$$|Considers different cover type fractions, default crop coefficient values and default crop height values from [FAO56](https://www.researchgate.net/publication/284300773_FAO_Irrigation_and_drainage_paper_No_56)| +|Crop root depth|$$R=\frac{fraction1 \cdot root1 + fraction2 \cdot root2 + .. + fractionN \cdot rootN}{fraction1 + fraction2 + .. + fractionN}$$|Considers different cover type fractions and default crop root depth values from [FAO56](https://www.researchgate.net/publication/284300773_FAO_Irrigation_and_drainage_paper_No_56)| +|Crop group number|$$Kg=\frac{fraction1 \cdot Kg1 + fraction2 \cdot Kg2 + .. + fractionN \cdot KgN}{fraction1 + fraction2 + .. + fractionN}$$|Considers different cover type fractions and default
crop group number values from the [Supit et al., 1994](https://op.europa.eu/en/publication-detail/-/publication/a99325a7-c776-11e6-a6db-01aa75ed71a1)| +|Manning's coefficient|$$Km=\frac{fraction1 \cdot Km1 + fraction2 \cdot Km2 + .. + fractionN \cdot KmN}{fraction1 + fraction2 + .. + fractionN}$$|Considers different cover type fractions and default Manning's surface roughness coefficient values from the [OPEN-CHANNEL HYDRAULICS](http://web.ipb.ac.id/~erizal/hidrolika/Chow%20-%20OPEN%20CHANNEL%20HYDRAULICS.pdf)| + +*where for forest **N**=12; for irrigated crops **N**=42; for other land cover type **N**=7 and for ‘40’ ‘cropland’ height, Kc, Kg and Km are for rainfed crops. + + +The LISFLOOD model does not accept missing values for Kc, Kg and Km thus all zero values are filled with field’s global mean values (computed by excluding all nil Kc, Kg and Km values, respectively).
+ +

+ + +

+ + + +*Figure 15: Crop coefficient for forest map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + +

+ + +

+ +*Figure 16: Crop coefficient for irrigated crops map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 17: Crop coefficient for other land use type map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 18: Crop group number for forest map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 19: Crop group number for irrigated crops map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 20: Crop group number for other land use type map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 21: Manning’s coefficient for forest map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 22: Manning’s coefficient for irrigated crops map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 23: Manning’s coefficient for other land cover type map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + +## Soil depth layers 1,2, and 3 for forested and non-forested areas + +### General map information and possible source data + + +| Map name | File name*;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Soil depth|soildeoth**N_T**.nc;
Type: Float32| Units: mm;
Range: ≥ 50**|Forested/ other (non-forested) area soil depth
for soil layer 1 (surface layer)/ 2 (middle layer)/ 3 (bottom layer)| + +*where **N** is the number of soil depth layer (**N**= ’1’ for surface layer, **N** = ’2’ for middle layer, **N** = ’3’ for bottom layer), and **T** is the landcover type (**T** = ’f’ for forested areas, **T** = ’o’ for non-forested areas or others). +**where range for soil layer 1 (surface layer) equals 50 mm, and for soil layer 2 (middle layer) and 3 (bottom layer) equals ≥ 50 mm. + +| Source data| Access |Temporal coverage|Spatial information| +| :---| :--- | :--- | :---| +|SoilGrids250m 2017 |[SoilGrids](https://data.isric.org/geonetwork/srv/api/records/f36117ea-9be5-4afd-bb7d-7a3e77bf392a)|2017|Global, 250m| +|Copernicus Global Land Cover Layers: collection 2|[CGLS-LC100](https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_Landcover_100m_Proba-V-C3_Global#description)|2015|Global, 100m| +|Spatial Production Allocation Model (SPAM)
Global Spatially-Disaggregated Crop Production Statistics Data
for 2010 (V 1.0)|[SPAM](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/PRFF8V)|2010|Global, 5' (~10 km)| +|FAO Irrigation and Drainage Paper No. 56:
Crop Evapotranspiration (guidelines for computing crop water requirements)
by Richard G. ALLEN, Luis S. PEREIRA, Dirk RAES, Martin SMITH |[FAO Paper No.56](https://www.researchgate.net/publication/284300773_FAO_Irrigation_and_drainage_paper_No_56)|1998|Global, per crop type| + +### Methodology + +The methodology for the computation of the depth of the three soil layers has been adapted from [Burek et al., 2014](https://ec-jrc.github.io/lisflood/pdfs/Dataset_hydro.pdf). Here, total soil depth is taken as the 'absolute depth to bedrock' from [SoilGrids250m (2017)](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0169748) and 'root depth' for the fractions forest and non-forest is computed following methodology explained [above](../4_Static-Maps_land-use-depending#crop-coefficient,-crop-group-number,-manning’s-surface-roughness-coefficient-for-forest,-irrigated-crops-and-other-land-use-type-maps). Soil depth is expressed in mm.
+Soil depth layer 1 (surface) for forest/non-forest ($SD_1$) is assumed constant, equal to 50 mm all over the world: + +$$ +SD_1 = 50 mm +$$ + +Soil depth layers 2 (middle, $SD_2$) and 3 (bottom, $SD_3$) for forest/non-forest are computed in several steps – first at native resolution of the input dataset, then at required resolution. First step is following: + ++ for soil depth layer 2 (middle, $SD_2$) + +| Absolute depth to bedrock | Equation | +| :---| :--- | +| ≤300 mm | $SD_2 = \frac{absolutedepth-SD_1}{2}$ | +| >300 mm | $SD_2 = \min(rootdepth,(absolutedepth - 300mm - SD_1))$ | + +If the computed value of $SD_2$ is lower than 50mm, then it is used $SD_2$ = $50 mm$ (in order to account for data uncertainty). + ++ for soil depth layer 3 (bottom layer, $SD_3$) + +$$ +SD_3 = absolutedepth - (SD_1 +SD_2) +$$ + +Second step is to reduce the resolution of the resulting field from native to the required one (e.g. from 250 m to 1 arc min) as follows. Firstly, resolution is reduced to 1, 3, 15 arc min and 1, 3, 15, 60 degrees with mean.unweighted() reducer, and then all different resolutions are assembled to create a field with no missing values. For each resolution (going from the highest to the coarsest), grid-cells with missing values are identified and filled with the value of the corresponding grid-cell with non-missing value from the next resolution down map (e.g. using 3 arc min to fill in 1 arc min missing values). If the corresponding grid-cell is masked (has a missing value), then the value of the corresponding non-masked grid-cell from the next resolution down map is used, until all resolution maps are explored. If the corresponding grid-cell value of the coarsest resolution (here 60 degree) is still missing, a zero value is used.
+ + +### Results (examples) + +

+ + +

+ +*Figure 24: Soil depth layer 1 (surface layer) for forest map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 25: Soil depth layer 1 (surface layer) for non-forest map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 26: Soil depth layer 2 (surface layer) for forest map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 27: Soil depth layer 2 (surface layer) for non-forest map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 28: Soil depth layer 3 (surface layer) for forest map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 29: Soil depth layer 3 (surface layer) for non-forest map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* diff --git a/docs/4_Static-Maps_land-use/index.md b/docs/4_Static-Maps_land-use/index.md new file mode 100644 index 00000000..612bf241 --- /dev/null +++ b/docs/4_Static-Maps_land-use/index.md @@ -0,0 +1,203 @@ +# Land use + +The LISFLOOD hydrological model can distinguish the following land cover types: forest, inland water, sealed surface (impervious urban area), irrigated land, rice, and other land cover type. Interception, evapotranspiration, infiltration, and overland (or surface) flow respond differently to each surface type.
+ ++ **Fraction of inland water map**
+Inland water map includes information on rivers, freshwater and saline lakes, ponds and other permanent water bodies over the continents. In the LISFLOOD model the inland water fraction map is used to identify the fraction of the pixel covered by open water bodies where the most prominent hydrological process is evaporation. +Considering that LISFLOOD does not distinguish oceans from inland water it is recommended to verify consistency between water fractions and computational area mask, especially in the coastal areas. Pixels included in the computational area mask cannot be fully covered with ocean. If this happens in coastal areas, then the fraction of inland water must be set to 1 and the [lake mask](../4_Static-Maps_reservoirs-lakes#lake-mask-map) should be changed accordingly.
+ ++ **Fraction of sealed surface map**
+Here, the sealed surface map describes urban areas, characterizing the human impact on the environment. In the LISFLOOD model the sealed surface fraction map is used to identify impervious areas where there is no water infiltration into the soil, meaning water is accumulated in the surface depression, yet evaporates, but once depression is full - water is transported by a surface runoff.
+ ++ **Fraction of forest map**
+Forest map describes land use composed of evergreen and deciduous needle leaf and broad leaf trees. In the LISFLOOD model the forest fraction is used to identify forested areas where main hydrological processes are canopy interception, evapotranspiration from canopies, canopies drainage and evapotranspiration.
+ ++ **Fraction of irrigated crops map**
+Irrigated crops map includes all possible crops excluding rice (is modelled separately). In the LISFLOOD model the irrigated crops fraction map is used to identify part of the pixel which is used by agriculture - water is abstracted from ground water and surface water bodies to irrigate the fields; main hydrological process connected with the irrigated crops are canopy interception, evapotranspiration from canopies, canopies drainage and evapotranspiration.
+ ++ **Fraction of other land cover type map**
+Other land cover type map includes agricultural areas, non-forested natural area, pervious surface of urban areas. In the LISFLOOD model the other land cover type fraction map is used in the following hydrological processes: canopy interception, evaporation from the canopies, canopy drainage, plant evapotranspiration, evaporation from the soil. The relative importance of these processes depends on the Leaf Area Index.
+ + +## Fraction of inland water +### General map information and possible source data + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Fraction of inland water | fracwater.nc;
Type: Float32 | Units: -;
Range: [0-1] |Inland water fraction for each grid-cell;
values range from 0 (grid-cell has no inland water) to 1 (grid-cell is fully covered with inland water) | + + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|Copernicus Global Land Cover Layers: CGLS-LC100 collection 2 |[CGLS-LC100](https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_Landcover_100m_Proba-V-C3_Global#description) |2015 |Global, 100 m| + +### Methodology + +To create the fraction of inland water, the 'water-permanent-coverfraction' layer can be used. It gives the percentage values of permanent inland water covering each grid-cell, ranging from 0 - grid-cell has no inland water - to 100% - grid-cell is fully covered with inland water. Values are translated into fractions per grid-cell, and then high initial resolution reduced to the needed resolution, e.g. 1 arc min, with mean() reducer. +Note: Inland water fraction field should be checked for consistency with all other fractions. + +### Results (example) + +

+ + +

+ +*Figure 9: Fraction of inland water map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + +## Fraction of sealed surfaces +### General map information and possible source data + + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Fraction of sealed surfaces | fracsealed.nc;
Type: Float32 | Units: -;
Range: [0-1] |Urban surface fraction for each grid-cell;
values range from 0 (grid-cell has no urban surface) to 1 (grid-cell is fully covered with urban surface) | + + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|Copernicus Global Land Cover Layers: CGLS-LC100 collection 2 |[CGLS-LC100](https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_Landcover_100m_Proba-V-C3_Global#description) |2015 |Global, 100 m| + +### Methodology + +To create the fraction of sealed surface map, the 'urban-coverfraction' layer can be used. It gives the percentage values of urban surface covering each grid-cell, ranging from 0 % - grid-cell has no urban surface to 100 % - grid-cell is fully covered with urban surface. Values are translated into fractions per grid-cell and multiplied by 0.75 to account for urban permeable part (it is assumed that in general all urban areas have part which allows water to infiltrate, e.g. trees along the road, bushes along the fence, grass or moss between concrete tiles or cobble stones, and on average it covers 25 % of the area at a kilometre scale), and then high native resolution is reduced to the needed resolution, e.g. 1 arc min, with mean() reducer.
+Note: Sealed surface fraction field should be checked for consistency with all other fractions. + +### Results (example) + +

+ + +

+ +*Figure 10: Fraction of sealed surfaces map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + +## Fraction of forest +### General map information and possible source data + + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Fraction of forest | fracforest.nc;
Type: Float32 | Units: -;
Range: [0-1] |Forest fraction for each grid-cell;
values range from 0 (grid-cell has no forest) to 1 (grid-cell is fully covered with forest) | + + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|Copernicus Global Land Cover Layers: CGLS-LC100 collection 2 |[CGLS-LC100](https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_Landcover_100m_Proba-V-C3_Global#description) |2015 |Global, 100 m| + +### Methodology + +To create the fraction of forest map, the 'tree-coverfraction' layer can be used. It gives the percentage values of forest covering each grid-cell, ranging from 0 % - grid-cell has no forest to 100 % - grid-cell is fully covered with forest. Values are translated into fractions per grid-cell, and then high native resolution is reduced to the needed resolution, e.g. 1 arc min, with mean() reducer.
+Note: Forest fraction field should be checked for consistency with all other fractions. + +### Results (example) + +

+ + +

+ +*Figure 11: Fraction of forest map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + +## Fraction of irrigated crops +### General map information and possible source data + + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Fraction of irrigated crops | fracirrigated.nc;
Type: Float32 | Units: -;
Range: [0-1] |Irrigated crop (except rice) fraction for each grid-cell;
values range from 0 (grid-cell has no irrigated crops) to 1 (grid-cell is fully covered with irrigated crops)| + + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|Spatial Production Allocation Model (SPAM) - Global Spatially-Disaggregated Crop Production Statistics Data for 2010 (V 1.0) |[Spatial Production Allocation Model](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/PRFF8V) |2018 |Global, 5 arcmin (approx 10 km)| +|CORINE Land Cover 2018 CLC2018 |[CLC2018 ](https://land.copernicus.eu/pan-european/corine-land-cover) |2018 |European, 100 m| + +### Methodology + +To create the fraction of irrigated crops map, multiple data sources can be used, for example when more accurate information could be found regionally compared with a global dataset. We describe here the process when using two datasets.
+For a global coverage, the 'spam2010v1r0_global_physical-area_CROP_i' files from the SPAM dataset are used. They describe the area (in hectares) where each crop is grown (one file per crop), not considering how often its production is harvested, with 'i' denoting a portion of the crop is irrigated. The area of all irrigated crops globally (except rice – modelled separately) is summed and resulting values translated from hectares to fractions per grid-cell, and the native resolution is changed to the highest resolution of all datasets used, here CORINE dataset 100 m resolution.
+For a regional coverage (here Europe), the '212' - ‘Permanently irrigated land, excluding rice’ value from the CORINE dataset is used (discrete classification where each grid-cell is fully covered with a certain land cover), assigning grid-cells covered with irrigated crops fraction 1.
+Finally, the generated fields are merged, with priority given to the high quality dataset (here from CORINE) over its geographical domain (here over the European domain), and the merged field resolution is reduced to the needed resolution, e.g. 1 arc min, with mean() reducer.
+Note: Irrigated crops fraction field should be checked for consistency with all other fractions. + +### Results (example) + +

+ + +

+ +*Figure 12: Fraction of irrigated crops map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + +## Fraction of rice crops +### General map information and possible source data + + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Fraction of rice | fracrice.nc;
Type: Float32 | Units: -;
Range: [0-1] |Irrigated rice fraction for each grid-cell;
values range from 0 (grid-cell has no irrigated rice) to 1 (grid-cell is fully covered with irrigated rice)| + + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|Spatial Production Allocation Model (SPAM) - Global Spatially-Disaggregated Crop Production Statistics Data for 2010 (V 1.0) |[Spatial Production Allocation Model](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/PRFF8V) |2018 |Global, 5 arcmin (approx 10 km)| +|CORINE Land Cover 2018 CLC2018 |[CLC2018](https://land.copernicus.eu/pan-european/corine-land-cover) |2018 |European, 100 m| + +### Methodology + +To create the fraction of irrigated rice map, multiple data sources can be used, for example when more accurate information could be found regionally compared with a global dataset. We describe here the process when using two datasets.
+For a global coverage, the 'spam2010v1r0_global_physical-area_rice_i' file from the SPAM dataset is used. It describes the area (in hectares) where crop is grown, not considering how often its production is harvested, with 'i' denoting a portion of the crop is irrigated. The area of irrigated rice values translated from hectares to fractions per grid-cell, and the native resolution is changed to the highest resolution of all datasets used, here CORINE dataset 100 m resolution.
+For a regional coverage (here Europe), the '213' - ‘Rice field’ value from the CORINE dataset is used (discrete classification where each grid-cell is fully covered with a certain land cover), assigning grid-cells covered with irrigated rice fraction 1.
+Finally, the generated fields are merged, with priority given to the high quality dataset (here from CORINE) over its geographical domain (here over the European domain), and the merged field resolution is reduced to the needed resolution, e.g. 1 arc min, with mean() reducer.
+Note: Irrigated rice fraction field should be checked for consistency with all other fractions.
+ +### Results (example) + +

+ + +

+ +*Figure 13: Fraction of rice crops map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +## Fraction of other land use type +### General map information and possible source data + + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Fraction of other land use type | fracother.nc;
Type: Float32 | Units: -;
Range: [0-1] |Other (e.g. agricultural areas, non-forested natural areas, pervious surface of urban areas)
land cover type (not mentioned above) fraction for each grid-cell;
values range from 0 (grid-cell has no other land cover type) to 1 (grid-cell is fully covered with other land cover type);
computed in a following way: fraction_other = 1 - (fraction_inlandWater + fraction_urban + fraction_forest + fraction_irrigatedCrop + fraction_irrigatedRice + fraction_oceanWater)| + + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|Fraction of inland water|It can be prepared by implementing [this methodology](../4_Static-Maps_land-use#fraction-of-inland-water)|NA|Global| +|Fraction of sealed surfaces|It can be prepared by implementing [this methodology](../4_Static-Maps_land-use#fraction-of-sealed-surfaces)|NA|Global| +|Fraction of forest|It can be prepared by implementing [this methodology](../4_Static-Maps_land-use#fraction-of-forest)|NA|Glonbal| +|Fraction of irrigated crops|It can be prepared by implementing [this methodology](../4_Static-Maps_land-use#fraction-of-irrigated-crops)|NA|Global| +|Fraction of rice|It can be prepared by implementing [this methodology](../4_Static-Maps_land-use#fraction-of-rice-crops)|NA|Global| + +### Methodology + +Here the other land cover type map is created based on all other fraction maps required by LISFLOOD model. It should be noted that: i) all fraction maps together (including fraction of other land cover type) should sum up to 1 in each grid-cell, and ii) consistency check for all fractions must be done because data come from different sources and it can happen that fractions summed can result to more than 1.
+The following procedures are recommended to check consistency between fraction maps. All fractions are summed up to compute the other land cover type fraction map. If the fraction sum is less than 1, then the other land cover type fraction is calculated as 1 minus all fraction sum, else other land cover type fraction is 0. For cases when the sum is greater than 1, a correction for forest, irrigated crops, rice, and sealed surface fractions is computed:
+ +$ \small fractionCorrectionFactor=\frac{fractionAllSum-1}{fractionForest+fractionIrrigated+fractionRice+fractionSealed}$ + +Finally, if data sources for forest, irrigated crops, rice, and sealed surfaces fractions have the same level of uncertainty, each of these fractions are corrected in the same way at the needed resolution (e.g. 1 and 3 arc min):
+ +$ \small fractionCorrectedX = fractionX - (fractionX \cdot fractionCorrectionFactor) $
+where X is Forest, Irrigated, Rice, Sealed. + +### Results (example) + +

+ + +

+ +*Figure 14: Fraction of other land use type map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* diff --git a/docs/4_Static-Maps_leaf-area-index/index.md b/docs/4_Static-Maps_leaf-area-index/index.md new file mode 100644 index 00000000..8c1aa083 --- /dev/null +++ b/docs/4_Static-Maps_leaf-area-index/index.md @@ -0,0 +1,50 @@ +## Leaf Area Index + +The Leaf Area Index (LAI) is defined as half the total area of green elements of the canopy per unit horizontal ground area m2/m2.
+The LAI quantifies the thickness of the vegetation cover. The Global Climate Observing System ([GCOS](https://public.wmo.int/en/programmes/global-climate-observing-system)) recognises LAI as an Essential Climate Variable ([ECV](https://public.wmo.int/en/programmes/global-climate-observing-system/essential-climate-variables)). + +Here, forest includes evergreen and deciduous needle leaf and broad leaf trees, irrigated crops - all possible crops excluding rice (is modelled separately), and other land cover type - agricultural areas, non-forested natural area, pervious surface of urban areas. +In LISFLOOD LAI has an important role in water interception and evapotranspiration processes. + +### Leaf Area Index for land covers forest, irrigated crops, and other + +#### General map information and possible source data + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +| LAI for forest | laif.nc; Float32 | Units: -; Range: 0 ..7 |10-day average (36 maps in total) Leaf Area Index for closed forested areas (forest fraction per grid-cell ≥ 0.7)| +| LAI for irrigated crops | laii.nc; Float32 | Units: -; Range: 0 ..7 |10-day average (36 maps in total) Leaf Area Index for irrigated crop areas (irrigated crop fraction per grid-cell ≥ 0.7)| +| LAI for other | laio.nc; Float32 | Units: -; Range: 0 ..7 |10-day average (36 maps in total) Leaf Area Index for mainly other land cover type areas (other land cover type fraction per grid-cell ≥ 0.7)| + + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +| Copernicus Global Land Service LAI Collection Version 2 | https://land.copernicus.eu/global/products/lai | 1 January 2010 - 31 December 2019 | Global, 1 km| +| Fraction of forest | It can be prepared by using [this methodology](../4_Static-Maps_land-use#fraction-of-forest)| NA | Global, 1' and 3'| +| Fraction of irrigated crops | It can be prepared by using [this methodology](../4_Static-Maps_land-use#fraction-of-irrigated-crops)| NA | Global, 1' and 3'| +| Fraction of other land cover type | It can be prepared by using [this methodology](../4_Static-Maps_land-use#fraction-of-other-land-use-type)|NA | Global, 1' and 3'| + +#### Methodology + +To create LAI for forest, irrigated crops and other land cover type, maps [Copernicus Global Land Service LAI Collection](https://land.copernicus.eu/global/products/lai) Version 2 can be used.
The dataset provides a 10-day average LAI information, 36 maps each year. Here, to normalise the climate over different regions of the globe, the 10-day average LAI maps are aggregated over a 10-year period (i.e. first 10-day average of years 2010-2019 are aggregated to compute a first 10-day climatological average). As a result 36 climatological LAI maps are calculated. +Then, fraction maps for forest, irrigated crops, and other land cover type are used to mask non-dense areas of the land cover type in question (i.e. fraction is less than 0.7) over the climatological LAI maps.
+The LAI map resolution of the resulting field is reduced from native to the required one (e.g. from 1 km to 1 arc min) as follows. Firstly, the resolution is reduced to 1, 3, 15 arc min and 1, 3, 15, 60 degrees with mean.unweighted() reducer, and then all different resolutions are assembled to create a field with no missing values. For each resolution (going from the highest to the coarsest), grid-cells with missing values are identified and filled with the value of the corresponding grid-cell with non-missing value from the next resolution down map (e.g. using 3 arc min to fill in 1 arc min missing values). If the corresponding grid-cell is masked (has a missing value), then the value of the corresponding non-masked grid-cell from the next resolution down map is used, until all resolution maps are explored. If the corresponding grid-cell value of the coarsest resolution (here 60 degree) is still missing, a zero value is given. + +#### Results (examples) + + + +

+ + +

+ +*Figure 51: Leaf area index for forest 5th January map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + +

+ + +

+ +*Figure 52: Leaf area index for forest 5th August map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* diff --git a/docs/4_Static-Maps_reservoirs-lakes/index.md b/docs/4_Static-Maps_reservoirs-lakes/index.md new file mode 100644 index 00000000..9477e27f --- /dev/null +++ b/docs/4_Static-Maps_reservoirs-lakes/index.md @@ -0,0 +1,65 @@ +# Reservoirs and lakes + +Lakes and reservoirs can be defined as a significant volume of water, which occupies a depression of the land and has no direct connection with a sea. They can intensify winter snowstorms, increase precipitation or/and surface temperature, generate night convection and intensive thunderstorms. Lakes and reservoirs can influence the atmosphere regionally and globally.
+ + Lake mask map +In the LISFLOOD model lake mask map represents the area covered by lakes and is used for computing evaporation from open water surfaces. + + Lakes & reservoirs maps +In the LISFLOOD model lakes and reservoirs maps represent only outflow location grid-cells (store lake/reservoir ID number in the morphological parameter look-up table) and are used for the lakes and reservoirs modelling. + + +## Lake mask map + +### General map information and possible source data + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +| Lake mask| lakemask.nc;
Type: Float32 | Units: -;
Range: 0 or 1 | Map of the footprint of lakes| + + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|Global Lakes and Wetlands Database (GLWD):
Large Lake Polygons (Level 1) |[GLWD leve1](https://www.worldwildlife.org/publications/global-lakes-and-wetlands-database-large-lake-polygons-level-1)|2004|Global, 1:1 to 1:3 million resolution| +|Global Lakes and Wetlands Database (GLWD):
Small Lake Polygons (Level 3) |[GLWD leve1](https://www.worldwildlife.org/publications/global-lakes-and-wetlands-database-large-lake-polygons-level-2)|2004|Global, 1:1 to 1:3 million resolution| +|Fraction of inland water| It can be prepared by using
the methodology explained [here](../4_Static-Maps_land-use#lend-use)|NA|Global| + +### Methodology + +Fraction of inland water map is adjusted to the LISFLOOD model – all grid-cells fully covered with ocean water that are considered during computations are filled with inland water.
+If a grid-cell has any fraction of inland water and is inside the GLWD Level 1 and GLWD level 2 lake shapefiles, it is marked as ‘1’ (fully covered), otherwise it is marked as ‘0’.
+ + +### Results (examples) + + +

+ + +

+ +*Figure 53: Lakemask map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right) with coloured areas showing land pixel.* + + + +## Lakes and reservoirs maps + + +### General map information and possible source data + + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Lakes|lakes.nc;
Type: Float32|Units: -;
Range: integer ID number to identify each lake |Lake outflow location
(stores lake ID number in the morphological parameter look-up table)| +|Reservoirs|res.nc;
Type: Float32|Units: -;
Range: integer ID number to identify each reservoir |Reservoir outflow location
(stores reservoir ID number in the morphological parameter look-up table)| + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|Lakes datase|NA|NA|European/Global, ASCII table| +|Reservoirs dataset|NA|NA|European/Global, ASCII table| +|Local Drain Direction (LDD) map| It can be prepared by following the methodology explained [here](../4_Static-Maps_topography)|NA|Global| + +### Methodology + +Any ASCII tables with lakes and reservoirs geographical location should be mapped on the local drain direction (ldd) map. + + + diff --git a/docs/4_Static-Maps_rice-calendar/index.md b/docs/4_Static-Maps_rice-calendar/index.md new file mode 100644 index 00000000..f10beae7 --- /dev/null +++ b/docs/4_Static-Maps_rice-calendar/index.md @@ -0,0 +1,60 @@ +# Rice calendar + +Rice is the world’s most important food crop. It is harvested from over 163 million hectares in more than 100 countries ([FAO](http://www.fao.org/faostat/en/#home)). It is grown in diverse cropping systems and environments - from single crop systems in temperate and tropical regions in both rainfed and irrigated conditions, to intensive monoculture in irrigated areas in the tropics where rice is grown two or three times per year ([Laborte et al, 2017](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5448352/)). Rice fields strongly differ from other crop fields in water routing, so hydrological models (e.g. LISFLOOD) have a separate component that computes necessary parameters over the rice fields. + +### General map information and possible source data + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +| Rice planting day | riceplantingday**N**.nc; Float32 | Units: calendar day number;
Range: 1 ..365 |Map with first/second rice season planting day | +| Rice harvest day | riceharvestday**N**.nc; Float32 | Units: calendar day number;
Range: 1 ..365 |Map with first/second rice season harvesting day| + +*where **N** is the number of season (N = ’1’ for first season, N = ’2’ for second season). With source data below it is possible to generate N = ’3’ third season. + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|RiceAtlas, a global database of rice calendars and production;
Version 3 |[RiceAtlas](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/JE6R2R)| up to 2017 | Global, shapefiles| + +## Methodology + +For the rice calendar maps, the ‘country subdivision’ shapefiles and 'rice production' table from RiceAtlas can be used. The 'rice production' table provides the following information: 'peak' planting days (named as PLANT_PK1, PLANT_PK2, PLANT_PK3), 'peak' harvest days (named as HARV_PK1, HARV_PK2, HARV_PK3), and number of rice total seasons per year (named as NUM_CROP), seasons varying from 1 (minimum) to 3 (maximum).
+The rice seasons are ordered according to the plant starting date in increasing Julian day order (i.e. season 1 being the one starting the earliest in the calendar year). +Then, the rice planting and harvesting fields for season 1 and 2 are created based on the ordered seasons. If there is only one season then its dates are copied to season 2. To insure the absence of missing data, a fixed value of rice planting/harvesting is associated with each grid-cell corresponding to nil rice fraction as the pre-computed global mode.unweighted() values of the first rice season – here planting date equals 105, harvesting date equals 227.
+ +## Results (examples) + + + +

+ + +

+ +*Figure 54: Rice planting day 1 (season 1) map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 55: Rice harvest day 1 (season 1) map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 55: Rice planting day 2 (season 2) map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 57: Rice harvest day 2 (season 2) map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* diff --git a/docs/4_Static-Maps_soil-hydraulic-properties/index.md b/docs/4_Static-Maps_soil-hydraulic-properties/index.md new file mode 100644 index 00000000..cac0fdd1 --- /dev/null +++ b/docs/4_Static-Maps_soil-hydraulic-properties/index.md @@ -0,0 +1,191 @@ +# Soil hydraulic properties + +Soil hydraulic parameters are used to calculate water dynamics through a vertical soil profile.
+In the LISFLOOD model the relationship between soil moisture and suction pressure (water retention curve), and hydraulic conductivity and soil moisture is described by the Van Genuchten equation and requires the following parameters: saturated hydraulic conductivity, lambda, genu alpha, theta residual and theta saturated.
++ Theta saturated (thetas) is the saturated water content soil hydraulic property representing the maximum water content in the soil.
++ Theta residual (thetar) is the residual water content soil hydraulic property representing the minimum water content in the soil.
++ Lambda is the Van Genuchten parameter λ (also referred as ‘n-1’ in literature) soil hydraulic property representing the pore size index of the soil. ++ Genu alpha (genua) is the Van Genuchten parameter α soil hydraulic property.
++ K saturated (Ksat) is the saturated hydraulic conductivity soil hydraulic property describing the ease with which water moves through pore spaces of the soil.
+ +Moreover, LISFLOOD differentiates between the water dynamics of areas with topsoil covered by forest and topsoil covered by non-forest land types. Here, forest includes evergreen and deciduous needle leaf and broad leaf trees, and non-forest (also referred to as ’others‘) includes all the other land cover types apart from forest. According to [FAO_2008](http://www.fao.org/uploads/media/Harm-World-Soil-DBv7cv_1.pdf) topsoil represents the first 30 cm, in the LISFLOOD model the topsoil is represented by the first two soil layers of the model (surface and middle layers). As a result, two soil hydraulic parameters are assigned to each LISFLOOD soil depth layer (soil depth layers are explained [here](../4_Static-Maps_land-use-depending) that represent topsoil, one for forested and one for non-forested areas. The soil hydraulic parameters for the third soil layer (bottom layer) do not depend on the land cover type.
+Soil hydraulic parameters are often derived from pedotransfer functions (PTFs) which translate soil characteristics to soil hydraulic properties. It should be noted that the same set of PTFs should be used to compute all different soil hydraulic properties. This guide describes the implementation of the PTFs proposed by [Toth et al. (2015)](https://onlinelibrary.wiley.com/doi/full/10.1111/ejss.12192). Clearly, LISFLOOD users can decide to implement a different set of PTFs.
+ + +## Soil hydraulic parameters for layers 1,2,3, for forested and non-forested areas maps + +## General map information and possible source data + +In the following table the soil hydraulic parameters required by the LISFLOOD model are presented.
+ +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Theta saturated |thetas**N_T**.nc;
Type: Float32 |Units: m3/m3;
Range: > 0.000 & < 1.000 |Saturated volumetric soil moisture content for forested/non-forested (others) areas | +|Theta residual |thetar**N_T**.nc;
Type: Float32 |Units: m3/m3;
Range: > 0.000 & < 1.000 |Residual volumetric soil moisture content for forested/non-forested (others) areas | +|lambda |lambda**N_T**.nc;
Type: Float32 |Units: - ;
Range: > 0.000 & ≤ 0.42 |Pore size index (λ) for forested/non-forested (others) areas | +|Genu Alpha|genua**N_T**.nc;
Type: Float32 |Units: cm-1 ;
Range: > 0.000 & ≤ 0.055 |Van Genuchten parameter (α) for forested/non-forested (others) areas soil | +|K saturated|ksat**N_T**.nc;
Type: Float32 |Units: mm/day ;
Range: > 0.000 |Saturated conductivity for forested/non-forested (others) areas | + +*where **N** is the number of soil depth layer (**N** = ’1’ for surface layer, **N** = ’2’ for middle layer, **N** = ’3’ for bottom layer), and **T** is the landcover type (**T** = ’f’ for forested areas, **T** = ’o’ for non-forested areas or others). For **N** = ’3’ landcover type is not differentiated (forested areas and others are combined). + + +The table below lists the data required for the implementation of the PTFs proposed by [Toth et al. (2015)](https://onlinelibrary.wiley.com/doi/full/10.1111/ejss.12192). + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +| % of Clay (C)|[ISRIC](https://files.isric.org/soilgrids/latest/data/clay/), mean value |2020|Global, 250 m available depths (cm):
0-5, 5-15, 15-30, 30-60, 60-100, 100-200| +| % of Silt (S)|[ISRIC](https://files.isric.org/soilgrids/latest/data/silt/), - |2020|Global, 250 m available depths (cm):
0-5, 5-15, 15-30, 30-60, 60-100, 100-200| +| % organic carbon (OC)|[ISRIC](https://files.isric.org/soilgrids/latest/data/soc/), mean value|2020|Global, 250 m available depths (cm):
0-5, 5-15, 15-30, 30-60, 60-100, 100-200| +| Bulk Density (BD)|[ISRIC](https://files.isric.org/soilgrids/latest/data/bdod/), median value (Q0.5)|2020|Global, 250 m available depths (cm):
0-5, 5-15, 15-30, 30-60, 60-100, 100-200| +| Soil PH |[ISRIC](https://files.isric.org/soilgrids/latest/data/phh2o/), mean value|2020|Global, 250 m available depths (cm):
0-5, 5-15, 15-30, 30-60, 60-100, 100-200| +| Cation exchange capacity (CEC)|[ISRIC](https://files.isric.org/soilgrids/latest/data/cec/), mean value|2020|Global, 250 m available depths (cm):
0-5, 5-15, 15-30, 30-60, 60-100, 100-200| +| Soil depth map | It can be prepared by using the
methodology explained [here](../4_Static-Maps_land-use-depending)| NA | Global, 250 m | +| Fraction of forested
areas map | It can be prepared by using the
methodology explained [here](../4_Static-Maps_land-use)| NA| Global, 100 m | + +## Methodology + +The table below shows the PTFs developed in [Toth et al. (2015)](https://onlinelibrary.wiley.com/doi/full/10.1111/ejss.12192). The column on the right clarifies the conditions that must be considered when computing the soil hydraulic parameters, regardless of the selected PTF.
+ + +| Parameter | Pedotransfer function* | Condition | +| :---| :--- | :--- | +|Theta saturated |$Thetas = (0.83080 - 0.28217 \cdot D + 0.0002728 \cdot C + 0.000187 \cdot S)$ |$Thetas <1$ (hurdle) | +|Theta residual |$Sand = 100 -S-C$
$Thetar=0.179$ if Sand<2.0
$Thetar=0.041$ if Sand≥2.0 |Thetar < Thetas (hurdle) | +|Lambda |$log10(λ) =$
$ 0.22236 - 0.30189 \cdot BD - 0.05558 \cdot T - 0.005306 \cdot C - 0.003084 \cdot S - 0.01072 \cdot OC$ |lambda≤0.42 (recommended)| +|Genu Alpha | $log10(Alpha) =$
$ -0.43348 - 0.41729 \cdot D - 0.04762 \cdot OC + 0.21810 \cdot T - 0.01581 \cdot C - 0.01207 \cdot S$ |alpha≤0.055(recommended)| +|K saturated** | $log10(KSat) =$
$ 0.40220 + 0.26122 \cdot pH + 0.44565 \cdot T - 0.02329 \cdot C - 0.01265 \cdot S - 0.01038 \cdot CEC $| Ksat>0 (hurdle) | + +*where D is bulk density, C - % of clay, S - % of silt, OC - organic content, CEC - cation exchange capacity, pH - soil pH, and T is the topsoil and subsoil distinction. FAO_2008 (link) defines topsoil as 0-30 cm layer and subsoil as 30-100 cm layer. When soil depth is within the definition of topsoil then T = 1, otherwise T = 0. +**K saturated results for Toth equation are in cm/day, the LISFLOOD model requires mm/day. + + +In this example of application, soil hydraulic parameters are firstly computed at the ISRIC soil proprieties resolution (~250 m) and resampled horizontally at a second stage. +Because in the current LISFLOOD model version, the soil depth layer 1 (surface) is fixed to the uniform value of 50 mm (see Section 6.2), the soil hydraulic parameters for this layer are calculated by applying the PTFs to the ISRIC soil characteristics of the 0-5 cm depth.
+For soil depth layers 2 (middle) and 3 (bottom) each soil hydraulic parameter is computed in 2 steps.
+In the first step the soil hydraulic parameters are computed for each ISRIC depth by applying the PTFs to each of the depths of the ISRIC soil characteristics (i.e. Clay, Silt, etc.) defined according to the ISRIC database (see Figure 30, Step 1).
+The second step consists in computing the value of the soil hydraulic parameter for the specific depth of the LISFLOOD soil depth layers 2 and 3. Unlike soil depth layer 1, the depths of soil layer 2 and soil layer 3 vary spatially (see Figure 26 to Figure 29). Each parameter is calculated as the weighted average of the parameters computed in step 1, for the soil depth corresponding to the grid-cell. Only the parameters that are within specific soil depth layer are used in the averaging operation (see Figure 30, step 2). +The following equation is used to compute the soil hydraulic parameter for the LISFLOOD model:
+ +$ \small parameter = \frac{ID2 \cdot parameter_{ID2} + ID3 \cdot parameter_{ID3} + ID4 \cdot parameter_{ID4}}{ID2+ID3+ID4} $ + +where ID1, ID2 and ID3 are the depths of the input ISRIC soil characteristics. Only the ISRIC depths included in the soil depth layer are used to compute the parameter. In the example, showed in Figure 30, the soil depth for layer 2 is equal to 450 mm, and the LISFLOOD soil hydraulic parameter is computed as:
+ +$ \small parameter = \frac{100 \cdot parameter_{ID2} + 150 \cdot parameter_{ID3} + 200 \cdot parameter_{ID4}}{100+150+200} $ + +where 100 is the thickness of ISRIC layer [5-15], 150 is the thickness of ISRIC layer [15-30], 200 is the result of the difference between 300 mm thickness of ISRIC layer (30-60) minus the 100 mm that are not in the soil depth grid-cell (ISRIC layer depths are expressed in cm, but for computations values are translated in mm).
+If cell's soil depth starts at a greater depth than 2000 mm, then each parameter is computed by using the input variables for depth layer (100-200).
+ +

+ +

+ +*Figure 30: Representation of ISRIC dataset depths (in squared brackets are the available depths), soil hydraulic parameters calculated for each ISRIC depth, LISFLOOD soil depth layer and the final soil hydraulic parameters for LISFLOOD model.* + +The computed soil depth hydraulic property fields are resampled from native to required resolution. For layer 1 and 2 this can be done in a following way: the computed fields at native resolution are combined with forested and non-forested (others) area fields in % per grid-cell by taking the weighted average of the parameter according to the forest (or others) percentage per grid-cell. For layer 3 this can be done following soil depth layer 2 and 3 methodology. Below is an example for layer 2 or 3, by using percentages of forest/ others per grid-cell at 250 m resolution parameter values: + +| Forest % | Others % | Parameter value| +| :---| :--- | :--- | +| 5 | 95 | 0.6 | +| 20 | 80 | 0.6 | +| 50 | 50 | 0.3 | +| 90 | 10 | 0.1 | + +Parameter value for forested area at 1 arcmin resolution: + +$ \frac{90 \cdot 0.1 + 50 \cdot 0.3 + 20 \cdot 0.6 + 5 \cdot 0.6}{90+50+20+5} = 0.3 $ + +Parameter value for non-forested area at 1 arcmin resolution: + +$ \frac{10 \cdot 0.1 + 50 \cdot 0.3 + 80 \cdot 0.6 + 95 \cdot 0.6}{10+50+80+95} = 0.5 $ + + +### Results (examples) + + +

+ + +

+ +*Figure 31: Theta saturated layer 1 (surface layer) for forested areas map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 32: Theta saturated layer 1 (surface layer) for non-forested areas map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 33: Theta saturated layer 2 (middle layer) for forested areas map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 34: Theta saturated layer 2 (middle layer) for non-forested areas map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 35: Theta saturated layer 3 (bottom layer) for forested and non-forested areas together map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 36: K saturated layer 1 (surface layer) for forested areas map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 37: K saturated layer 1 (surface layer) for non-forested areas map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 38: K saturated layer 2 (surface layer) for forested areas map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 39: K saturated layer 2 (surface layer) for non-forested areas map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + + +

+ + +

+ +*Figure 40: K saturated layer 3 (bottom layer) for forested and non-forested areas together map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* diff --git a/docs/4_Static-Maps_topography/index.md b/docs/4_Static-Maps_topography/index.md new file mode 100644 index 00000000..95aeb5b7 --- /dev/null +++ b/docs/4_Static-Maps_topography/index.md @@ -0,0 +1,127 @@ +# Topography maps + ++ **Local drain direction map** +The local drain direction (ldd) in a distributed hydrological model is the essential component to connect the grid cells to express the flow direction from one cell to another and forming a river network from springs to mouth. Currently LISFLOOD hydrological model needs ldd in PCRaster file format. Following links provide examples how local drain direction map can be generated with [ArcGIS](https://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/flow-accumulation.htm) or [PCRaster](https://pcraster.geo.uu.nl/pcraster/4.3.0/documentation/pcraster_manual/sphinx/op_upstream.html).
++ **Slope gradient map** +Elevation data and its derivate (e.g. slope) are used in hydrological models for snow processes and for routing of surface runoff. In the LISFLOOD model the slope gradient map is used for surface routing.
++ **Standard deviation of elevation map** +Elevation data and its derivate (e.g. standard deviation of elevation) are used in hydrological models (e.g. the LISFLOOD model) for snow processes and for routing of surface runoff.
++ **Map with upstream area** +The upstream area in a distributed hydrological model is the accumulated area of all connected water pixels that in a river network starts at the springs and goes to the river mouth. Springs grid-cells have lowest values, and river mouth grid-cells have the highest values on the map. Following links provide examples how upstream area map can be generated with [ArcGIS](https://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/flow-accumulation.htm) or [PCRaster](https://pcraster.geo.uu.nl/pcraster/4.3.0/documentation/pcraster_manual/sphinx/op_upstream.html).
+ +## Local drain direction map +### General map information and possible source data + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Local drain direction (ldd) map | ldd.nc/ldd.map;
Type: Byte | Units: -;
Values: 1,2,3,4,5,6,7,8,9 |Local drain direction map - flow directions from each grid-cell to its steepest downslope neighbour; geographical directions are coded n a following way: N=8, NE=9, E=6, SE=3, S=2, SW=1, W=4, NW=7, and grid-cells with only inflow of water (pits) equal 5; the pit grid-cell at the end of the path is the outlet point of a catchment; NoData=255 | + + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|Flow direction map |[cama-flood](http://hydro.iis.u-tokyo.ac.jp/~yamadai/cama-flood/index.html) |2018 |Global, 1' and 3'| + + +### Methodology + +It is suggested to use cautiously any file transforming commands as they might change file structure. Here it is suggested to use only CDO, GDAL and Python commands to preserve initial file structure as much as possible (especially latitude and longitude values) and be able to use it later as a Template for all other static maps.
+To create a local drain direction (ldd) field from a flow direction map, initial file values in a NetCDF format are changed in the following way for different geographical directions. Mouth: ‘-1’=>’5’, Inland: ‘0’=>’5’, North: ‘1’=>’8’, NE: ‘2’=>’9’, East: ‘3’=>’6’, SE: ‘4’=>’3’, South: ‘5’=>’2’, SW: ‘6’=>’1’, West: ‘7’=>’4’, NW: ‘8’=>’7’.
+Note: Obtaining a flow direction map from a digital elevation model is a complex process and is not described here. A good example of how to create a flow direction map can be found in [Yamazaki et al. (WRR, 2019)](https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2019WR024873). Note also that the created ldd file must be checked and corrected if needed, so that water is not flowing out of the region of interest. Finally, after all manipulations of the NetCDF file, latitude and longitude values from the native files must be copied to the newly generated file to insure identical structure of all static map files.
+ +### Results (example) + +

+ + +

+ +*Figure 5: Local drain direction map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + +## Gradient map +### General map information and possible source data + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Gradient map | gradient.nc;
Type: Float32 | Units: -;
Range: >0 |Slope gradient | + + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +| MERIT DEM: Multi-Error-Removed Improved-Terrain DEM| [MERIT DEM](http://hydro.iis.u-tokyo.ac.jp/~yamadai/MERIT_DEM/index.html) | 2018 | Global, 3" (~90 m) | +|Local drain direction (ldd) map |It can be created using the methodology explained [here](../4_Static-Maps_topography#local-drain-direction-map) |NA |Global, 1' and 3'| + +### Methodology +The local drain direction (ldd) file can be used to extract the connectivity between grid-cells. The distance (in meters) between two connected grid-cells is calculated together with the absolute difference (in meters) of elevation between the two grid-cells.
+Gradient is assigned to the upstream grid-cell, and computed according to the following formula:
+ +$$ +gradient=\frac{elevation difference}{distance} +$$ + +$gradient$ is set equal 0 where $ldd$ is 5. + +### Results (examples) + +

+ + +

+ +*Figure 6: Slope gradient map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + + +## Standard deviation of elevation map +### General map information and possible source data + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Elevation standard deviation | elvstd.nc;
Type: Float32 | Units: -;
Range: >=0 |Standard deviation of elevation (altitude difference elevation within a grid-cell) | + + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +| MERIT DEM: Multi-Error-Removed Improved-Terrain DEM| [MERIT DEM](http://hydro.iis.u-tokyo.ac.jp/~yamadai/MERIT_DEM/index.html) | 2018 | Global, 3" (~90 m) | + +### Methodology + +High resolution of initial elevation data is to be reduced to the needed coarser resolution i) by averaging elevation data with mean.unweighted() reducer to compute elevation field at required resolution, and ii) by computing standard deviation of all 90-meter grid-cells on the elevation field included into one e.g. 1 arc min grid-cell with stDev.unweighted() reducer. + +### Results (examples) + +

+ + +

+ +*Figure 7: Standard deviation of elevation map at 1 arc min horizontal resolution for European domain (left) and at 3 arc min horizontal resolution for Global domain (right).* + +## Upstream area + +| Map name | File name;type | Units; range | Description | +| :---| :--- | :--- | :--- | +|Upstream area | upArea.nc;
Type: Float32 | Units: $m^2$;
Range: >0 |Map with upstream area (based on ldd and pixarea maps) - the accumulated area of all connected water pixels that in a river network starts at the springs and goes to the river mouth| + + +| Source data| Reference/preparation | Temporal coverage | Spatial information | +| :---| :--- | :--- | :--- | +|Pixel area map |It can be created using the methodology explained [here](../4_Static-Maps_general-maps#grid-cell-length-and-grid-cell-area-maps) |NA |Global, 1' and 3'| +|Local drain direction (ldd) map |It can be created using the methodology explained [here](../4_Static-Maps_topography#local-drain-direction-map) |NA |Global, 1' and 3'| + +### Methodology + +To create an upstream area, pixel area and ldd maps are used with the PCRaster function accuflux. + +### Results (examples) + +

+ + +

+

+ +

+ +*Figure 8: Map with upstream area at 1 arc min horizontal resolution for European domain (top left) and for the Po River Valley (bottom), and at 3 arc min horizontal resolution for Global domain (top right).* + + diff --git a/docs/4_annex_input-files/index.md b/docs/4_annex_input-files/index.md new file mode 100644 index 00000000..a70c8d95 --- /dev/null +++ b/docs/4_annex_input-files/index.md @@ -0,0 +1,134 @@ +# LISFLOOD input files + +All input that LISFLOOD requires are either in map or table format. Before showing a listing of all LISFLOOD input files, first some important remarks on the meteorological input data LISFLOOD requires. + + +## Treatment of meteorological input variables + +The meteorological conditions provide the driving forces behind the water balance. LISFLOOD uses the following meteorological input variables: + + +| **Code** | **Description** | **Unit** | +| --------- | -------------------------------------------------- | ------------------ | +| $P$ | Precipitation | $[\frac{mm}{day}]$ | +| $ET0$ | Potential (reference) evapotranspiration rate | $[\frac{mm}{day}]$ | +| $EW0$ | Potential evaporation rate from open water surface | $[\frac{mm}{day}]$ | +| $ES0$ | Potential evaporation rate from bare soil surface | $[\frac{mm}{day}]$ | +| $T_{avg}$ | Average *daily* temperature | $^\circ C$ | + +> **Note** that the model needs *daily* average temperature values, even if the model is run on a smaller time interval (e.g. hourly). This is because the routines for snowmelt and soil freezing are use empirical relations which are based on daily temperature data.. Just as an example, feeding hourly temperature data into the snowmelt routine can result in a gross overestimation of snowmelt. This is because even on a day on which the average temperature is below $T_m$ (no snowmelt), the instantaneous (or hourly) temperature may be higher for a part of the day, leading to unrealistically high simulated snowmelt rates. + + +Both precipitation and evaporation are internally converted from *intensities* $[\frac{mm}{day}]$ to *quantities per time step* $[mm]$ by multiplying them with the time step, $\Delta t$ (in $days$). +For the sake of consistency, all in- and outgoing fluxes will also be described as *quantities per time step* $[mm]$ in the following, unless stated otherwise. +$ET0$, $EW0$ and $ES0$ can be calculated using standard meteorological observations. + +To this end a dedicated pre-processing application has been developed (LISVAP), which is documented in a separate [manual](https://ec-jrc.github.io/lisflood-lisvap/). + + + +## LISFLOOD input maps + + +***Table:*** *LISFLOOD input maps.* + +| Map | Default name | Units, range | Description | +| --------------------------------------------------------- | ------------------- | ------------------------------------------------------ | ------------------------------------------------------------ | +| **GENERAL** | | | | +| MaskMap | area.map | Unit: -
Range: 0 or 1 | Boolean map that defines model boundaries | +| **TOPOGRAPHY** | | | | +| Ldd | ldd.map | U.: flow directions
R.: 1 ≤ map ≤ 9 | local drain direction map (with value 1-9); this file contains flow directions from each cell to its steepest downslope neighbour. Ldd directions are coded according to the following diagram:
![](../media/image58.png)
This resembles the numeric key pad of your PC's keyboard, except for the value 5, which defines a cell without local drain direction (pit). The pit cell at the end of the path is the outlet point of a catchment. | +| Grad | gradient.map | U.: $\frac{m}{m}$
R.: map > 0
| Slope gradient | +| Elevation Stdev | elvstd.map | U.: $m$
R.: map ≥ 0 | Standard deviation of elevation | +| **LAND USE -- fraction maps** | | | | +| Fraction of water | fracwater.map | U.: [-]
R.: 0 ≤ map ≤ 1 | Fraction of inland water for each cell. Values range from 0 (no water at all) to 1 (pixel is 100% water) | +| Fraction of sealed surface | fracsealed.map | U.: [-]
R.: 0 ≤ map ≤ 1 | Fraction of impermeable surface for each cell. Values range from 0 (100% permeable surface -- no urban at all) to 1 (100% impermeable surface). | +| Fraction of forest | fracforest.map | U.:[-]
R.: 0 ≤ map ≤ 1 | Forest fraction for each cell. Values range from 0 (no forest at all) to 1 (pixel is 100% forest) | +| Fraction of other land cover | fracother.map | U.: [-]
R.: 0 ≤ map ≤ 1 | Other (agricultural areas, non-forested natural area, pervious surface of urban areas) fraction for each cell. | +| **LAND COVER depending maps** | | | | +| Crop coef. for forest | cropcoef_forest.map | U.: [-]
R.: 0.8≤ map ≤ 1.2 | Crop coefficient for forest | +| Crop coef. for other | cropcoef_other.map | U.: [-]
R.: 0.8≤ map ≤ 1.2 | Crop coefficient for other | +| Crop group number for forest | crgrnum_forest.map | U.: [-]
R.: 1 ≤ map ≤ 5 | Crop group number for forest | +| Crop group number for forest | crgrnum_other.map | U.: [-]
R.: 1 ≤ map ≤ 5 | Crop group number for other | +| Manning for forest | mannings_forest.map | U.: $m^{-1/3} s$
R.: 0.2≤ map ≤ 0.4 | Manning's roughness for forest | +| Manning for other | mannings_other.map | U.: $m^{-1/3} s$
R.: 0.01≤ map ≤0.3 | Manning's roughness for other | +| Soil depth for forest for layer1a | soildep1a_forest.map | U.: $mm$
R.: map ≥ 50 | Forest soil depth for soil layer 1a | +| Soil depth for other for layer1a | soildep1a_other.map | U.: $mm$
R.: map ≥ 50 | Other soil depth for soil layer 1a | +| Soil depth for forest for layer1b | soildep1b_forest.map | U.: $mm$
R.: map ≥ 50 | Forest soil depth for soil layer 1b | +| Soil depth for other for layer1b | soildep1b_other.map | U.: $mm$
R.: map ≥ 50 | Other soil soil depth for soil layer 1b | +| Soil depth for forest for layer2 | soildep2_forest.map | U.: $mm$
R.: map ≥ 50 | Forest soil depth for soil layer 2 | +| Soil depth for other for layer2 | soildep2_other.map | U.: $mm$
R.: map ≥ 50 | Other soil soil depth for soil layer 2 | +| **SOIL HYDRAULIC PROPERTIES (depending on soil texture)** | | | | +| ThetaSat1a for forest | thetas1a_forest.map | U.: [V/V]
R.: 0 < map < 1 | Saturated volumetric soil moisture content layer 1a | +| ThetaSat1a for other | thetas1a_other.map | U.: [V/V]
R.: 0 < map < 1 | Saturated volumetric soil moisture content layer 1a | +| ThetaSat1b for forest | thetas1b_forest.map | U.: [V/V]
R.: 0 < map < 1 | Saturated volumetric soil moisture content layer 1b | +| ThetaSat1b for other | thetas1b_other.map | U.: [V/V]
R.: 0 < map < 1 | Saturated volumetric soil moisture content layer 1b | +| ThetaSat2 for forest and other | thetas2.map | U.: [V/V]
R.: 0 < map < 1 | Saturated volumetric soil moisture content layer 2 | +| ThetaRes1a for forest | thetar1a_forest.map | U.: [V/V]
R.: 0 < map < 1 | Residual volumetric soil moisture content layer 1a | +| ThetaRes1a for other | thetar1a_other.map | U.: [V/V]
R.: 0 < map < 1 | Residual volumetric soil moisture content layer 1a | +| ThetaRes1b for forest | thetar1b_forest.map | U.: [V/V]
R.: 0 < map < 1 | Residual volumetric soil moisture content layer 1b | +| ThetaRes1b for other | thetar1b_other.map | U.: [V/V]
R.: 0 < map < 1 | Residual volumetric soil moisture content layer 1b | +| ThetaRes2 for forest and other | thetar2.map | U.: [V/V]
R.: 0 < map < 1 | Residual volumetric soil moisture content layer 2 | +| Lambda1a for forest | lambda1a_forest.map | U.: [-]
R.: map>0 | Pore size index (λ) layer 1a | +| Lambda1a for other | lambda1a_other.map | U.: [-]
R.: map>0 | Pore size index (λ) layer 1a | +| Lambda1b for forest | lambda1b_forest.map | U.: [-]
R.: map>0 | Pore size index (λ) layer 1b | +| Lambda1b for other | lambda1b_other.map | U.: [-]
R.: map>0 | Pore size index (λ) layer 1b +| Lambda2 for forest and other | lambda2.map | U.: [-]
R.: map>0 | Pore size index (λ) layer 2 | +| GenuAlpha1a for forest | alpha1a_forest.map | U.: $\frac{1} {cm}$
R.: 0 < map < 1 | Van Genuchten parameter α layer 1a | +| GenuAlpha1a for other | alpha1a_other.map | U.: $\frac{1} {cm}$
R.: 0 < map < 1 | Van Genuchten parameter α layer 1a | +| GenuAlpha1b for forest | alpha1b_forest.map | U.: $\frac{1} {cm}$
R.: 0 < map < 1 | Van Genuchten parameter α layer 1b | +| GenuAlpha1b for other | alpha1b_other.map | U.: $\frac{1} {cm}$
R.: 0 < map < 1 | Van Genuchten parameter α layer 1b | +| GenuAlpha2 for forest and other | alpha2.map | U.: $\frac{1} {cm}$
R.: 0 < map < 1 | Van Genuchten parameter α layer 2 | +| Sat1a for forest | ksat1a_forest.map | U.: $\frac{mm} {day}$
R.: map>0 | Saturated conductivity layer 1a | +| Sat1a for other | ksat1a_other.map | U.: $\frac{mm} {day}$
R.: map>0 | Saturated conductivity layer 1a | +| Sat1b for forest | ksat1b_forest.map | U.: $\frac{mm} {day}$
R.: map>0 | Saturated conductivity layer 1b | +| Sat1b for other | ksat1b_other.map | U.: $\frac{mm} {day}$
R.: map>0 | Saturated conductivity layer 1b | +| Sat2 for forest and other | ksat2.map | U.: $\frac{mm} {day}$
R.: map>0 | Saturated conductivity layer 2 | +| **CHANNEL GEOMETRY** | | | | +| Channels | chan.map | U.: [-]
R.: 0 or 1 | Map with Boolean 1 for all channel pixels, and Boolean 0 for all other pixels on MaskMap | +| ChanGrad | changrad.map | U.: $\frac{m} {m}$
R.: map > 0
!!! | Channel gradient | +| ChanMan | chanman.map | U.: $m^{-1/3} s$
R.: map > 0 | Manning's roughness coefficient for channels | +| ChanLength | chanleng.map | U.: $m$
R.: map > 0 | Channel length (can exceed grid size, to account for meandering rivers) | +| ChanBottomWidth | chanbw.map | U.: $m$
R.: map > 0 | Channel bottom width | +| ChanSdXdY | chans.map | U.: $\frac{m} {m}$
R.: map ≥ 0 | Channel side slope Important: defined as horizontal divided by vertical distance (dx/dy); this may be confusing because slope is usually defined the other way round (i.e. dy/dx)! | +| ChanDepthThreshold | chanbnkf.map | U.: $m$
R.: map > 0 | Bankfull channel depth | +| **METEOROLOGICAL VARIABLES** | | | | +| PrecipitationMaps | pr | U.: $\frac{mm} {day}$
R.: map ≥ 0 | Precipitation rate | +| TavgMaps | ta | U.: $°C$
R.:-50 ≤map ≤ +50 | Average daily temperature | +| E0Maps | e | U.: $\frac{mm} {day}$
R.: map ≥ 0 | Daily potential evaporation rate, free water surface | +| ES0Maps | es | U.: $\frac{mm} {day}$
R.: map ≥ 0 | Daily potential evaporation rate, bare soil | +| ET0Maps | et | U.: $\frac{mm} {day}$
R.: map ≥ 0 | Daily potential evapotranspiration rate, reference crop | +| **DEVELOPMENT OF VEGETATION OVER TIME** | | | | +| LAIMaps for forest | lai_forest | U.: $\frac{m^2} {m^2}$
R.: map ≥ 0 | Pixel-average Leaf Area Index for forest | +| LAIMaps for other | lai_other | U.: $\frac{m^2} {m^2}$
R.: map ≥ 0 | Pixel-average Leaf Area Index for other | +| **DEFINITION OF INPUT/OUTPUT TIMESERIES** | | | | +| Gauges | outlets.map | U.: [-]
R.: For each station an individual number | Nominal map with locations at which discharge timeseries are reported (usually correspond to gauging stations) | +| Sites | sites.map | U.: [-]
R.: For each station an individual number | Nominal map with locations (individual pixels or areas) at which timeseries of intermediate state and rate variables are reported (soil moisture, infiltration, snow, etcetera) | + + + +***Table:*** *Optional maps that define grid size.* + +| Map | Default name | Units, range | Description | +| --------------- | ------------ | ------------------------ | --------------------- | +| PixelLengthUser | pixleng.map | U.: $m$
R.: map > 0 | Map with pixel length | +| PixelAreaUser | pixarea.map | U.: $m$
R.: map > 0 | Map with pixel area | + + + +## Tables + +In the previous version of LISFLOOD a number of model parameters are read through tables that are linked to the classes on the land use and soil (texture) maps. +Those tables are replaced by maps (e.g. soil hydraulic property maps) in order to include the sub-grid variability of each parameter. + +Therefore only one default table is used in the standard LISFLOOD setting. The following table gives an overview: + +***Table:*** *LISFLOOD input tables.* + +| Table | Default name | Description | +| ---------------------- | ------------ | ---------------------------------------- | +| **LAND USE** | | | +| Day of the year -> LAI | LaiOfDay.txt | Lookup table: Day of the year -> LAI map | + +[🔝](#top) + diff --git a/docs/4_annex_output-files/index.md b/docs/4_annex_output-files/index.md new file mode 100644 index 00000000..2811aa3d --- /dev/null +++ b/docs/4_annex_output-files/index.md @@ -0,0 +1,191 @@ +# Output generated by LISFLOOD + +LISFLOOD can generate a wide variety of outputs. Output files can be time series at specific points (.tss files) or maps (NetCDF format). Reporting of output files can be switched on and off using options in the LISFLOOD settings file. A number of output files are specific to optional modules, such as the simulation of reservoirs. This page lists the most common output time series and maps (note that the file names can always be changed by the user, although this is not recommended). + +## Time Series + +***Table:*** *LISFLOOD output time series, some examples.* + +| Description | Units | File name | +| ------------------------------------------------------------ | ---------------- | --------------------- | +| **RATE VARIABLES AT GAUGES** | | | +| $^{1,2}$ channel discharge | $\frac{m^3} {s}$ | dis.tss | +| **NUMERICAL CHECKS** | | | +| $^2$ cumulative mass balance error | $m^3$ | mbError.tss | +| $^2$ cumulative mass balance error, expressed as mm water slice (average over catchment) | $mm$ | mbErrorMm.tss | +| $^2$ number of sub-steps needed for channel routing | - | NoSubStepsChannel.tss | + +$^1$ Output only if option 'InitLisflood' = 1 (pre-run) +$^2$ Output only if option 'InitLisflood' = 0 + +Output time series can be classified in the following categories: + +1. Time series with values of meteorological input variables, averaged over the area upstream of each gauge location; reporting of these time series can be activated using the option *repMeteoUpsGauges=1* +2. Time series with values of model state variables, averaged over area upstream of each gauge location; reporting of these time series can be activated using the option *repStateUpsGauges=1* +3. Time series with values of model rate variables, averaged over area upstream of each gauge location; reporting of these time series can be activated using the option *repRateUpsGauges=1* +4. Time series that are specific to other options (e.g. simulation of reservoirs). +5. Time series with values of model state variables at user-defined locations (sites); reporting of these time series can be activated using the option *repStateSites=1.* Note that 'sites' can be either individual pixels or larger areas (e.g. catchments, administrative areas, and so on). In case of larger areas the model reports the average value for each respective area. +6. Time series with values of model rate variables at user-defined locations (sites); reporting of these time series can be activated using the option *repRateSites=1* + +***Table:*** *LISFLOOD optional output time series (only 'InitLisflood' = 0).* + +| Description | Units | Settings variable | Default name | +| ------------------------------------------------------------ | -------------------------- | ---------------------- | ---------------------- | +| **STATE VARIABLES AT SITES** (option *repStateSites*) | | | | +| depth of snow cover on soil surface (pixel-average) | $mm$ | SnowCoverTS | snowCover.tss | +| depth of interception storage | $mm$ | CumInterceptionTS | cumInt.tss | +| soil moisture content superficial layer | $\frac{mm^3}{mm^3}$ | Theta1TS | th1a.tss | +| soil moisture content upper layer | $\frac{mm^3}{mm^3}$ | Theta2TS | th1b.tss | +| soil moisture layer bottom layer | $\frac{mm^3}{mm^3}$ | Theta3TS | th2.tss | +| storage in upper groundwater zone | $mm$ | UZTS | uz.tss | +| storage in lower groundwater zone | $mm$ | LZTS | lz.tss | +| number of days since last rain | $days$ | DSLRTS | dslr.tss | +| frost index | $\frac{°C}{days}$ | FrostIndexTS | frost.tss | +| **RATE VARIABLES AT SITES** (option *repRateSites*) | | | | +| rain (excluding snow) | $\frac{mm}{timestep}$ | RainTS | rain.tss | +| Snow | $\frac{mm}{timestep}$ | SnowTS | snow.tss | +| snow melt | $\frac{mm}{timestep}$ | SnowmeltTS | snowMelt.tss | +| actual evaporation | $\frac{mm}{timestep}$ | ESActTS | esAct.tss | +| actual transpiration | $\frac{mm}{timestep}$ | TaTS | tAct.tss | +| rainfall interception | $\frac{mm}{timestep}$ | InterceptionTS | interception.tss | +| evaporation of intercepted water | $\frac{mm}{timestep}$ | EWIntTS | ewIntAct.tss | +| leaf drainage | $\frac{mm}{timestep}$ | LeafDrainageTS | leafDrainage.tss | +| infiltration | $\frac{mm}{timestep}$ | InfiltrationTS | infiltration.tss | +| preferential (bypass) flow | $\frac{mm}{timestep}$ | PrefFlowTS | prefFlow.tss | +| percolation upper to lower soil layer | $\frac{mm}{timestep}$ | PercolationTS | dTopToSub.tss | +| percolation lower soil layer to subsoil | $\frac{mm}{timestep}$ | SeepSubToGWTS | dSubToUz.tss | +| surface runoff | $\frac{mm}{timestep}$ | SurfaceRunoffTS | surfaceRunoff.tss | +| outflow from upper zone | $\frac{mm}{timestep}$ | UZOutflowTS | qUz.tss | +| outflow from lower zone | $\frac{mm}{timestep}$ | LZOutflowTS | qLz.tss | +| total runoff | $\frac{mm}{timestep}$ | TotalRunoffTS | totalRunoff.tss | +| percolation from upper to lower zone | $\frac{mm}{timestep}$ | GwPercUZLZTS | percUZLZ.tss | +| loss from lower zone | $\frac{mm}{timestep}$ | GwLossTS | loss.tss | +| **TIME SERIES, AVERAGE UPSTREAM OF GAUGES** | | | | +| **METEOROLOGICAL INPUT VARIABLES** (option *repMeteoUpsGauges*) | | | | +| precipitation | $\frac{mm}{timestep}$ | PrecipitationAvUpsTS | precipUps.tss | +| potential reference evapotranspiration | $\frac{mm}{timestep}$ | ETRefAvUpsTS | etUps.tss | +| potential evaporation from soil | $\frac{mm}{timestep}$ | ESRefAvUpsTS | esUps.tss | +| potential open water evaporation | $\frac{mm}{timestep}$ | EWRefAvUpsTS | ewUps.tss | +| average daily temperature | $°C$ | TavgAvUpsTS | tAvgUps.tss | +| **STATE VARIABLES** (option *repStateUpsGauges*) | | | | +| depth of water on soil surface | $mm$ | WaterDepthAvUpsTS | wdepthUps.tss | +| depth of snow cover on | $mm$ | SnowCoverAvUpsTS | snowCoverUps.tss | +| depth of interception storage | $mm$ | CumInterceptionAvUpsTS | cumInterceptionUps.tss | +| soil moisture upper layer | $\frac{mm^3}{mm^3}$ | Theta1AvUpsTS | th1aAvUps.tss | +| soil moisture lower layer | $\frac{mm^3}{mm^3}$ | Theta2AvUpsTS | th1bAvUps.tss | +| soil moisture layer 2 | $\frac{mm^3}{mm^3}$ | Theta3AvUpsTS | th2AvUps.tss | +| groundwater upper zone | $mm$ | UZAvUpsTS | uzUps.tss | +| groundwater lower zone | $mm$ | LZAvUpsTS | lzUps.tss | +| number of days since last rain | $days$ | DSLRAvUpsTS | dslrUps.tss | +| frost index | $\frac{°C}{days}$ | FrostIndexAvUpsTS | frostUps.tss | +| **RATE VARIABLES** (option *repRateUpsGauges*) | | | | +| rain (excluding snow) | $\frac{mm}{timestep}$ | RainAvUpsTS | rainUps.tss | +| snow | $\frac{mm}{timestep}$ | SnowAvUpsTS | snowUps.tss | +| snow melt | $\frac{mm}{timestep}$ | SnowmeltAvUpsTS | snowMeltUps.tss | +| actual evaporation | $\frac{mm}{timestep}$ | ESActAvUpsTS | esActUps.tss | +| actual transpiration | $\frac{mm}{timestep}$ | TaAvUpsTS | tActUps.tss | +| rainfall interception | $\frac{mm}{timestep}$ | InterceptionAvUpsTS | interceptionUps.tss | +| evaporation of intercepted water | $\frac{mm}{timestep}$ | EWIntAvUpsTS | ewIntActUps.tss | +| leaf drainage | $\frac{mm}{timestep}$ | LeafDrainageAvUpsTS | leafDrainageUps.tss | +| infiltration | $\frac{mm}{timestep}$ | InfiltrationAvUpsTS | infiltrationUps.tss | +| preferential (bypass) flow | $\frac{mm}{timestep}$ | PrefFlowAvUpsTS | prefFlowUps.tss | +| percolation upper to lower soil layer | $\frac{mm}{timestep}$ | PercolationAvUpsTS | dTopToSubUps.tss | +| percolation lower soil layer to subsoil | $\frac{mm}{timestep}$ | SeepSubToGWAvUpsTS | dSubToUzUps.tss | +| surface runoff | $\frac{mm}{timestep}$ | SurfaceRunoffAvUpsTS | surfaceRunoffUps.tss | +| outflow from upper zone | $\frac{mm}{timestep}$ | UZOutflowAvUpsTS | qUzUps.tss | +| outflow from lower zone | $\frac{mm}{timestep}$ | LZOutflowAvUpsTS | qLzUps.tss | +| total runoff | $\frac{mm}{timestep}$ | TotalRunoffAvUpsTS | totalRunoffUps.tss | +| percolation upper to lower zone | $\frac{mm}{timestep}$ | GwPercUZLZAvUpsTS | percUZLZUps.tss | +| loss from lower zone | $\frac{mm}{timestep}$ | GwLossTS | lossUps.tss | +| **WATER LEVEL IN CHANNEL** (option *repWaterLevelTs*) | | | | +| water level in channel | $m$ (above channel bottom) | WaterLevelTS | waterLevel.tss | +| **OUTPUT RELATED TO LOWER ZONE INITIALISATION** (option *repLZAvInflowSites* and *repLZAvInflowUpsGauges*) | | | | +| average inflow into lower zone | $\frac{mm^3}{day}$ | LZAvInflowTS | lzAvIn.tss | +| average inflow into lower zone | $\frac{mm^3}{day}$ | LZAvInflowAvUpsTS | lzAvInUps.tss | + + + +## Maps + +Output maps can be classified according to the following categories: + +1. Maps of discharge at each time step; reporting of these maps can be activated using the option *repDischargeMaps=1*. +2. Maps with values of driving meteorological values at each time step. +3. Maps with values of model state variables at each time step. +4. Maps with values of model rate variables at each time step. +5. Maps that are specific to other options (e.g. simulation of reservoirs). + +In addition, some additional maps and time series may be reported for debugging purposes. In general these are not of any interest to the LISFLOOD user, so they are not documented here. + +Note the domains for which variables are valid: all *rate variables* are reported as pixel-average values. Soil moisture and groundwater storage are reported for the permeable fraction of each pixel only. The reported snow cover is the average of the snow depths in snow zones A, B and C. + + +***Table:*** *LISFLOOD initialization default output maps (Output only if option 'InitLisflood' = 1).* + +| Description | Units | File name | Domain | +| ------------------------------------------------------------ | ------------------- | ----------------- | ------------------------------------ | +| **AVERAGE RECHARGE MAP (for lower groundwater zone and channel discharge)** (option *InitLisflood*) | | | | +| average inflow to lower zone | $mm$ | lzavin.nc | whole pixel | +| average channel discharge (if option 'SplitRouting' = 1) | $\frac{m}{s}$ | avgdis.nc| channel | + +LISFLOOD can also generate optional output end-files to allow the initialization of the soil moisture of the three soil layers and the water content of the upper groundwater zone. To achieve this aim is necessary to set 'repEndMaps' = 1 (with 'InitLisflood' = 1). More details are provided here https://ec-jrc.github.io/lisflood-code/3_step5_model-initialisation/ +To speed up the pre-run and to prevent that results are taken from the pre-run, all additional output is disabled if option 'InitLisflood' = 1 is chosen. + +### *LISFLOOD state maps. These maps can be used to define the initial conditions of another simulation.* +These maps are written in output when 'repStateMaps' = 1. +LISFLOOD writes the results for each computational time step. +The complete list of state maps is available here https://ec-jrc.github.io/lisflood-code/4_annex_state-variables/ . +The users should be aware that some state maps are generated only if the relevant option has been set to 1. For instance, LakePrevInflowState and LakePrevOutflowState can be generated only when 'simulateLakes' = 1. + + +***Table:*** *LISFLOOD optional output maps* + +| Description | Option | Units | Settings variable | Prefix | +| --------------------------------------- | ---------------------- | -------------------------- | -------------------------------------------------- | --------------- | +| **DISCHARGE** | | | | | +| discharge | repDischargeMaps | $\frac{m^3}{s}$ | DischargeMaps | dis | +| **METEOROLOGICAL INPUT VARIABLES** | | | | | +| precipitation | repPrecipitationMaps | $mm$ | PrecipitationMaps | pr | +| potential reference evapotranspiration | repETRefMaps | $mm$ | ETRefMaps | et | +| potential evaporation from soil | repESRefMaps | $mm$ | ESRefMaps | es | +| potential open water evaporation | repEWRefMaps | $mm$ | EWRefMaps | ew | +| average daily temperature | repTavgMaps | $mm$ | TavgMaps | tav | +| **VOLUME VARIABLES** | | | | | +| depth of water on soil surface | repWaterDepthMaps | $mm$ | WaterDepthMaps | wdep | +| depth of snow cover on soil surface | repSnowCoverMaps | $mm$ | SnowCoverMaps | scov | +| depth of interception storage | repCumInterceptionMaps | $mm$ | CumInterceptionMaps (other fraction)
CumInterceptionForestMaps
CumInterceptionIrrigationMaps
CumIntSealedMaps | cum
cumf
cumi
cums | +| soil moisture content of the three soil layers | repThetaMaps | $\frac{mm^3}{mm^3}$ | Theta1Maps
Theta1ForestMaps
Theta1IrrigationMaps
Theta2Maps
Theta2ForestMaps
Theta2IrrigationMaps
Theta3Maps
Theta3ForestMaps
Theta3IrrigationMaps | tha
thfa
thia
thb
thfb
thib
thc
thfc
thic| +| storage in upper groundwater zone | repUZMaps | $mm$ | UZMaps
UZForestMaps
UZIrrigationMaps | uz
uzf
uzi | +| storage in lower groundwater zone | repLZMaps | $mm$ | LZMaps | lz | +| number of days since last rain | repDSLRMaps | $days$ | DSLRMaps
DSLRForestMaps | dslr
dslF | +| frost index | repFrostIndexMaps | $\frac{°C}{days}$ | FrostIndexMaps | frost | +| Total Water Storage | repTotalWaterStorageMaps | $mm$ | TotalWaterStorageMaps | tws | +| **RATE VARIABLES** | | | | | +| rain (excluding snow) | repRainMaps | $\frac{mm}{timestep}$ | RainMaps | rain | +| snow | repSnowMaps | $\frac{mm}{timestep}$ | SnowMaps | snow | +| snow melt | repSnowMeltMaps | $\frac{mm}{timestep}$ | SnowMeltMaps | smelt | +| actual evaporation | repESActMaps | $\frac{mm}{timestep}$ | ESActMaps | esact | +| actual transpiration | repTaMaps | $\frac{mm}{timestep}$ | TaMaps | tact | +| rainfall interception | repInterceptionMaps | $\frac{mm}{timestep}$ | InterceptionMaps
InterceptionForestMaps | int
intF | +| evaporation of intercepted water | repEWIntMaps | $\frac{mm}{timestep}$ | EWIntMaps | ewint | +| leaf drainage | repLeafDrainageMaps | $\frac{mm}{timestep}$ | LeafDrainageMaps
LeafDrainageForestMaps | ldra
draF | +| infiltration | repInfiltrationMaps | $\frac{mm}{timestep}$ | InfiltrationMaps
InfiltrationForestMaps | inf
infF | +| preferential (bypass) flow | repPrefFlowMaps | $\frac{mm}{timestep}$ | PrefFlowMaps
PrefFlowtherMaps
PrefFlowForestMaps
PrefFlowIrrigationMaps | pflowpixel
pflow
pflowF
pflowi | +| percolation upper to lower soil layer | repPercolationMaps | $\frac{mm}{timestep}$ | Percolation1ato1bOtherMaps
Percolation1ato1bForestMaps
Percolation1ato1bIrrigationMaps
Percolation1bto2OtherMaps
Percolation1bto2ForestMaps
Percolation1bto2IrrigationMaps | Percolation1ato1bOther
Percolation1ato1bForest
Percolation1ato1bIrrigation
Percolation1bto2Other
Percolation1bto2Forest
Percolation1bto2Irrigation | +| percolation lower soil layer to subsoil | repSeepSubToGWMaps | $\frac{mm}{timestep}$ | SeepSubToGWMaps
SeepSubToGWotherMaps
SeepSubToGWforestMaps
SeepSubToGWoirrigationMaps | sgwPixel
sgwOther
sgwForest
sgwIrrigation | +| surface runoff | repSurfaceRunoffMaps | $\frac{mm}{timestep}$ | SurfaceRunoffMaps | srun | +| outflow from upper zone | repUZOutflowMaps | $\frac{mm}{timestep}$ | UZOutflowMaps, UZOutflowForestMaps
UZOutflowIrrigationMaps | quzPixel
quz
quzF
quzi | +| outflow from lower zone | repLZOutflowMaps | $\frac{mm}{timestep}$ | LZOutflowMaps | qlz | +| total runoff | repTotalRunoffMaps | $\frac{mm}{timestep}$ | TotalRunoffMaps | trun | +| percolation upper to lower zone | repGwPercUZLZMaps | $\frac{mm}{timestep}$ | GwPercUZLZMaps
GwPercUZLZOtherMaps
GwPercUZLZForestMaps
GwPercUZLZIrrigationMaps | uz2lzPixel
uz2lz
uz2lzF
uz2lzi | +| loss from lower zone | repGwLossMaps | $\frac{mm}{timestep}$ | GwLossMaps | loss | + +**Note** + +Some cumulative stoarges and volumes are computed internally by LISFLOOD. Some relevant exmaple is described below: +- Total Water Storage is the total water volume stored in channels, lakes, reservoirs, snow cover, sealed surfaces depressions, surface runoff, canopy interception, uppper and lower groundwater zones. +- Surface runoff is the sum of direct runoff (from sealed and water fractions) and runoff generated by the pervious land cover fractions (forest, irrigation, other). +- Total runoff is the sum of surface runoff and sub-surface runoff. Sub-surface runoff is the outflow from upper and lower groundwater zones. + + +[🔝](#top) diff --git a/docs/4_annex_parameters/index.md b/docs/4_annex_parameters/index.md new file mode 100644 index 00000000..717541ec --- /dev/null +++ b/docs/4_annex_parameters/index.md @@ -0,0 +1,18 @@ +**Table:** *Parameters range and default values.* + +| ParameterName | MinValue | MaxValue | DefaultValue | +| :----------------------------- | -----------------: | -----------------: | -----------------: | +| UpperZoneTimeConstant | 0.01 | 40 | 10 | +| LowerZoneTimeConstant | 40 | 1000 | 100 | +| GwPercValue | 0.01 | 2 | 0.8 | +| LZThreshold | 0 | 30 | 10 | +| b_Xinanjiang | 0.01 | 5 | 0.5 | +| PowerPrefFlow | 0.5 | 8 | 4 | +| SnowMeltCoef | 2.5 | 6.5 | 4 | +| CalChanMan1 | 0.5 | 2 | 1 | +| CalChanMan2 | 0.5 | 5 | 1 | +| LakeMultiplier | 0.5 | 2 | 1 | +| adjust_Normal_Flood | 0.01 | 0.99 | 0.8 | +| ReservoirRnormqMult | 0.25 | 2 | 1 | +| QSplitMult | 0 | 20 | 2 | +| GwLoss | 0 | 0.5 | 0 | \ No newline at end of file diff --git a/docs/4_annex_settings_and_options/index.md b/docs/4_annex_settings_and_options/index.md new file mode 100644 index 00000000..378c9bc6 --- /dev/null +++ b/docs/4_annex_settings_and_options/index.md @@ -0,0 +1,891 @@ +The Tables below presents a comprehensive list of setting options, inputs, and outputs. + + + +**Table:** *LISFLOOD Settings.* + +| section (XML) | group (XML) | module | eqz | KEY | cold | warm | Type | I/O | Description | +| --------------- | ------------------------------------------------------------ | ---------------------------------- | ------ | ------------------------------- | ------------------------------------------------- | ------------------------------------------------- | --------------- | ---------------------- | ------------------------------------------------------------ | +| lfoptions | | SETTINGS | | TemperatureInKelvin | | | switch | input | Use temperature data in C (=0) or in K (=1) | +| lfoptions | | SETTINGS | | gridSizeUserDefined | | | switch | input | Get grid size attributes (length, area) from user-defined maps (instead of using map location attributes directly) | +| lfoptions | | DYNAMIC WAVE | | dynamicWave | | | switch | input | Activate dynamic wave routing | +| lfoptions | | INFLOW | | inflow | | | switch | input | Use inflow hydrographs | +| lfoptions | | SOIL | | simulatePF | | | switch | input | Calculate pF values from soil moisture | +| lfoptions | | LAKES | | simulateLakes | | | switch | input | Simulate unregulated lakes (kin. wave only) | +| lfoptions | | POLDERS | | simulatePolders | | | switch | input | Simulate polders (dyn. wave only) | +| lfoptions | | RESERVOIRS | | simulateReservoirs | | | switch | input | Simulate retention and hydropower reservoirs (kin. wave only) | +| lfoptions | | WATER LEVELS | | simulateWaterLevels | | | switch | input | Activate computation of water level maps / time series (does not affect routing) | +| lfoptions | | LANDUSE CHANGE | | TransientLandUseChange | | | switch | input | Activate reading of time changing land use description | +| lfoptions | | WATER ABSTRACTION | | TransientWaterDemandChange | | | switch | input | Activate reading of time changing water demand | +| lfoptions | | WATER ABSTRACTION | | useWaterDemandAveYear | | | switch | input | Use "average" year for water demand and loop it over years | +| lfoptions | | TRANSMISSION LOSS | | TransLoss | | | switch | input | Activate transmission loss | +| lfoptions | | DOUBLE KINEMATIC WAVE | | SplitRouting | | | switch | input | Activate double kinematic wave routing | +| lfoptions | | WATER ABSTRACTION | | wateruse | | | switch | input | Activate water use computation | +| lfoptions | | GROUNDWATER | | groundwaterSmooth | | | switch | input | Activate smoothing for groundwater to correct error by using windowtotal, based on groundwater bodies and catchments | +| lfoptions | | WATER ABSTRACTION | | wateruseRegion | | | switch | input | Use water regions in water use module | +| lfoptions | | IRRIGATION | | drainedIrrigation | | | switch | input | Use map of drainage systems to determine return flow (if drained, all percolation to channel within day; if not, all normal soil processes) | +| lfoptions | | IRRIGATION | | riceIrrigation | | | switch | input | Activate computation for paddy rice irrigation and abstraction | +| lfoptions | | EVAPO | | openwaterevapo | | | switch | input | Compute evaporation from open water | +| lfoptions | | EVAPO | | varfractionwater | | | switch | input | Compute the fraction of pixel that is open water | +| lfoptions | | INDICATOR | | indicator | | | switch | input | Activate computation of indicators (such as WEI, e-flow, etc) | +| lfoptions | | SETTINGS | | MonteCarlo | | | switch | input | Activate MonteCarlo simulation | +| lfoptions | | SETTINGS | | EnKF | | | switch | input | Activate EnKF simulation | +| lfoptions | | SETTINGS | | InitLisflood | | | switch | input | Run LISFLOOD initialization run | +| lfoptions | | SETTINGS | | InitLisfloodwithoutSplit | | | switch | input | Run LISFLOOD initialization run to compute Lzavin.map and skip completely the routing component | +| lfoptions | | IO | | readNetcdfStack | | | switch | input | Read meteorological data in NetCDF format (Precip, Tavg, ET0, E0,ES0) | +| lfoptions | | IO | | writeNetcdfStack | | | switch | input | Write NetCDF stacks for output files (the pr.nc is read to get the metadata like projection) | +| lfoptions | | IO | | writeNetcdf | | | switch | input | Write NetCDF files for END files (single netcdf) | +| lfoptions | | DISCHARGE | | repDischargeTs | | | switch rep tss | input | Report discharge time series at gauges | +| lfoptions | | LOG | | repInternalCom | | | switch rep tss | input | Report internal number of sub step for soil, channel routing, water use | +| lfoptions | | LOG | | repMBTs | | | switch rep tss | input | Report timeseries of absolute cumulative mass balance error | +| lfoptions | | STATE | | repStateSites | | | switch rep tss | input | Report state variables at sites | +| lfoptions | | STATE | | repRateSites | | | switch rep tss | input | Report state variables rates at sites | +| lfoptions | | STATE | | repStateUpsGauges | | | switch rep tss | input | Report timeseries of model variables, averaged over contributing area of each gauging station | +| lfoptions | | STATE | | repRateUpsGauges | | | switch rep tss | input | Report timeseries of model rate variables, averaged over contributing area of each gauging station | +| lfoptions | | METEO | | repMeteoUpsGauges | | | switch rep tss | input | Report timeseries of meteo input data | +| lfoptions | | INFLOW | | repLZAvInflowSites | | | switch rep tss | input | Report time serie of average percolation rate from upper to lower groundwater zone at sites | +| lfoptions | | INFLOW | | repLZAvInflowUpsGauges | | | switch rep tss | input | Report time serie of average percolation rate from upper to lower groundwater zone at gauges | +| lfoptions | | WATER ABSTRACTION | | repwateruseGauges | | | switch rep tss | input | Report water use ts at gauges | +| lfoptions | | WATER ABSTRACTION | | repwateruseSites | | | switch rep tss | input | Report water use ts at sistes | +| lfoptions | | WATER LEVELS | | repWaterLevelTs | | | switch rep tss | input | Report water level ts | +| lfoptions | | SOIL | | repPFUpsGauges | | | switch rep tss | input | Report PF ts at gauges | +| lfoptions | | SOIL | | repPFSites | | | switch rep tss | input | Report PF ts at sistes | +| lfoptions | | LAKES | | repsimulateLakes | | | switch rep tss | input | Report time series of lakes | +| lfoptions | | RESERVOIRS | | repsimulateReservoirs | | | switch rep tss | input | Report time series of reservoirs | +| lfoptions | | POLDERS | | repsimulatePolders | | | switch rep tss | input | Report time series of polders | +| lfoptions | | LOG | | repBal1 | | | switch rep tss | input | Report water balance TS | +| lfoptions | | STATE | | repStateMaps | | | switch rep maps | input | Report maps of model state variables (as defined by "ReportSteps" variable) | +| lfoptions | | STATE | | repEndMaps | | | switch rep maps | input | Report maps of model state variables (at last time step) | +| lfoptions | | METEO | | repPrecipitationMaps | | | switch rep maps | input | Report precipitation | +| lfoptions | | METEO | | repTavgMaps | | | switch rep maps | input | Report average temperature maps | +| lfoptions | | EVAPO | | repETRefMaps | | | switch rep maps | input | Report reference evapo-transpiration | +| lfoptions | | EVAPO | | repESRefMaps | | | switch rep maps | input | Report reference soil evaporation | +| lfoptions | | EVAPO | | repEWRefMaps | | | switch rep maps | input | Report reference evaporation of intercepted water | +| lfoptions | | DISCHARGE | | repAverageDis | | | switch rep maps | input | Report average discharge | +| lfoptions | | ROUTING | | repChanCrossSectionMaps | | | switch rep maps | input | Report total cross-section area for channels | +| lfoptions | | INTERCEPTION | | repCumInterCeptionMaps | | | switch rep maps | input | Report cumulative interception | +| lfoptions | | DISCHARGE | | repDischargeMaps | | | switch rep maps | input | Report maps of discharge (for each time step) | +| lfoptions | | METEO | | repDSLRMaps | | | switch rep maps | input | Report maps with number of days since the last rainfall event | +| lfoptions | | EVAPO | | repESActMaps | | | switch rep maps | input | Report actual soil evaporation | +| lfoptions | | EVAPO | | repEWIntMaps | | | switch rep maps | input | Report evaporation of intercepted water | +| lfoptions | | SNOW | | repFrostIndexMaps | | | switch rep maps | input | Report frost index maps | +| lfoptions | | GROUNDWATER | | repGwLossMaps | | | switch rep maps | input | Report groundwater loss maps | +| lfoptions | | GROUNDWATER | | repGwPercUZLZMaps | | | switch rep maps | input | Report maps of percolation from upper to lower ground water zone (for each time step) | +| lfoptions | | INFILTRATION | | repInfiltrationMaps | | | switch rep maps | input | Report infiltration maps | +| lfoptions | | INTERCEPTION | | repInterceptionMaps | | | switch rep maps | input | Report interception maps | +| lfoptions | | LEAF | | repLeafDrainageMaps | | | switch rep maps | input | Report leaf drainage maps | +| lfoptions | | GROUNDWATER | | repLZAvInflowMap | | | switch rep maps | input | Report lower groundwater zone inflow maps | +| lfoptions | | GROUNDWATER | | repLZMaps | | | switch rep maps | input | Report maps of lower groundwater zone storage (for each time step) | +| lfoptions | | GROUNDWATER | | repLZOutflowMaps | | | switch rep maps | input | Report lower groundwater zone outflow maps | +| lfoptions | | PERCOLATION | | repPercolationMaps | | | switch rep maps | input | Report percolation maps | +| lfoptions | | SOIL | | repPFMaps | | | switch rep maps | input | Report pF and vegetation stress due to low soil moisture | +| lfoptions | | SOIL | | repPFForestMaps | | | switch rep maps | input | Report pF and vegetation stress due to low soil moisture for forest fraction | +| lfoptions | | SOIL | | repPrefFlowMaps | | | switch rep maps | input | Report preferential flow (rapid bypass soil matrix) | +| lfoptions | | METEO | | repRainMaps | | | switch rep maps | input | Report rain excluding snow | +| lfoptions | | GROUNDWATER | | repSeepSubToGWMaps | | | switch rep maps | input | Report flux between sub soil and GW | +| lfoptions | | SNOW | | repSnowCoverMaps | | | switch rep maps | input | Report maps of snow cover (for each time step) | +| lfoptions | | SNOW | | repSnowMaps | | | switch rep maps | input | Report maps of snow (for each time step) | +| lfoptions | | SNOW | | repSnowMeltMaps | | | switch rep maps | input | Report maps of snowmelt (for each time step) | +| lfoptions | | SURFACE | | repSurfaceRunoffMaps | | | switch rep maps | input | Report maps of surface runoff (for each time step) | +| lfoptions | | TRANSPIRATION | | repTaMaps | | | switch rep maps | input | Report transpiration maps | +| lfoptions | | SOIL | | repThetaMaps | | | switch rep maps | input | Reporting of *individual* model state variables as maps THETA | +| lfoptions | | SOIL | | repThetaForestMaps | | | switch rep maps | input | Reporting of *individual* model state variables as maps THETA FOREST | +| lfoptions | | SOIL | | repThetaIrrigationMaps | | | switch rep maps | input | Report irrigation mapsrE | +| lfoptions | | SOIL | | repTotalRunoffMaps | | | switch rep maps | input | Report total runoff | +| lfoptions | | GROUNDWATER | | repUZMaps | | | switch rep maps | input | Report maps of upper groundwater zone storage (for each time step) | +| lfoptions | | GROUNDWATER | | repUZOutflowMaps | | | switch rep maps | input | Report maps for upper groundwater zone outflow | +| lfoptions | | ROUTING | | repWaterDepthMaps | | | switch rep maps | input | Report water depth on soil surface | +| lfoptions | | ROUTING | | repWaterLevelMaps | | | switch rep maps | input | Report water level in channels | +| lfoptions | | EVAPO | | ETActMaps | | | switch rep maps | input | Report actual evapo-transpiration | +| lfoptions | | ROUTING | | repFastRunoffMaps | | | switch rep maps | input | Report fast runoff = surface + UZ | +| lfoptions | | WATER STRESS | | repRWS | | | switch rep maps | input | Report soil transpiration reduction factor RWP | +| lfoptions | | WATER STRESS | | repStressDays | | | switch rep maps | input | Report soil transpiration reduction factor RWP for forest | +| lfoptions | | SOIL | | repPF1Maps | | | switch rep maps | input | Report PF1 maps | +| lfoptions | | SOIL | | repPF2Maps | | | switch rep maps | input | Report PF2 maps | +| lfoptions | | WATER ABSTRACTION | | repTotalAbs | | | switch rep maps | input | Report total water abstraction | +| lfoptions | | WATER ABSTRACTION | | repTotalWUse | | | switch rep maps | input | Report total water use | +| lfoptions | | INDICATOR | | repWIndex | | | switch rep maps | input | Report indexes and indicators | +| lfuser | AREA AND OUTLETS | SETTINGS | | PathRoot | /perm/ma/ma9/xdom/data/staticData/lisflood | /perm/ma/ma9/xdom/data/staticData/lisflood | path | input | Root directory | +| lfuser | AREA AND OUTLETS | SETTINGS | | MaskMap | /perm/ma/ma9/xdom/data/staticData/lisflood/area | /perm/ma/ma9/xdom/data/staticData/lisflood/area | map | input | Clone map used to set computation area for Lisflood model It can be 5 values separated by a blank space: col row cellsize xupleft yupleft (3600 1500 0.1 -180 90 -> World) or a map in pcraster format or netcdf If a map is used, information are read from the map. | +| lfuser | AREA AND OUTLETS | SETTINGS | | Gauges | $(PathMaps)/outlets.map | $(PathMaps)/outlets.map | map | input | Nominal map with gauge locations (i.e cells for which simulated discharge is written to file(1,2,3 etc) lat lon (lat2 lon2 ...) or pcraster maps or netcdf maps | +| lfuser | AREA AND OUTLETS | SETTINGS | | netCDFtemplate | $(PathMaps)/elvstd.nc | $(PathMaps)/elvstd.nc | map | input | netcdf template used to copy metadata information for writing netcdf $(PathEvapo)/$(PrefixE0) | +| lfuser | TIMESTEP RELATED PARAMETERS | SETTINGS | | CalendarDayStart | 1/2/1990 6:00 | 1/2/2015 6:00 | date | input | Reference Calendar day of the model. It is used inside LISFLOOD code as the reference date for time step id numbers. It MUST be <= first simulation start date. It MUST be a date as string, see code for list of available date formats. It can now include also HH:MM, if not specified they are set as 00:00 PCRaster: Day of the year of first map (e.g. xx000.001) even if the model start from map e.g. 500 e.g. 1st of January: 1; 1st of June 151 (or 152 in leap year) Needed to read out LAI tables correctly | +| lfuser | TIMESTEP RELATED PARAMETERS | SETTINGS | | DtSec | 86400 | 86400 | value | input | timestep [seconds]. This is the simulation time interval (86400-day; 3600-hour) | +| lfuser | TIMESTEP RELATED PARAMETERS | KINEMATIC WAVE | | DtSecChannel | 3600 | 3600 | value | input | Sub time step used for kinematic wave channel routing [seconds] Within the model, the smallest out of DtSecChannel and DtSec is used Using a value that is smaller than DtSec may result in a better simulation of the overal shape of the calculated hydrograph | +| lfuser | TIMESTEP RELATED PARAMETERS | SETTINGS | | StepStart | 1/2/1990 6:00 | 1/2/2015 6:00 | value/date | input | Step id number or date of the simulation start step. See code for a list of available date formats. If number is used, it refers to "CalendarDayStart". For dates, also HH:MM can be set. If they are not set, 00:00 are automatically used. StepStart MUST be >= Calendar DayStart and <= StepEnd | +| lfuser | TIMESTEP RELATED PARAMETERS | SETTINGS | | StepEnd | 1/1/2015 6:00 | 1/1/2017 6:00 | value/date | input | Step id number or date of end time step in simulation. If number is used, it refers to "CalendarDayStart". For dates, also HH:MM can be set. If they are not set, 00:00 are automatically used. StepStart MUST be <= Calendar DayStart and >= StepStart | +| lfuser | TIMESTEP RELATED PARAMETERS | SETTINGS | | ReportSteps | 1..9999 | 1..9999 | value | input | Time steps at which to write model state maps (i.e. only those maps that would be needed to define initial conditions for succeeding model run). Use: #,#,# to specify single step numbers #..# to print all state files between one step and another one "endtime" to print state files for final step (to state file in NetCDF file format stack) | +| lfuser | MONTE CARLO | SETTINGS | | EnsMembers | 2 | 2 | value | input | Number of sample to use in MonteCarlo simulations | +| lfuser | MONTE CARLO | SETTINGS | | nrCores | 2 | 2 | value | input | Number of cores of the computer to use in MonteCarlo simulations This only works with Linux, if set to 1 no forking will be used | +| lfuser | FILTER KALMAN | SETTINGS | | FilterSteps | 10 | 10 | value | input | Time steps at which to write model state maps (i.e. only those maps that would be needed to define initial conditions for succeeding model run) | +| lfuser | GROUNDWATER RELATED PAR | GROUNDWATER | Tuz | UpperZoneTimeConstant | $(PathParams)/params_UpperZoneTimeConstant | $(PathParams)/params_UpperZoneTimeConstant | value/map | input calib par | Time constant for the upper groundwater zone [days] default: 10 $(PathParams)/params_UpperZoneTimeConstant.nc Time constant for water in upper zone [days*mm^GwAlpha] Note that units are days if GwAlpha=0 (linear reservoir] | +| lfuser | GROUNDWATER RELATED PAR | GROUNDWATER | Tlz | LowerZoneTimeConstant | $(PathParams)/params_LowerZoneTimeConstant | $(PathParams)/params_LowerZoneTimeConstant | value/map | input calib par | Time constant for the lower groundwater zone [days] This is the average time a water 'particle' remains in the reservoir if we had a stationary system (average inflow=average outflow) default: 100 | +| lfuser | GROUNDWATER RELATED PAR | GROUNDWATER | GWperc | GwPercValue | $(PathParams)/params_GwPercValue | $(PathParams)/params_GwPercValue | value/map | input calib par | Maximum rate of percolation going from the upper to the lower groundwater zone [mm day-1] default: 0.5 $(PathParams)/params_GwPercValue.nc | +| lfuser | GROUNDWATER RELATED PAR | GROUNDWATER | floss | GwLoss | $(PathParams)/params_GwLoss | $(PathParams)/params_GwLoss | value/map | input calib par | Rate of percolation from the lower groundwater zone (groundwater loss) zone [mm day-1]. A value of 0 (closed lower boundary) is recommended as a starting value; default: 0.0 | +| lfuser | INFILTRATION | INFILTRATION | b | b_Xinanjiang | $(PathParams)/params_b_Xinanjiang | $(PathParams)/params_b_Xinanjiang | value/map | input calib par | Power in Xinanjiang distribution function. [-] It is the power in the infiltration equation. Default: 0.7 | +| lfuser | INFILTRATION | INFILTRATION | cpref | PowerPrefFlow | $(PathParams)/params_PowerPrefFlow | $(PathParams)/params_PowerPrefFlow | value/map | input calib par | Power that controls increase of proportion of preferential flow with increased soil moisture storage. It s the power in the preferential flow equation [-] default: 3.5 $(PathParams)/params_PowerPrefFlow.nc | +| lfuser | ROUTING | KINEMATIC WAVE | n | CalChanMan | $(PathParams)/params_CalChanMan1 | $(PathParams)/params_CalChanMan1 | value/map | input calib par | It is a multiplier that is applied to the Manning's roughness map of the channel system default: 2.0 $(PathParams)/params_CalChanMan1.nc | +| lfuser | SNOW AND FROST | SNOW | Cm | SnowMeltCoef | $(PathParams)/params_SnowMeltCoef | $(PathParams)/params_SnowMeltCoef | value/map | input calib par | Snowmelt coefficient [mm/deg C /day]. It is the degree-day factor that controls the rate of snowmelt default: 4.0 $(PathParams)/params_SnowMeltCoef.nc SRM: 0.45 cm/C/day ( = 4.50 mm/C/day), Kwadijk: 18 mm/C/month (= 0.59 mm/C/day) See also Martinec et al., 1998. | +| lfuser | ROUTING | DOUBLE KINEMATIC WAVE | n? | CalChanMan2 | $(PathParams)/params_CalChanMan2 | $(PathParams)/params_CalChanMan2 | value/map | input calib par | PBchange Multiplier applied to Channel Manning's n for second routing line default: 3.0 $(PathParams)/params_CalChanMan2.nc | +| lfuser | CALIBRATION | LAKES | | LakeMultiplier | $(PathParams)/params_LakeMultiplier | $(PathParams)/params_LakeMultiplier | value/map | input calib par | default: 1.0 $(PathParams)/params_LakeMultiplier.nc Multiplier applied to the lake parameter A | +| lfuser | CALIBRATION | RESERVOIRS | | adjust_Normal_Flood | $(PathParams)/params_adjust_Normal_Flood | $(PathParams)/params_adjust_Normal_Flood | value/map | input calib par | default: 0.8 $(PathParams)/params_adjust_Normal_Flood.nc adjusting the balance between normal and flood storage big values (= closer to 1.0 = close to flood) results in keeping the outflow longer at rnormq Range 0.01 - 0.99 | +| lfuser | CALIBRATION | RESERVOIRS | | ReservoirRnormqMult | $(PathParams)/params_ReservoirRnormqMult | $(PathParams)/params_ReservoirRnormqMult | value/map | input calib par | default: 1.0 $(PathParams)/params_ReservoirRnormqMult.nc Reservoir rnormq (normal outflow) fraction of the value in table rnormq.txt range: 0.5 - 2 | +| lfuser | EVAPO(TRANSPI)RATION AND INTERCEPTION | SETTINGS | | AvWaterRateThreshold | 5 | 5 | value | input par | It defines a critical amount of water that is used as a threshold for resetting the variable Dslr. The threshold is defined as an equivalent intensity in [mm day-1] Critical amount of available water (expressed in [mm/day]!), above which 'Days Since Last Rain' parameter is set to 1 default: 5.0 (not included in calibration) | +| lfuser | FILE PATHS | SETTINGS | | PathOut | outputs/ecWB/ecWB_1990-2014/ | outputs/ecWB/ecWB_2015-2016/ | path | input | Output path (org=$(PathRoot)/out) It is the directory where all output files are written. It must be an existing directory (if not you will get an error message – not immediately but after 256 timesteps, when the time series are written for the first time). | +| lfuser | FILE PATHS | SETTINGS | | PathInit | initcond/ecWB/ | outputs/ecWB/ecWB_1990-2014/ | path | input | Path of the initial value maps e.g. lzavin.map (org=$(PathRoot)/outPo) It is the directory where the initial files are located, to initialize a “warm” start. It can be also the PathOut directory. | +| lfuser | FILE PATHS | SETTINGS | | PathMaps | /perm/ma/ma9/xdom/data/staticData/lisflood | /perm/ma/ma9/xdom/data/staticData/lisflood | path | input | Maps path it is the directory where all input base maps are located | +| lfuser | FILE PATHS | INFLOW | | PathInflow | $(PathRoot)/inflow | $(PathRoot)/inflow | path | input | Inflow path | +| lfuser | FILE PATHS | SETTINGS | | PathParams | $(PathMaps)/parameters | $(PathMaps)/parameters | path | input | Calibration parameter path | +| lfuser | FILE PATHS | TABLE | | PathTables | $(PathRoot)/tables | $(PathRoot)/tables | path | input | Tables path | +| lfuser | FILE PATHS | TABLES | | PathMapsTables | $(PathMaps)/table2map | $(PathMaps)/table2map | path | input | Maps instead tables path | +| lfuser | FILE PATHS | SOIL | | PathSoilHyd | $(PathMaps)/soilhyd | $(PathMaps)/soilhyd | path | input | Maps instead tables for soil hydraulics path Directory where the soil hydraulic property maps are located | +| lfuser | FILE PATHS | LANDUSE | | PathMapsLandUseChange | $(PathMaps)/landuse_rcp85_20062125 | $(PathMaps)/landuse_rcp85_20062125 | path | input | Maps for transient land use changes every 5 years | +| lfuser | FILE PATHS | LANDUSE | | PathMapsLanduse | $(PathMaps)/landuse2006 | $(PathMaps)/landuse2006 | path | input | Maps for land use fractions and related land use maps | +| lfuser | FILE PATHS | WATER USE | | PathWaterUse | forcings/ecWaterDemand19902014/ | $(PathMaps)/waterdemand | path | input | Water use maps path | +| lfuser | FILE PATHS | METEO | | PathMeteo | forcings/ecWB_grids_1990_2016/ | forcings/ecWB_grids_1990_2016/ | path | input | Meteo path Directory where all maps with meteorological input are located (rain, evapo(transpi)ration, temperature) | +| lfuser | FILE PATHS | LAI | | PathLAI | $(PathMaps)/lai | $(PathMaps)/lai | path | input | Leaf Area Index maps path Directory where you Leaf Area Index maps are located | +| lfuser | FILE PATHS | WATER FRACTION | | PathVarWaterfraction | $(PathMaps)/variablewater | $(PathMaps)/variablewater | path | input | variable water fraction maps path | +| lfuser | INITIAL CONDITIONS | SETTINGS | | timestepInit | 1/2/1990 6:00 | 1/1/2015 6:00 | value/date | input initial | If initial conditions are stored as netCDF stack, this variable sets which time step to use as initial step. It can be either a date (e.g. 1/1/2010) or a number (e.g. 5). If a number is used, it refers to "CalendarDayStart". (it is generally one step back compared to StepStart) If missing, netcdf file are read with no reference to 'time', either if they are a stack or not. timestepInit is ignored if netCDF file is a single netCDF file.. | +| lfuser | INITIAL CONDITIONS | SURFACE | | OFDirectInitValue | 0 | $(PathInit)/ofdir | value/map | input initial/internal | Initial water volume for direct fraction on catchment surface [m3] | +| lfuser | INITIAL CONDITIONS | SURFACE | | OFOtherInitValue | 0 | $(PathInit)/ofoth | value/map | input initial/internal | Initial water volume for other fraction on catchment surface [m3] | +| lfuser | INITIAL CONDITIONS | SURFACE | | OFForestInitValue | 0 | $(PathInit)/offor | value/map | input initial/internal | Initial water volume for forest fraction on catchment surface [m3] | +| lfuser | INITIAL CONDITIONS | OVERLAND FLOW | | WaterDepthInitValue | 0 | $(PathInit)/wdept | value/map | | initial overland flow water depth [mm] Initial amount of water on the soil surface | +| lfuser | INITIAL CONDITIONS | SNOW | | SnowCoverAInitValue | 0 | $(PathInit)/scova | value/map | input initial/internal | It is the initial snow cover on the soil surface in elevation zone A [mm] | +| lfuser | INITIAL CONDITIONS | SNOW | | SnowCoverBInitValue | 0 | $(PathInit)/scovb | value/map | input initial/internal | It is the initial snow cover on the soil surface in elevation zone B [mm] | +| lfuser | INITIAL CONDITIONS | SNOW | | SnowCoverCInitValue | 0 | $(PathInit)/scovc | value/map | input initial/internal | It is the initial snow cover on the soil surface in elevation zone C [mm] | +| lfuser | INITIAL CONDITIONS | SNOW | F | FrostIndexInitValue | 0 | $(PathInit)/frost | value/map | input initial/internal | initial Frost Index value [C day-1] | +| lfuser | INITIAL CONDITIONS | INTERCEPTION | | CumIntInitValue | 0 | $(PathInit)/cum | value/map | input initial/internal | cumulative interception [mm] Initial interception storage | +| lfuser | INITIAL CONDITIONS | GROUNDWATER | | UZInitValue | 0 | $(PathInit)/uz | value/map | input initial/internal | It is the initial storage in the upper groundwater zone [mm] | +| lfuser | INITIAL CONDITIONS | SOIL | Dslr | DSLRInitValue | 1 | $(PathInit)/dslr | value/map | input initial/internal | initial number of days since the last rainfall event [days] | +| lfuser | INITIAL CONDITIONS | GROUNDWATER | | LZInitValue | -9999 | $(PathInit)/lz | value/map | input initial/internal | It is the initial storage in the lower groundwater zone [mm] -9999: use steady-state storage | +| lfuser | INITIAL CONDITIONS | KINEMATIC WAVE | | TotalCrossSectionAreaInitValue | -9999 | $(PathInit)/chcro | value/map | input initial/internal | initial cross-sectional area of flow in channel[m2] -9999: use half bankfull It is the initial cross-sectional area [m2] of the water in the river channels (a substitute for initial discharge, which is directly dependent on this). | +| lfuser | INITIAL CONDITIONS | SOIL | | ThetaInit1Value | -9999 | $(PathInit)/tha | value/map | input initial/internal | initial soil moisture content layer 1a -9999: use field capacity values It is the initial moisture content [mm3 mm-3] of the supercificial soil layer. | +| lfuser | INITIAL CONDITIONS | SOIL | | ThetaInit2Value | -9999 | $(PathInit)/thb | value/map | input initial/internal | initial soil moisture content layer 1b -9999: use field capacity values It is the initial moisture content [mm3 mm-3] of the upper soil layer. | +| lfuser | INITIAL CONDITIONS | SOIL | | ThetaInit3Value | -9999 | $(PathInit)/thc | value/map | input initial/internal | initial soil moisture content layer 2 -9999: use field capacity values It is the initial moisture content [mm3 mm-3] of the lower soil layer. | +| lfuser | INITIAL CONDITIONS | DOUBLE KINEMATIC WAVE | | CrossSection2AreaInitValue | -9999 | $(PathInit)/ch2cr | value/map | input initial/internal | initial channel cross-sectional area [m2] of the water in the river channels for 2nd routing channel -9999: use 0 | +| lfuser | INITIAL CONDITIONS | DOUBLE KINEMATIC WAVE | | PrevSideflowInitValue | -9999 | $(PathInit)/chside | value/map | input initial/internal | initial inflow from each pixel to the channel [mm]. A value of -9999 sets the initial amount of sideflow to thye channel to 0 | +| lfuser | INITIAL CONDITIONS | LAKES | | LakeInitialLevelValue | -9999 | $(PathInit)/lakeh | value/map | input initial/internal | Initial lake level [m] -9999 sets initial value to steady-state level | +| lfuser | INITIAL CONDITIONS | KINEMATIC WAVE | | PrevDischarge | -9999 | $(PathInit)/chanq | value/map | input initial/internal | initial discharge from previous run for lakes, reservoirs and transmission loss only needed for lakes reservoirs and transmission loss -9999: use 0 It is the initial discharge from previous run [m3s-1] used for lakes, reservoirs and transmission loss (only needed if option is on for lakes or reservoirs or transmission loss). Note that PrevDischarge is discharge as an average over the time step (a flux) . | +| lfuser | INITIAL CONDITION FOREST | INTERCEPTION | | CumIntForestInitValue | 0 | $(PathInit)/cumf | value/map | input initial/internal | cumulative interception forest [mm] | +| lfuser | INITIAL CONDITION FOREST | GROUNDWATER | | UZForestInitValue | 0 | $(PathInit)/uzf | value/map | input initial/internal | Initial water storage water in upper groundwater zone for forest [mm] | +| lfuser | INITIAL CONDITION FOREST | SOIL | | DSLRForestInitValue | 1 | $(PathInit)/dslf | value/map | input initial/internal | initial number of days since the last rainfall event for forest [days] | +| lfuser | INITIAL CONDITION FOREST | SOIL | | ThetaForestInit1Value | -9999 | $(PathInit)/thfa | value/map | input initial/internal | initial soil moisture content layer 1a -9999: use field capacity values | +| lfuser | INITIAL CONDITION FOREST | SOIL | | ThetaForestInit2Value | -9999 | $(PathInit)/thfb | value/map | input initial/internal | initial soil moisture content layer 1b -9999: use field capacity values | +| lfuser | INITIAL CONDITION FOREST | SOIL | | ThetaForestInit3Value | -9999 | $(PathInit)/thfc | value/map | input initial/internal | initial soil moisture content layer 2 -9999: use field capacity values | +| lfuser | INITIAL CONDITION IRRIGATION | INTERCEPTION | | CumIntIrrigationInitValue | 0 | $(PathInit)/cumi | value/map | input initial/internal | cumulative interception irrigation [mm] It is the initial value of the interception storage for the irrigation part of a pixel [mm] | +| lfuser | INITIAL CONDITION IRRIGATION | GROUNDWATER | | UZIrrigationInitValue | 0 | $(PathInit)/uzi | value/map | input initial/internal | Initial water storage water in upper groundwater zone for irrigation [mm] | +| lfuser | INITIAL CONDITION IRRIGATION | SOIL | | DSLRIrrigationInitValue | 1 | $(PathInit)/dsli | value/map | input initial/internal | initial number of days since the last rainfall event for irrigation [days] | +| lfuser | INITIAL CONDITION IRRIGATION | SOIL | | ThetaIrrigationInit1Value | -9999 | $(PathInit)/thia | value/map | input initial/internal | initial soil moisture content layer 1a for irrigation -9999: use field capacity values | +| lfuser | INITIAL CONDITION IRRIGATION | SOIL | | ThetaIrrigationInit2Value | -9999 | $(PathInit)/thib | value/map | input initial/internal | initial soil moisture content layer 1b for irrigation -9999: use field capacity values | +| lfuser | INITIAL CONDITION IRRIGATION | SOIL | | ThetaIrrigationInit3Value | -9999 | $(PathInit)/thic | value/map | input initial/internal | initial soil moisture content layer 2 for irrigation -9999: use field capacity values | +| lfuser | INITIAL CONDITIONS IMPERVIOUS AREAS | SOIL | | CumIntSealedInitValue | 0 | $(PathInit)/cseal | value/map | input initial/internal | cumulative depression storage [mm] depression storage for surface runoff from imperious surface | +| lfuser | PREFIXES METEO VEG VARIAB | METEO | | PrefixPrecipitation | pr | pr | prefix | input forcings | prefix precipitation maps | +| lfuser | PREFIXES METEO VEG VARIAB | METEO | | PrefixTavg | ta | ta | prefix | input forcings | prefix average temperature maps | +| lfuser | PREFIXES METEO VEG VARIAB | EVAPO | | PrefixE0 | e0 | e0 | prefix | input forcings | prefix E0 (potential open water evaporation) maps | +| lfuser | PREFIXES METEO VEG VARIAB | EVAPO | | PrefixES0 | es | es | prefix | input forcings | prefix ES0 (potential open bare-soil evaporation)maps | +| lfuser | PREFIXES METEO VEG VARIAB | EVAPO | | PrefixET0 | et | et | prefix | input forcings | prefix ET0 (potential reference evapotranspioration) maps | +| lfuser | PREFIXES METEO VEG VARIAB | LAI | | PrefixLAIOther | laio | laio | prefix | input forcings | prefix LAI (Leaf Area Index) maps | +| lfuser | PREFIXES METEO VEG VARIAB | LAI | | PrefixLAIForest | laif | laif | prefix | input forcings | prefix LAI forest maps | +| lfuser | PREFIXES METEO VEG VARIAB | LAI | | PrefixLAIIrrigation | laii | laii | prefix | input forcings | prefix LAI irrigation maps | +| lfuser | PREFIXES METEO VEG VARIAB | WATER USE | | PrefixWaterUseDomestic | dom | dom_2014 | prefix | input forcings | prefix domestic water use maps | +| lfuser | PREFIXES METEO VEG VARIAB | WATER USE | | PrefixWaterUseLivestock | liv | liv_2014 | prefix | input forcings | prefix livestock water use maps | +| lfuser | PREFIXES METEO VEG VARIAB | WATER USE | | PrefixWaterUseEnergy | ene | ene_2014 | prefix | input forcings | prefix energy water use maps | +| lfuser | PREFIXES METEO VEG VARIAB | WATER USE | | PrefixWaterUseIndustry | ind | ind_2014 | prefix | input forcings | prefix industry water use maps | +| lfuser | PREFIXES METEO VEG VARIAB | WATER USE | | PrefixVarWaterFraction | varw | varw | prefix | input forcings | prefix variable water fraction | +| lfuser | EVAPO(TRANSPI)RATION AND INTERCEPTION | METEO | | PrScaling | 1 | 1 | value | input par | Multiplier applied to potential precipitation rates | +| lfuser | EVAPO(TRANSPI)RATION AND INTERCEPTION | EVAPO | | CalEvaporation | 1 | 1 | value | input par | Multiplier applied to potential evapo(transpi)ration rates | +| lfuser | EVAPO(TRANSPI)RATION AND INTERCEPTION | LEAF DRAINAGE | Tint | LeafDrainageTimeConstant | 1 | 1 | value | input par | Time constant for water in interception store [days] | +| lfuser | EVAPO(TRANSPI)RATION AND INTERCEPTION | EVAPO | | kdf | 0.72 | 0.72 | value | input par | Average extinction coefficient for the diffuse radiation flux varies with crop from 0.4 to 1.1 (Goudriaan (1977)) It is used to calculate the extinction coefficient for global radiation kgb | +| lfuser | EVAPO(TRANSPI)RATION AND INTERCEPTION | DEPRESSION STORAGE | | SMaxSealed | 1 | 1 | value | input par | maximum depression storage for water on impervious surface which is not immediatly causing surface runoff [mm] This storage is emptied by evaporation (EW0) | +| lfuser | SNOW AND FROST | SNOW | | SnowFactor | 1 | 1 | value | input par | Multiplier applied to precipitation that falls as snow. Since snow is commonly underestimated in meteorological observation data, setting this multiplier to some value greater than 1 can counteract for this. Estimate from prior data if available, otherwise 1 | +| lfuser | SNOW AND FROST | SNOW | | SnowSeasonAdj | 1 | 1 | value | input par | It is the range [mm C-1 d-1] of the seasonal variation of snow melt. SnowMeltCoef is the average value. | +| lfuser | SNOW AND FROST | SNOW | Tm | TempMelt | 1 | 1 | value | input par | It is the degree-day factor that controls the rate of snowmelt [mm °C-1 day-1] | +| lfuser | SNOW AND FROST | SNOW | | TempSnow | 1 | 1 | value | input par | It is the average temperature below which precipitation is assumed to be snow [°C] | +| lfuser | SNOW AND FROST | SNOW | | TemperatureLapseRate | 0.0065 | 0.0065 | value | input par | Temperature lapse rate with altitude [deg C / m] It is the temperature lapse rate that is used to estimate average temperature at the centroid of each pixel’s elevation zones [°C m-1] | +| lfuser | SNOW AND FROST | SNOW | Af | Afrost | 0.97 | 0.97 | value | input par | Daily decay coefficient. It is the frost index decay coefficient [day-1]. It has a value in the range 0-1. | +| lfuser | SNOW AND FROST | SNOW | K | Kfrost | 0.57 | 0.57 | value | input par | Snow depth reduction coefficient, [cm-1] | +| lfuser | SNOW AND FROST | SNOW | wes | SnowWaterEquivalent | 0.45 | 0.45 | value | input par | Snow water equivalent, (based on snow density of 450 kg/m3) (e.g. Tarboton and Luce, 1996) It is the equivalent water depth of a given snow cover, expressed as a fraction [-] | +| lfuser | SNOW AND FROST | SNOW | | FrostIndexThreshold | 56 | 56 | value | input par | Degree Days Frost Threshold (stops infiltration, percolation and capillary rise) Molnau and Bissel found a value 56-85 for NW USA. It is the critical value of the frost index (Eq 2-5) above which the soil is considered frozen [°C day-1] | +| lfuser | IRRIGATION AND WATER ABSTRACTION | WATER ABSTRACTION | | IrrigationEfficiency | 0.75 | 0.75 | value | input | Field application irrigation efficiency max 1, ~0.90 drip irrigation, ~0.75 sprinkling | +| lfuser | IRRIGATION AND WATER ABSTRACTION | WATER ABSTRACTION | | ConveyanceEfficiency | 0.8 | 0.8 | value | input | onveyance efficiency, around 0.80 for average channel | +| lfuser | IRRIGATION AND WATER ABSTRACTION | WATER ABSTRACTION | | IrrigationType | 1 | 1 | value | input | IrrigationType (value between 0 and 1) is used here to distinguish between additional adding water until fieldcapacity (value set to 1) or not (value set to 0) | +| lfuser | IRRIGATION AND WATER ABSTRACTION | WATER ABSTRACTION | | IrrigationMult | 1.2 | 1.2 | value | input | Factor to irrigation water demand More than the transpiration is added e.g to prevent salinisation | +| lfuser | IRRIGATION AND WATER ABSTRACTION | WATER ABSTRACTION | | LivestockConsumptiveUseFraction | 0.15 | 0.15 | value | input | Consumptive Use (1-Recycling ratio) for livestock water use (0-1) | +param| lfuser | IRRIGATION AND WATER ABSTRACTION | WATER ABSTRACTION | | IndustryConsumptiveUseFraction | 0.15 | 0.15 | value | input | Consumptive Use (1-Recycling ratio) for industrial water use (0-1) | +| lfuser | IRRIGATION AND WATER ABSTRACTION | WATER ABSTRACTION | | EnergyConsumptiveUseFraction | $(PathMaps)/energyconsumptiveuse.map | $(PathMaps)/energyconsumptiveuse.map | value/map | input | Consumptive Use (1-Recycling ratio) for energy water use (0-1) Source: Torcellini et al. (2003) "Consumptive Use for US Power Production" map advised by Neil Edwards, Energy Industry the UK and small French rivers the consumptive use varies between 1:2 and 1:3, so 0.33-0.50 For plants along big rivers like Rhine and Danube the 0.025 is ok EnergyConsumptiveUseFraction=0.025 | +| lfuser | IRRIGATION AND WATER ABSTRACTION | WATER ABSTRACTION | | DomesticConsumptiveUseFraction | 0.2 | 0.2 | value | input | Consumptive Use (1-Recycling ratio) for domestic water use (0-1) Source: EEA (2005) State of Environment | +| lfuser | IRRIGATION AND WATER ABSTRACTION | WATER ABSTRACTION | | LeakageFraction | 0.2 | 0.2 | value | input | $(PathMaps)/leakage.map Fraction of leakage of public water supply (0=no leakage, 1=100% leakage) | +| lfuser | IRRIGATION AND WATER ABSTRACTION | WATER ABSTRACTION | | LeakageWaterLoss | 0.75 | 0.75 | value | input | The water that is lost from leakage (lost) (0-1) | +| lfuser | IRRIGATION AND WATER ABSTRACTION | WATER ABSTRACTION | | LeakageReductionFraction | 0 | 0 | value | input | Leakage reduction fraction (e.g. 50% = 0.5 as compared to current Leakage) (baseline=0, maximum=1) | +| lfuser | IRRIGATION AND WATER ABSTRACTION | WATER ABSTRACTION | | WaterSavingFraction | 0 | 0 | value | input | Water savings fraction (e.g. 10% = 0.1 as compared to current Use (baseline=0, maximum=1) scenwsav.map | +| lfuser | IRRIGATION AND WATER ABSTRACTION | WATER ABSTRACTION | | WaterReUseFraction | 0 | 0 | value | input | Fraction of water re-used in industry (e.g. 50% = 0.5 = half of the water is re-used, used twice (baseline=0, maximum=1 scenruse.map | +| lfuser | INPUT WATER USE MAPS AND PAR | LAI | | FirstDayOfMonth | $(PathTables)/firstdayofmonth.txt | $(PathTables)/firstdayofmonth.txt | table | input | NO LONGER USED table with number of first day for each month | +| lfuser | INPUT WATER USE MAPS AND PAR | CALC INDICATOR | | Population | $(PathMapsLanduse)/pop | $(PathMapsLanduse)/pop | map | input | Population per pixel | +| lfuser | INPUT WATER USE MAPS AND PAR | CALC INDICATOR | | PopulationMaps | $(PathWaterUse)/pop | $(PathWaterUse)/pop | map | input | Population map for TransientLandUseChange | +| lfuser | INPUT WATER USE MAPS AND PAR | CALC INDICATOR | | LandUseMask | $(PathMaps)/lusemask.map | $(PathMaps)/lusemask.map | map | input | Land use mask map to mask out deserts and high mountains (to cover ETdif map, otherwise Sahara etc would pop out; meant as a drought indicator | +| lfuser | INPUT WATER USE MAPS AND PAR | WATER ABSTRACTION | | WaterUseMaps | $(PathOut)/wuse | $(PathOut)/wuse | map | output | path and prefix of the reported water use m3 s-1 as a result of demand and availability | +| lfuser | INPUT WATER USE MAPS AND PAR | WATER ABSTRACTION | | WaterUseTS | $(PathOut)/wateruseUps.tss | $(PathOut)/wateruseUps.tss | tss | output | Time series of upstream water use at gauging stations | +| lfuser | INPUT WATER USE MAPS AND PAR | WATER ABSTRACTION | | StepsWaterUseTS | $(PathOut)/stepsWaterUse.tss | $(PathOut)/stepsWaterUse.tss | tss | output | number of loops needed for water use routine | +| lfuser | INPUT WATER USE MAPS AND PAR | WATER ABSTRACTION | | maxNoWateruse | 5 | 5 | value | input | maximum number of loops for calculating the use of water | +| lfuser | INPUT WATER USE MAPS AND PAR | WATER ABSTRACTION | | WUsePercRemain | 0.5 | 0.5 | value | input | percentage of water that must remain the channel (after water abstraction) | +| lfuser | INPUT WATER USE MAPS AND PAR | WATER ABSTRACTION / CALC INDICATOR | | WUseRegion | $(PathMaps)/wregion.map | $(PathMaps)/wregion.map | map | input | area from which surface water is extracted | +| lfuser | GROUNDWATER RELATED PAR | GROUNDWATER | | LZThreshold | $(PathMaps)/lzthreshold.map | $(PathMaps)/lzthreshold.map | map | input | threshold value below which there is no outflow to the channel | +| lfuser | GROUNDWATER RELATED PAR | GROUNDWATER | | LZSmoothRange | 5 | 5 | value | input | length of the window used to smooth the LZ zone [number of cell length] It works ONLY if wateruse=1 | +| lfuser | GROUNDWATER RELATED PAR | GROUNDWATER | | GroundwaterBodies | $(PathMaps)/gwbodiesNew.map | $(PathMaps)/gwbodiesNew.map | map | input | map of aquifers (0/1), used to smoothen LZ near extraction areas | +| lfuser | EVAPORATION FROM OPEN WATER | EVAPO | | FracMaxWater | $(PathMaps)/fracmaxwater.map | $(PathMaps)/fracmaxwater.map | map | input | Fraction of maximum extend of water | +| lfuser | EVAPORATION FROM OPEN WATER | LAKES | | LakeMask | $(PathMaps)/lakemask.map | $(PathMaps)/lakemask.map | map | input | Mask with Lakes from GLWD database | +| lfuser | TRANSMISSION LOSS | TRANSMISSION | | TransSub | 0.3 | 0.3 | value | input par | PBchange Transmission loss function parameter | +| lfuser | TRANSMISSION LOSS | TRANSMISSION | | TransPower1 | 2 | 2 | value | input par | PBchange Transmission loss function parameter | +| lfuser | TRANSMISSION LOSS | TRANSMISSION | | TransArea | 1.00E+10 | 1.00E+10 | value | input par | PBchange downstream area taking into account for transmission loss | +| lfuser | TRANSMISSION LOSS | TRANSMISSION | | UpAreaTrans | $(PathMaps)/upArea | $(PathMaps)/upArea | map | output | upstream area for transmission loss | +| lfuser | ROUTING | KINEMATIC WAVE | | beta | 0.6 | 0.6 | value | input par | It is the routing coefficient in Manning's equation (2/3). kinematic wave parameter: 0.6 is for broad sheet flow | +| lfuser | ROUTING | KINEMATIC WAVE | | OFDepRef | 5 | 5 | value | input par | It is a reference flow depth from which the flow velocity of the surface runoff is calculated [mm] Reference depth of overland flow [mm], used to compute overland flow Alpha for kin. wave | +| lfuser | ROUTING | KINEMATIC WAVE | | GradMin | 0.001 | 0.001 | value | input par | Minimum slope gradient of the surface (for kin. wave: slope cannot be 0) It is a lower limit for the slope gradient used in the calculation of the surface runoff flow velocity [m m-1] | +| lfuser | ROUTING | KINEMATIC WAVE | | ChanGradMin | 0.0001 | 0.0001 | value | input par | Minimum channel gradient (for kin. wave: slope cannot be 0) It is a lower limit for the channel gradient used in the calculation of the channel flow velocity [m m-1] | +| lfuser | ROUTING | DOUBLE KINEMATIC WAVE | | QSplitMult | 2 | 2 | value | input par | PBchange Multiplier applied to average Q to split into a second line of routing | +| lfuser | NUMERICS | SOIL | | CourantCrit | 0.4 | 0.4 | value | input par | Minimum value for Courant condition in soil moisture routine. Always less than or equal to 1. Small values result in improved numerical accuracy, at the expense of increased computing time (more sub-steps needed). If reported time series of soil moisture contain large jumps, lowering CourantCrit should fix this | +| lfuser | OPTION RESERVOIR | RESERVOIRS | | DtSecReservoirs | 3600 | 3600 | value | input | Sub time step used for reservoir simulation [s]. Within the model, the smallest out of DtSecReservoirs and DtSec is used. | +| lfuser | OPTION RESERVOIR | RESERVOIRS | | ReservoirInitialFillValue | -9999 | $(PathInit)/rsfil | value/map | input initial/internal | Initial reservoir fill fraction -9999 sets initial fill to normal storage limit if you're not using the reservoir option, enter some bogus value | +| lfuser | OPTION LAKE | LAKES | | TabLakeAvNetInflowEstimate | $(PathTables)/lakeavinflow.txt | $(PathTables)/lakeavinflow.txt | table | input | Estimate of average net inflow into lake (=inflow - evaporation) [cu m / s] Used to calculated steady-state lake level in case LakeInitialLevelValue is set to -9999 | +| lfuser | OPTION POLDER | POLDER | | mu | 0.49 | 0.49 | value | input | Weir constant [-] (Do not change!) | +| lfuser | OPTION POLDER | POLDER | | PolderInitialLevelValue | 0 | 0 | value | input | Initial water level in polder [m] | +| lfuser | OPTION DYNAMIC WAVE | DYNAMIC WAVE | | CourantDynamicCrit | 0.5 | 0.5 | value | input par | Minimum value for Courant condition in soil moisture routine. Always less than or equal to 1. Small values result in improved numerical accuracy, at the expense of increased computing time (more sub-steps needed). If reported time series of soil moisture contain large jumps, lowering CourantCrit should fix this | +| lfuser | OPTION DYNAMIC WAVE | DYNAMIC WAVE | | DynWaveConstantHeadBoundary | 0 | 0 | value | input | Constant head [m] at most downstream pixel (relative to altitude at most downstream pixel) | +| lfuser | OPTION HYDROGRAPH | INFLOW | | InflowPoints | $(PathInflow)/nile_assiut.map | $(PathInflow)/nile_assiut.map | map | input forcings | OPTIONAL: nominal map with locations of (measured) inflow hydrographs [cu m / s] | +| lfuser | OPTION HYDROGRAPH | INFLOW | | QInTS | $(PathInflow)/nile_assiut.tss | $(PathInflow)/nile_assiut.tss | tss | input forcings | OPTIONAL: observed or simulated input hydrographs as time series [cu m / s] Note that identifiers in time series correspond to InflowPoints map (also optional) | +| lfuser | OPTION PF REPORTING | SOIL | | HeadMax | 1.00E+07 | 1.00E+07 | value | input | Maximum capillary head [cm]. This value is used if Theta equals residual soil moisture content (value of HeadMax is arbitrary). Only needed for pF computation, otherwise doesn't influence model results at all) | +| lfbinding | | SETTINGS | | MaskMap | $(MaskMap) | $(MaskMap) | map/value | input | Clone map used to set computation area for Lisflood model It can be 5 values separated by a blank space: col row cellsize xupleft yupleft (3600 1500 0.1 -180 90 -> World) or a map in pcraster format or netcdf If a map is used, information are read from the map. | +| lfbinding | | SETTINGS | | netCDFtemplate | $(netCDFtemplate) | $(netCDFtemplate) | map | input | netcdf template used to copy metadata information for writing netcdf | +| lfbinding | TIMESTEP RELATED PARAMETERS | SETTINGS | | CalendarDayStart | $(CalendarDayStart) | $(CalendarDayStart) | date | input | Reference Calendar day of the model. It is used inside LISFLOOD code as the reference date for time step id numbers. It MUST be <= first simulation start date. It MUST be a date as string, see code for list of available date formats. It can now include also HH:MM, if not specified they are set as 00:00 PCRaster: Day of the year of first map (e.g. xx000.001) even if the model start from map e.g. 500 e.g. 1st of January: 1; 1st of June 151 (or 152 in leap year) Needed to read out LAI tables correctly | +| lfbinding | TIMESTEP RELATED PARAMETERS | SETTINGS | | DtSec | $(DtSec) | $(DtSec) | 0 | input | timestep [seconds]. This is the simulation time interval (86400-day; 3600-hour) | +| lfbinding | TIMESTEP RELATED PARAMETERS | KINEMATIC WAVE | | DtSecChannel | $(DtSecChannel) | $(DtSecChannel) | 0 | input | Sub time step used for kinematic wave channel routing [seconds] Within the model, the smallest out of DtSecChannel and DtSec is used Using a value that is smaller than DtSec may result in a better simulation of the overal shape of the calculated hydrograph | +| lfbinding | TIMESTEP RELATED PARAMETERS | SETTINGS | | StepStart | $(StepStart) | $(StepStart) | value/date | input | Step id number or date of the simulation start step. See code for a list of available date formats. If number is used, it refers to "CalendarDayStart". For dates, also HH:MM can be set. If they are not set, 00:00 are automatically used. StepStart MUST be >= Calendar DayStart and <= StepEnd | +| lfbinding | TIMESTEP RELATED PARAMETERS | SETTINGS | | StepEnd | $(StepEnd) | $(StepEnd) | value/date | input | Step id number or date of end time step in simulation. If number is used, it refers to "CalendarDayStart". For dates, also HH:MM can be set. If they are not set, 00:00 are automatically used. StepStart MUST be <= Calendar DayStart and >= StepStart | +| lfbinding | EVAPO(TRANSPI)RATION AND INTERCEPTION | METEO | | PrScaling | $(PrScaling) | $(PrScaling) | 0 | input | Multiplier applied to potential precipitation rates | +| lfbinding | EVAPO(TRANSPI)RATION AND INTERCEPTION | EVAPO | | CalEvaporation | $(CalEvaporation) | $(CalEvaporation) | value | input | Multiplier applied to potential evapo(transpi)ration rates | +| lfbinding | EVAPO(TRANSPI)RATION AND INTERCEPTION | LEAF DRAINAGE | | LeafDrainageTimeConstant | $(LeafDrainageTimeConstant) | $(LeafDrainageTimeConstant) | 0 | input | Time constant for leaf drainage | +| lfbinding | EVAPO(TRANSPI)RATION AND INTERCEPTION | EVAPO | | kdf | $(kdf) | $(kdf) | value | input | ? | +| lfbinding | EVAPO(TRANSPI)RATION AND INTERCEPTION | SETTINGS | | AvWaterRateThreshold | $(AvWaterRateThreshold) | $(AvWaterRateThreshold) | 0 | input | It defines a critical amount of water that is used as a threshold for resetting the variable Dslr. The threshold is defined as an equivalent intensity in [mm day-1] Critical amount of available water (expressed in [mm/day]!), above which 'Days Since Last Rain' parameter is set to 1 default: 5.0 (not included in calibration) | +| lfbinding | EVAPO(TRANSPI)RATION AND INTERCEPTION | DEPRESSION STORAGE | | SMaxSealed | $(SMaxSealed) | $(SMaxSealed) | 0 | input | maximum depression storage for water on impervious surface which is not immediatly causing surface runoff [mm] This storage is emptied by evaporation (EW0) | +| lfbinding | SNOW AND FROST | SNOW | | SnowFactor | $(SnowFactor) | $(SnowFactor) | 0 | input | Multiplier applied to precipitation that falls as snow. Since snow is commonly underestimated in meteorological observation data, setting this multiplier to some value greater than 1 can counteract for this. Estimate from prior data if available, otherwise 1 | +| lfbinding | SNOW AND FROST | SNOW | | SnowMeltCoef | $(SnowMeltCoef) | $(SnowMeltCoef) | 0 | input | Snowmelt coefficient [mm/deg C /day]. It is the degree-day factor that controls the rate of snowmelt default: 4.0 $(PathParams)/params_SnowMeltCoef.nc SRM: 0.45 cm/C/day ( = 4.50 mm/C/day), Kwadijk: 18 mm/C/month (= 0.59 mm/C/day) See also Martinec et al., 1998. | +| lfbinding | SNOW AND FROST | SNOW | | SnowSeasonAdj | $(SnowSeasonAdj) | $(SnowSeasonAdj) | 0 | input | It is the range [mm C-1 d-1] of the seasonal variation of snow melt. SnowMeltCoef is the average value. | +| lfbinding | SNOW AND FROST | SNOW | | TempMelt | $(TempMelt) | $(TempMelt) | 0 | input | It is the degree-day factor that controls the rate of snowmelt [mm °C-1 day-1] | +| lfbinding | SNOW AND FROST | SNOW | | TempSnow | $(TempSnow) | $(TempSnow) | 0 | input | It is the average temperature below which precipitation is assumed to be snow [°C] | +| lfbinding | SNOW AND FROST | SNOW | | TemperatureLapseRate | $(TemperatureLapseRate) | $(TemperatureLapseRate) | 0 | input | Temperature lapse rate with altitude [deg C / m] It is the temperature lapse rate that is used to estimate average temperature at the centroid of each pixel’s elevation zones [°C m-1] | +| lfbinding | SNOW AND FROST | SNOW | | Afrost | $(Afrost) | $(Afrost) | 0 | input | Daily decay coefficient. It is the frost index decay coefficient [day-1]. It has a value in the range 0-1. | +| lfbinding | SNOW AND FROST | SNOW | | Kfrost | $(Kfrost) | $(Kfrost) | 0 | input | Snow depth reduction coefficient, [cm-1] | +| lfbinding | SNOW AND FROST | SNOW | | SnowWaterEquivalent | $(SnowWaterEquivalent) | $(SnowWaterEquivalent) | 0 | input | Snow water equivalent, (based on snow density of 450 kg/m3) (e.g. Tarboton and Luce, 1996) It is the equivalent water depth of a given snow cover, expressed as a fraction [-] | +| lfbinding | SNOW AND FROST | SNOW | | FrostIndexThreshold | $(FrostIndexThreshold) | $(FrostIndexThreshold) | 0 | input | Degree Days Frost Threshold (stops infiltration, percolation and capillary rise) Molnau and Bissel found a value 56-85 for NW USA. It is the critical value of the frost index (Eq 2-5) above which the soil is considered frozen [°C day-1] | +| lfbinding | INFILTRATION | INFILTRATION | | b_Xinanjiang | $(b_Xinanjiang) | $(b_Xinanjiang) | 0 | input | Power in Xinanjiang distribution function. [-] It is the power in the infiltration equation. Default: 0.7 | +| lfbinding | INFILTRATION | INFILTRATION | | PowerPrefFlow | $(PowerPrefFlow) | $(PowerPrefFlow) | 0 | input | Power that controls increase of proportion of preferential flow with increased soil moisture storage. It s the power in the preferential flow equation [-] default: 3.5 $(PathParams)/params_PowerPrefFlow.nc | +| lfbinding | GROUNDWATER RELATED PAR | GROUNDWATER | | UpperZoneTimeConstant | $(UpperZoneTimeConstant) | $(UpperZoneTimeConstant) | 0 | input | Time constant for the upper groundwater zone [days] default: 10 $(PathParams)/params_UpperZoneTimeConstant.nc Time constant for water in upper zone [days*mm^GwAlpha] Note that units are days if GwAlpha=0 (linear reservoir] | +| lfbinding | GROUNDWATER RELATED PAR | GROUNDWATER | | LowerZoneTimeConstant | $(LowerZoneTimeConstant) | $(LowerZoneTimeConstant) | 0 | input | Time constant for the lower groundwater zone [days] | +| lfbinding | GROUNDWATER RELATED PAR | GROUNDWATER | | GwPercValue | $(GwPercValue) | $(GwPercValue) | 0 | input | Maximum rate of percolation going from the upper to the lower groundwater zone [mm day-1] default: 0.5 $(PathParams)/params_GwPercValue.nc | +| lfbinding | GROUNDWATER RELATED PAR | GROUNDWATER | | GwLoss | $(GwLoss) | $(GwLoss) | 0 | input | Maximum loss rate out of Lower response box, expressed as a fraction of lower zone outflow. Fraction [-], range 0-1 A value of 0 (closed lower boundary) is recommended as a starting value Maximum rate of percolation from the lower groundwater zone (groundwater loss) zone [mm day-1]. default: 0.0 | +| lfbinding | EVAPORATION FROM OPEN WATER | WATER USE | | WFractionMaps | $(PathVarWaterfraction)/$(PrefixVarWaterFraction) | $(PathVarWaterfraction)/$(PrefixVarWaterFraction) | 0 | input | water use daily maps with a (in this case negative) volume of water [cu m/s] | +| lfbinding | EVAPORATION FROM OPEN WATER | WATER USE | | WFracOfDay | $(PathTables)/WFracOfDay.txt | $(PathTables)/WFracOfDay.txt | 0 | input | table with days for each water use maps 1st column: range of days; 2nd column: suffix of wuse map | +| lfbinding | EVAPORATION FROM OPEN WATER | EVAPO | | FracMaxWater | $(FracMaxWater) | $(FracMaxWater) | value | input | Percentage of maximum extend of water | +| lfbinding | EVAPORATION FROM OPEN WATER | LAKES | | LakeMask | $(LakeMask) | $(LakeMask) | map | input | Mask with Lakes from GLWD database | +| lfbinding | EVAPORATION FROM OPEN WATER | EVAPO | | maxNoEva | 10 | 10 | value | input | ? | +| lfbinding | EVAPORATION FROM OPEN WATER | EVAPO | | EvaOpenMaps | $(PathOut)/evaop | $(PathOut)/evaop | map (missing) | output | Reported evaporation from open water [mm] | +| lfbinding | EVAPORATION FROM OPEN WATER | EVAPO | | EvaOpenTS | $(PathOut)/evaopenUps.tss | $(PathOut)/evaopenUps.tss | tss (missing) | output | Time series of upstream water evaporation from open water at gauging stations | +| lfbinding | TRANSMISSION LOSS | TRANSMISSION | | TransPower1 | $(TransPower1) | $(TransPower1) | 0 | input | PBchange Transmission loss function parameter | +| lfbinding | TRANSMISSION LOSS | TRANSMISSION | | TransSub | $(TransSub) | $(TransSub) | 0 | input | PBchange Transmission loss function parameter | +| lfbinding | TRANSMISSION LOSS | TRANSMISSION | | TransArea | $(TransArea) | $(TransArea) | 0 | input | PBchange downstream area taking into account for transmission loss | +| lfbinding | TRANSMISSION LOSS | TRANSMISSION | | UpAreaTrans | $(UpAreaTrans) | $(UpAreaTrans) | 0 | input | upstream area for transmission loss | +| lfbinding | ROUTING | KINEMATIC WAVE | | CalChanMan | $(CalChanMan) | $(CalChanMan) | 0 | input | It is a multiplier that is applied to the Manning's roughness map of the channel system default: 2.0 $(PathParams)/params_CalChanMan1.nc | +| lfbinding | ROUTING | DOUBLE KINEMATIC WAVE | | CalChanMan2 | $(CalChanMan2) | $(CalChanMan2) | value/map | input | PBchange Multiplier applied to Channel Manning's n for second routing line default: 3.0 $(PathParams)/params_CalChanMan2.nc | +| lfbinding | ROUTING | DOUBLE KINEMATIC WAVE | | QSplitMult | $(QSplitMult) | $(QSplitMult) | value | input | PBchange Multiplier applied to average Q to split into a second line of routing | +| lfbinding | ROUTING | KINEMATIC WAVE | | beta | $(beta) | $(beta) | 0 | input | It is the routing coefficient in Manning's equation (2/3). kinematic wave parameter: 0.6 is for broad sheet flow | +| lfbinding | ROUTING | KINEMATIC WAVE | | OFDepRef | $(OFDepRef) | $(OFDepRef) | 0 | input | It is a reference flow depth from which the flow velocity of the surface runoff is calculated [mm] Reference depth of overland flow [mm], used to compute overland flow Alpha for kin. wave | +| lfbinding | ROUTING | KINEMATIC WAVE | | GradMin | $(GradMin) | $(GradMin) | 0 | input | Minimum slope gradient of the surface (for kin. wave: slope cannot be 0) It is a lower limit for the slope gradient used in the calculation of the surface runoff flow velocity [m m-1] | +| lfbinding | ROUTING | KINEMATIC WAVE | | ChanGradMin | $(ChanGradMin) | $(ChanGradMin) | 0 | input | Minimum channel gradient (for kin. wave: slope cannot be 0) It is a lower limit for the channel gradient used in the calculation of the channel flow velocity [m m-1] | +| lfbinding | NUMERICS | SOIL | | CourantCrit | $(CourantCrit) | $(CourantCrit) | value | input | Minimum value for Courant condition in soil moisture routine. Always less than or equal to 1. Small values result in improved numerical accuracy, at the expense of increased computing time (more sub-steps needed). If reported time series of soil moisture contain large jumps, lowering CourantCrit should fix this | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | GROUNDWATER | | LZAvInflowMap | $(PathMaps)/lzavin.map | $(PathMaps)/lzavin.map | map | input | $(PathInit)/lzavin.map Reported map of average percolation rate from upper to lower groundwater zone (reported for end of simulation) | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | KINEMATIC WAVE | | AvgDis | $(PathMaps)/avgdis.map | $(PathMaps)/avgdis.map | map | input | $(PathInit)/avgdis.map CHANNEL split routing in two lines Average discharge map [m3/s] | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | SETTINGS | | timestepInit | $(timestepInit) | $(timestepInit) | value/date | input | If initial conditions are stored as netCDF stack, this variable sets which time step to use as initial step. It can be either a date (e.g. 1/1/2010) or a number (e.g. 5). If a number is used, it refers to "CalendarDayStart". (it is generally one step back compared to StepStart) If missing, netcdf file are read with no reference to 'time', either if they are a stack or not. timestepInit is ignored if netCDF file is a single netCDF file.. | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | SURFACE | | OFDirectInitValue | $(OFDirectInitValue) | $(OFDirectInitValue) | value/map | input | Reported water volume for direct fraction on catchment surface [m^3] | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | SURFACE | | OFOtherInitValue | $(OFOtherInitValue) | $(OFOtherInitValue) | value/map | input | | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | SURFACE | | OFForestInitValue | $(OFForestInitValue) | $(OFForestInitValue) | value/map | input | | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | OVERLAND FLOW | | WaterDepthInitValue | $(WaterDepthInitValue) | $(WaterDepthInitValue) | map | input | initial overland flow water depth [mm] | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | SNOW | | SnowCoverAInitValue | $(SnowCoverAInitValue) | $(SnowCoverAInitValue) | 0 | input | initial snow depth in snow zone A [mm] | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | SNOW | | SnowCoverBInitValue | $(SnowCoverBInitValue) | $(SnowCoverBInitValue) | 0 | input | initial snow depth in snow zone B [mm] | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | SNOW | | SnowCoverCInitValue | $(SnowCoverCInitValue) | $(SnowCoverCInitValue) | 0 | input | initial snow depth in snow zone C [mm] | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | SNOW | | FrostIndexInitValue | $(FrostIndexInitValue) | $(FrostIndexInitValue) | 0 | input | initial frost index value | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | INTERCEPTION | | CumIntInitValue | $(CumIntInitValue) | $(CumIntInitValue) | 0 | input | cumulative interception [mm] | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | GROUNDWATER | | UZInitValue | $(UZInitValue) | $(UZInitValue) | 0 | input | water in upper groundwater zone [mm] | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | SOIL | | DSLRInitValue | $(DSLRInitValue) | $(DSLRInitValue) | 0 | input | days since last rainfall | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | GROUNDWATER | | LZInitValue | $(LZInitValue) | $(LZInitValue) | 0 | input | water in lower store [mm] -9999: use steady-state storage | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | KINEMATIC WAVE | | TotalCrossSectionAreaInitValue | $(TotalCrossSectionAreaInitValue) | $(TotalCrossSectionAreaInitValue) | 0 | input | initial cross-sectional area of flow in channel[m2] -9999: use half bankfull | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | SOIL | | ThetaInit1Value | $(ThetaInit1Value) | $(ThetaInit1Value) | 0 | input | initial soil moisture content layer 1a -9999: use field capacity values | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | SOIL | | ThetaInit2Value | $(ThetaInit2Value) | $(ThetaInit2Value) | 0 | input | initial soil moisture content layer 1b -9999: use field capacity values | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | SOIL | | ThetaInit3Value | $(ThetaInit3Value) | $(ThetaInit3Value) | 0 | input | initial soil moisture content layer 2 -9999: use field capacity values | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | DOUBLE KINEMATIC WAVE | | CrossSection2AreaInitValue | $(CrossSection2AreaInitValue) | $(CrossSection2AreaInitValue) | value/map | input | initial channel crosssection for 2nd routing channel -9999: use 0 | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | DOUBLE KINEMATIC WAVE | | PrevSideflowInitValue | $(PrevSideflowInitValue) | $(PrevSideflowInitValue) | value/map | input | initial inflow from each pixel to the channel [mm]. A value of -9999 sets the initial amount of sideflow to thye channel to 0 | +| lfbinding | INITIAL CONDITIONS WATER BALANCE MODEL | KINEMATIC WAVE | | PrevDischarge | $(PrevDischarge) | $(PrevDischarge) | 0 | input | initial discharge from previous run for lakes, reservoirs and transmission loss only needed for lakes reservoirs and transmission loss -9999: use 0 | +| lfbinding | INITIAL CONDITION FOREST | INTERCEPTION | | CumIntForestInitValue | $(CumIntForestInitValue) | $(CumIntForestInitValue) | 0 | input | cumulative interception forest [mm] | +| lfbinding | INITIAL CONDITION FOREST | GROUNDWATER | | UZForestInitValue | $(UZForestInitValue) | $(UZForestInitValue) | 0 | input | Initial water storage water in upper groundwater zone for forest [mm] | +| lfbinding | INITIAL CONDITION FOREST | SOIL | | DSLRForestInitValue | $(DSLRForestInitValue) | $(DSLRForestInitValue) | 0 | input | initial number of days since the last rainfall event for forest [days] | +| lfbinding | INITIAL CONDITION FOREST | SOIL | | ThetaForestInit1Value | $(ThetaForestInit1Value) | $(ThetaForestInit1Value) | 0 | input | initial soil moisture content layer 1a -9999: use field capacity values | +| lfbinding | INITIAL CONDITION FOREST | SOIL | | ThetaForestInit2Value | $(ThetaForestInit2Value) | $(ThetaForestInit2Value) | 0 | input | initial soil moisture content layer 1b -9999: use field capacity values | +| lfbinding | INITIAL CONDITION FOREST | SOIL | | ThetaForestInit3Value | $(ThetaForestInit3Value) | $(ThetaForestInit3Value) | 0 | input | initial soil moisture content layer 2 -9999: use field capacity values | +| lfbinding | INITIAL CONDITION FOREST | SOIL | | CumIntSealedInitValue | $(CumIntSealedInitValue) | $(CumIntSealedInitValue) | 0 | input | cumulative depression storage [mm] depression storage for surface runoff from imperious surface | +| lfbinding | INITIAL CONDITION IRRIGATION | INTERCEPTION | | CumIntIrrigationInitValue | $(CumIntIrrigationInitValue) | $(CumIntIrrigationInitValue) | 0 | input | cumulative interception irrigation [mm] It is the initial value of the interception storage for the irrigation part of a pixel [mm] | +| lfbinding | INITIAL CONDITION IRRIGATION | GROUNDWATER | | UZIrrigationInitValue | $(UZIrrigationInitValue) | $(UZIrrigationInitValue) | 0 | input | Initial water storage water in upper groundwater zone for irrigation [mm] | +| lfbinding | INITIAL CONDITION IRRIGATION | SOIL | | DSLRIrrigationInitValue | $(DSLRIrrigationInitValue) | $(DSLRIrrigationInitValue) | 0 | input | initial number of days since the last rainfall event for irrigation [days] | +| lfbinding | INITIAL CONDITION IRRIGATION | SOIL | | ThetaIrrigationInit1Value | $(ThetaIrrigationInit1Value) | $(ThetaIrrigationInit1Value) | 0 | input | initial soil moisture content layer 1a for irrigation -9999: use field capacity values | +| lfbinding | INITIAL CONDITION IRRIGATION | SOIL | | ThetaIrrigationInit2Value | $(ThetaIrrigationInit2Value) | $(ThetaIrrigationInit2Value) | 0 | input | initial soil moisture content layer 1b for irrigation -9999: use field capacity values | +| lfbinding | INITIAL CONDITION IRRIGATION | SOIL | | ThetaIrrigationInit3Value | $(ThetaIrrigationInit3Value) | $(ThetaIrrigationInit3Value) | 0 | input | initial soil moisture content layer 2 for irrigation -9999: use field capacity values | +| lfbinding | INPUT METEO AND VEG MAPS | METEO | | PrecipitationMaps | $(PathMeteo)/$(PrefixPrecipitation) | $(PathMeteo)/$(PrefixPrecipitation) | map | input | precipitation [mm/day] | +| lfbinding | INPUT METEO AND VEG MAPS | METEO | | TavgMaps | $(PathMeteo)/$(PrefixTavg) | $(PathMeteo)/$(PrefixTavg) | map | input | average daily temperature [C] | +| lfbinding | INPUT METEO AND VEG MAPS | METEO | | E0Maps | $(PathMeteo)/$(PrefixE0) | $(PathMeteo)/$(PrefixE0) | map | input | daily reference evaporation (free water) [mm/day] | +| lfbinding | INPUT METEO AND VEG MAPS | METEO | | ES0Maps | $(PathMeteo)/$(PrefixES0) | $(PathMeteo)/$(PrefixES0) | map | input | daily reference evaporation (soil) [mm/day] | +| lfbinding | 0 | METEO | | ET0Maps | $(PathMeteo)/$(PrefixET0) | $(PathMeteo)/$(PrefixET0) | map | input | daily reference evapotranspiration (crop) [mm/day] | +| lfbinding | INPUT METEO AND VEG MAPS | LAI | | LAIOtherMaps | $(PathLAI)/$(PrefixLAIOther) | $(PathLAI)/$(PrefixLAIOther) | 0 | input | leaf area index [m2/m2] | +| lfbinding | INPUT METEO AND VEG MAPS | LAI | | LAIForestMaps | $(PathLAI)/$(PrefixLAIForest) | $(PathLAI)/$(PrefixLAIForest) | 0 | input | leaf area index forest [m2/m2] | +| lfbinding | INPUT METEO AND VEG MAPS | LAI | | LAIIrrigationMaps | $(PathLAI)/$(PrefixLAIIrrigation) | $(PathLAI)/$(PrefixLAIIrrigation) | 0 | input | leaf area index irrigation [m2/m2] | +| lfbinding | INPUT METEO AND VEG MAPS | LAI | | LAIOfDay | $(PathTables)/laiofday.txt | $(PathTables)/laiofday.txt | table | input | table with days for each LAI maps 1st column: range of days; 2nd column: suffix of LAI map | +| lfbinding | INPUT WATER USE MAPS AND PAR | WATER ABSTRACTION | | FirstDayOfMonth | $(PathTables)/firstdayofmonth.txt | $(PathTables)/firstdayofmonth.txt | table | input | NO LONGER USED table with number of first day for each month | +| lfbinding | INPUT WATER USE MAPS AND PAR | WATER ABSTRACTION | | DomesticDemandMaps | $(PathWaterUse)/$(PrefixWaterUseDomestic) | $(PathWaterUse)/$(PrefixWaterUseDomestic) | map | input | Domestic water abstraction daily maps [mm] | +| lfbinding | INPUT WATER USE MAPS AND PAR | WATER ABSTRACTION | | LivestockDemandMaps | $(PathWaterUse)/$(PrefixWaterUseLivestock) | $(PathWaterUse)/$(PrefixWaterUseLivestock) | map | input | Livestock water abstraction daily maps [mm] | +| lfbinding | INPUT WATER USE MAPS AND PAR | WATER ABSTRACTION | | EnergyDemandMaps | $(PathWaterUse)/$(PrefixWaterUseEnergy) | $(PathWaterUse)/$(PrefixWaterUseEnergy) | map | input | Energy water abstraction daily maps [mm] | +| lfbinding | INPUT WATER USE MAPS AND PAR | WATER ABSTRACTION | | IndustrialDemandMaps | $(PathWaterUse)/$(PrefixWaterUseIndustry) | $(PathWaterUse)/$(PrefixWaterUseIndustry) | map | input | Industry water abstraction daily maps [mm] | +| lfbinding | IRRIGATION AND WATER ABSTRACTION | WATER ABSTRACTION | | LivestockConsumptiveUseFraction | $(LivestockConsumptiveUseFraction) | $(LivestockConsumptiveUseFraction) | 0 | input | Consumptive Use (1-Recycling ratio) for livestock water use (0-1) | +| lfbinding | WATER USE MAPS AND PARAMETERS | WATER ABSTRACTION | | IndustryConsumptiveUseFraction | $(IndustryConsumptiveUseFraction) | $(IndustryConsumptiveUseFraction) | 0 | input | Consumptive Use (1-Recycling ratio) for industrial water use (0-1) | +| lfbinding | WATER USE MAPS AND PARAMETERS | WATER ABSTRACTION | | EnergyConsumptiveUseFraction | $(EnergyConsumptiveUseFraction) | $(EnergyConsumptiveUseFraction) | 0 | input | Consumptive Use (1-Recycling ratio) for energy production water use (0-1) | +| lfbinding | WATER USE MAPS AND PARAMETERS | WATER ABSTRACTION | | DomesticConsumptiveUseFraction | $(DomesticConsumptiveUseFraction) | $(DomesticConsumptiveUseFraction) | value | input | Consumptive Use (1-Recycling ratio) for domestic water use (0-1) Source: EEA (2005) State of Environment | +| lfbinding | WATER USE MAPS AND PARAMETERS | WATER ABSTRACTION | | LeakageFraction | $(LeakageFraction) | $(LeakageFraction) | 0 | input | Fraction of leakage of public water supply (0=no leakage, 1=100% leakage) | +| lfbinding | WATER USE MAPS AND PAR | WATER ABSTRACTION | | LeakageWaterLoss | $(LeakageWaterLoss) | $(LeakageWaterLoss) | 0 | input | The water that is lost from leakage (lost) (0-1) | +| lfbinding | WATER USE MAPS AND PAR | WATER ABSTRACTION | | LeakageReductionFraction | $(LeakageReductionFraction) | $(LeakageReductionFraction) | 0 | input | Leakage reduction fraction (e.g. 50% = 0.5 as compared to current Leakage) (baseline=0, maximum=1) | +| lfbinding | WATER USE MAPS AND PAR | WATER ABSTRACTION | | WaterSavingFraction | $(WaterSavingFraction) | $(WaterSavingFraction) | 0 | input | Water savings fraction (e.g. 10% = 0.1 as compared to current Use (baseline=0, maximum=1) scenwsav.map | +| lfbinding | WATER USE MAPS AND PAR | WATER ABSTRACTION | | WaterReUseFraction | $(WaterReUseFraction) | $(WaterReUseFraction) | 0 | input | Fraction of water re-used in industry (e.g. 50% = 0.5 = half of the water is re-used, used twice (baseline=0, maximum=1 scenruse.map | +| lfbinding | WATER USE MAPS AND PAR | WATER ABSTRACTION | | IrrigationEfficiency | $(IrrigationEfficiency) | $(IrrigationEfficiency) | 0 | input | Fraction of water re-used in industry (e.g. 50% = 0.5 = half of the water is re-used, used twice (baseline=0, maximum=1 scenruse.map | +| lfbinding | WATER USE MAPS AND PAR | WATER ABSTRACTION | | ConveyanceEfficiency | $(ConveyanceEfficiency) | $(ConveyanceEfficiency) | 0 | input | onveyance efficiency, around 0.80 for average channel | +| lfbinding | WATER USE MAPS AND PAR | WATER ABSTRACTION | | IrrigationType | $(IrrigationType) | $(IrrigationType) | 0 | input | IrrigationType (value between 0 and 1) is used here to distinguish between additional adding water until fieldcapacity (value set to 1) or not (value set to 0) | +| lfbinding | WATER USE MAPS AND PAR | WATER ABSTRACTION | | IrrigationMult | $(IrrigationMult) | $(IrrigationMult) | 0 | input | Factor to irrigation water demand More than the transpiration is added e.g to prevent salinisation | +| lfbinding | WATER USE MAPS AND PAR | CROP | | MapIrrigationCropCoef | $(PathMapsTables)/cropcoef_i.map | $(PathMapsTables)/cropcoef_i.map | table | input | Irrigation crop coefficient | +| lfbinding | WATER USE MAPS AND PAR | SOIL | | MapIrrigationCropGroupNumber | $(PathMapsTables)/cropgrpn_i.map | $(PathMapsTables)/cropgrpn_i.map | table | input | Irrigation crop group number | +| lfbinding | WATER USE MAPS AND PAR | CALC INDICATOR | | Population | $(Population) | $(Population) | map | input | Population per pixel | +| lfbinding | WATER USE MAPS AND PAR | CALC INDICATOR | | PopulationMaps | $(PopulationMaps) | $(PopulationMaps) | map | input | Population map for TransientLandUseChange | +| lfbinding | WATER USE MAPS AND PAR | CALC INDICATOR | | LandUseMask | $(LandUseMask) | $(LandUseMask) | map | input | Land use mask map to mask out deserts and high mountains (to cover ETdif map, otherwise Sahara etc would pop out; meant as a drought indicator | +| lfbinding | WATER USE MAPS AND PAR | WATER ABSTRACTION | | WaterUseMaps | $(WaterUseMaps) | $(WaterUseMaps) | map | input | Reported water use m3 s-1 depending on the availability of discharge | +| lfbinding | WATER USE MAPS AND PAR | WATER ABSTRACTION | | WaterUseTS | $(WaterUseTS) | $(WaterUseTS) | tss | input | Time series of upstream water use at gauging stations | +| lfbinding | WATER USE MAPS AND PAR | WATER ABSTRACTION | | StepsWaterUseTS | $(StepsWaterUseTS) | $(StepsWaterUseTS) | tss | input | number of loops needed for water use routine | +| lfbinding | WATER USE MAPS AND PAR | WATER ABSTRACTION | | maxNoWateruse | $(maxNoWateruse) | $(maxNoWateruse) | value | input | maximum number of loops for calculating the use of water (=distance to the water demand cell) | +| lfbinding | WATER USE MAPS AND PAR | WATER ABSTRACTION | | WUsePercRemain | $(WUsePercRemain) | $(WUsePercRemain) | value | input | percentage of water that must remain in a grid cell and is not withdrawn by water use e.g. 0.2 = 20 percent of discharge is not taken out | +| lfbinding | WATER USE MAPS AND PAR | WATER ABSTRACTION / CALC INDICATOR | | WUseRegion | $(WUseRegion) | $(WUseRegion) | map | input | water use region | +| lfbinding | RICE IRRIGATION | RICE IRRIGATION | | RiceFlooding | 10 | 10 | 0 | input | water amount in mm per day 10 mm for 10 days (total 10cm water) | +| lfbinding | RICE IRRIGATION | RICE IRRIGATION | | RicePercolation | 2 | 2 | 0 | input | FAO: percolation for heavy clay soils: PERC = 2 mm/day | +| lfbinding | RICE IRRIGATION | RICE IRRIGATION | | RicePlantingDay1 | $(PathMapsTables)/riceplantingday1.map | $(PathMapsTables)/riceplantingday1.map | table | input | map with starting day of the year | +| lfbinding | RICE IRRIGATION | RICE IRRIGATION | | RiceHarvestDay1 | $(PathMapsTables)/riceharvestday1.map | $(PathMapsTables)/riceharvestday1.map | map | input | map with starting day of the year | +| lfbinding | RICE IRRIGATION | RICE IRRIGATION | | RicePlantingDay2 | $(PathMapsTables)/riceplantingday2.map | $(PathMapsTables)/riceplantingday2.map | table | input | map with starting day of the year | +| lfbinding | RICE IRRIGATION | RICE IRRIGATION | | RiceHarvestDay2 | $(PathMapsTables)/riceharvestday2.map | $(PathMapsTables)/riceharvestday2.map | map | input | map with starting day of the year | +| lfbinding | REPORTED OUTPUT MAPS | ROUTING | | DischargeMaps | $(PathOut)/dis | $(PathOut)/dis | map | output | Reported discharge [cu m/s] (average over the sub timesteps) | +| lfbinding | REPORTED OUTPUT MAPS | SOIL | | TopSoilMoistureMaps | $(PathOut)/wt | $(PathOut)/wt | map (missing) | output | Reported Topsoil moisture [%] | +| lfbinding | REPORTED OUTPUT MAPS | SOIL | | SurfaceSoilMoistureMaps | $(PathOut)/wta | $(PathOut)/wta | map (missing) | output | Reported surface soil moisture [%] | +| lfbinding | REPORTED OUTPUT MAPS | KINEMATIC WAVE | | DisMaps | $(PathOut)/q | $(PathOut)/q | map (missing) | output | Reported discharge [cu m/s] at the end of a timestep | +| lfbinding | REPORTED OUTPUT MAPS | KINEMATIC WAVE | | MaskDischargeMaps | $(PathOut)/dism | $(PathOut)/dism | map (missing) | output | Reported discharge [cu m/s] but cut by a discharge mask map | +| lfbinding | REPORTED OUTPUT MAPS | KINEMATIC WAVE | | WaterLevelMaps | $(PathOut)/wl | $(PathOut)/wl | map | output | Reported water level [m] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SOIL | | Theta1State | $(PathOut)/tha | $(PathOut)/tha | map | output/state | Reported volumetric soil moisture content for soil layer 1 [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SOIL | | Theta2State | $(PathOut)/thb | $(PathOut)/thb | map | output/state | Reported volumetric soil moisture content for both soil layer 2 [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SOIL | | Theta3State | $(PathOut)/thc | $(PathOut)/thc | map | output/state | Reported volumetric soil moisture content for both soil layer 3 [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | GROUNDWATER | | UZState | $(PathOut)/uz | $(PathOut)/uz | map | output/state | Reported storage in upper groundwater zone response box [mm] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | GROUNDWATER | | LZState | $(PathOut)/lz | $(PathOut)/lz | map | output/state | Reported storage in lower response box [mm] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SOIL | | DSLRState | $(PathOut)/dslr | $(PathOut)/dslr | map | output/state | Reported days since last rain [ndays] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | ROUTING | | WaterDepthState | $(PathOut)/wdept | $(PathOut)/wdept | map | output | Reported overland flow water depth | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SURFACE | | OFDirectState | $(PathOut)/ofdir | $(PathOut)/ofdir | map | output/state | Reported water volume for direct fraction on catchment surface [m3] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SURFACE | | OFOtherState | $(PathOut)/ofoth | $(PathOut)/ofoth | map | output/state | Reported water volume for other fraction on catchment surface [m3] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SURFACE | | OFForestState | $(PathOut)/offor | $(PathOut)/offor | map | output/state | Reported water volume for forest fraction on catchment surface [m3] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | KINEMATIC WAVE | | ChanCrossSectionState | $(PathOut)/chcro | $(PathOut)/chcro | map | output/state | Reported chan cross-section area [m2] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SNOW | | SnowCoverAState | $(PathOut)/scova | $(PathOut)/scova | map | output/state | Reported snow cover in snow zone A [mm] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SNOW | | SnowCoverBState | $(PathOut)/scovb | $(PathOut)/scovb | map | output/state | Reported snow cover in snow zone B [mm] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SNOW | | SnowCoverCState | $(PathOut)/scovc | $(PathOut)/scovc | map | output/state | Reported snow cover in snow zone C [mm] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SNOW | | FrostIndexState | $(PathOut)/frost | $(PathOut)/frost | map | output/state | Reported frost index | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | INTERCEPTION | | CumInterceptionState | $(PathOut)/cum | $(PathOut)/cum | map | output/state | Reported interception storage | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | DOUBLE KINEMATIC WAVE | | CrossSection2State | $(PathOut)/ch2cr | $(PathOut)/ch2cr | map | output/state | Cross section area for split routing [m2] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | DOUBLE KINEMATIC WAVE | | ChSideState | $(PathOut)/chside | $(PathOut)/chside | map | output/state | Reported sideflow to channel for first line of routing [m3/s] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | ROUTING | | ChanQState | $(PathOut)/chanq | $(PathOut)/chanq | map | output/state | Reported istantaneous discharge at end of computation step [cu m/s] ChanQ | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SOIL | | DSLRForestState | $(PathOut)/dslf | $(PathOut)/dslf | map | output/state | Reported days since last rain for forest | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | INTERCEPTION | | CumInterceptionForestState | $(PathOut)/cumf | $(PathOut)/cumf | map | output/state | Reported interception storage for forest | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SOIL | | Theta1ForestState | $(PathOut)/thfa | $(PathOut)/thfa | map | output/state | theta for soil layer 1a forest fraction | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SOIL | | Theta2ForestState | $(PathOut)/thfb | $(PathOut)/thfb | map | output/state | theta for soil layer 1b forest fraction | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SOIL | | Theta3ForestState | $(PathOut)/thfc | $(PathOut)/thfc | map | output/state | theta for soil layer 2 forest fraction | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | GROUNDWATER | | UZForestState | $(PathOut)/uzf | $(PathOut)/uzf | map | output/state | Reported storage in upper groundwater zone response box [mm] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SURFACE | | CumIntSealedState | $(PathOut)/cseal | $(PathOut)/cseal | map | output/state | Reported depression storage | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SOIL | | DSLRIrrigationState | $(PathOut)/dsli | $(PathOut)/dsli | map | output/state | Reported days since last rain irrigation | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | INTERCEPTION | | CumInterceptionIrrigationState | $(PathOut)/cumi | $(PathOut)/cumi | map | output/state | Reported interception storage | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SOIL | | Theta1IrrigationState | $(PathOut)/thia | $(PathOut)/thia | map | output/state | Reported volumetric soil moisture content for soil layer 1a for irrigation[V/V] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SOIL | | Theta2IrrigationState | $(PathOut)/thib | $(PathOut)/thib | map | output/state | Reported volumetric soil moisture content for both soil layer 1b for irrigation [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | SOIL | | Theta3IrrigationState | $(PathOut)/thic | $(PathOut)/thic | map | output/state | Reported volumetric soil moisture content for both soil layer 2 for irrigation [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (STATE VARIABLES AT SELECTED TIME STEPS) | GROUNDWATER | | UZIrrigationState | $(PathOut)/uzi | $(PathOut)/uzi | map | output/state | Reported storage in upper groundwater zone response box [mm] | +| lfbinding | REPORTED OUTPUT MAPS (END) | SOIL | | Theta1End | $(PathOut)/tha.end | $(PathOut)/tha.end | map | output/end | Reported volumetric soil moisture content for soil layer 1a [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (END) | SOIL | | Theta2End | $(PathOut)/thb.end | $(PathOut)/thb.end | map | output/end | Reported volumetric soil moisture content for both soil layer 1b [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (END) | SOIL | | Theta3End | $(PathOut)/thc.end | $(PathOut)/thc.end | map | output/end | Reported volumetric soil moisture content for both soil layer 2 [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (END) | GROUNDWATER | | UZEnd | $(PathOut)/uz.end | $(PathOut)/uz.end | map | output/end | Reported storage in upper groundwater zone response box [mm] | +| lfbinding | REPORTED OUTPUT MAPS (END) | GROUNDWATER | | LZEnd | $(PathOut)/lz.end | $(PathOut)/lz.end | map | output/end | Reported storage in lower groundwater zone response box [mm] | +| lfbinding | REPORTED OUTPUT MAPS (END) | SOIL | | DSLREnd | $(PathOut)/dslr.end | $(PathOut)/dslr.end | map | output/end | Reported days since last rain | +| lfbinding | REPORTED OUTPUT MAPS (END) | ROUTING | | WaterDepthEnd | $(PathOut)/wdept.end | $(PathOut)/wdept.end | map | output/end | Reported overlandflow water depth | +| lfbinding | REPORTED OUTPUT MAPS (END) | SURFACE | | OFDirectEnd | $(PathOut)/ofdir.end | $(PathOut)/ofdir.end | map | output/end | Reported water volume for direct fraction on catchment surface | +| lfbinding | REPORTED OUTPUT MAPS (END) | SURFACE | | OFOtherEnd | $(PathOut)/ofoth.end | $(PathOut)/ofoth.end | map | output/end | | +| lfbinding | REPORTED OUTPUT MAPS (END) | SURFACE | | OFForestEnd | $(PathOut)/offor.end | $(PathOut)/offor.end | map | output/end | | +| lfbinding | REPORTED OUTPUT MAPS (END) | KINEMATIC WAVE | | ChanCrossSectionEnd | $(PathOut)/chcro.end | $(PathOut)/chcro.end | map | output/end | Reported chan cross-section area | +| lfbinding | REPORTED OUTPUT MAPS (END) | SNOW | | SnowCoverAEnd | $(PathOut)/scova.end | $(PathOut)/scova.end | map | output/end | Reported snow cover in snow zone A [mm] | +| lfbinding | REPORTED OUTPUT MAPS (END) | SNOW | | SnowCoverBEnd | $(PathOut)/scovb.end | $(PathOut)/scovb.end | map | output/end | Reported snow cover in snow zone B [mm] | +| lfbinding | REPORTED OUTPUT MAPS (END) | SNOW | | SnowCoverCEnd | $(PathOut)/scovc.end | $(PathOut)/scovc.end | map | output/end | Reported snow cover in snow zone C [mm] | +| lfbinding | REPORTED OUTPUT MAPS (END) | SNOW | | FrostIndexEnd | $(PathOut)/frost.end | $(PathOut)/frost.end | map | output/end | Reported frost index | +| lfbinding | REPORTED OUTPUT MAPS (END) | INTERCEPTION | | CumInterceptionEnd | $(PathOut)/cum.end | $(PathOut)/cum.end | map | output/end | Reported interception storage | +| lfbinding | REPORTED OUTPUT MAPS (END) | LAKES | | LakeLevelEnd | $(PathOut)/lakeh.end | $(PathOut)/lakeh.end | map | output/end | Reported lake level | +| lfbinding | REPORTED OUTPUT MAPS (END) | LAKES | | LakeStorageM3 | $(PathOut)/lakest | $(PathOut)/lakest | map | output | Reported lake storage | +| lfbinding | REPORTED OUTPUT MAPS (END) | RESERVOIRS | | ReservoirFillEnd | $(PathOut)/rsfil.end | $(PathOut)/rsfil.end | map | output/end | Reported reservoir filling | +| lfbinding | REPORTED OUTPUT MAPS (END) | DOUBLE KINEMATIC WAVE | | CrossSection2End | $(PathOut)/ch2cr.end | $(PathOut)/ch2cr.end | map | output/end | Cross section area for split routing [m2] | +| lfbinding | REPORTED OUTPUT MAPS (END) | DOUBLE KINEMATIC WAVE | | ChSideEnd | $(PathOut)/chside.end | $(PathOut)/chside.end | map | output/end | Reported channel side flow | +| lfbinding | REPORTED OUTPUT MAPS (END) | ROUTING | | ChanQEnd | $(PathOut)/chanq.end | $(PathOut)/chanq.end | map | output/end | Reported istantaneous discharge at end of computation step [cu m/s] ChanQ | +| lfbinding | REPORTED OUTPUT MAPS (END) | KINEMATIC WAVE | | DischargeEnd | $(PathOut)/dis.end | $(PathOut)/dis.end | map | output/end | Reported discharge [m3/s] for lakes and reservoirs | +| lfbinding | REPORTED OUTPUT MAPS (END) | SOIL | | DSLRForestEnd | $(PathOut)/dslf.end | $(PathOut)/dslf.end | map | output/end | Reported days since last rain for forest | +| lfbinding | REPORTED OUTPUT MAPS (END) | INTERCEPTION | | CumInterceptionForestEnd | $(PathOut)/cumf.end | $(PathOut)/cumf.end | map | output/end | Reported interception storage for forest | +| lfbinding | REPORTED OUTPUT MAPS (END) | SOIL | | Theta1ForestEnd | $(PathOut)/thfa.end | $(PathOut)/thfa.end | map | output/end | Reported volumetric soil moisture content for soil layer 1a for forest [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (END) | SOIL | | Theta2ForestEnd | $(PathOut)/thfb.end | $(PathOut)/thfb.end | map | output/end | Reported volumetric soil moisture content for both soil layer 1b for forest [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (END) | SOIL | | Theta3ForestEnd | $(PathOut)/thfc.end | $(PathOut)/thfc.end | map | output/end | Reported volumetric soil moisture content for both soil layer 2 [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (END) | GROUNDWATER | | UZForestEnd | $(PathOut)/uzf.end | $(PathOut)/uzf.end | map | output/end | Reported storage in upper groundwaterzone response box [mm] | +| lfbinding | REPORTED OUTPUT MAPS (END) | SURFACE | | CumIntSealedEnd | $(PathOut)/cseal.end | $(PathOut)/cseal.end | map | output/end | Reported depression storage | +| lfbinding | REPORTED OUTPUT MAPS (END) | SOIL | | DSLRIrrigationEnd | $(PathOut)/dsli.end | $(PathOut)/dsli.end | map | output/end | Reported days since last rain for irrigation | +| lfbinding | REPORTED OUTPUT MAPS (END) | INTERCEPTION | | CumInterceptionIrrigationEnd | $(PathOut)/cumi.end | $(PathOut)/cumi.end | map | output/end | Reported interception storage for irrigation | +| lfbinding | REPORTED OUTPUT MAPS (END) | SOIL | | Theta1IrrigationEnd | $(PathOut)/thia.end | $(PathOut)/thia.end | map | output/end | Reported volumetric soil moisture content for soil layer 1a [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (END) | SOIL | | Theta2IrrigationEnd | $(PathOut)/thib.end | $(PathOut)/thib.end | map | output/end | Reported volumetric soil moisture content for soil layer 1b [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (END) | SOIL | | Theta3IrrigationEnd | $(PathOut)/thic.end | $(PathOut)/thic.end | map | output/end | Reported volumetric soil moisture content for soil layer 2 [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (END) | GROUNDWATER | | UZIrrigationEnd | $(PathOut)/uzi.end | $(PathOut)/uzi.end | map | output/end | Reported storage in upper groundwater zone response box for irrigation [mm] | +| lfbinding | REPORTED OUTPUT MAPS (DRIVING METEO VAR) | METEO | | PrecipitationMapsOut | $(PathOut)/pr | $(PathOut)/pr | map | output | Precipitation [mm per time step] | +| lfbinding | REPORTED OUTPUT MAPS (DRIVING METEO VAR) | METEO | | TavgMapsOut | $(PathOut)/tav | $(PathOut)/tav | map | output | Average DAILY temperature [degrees C] | +| lfbinding | REPORTED OUTPUT MAPS (DRIVING METEO VAR) | EVAPO | | ETRefMapsOut | $(PathOut)/et | $(PathOut)/et | map | output | Potential reference evapotranspiration [mm per time step] | +| lfbinding | REPORTED OUTPUT MAPS (DRIVING METEO VAR) | EVAPO | | ESRefMapsOut | $(PathOut)/es | $(PathOut)/es | map | output | Potential evaporation from bare soil surface [mm per time step] | +| lfbinding | REPORTED OUTPUT MAPS (DRIVING METEO VAR) | EVAPO | | EWRefMapsOut | $(PathOut)/ew | $(PathOut)/ew | map | output | Potential evaporation from open water surface [mm per time step] | +| lfbinding | REPORTED OUTPUT MAPS (INDIVIDUAL STATE VAR AT EVERY TIME STEP) | SOIL | | Theta1Maps | $(PathOut)/thtop | $(PathOut)/thtop | map | output | Reported volumetric soil moisture content for soil layer 1 [V/V] | +| lfbinding | REPORTED OUTPUT MAPS (INDIVIDUAL RATE VAR AT EVERY TIME STEP) | GROUNDWATER | | UZOutflowMaps | $(PathOut)/quz | $(PathOut)/quz | map | output | Reported upper groundwater zone outflow [mm/∆t] | +| lfbinding | REPORTED OUTPUT MAPS (INDIVIDUAL RATE VAR AT EVERY TIME STEP) | RUNOFF | | TotaltoChanMaps | $(PathOut)/ttoc | $(PathOut)/ttoc | map | output | Reported total runoff that enters the channel: groundwater + surface runoff [mm/∆t] | +| lfbinding | REPORTED OUTPUT MAPS (INDIVIDUAL STATE VAR AT EVERY TIME STEP) | GROUNDWATER | | UZMaps | $(PathOut)/uz | $(PathOut)/uz | map | output | Reported storage in upper groundwater zone response box [mm] | +| lfbinding | REPORTED OUTPUT MAPS (INDIVIDUAL STATE VAR AT EVERY TIME STEP) | GROUNDWATER | | LZMaps | $(PathOut)/lz | $(PathOut)/lz | map | output | Reported storage in lower groundwater zone response box [mm] | +| lfbinding | REPORTED OUTPUT MAPS (INDIVIDUAL STATE VAR AT EVERY TIME STEP) | SOIL | | DSLRMaps | $(PathOut)/dslr | $(PathOut)/dslr | map | output | Reported days since last rain | +| lfbinding | REPORTED OUTPUT MAPS (INDIVIDUAL STATE VAR AT EVERY TIME STEP) | ROUTING | | WaterDepthMaps | $(PathOut)/wdept | $(PathOut)/wdept | map | output | Reported water depth | +| lfbinding | REPORTED OUTPUT MAPS (INDIVIDUAL RATE VAR AT EVERY TIME STEP) | RUNOFF | | TotalRunoffMaps | $(PathOut)/trun | $(PathOut)/trun | map | output | Reported total runoff [mm/∆t] | +| lfbinding | REPORTED OUTPUT MAPS (INDIVIDUAL STATE VAR AT EVERY TIME STEP) | SOIL | | Theta3Maps | $(PathOut)/thbot | $(PathOut)/thbot | map | output | Reported volumetric soil moisture content for soil layer 2 [V/V] | + + + +**Table:** *Switches for LISFLOOD options.* + +| section (XML) | group (XML) | module | Eqz. | key | default | module | Type | I/O | DEFAULT | cold | warm | calib | Description | +| --------------- | ----------- | ------ | ---- | -------------------------- | ------- | ----------------- | --------------- | ----- | ------- | ---- | ---- | ----- | ------------------------------------------------------------ | +| lfoptions | | | | TemperatureInKelvin | 0 | SETTINGS | switch | input | 0 | | | | Use temperature data in C (=0) or in K (=1) | +| lfoptions | | | | gridSizeUserDefined | 0 | SETTINGS | switch | input | 0 | | | | Get grid size attributes (length, area) from user-defined maps (instead of using map location attributes directly) | +| lfoptions | | | | dynamicWave | 0 | DYNAMIC WAVE | switch | input | 0 | | | | Activate dynamic wave routing | +| lfoptions | | | | inflow | 0 | INFLOW | switch | input | 0 | | | | Use inflow hydrographs | +| lfoptions | | | | simulatePF | 0 | SOIL | switch | input | 0 | | | | Calculate pF values from soil moisture | +| lfoptions | | | | simulateLakes | 0 | LAKES | switch | input | 0 | | | | Simulate unregulated lakes (kin. wave only) | +| lfoptions | | | | simulatePolders | 0 | POLDERS | switch | input | 0 | | | | Simulate polders (dyn. wave only) | +| lfoptions | | | | simulateReservoirs | 0 | RESERVOIRS | switch | input | 0 | | | | Simulate retention and hydropower reservoirs (kin. wave only) | +| lfoptions | | | | simulateWaterLevels | 0 | WATER LEVELS | switch | input | 0 | | | | Activate computation of water level maps / time series (does not affect routing) | +| lfoptions | | | | TransientLandUseChange | 0 | LANDUSE CHANGE | switch | input | 0 | | | | Activate reading of time changing land use description | +| lfoptions | | | | TransientWaterDemandChange | 0 | WATER ABSTRACTION | switch | input | 0 | | | | Activate reading of time changing water demand | +| lfoptions | | | | useWaterDemandAveYear | 0 | WATER ABSTRACTION | switch | input | 0 | | | | Use "average" year for water demand and loop it over years | +| lfoptions | | | | TransLoss | 0 | TRANSMISSION LOSS | switch | input | 0 | | | | Activate transmission loss | +| lfoptions | | | | SplitRouting | 0 | KINEMATIC WAVE | switch | input | 0 | | | | Activate double kinematic wave routing | +| lfoptions | | | | wateruse | 0 | WATER ABSTRACTION | switch | input | 0 | | | | Activate water use computation | +| lfoptions | | | | groundwaterSmooth | 0 | GROUNDWATER | switch | input | 0 | | | | Activate smoothing for groundwater to correct error by using windowtotal, based on groundwater bodies and catchments | +| lfoptions | | | | wateruseRegion | 0 | WATER ABSTRACTION | switch | input | 0 | | | | Use water regions in water use module | +| lfoptions | | | | drainedIrrigation | 0 | IRRIGATION | switch | input | 0 | | | | Use map of drainage systems to determine return flow (if drained, all percolation to channel within day; if not, all normal soil processes) | +| lfoptions | | | | riceIrrigation | 0 | IRRIGATION | switch | input | 0 | | | | Activate computation for paddy rice irrigation and abstraction | +| lfoptions | | | | openwaterevapo | 1 | EVAPO | switch | input | 1 | | | | Compute evaporation from open water | +| lfoptions | | | | varfractionwater | 0 | EVAPO | switch | input | 0 | | | | Compute the fraction of pixel that is open water | +| lfoptions | | | | indicator | 0 | INDICATOR | switch | input | 0 | | | | Activate computation of indicators (such as WEI, e-flow, etc) | +| lfoptions | | | | MonteCarlo | 0 | SETTINGS | switch | input | 0 | | | | Activate MonteCarlo simulation | +| lfoptions | | | | EnKF | 0 | SETTINGS | switch | input | 0 | | | | Activate EnKF simulation | +| lfoptions | | | | InitLisflood | 1 | SETTINGS | switch | input | 1 | | | | Run LISFLOOD initialization run | +| lfoptions | | | | InitLisfloodwithoutSplit | 0 | SETTINGS | switch | input | 0 | | | | Run LISFLOOD initialization run to compute Lzavin.map and skip completely the routing component | +| lfoptions | | | | readNetcdfStack | 0 | IO | switch | input | 0 | | | | Read meteorological data in NetCDF format (Precip, Tavg, ET0, E0,ES0) | +| lfoptions | | | | writeNetcdfStack | 0 | IO | switch | input | 0 | | | | Write NetCDF stacks for output files (the pr.nc is read to get the metadata like projection) | +| lfoptions | | | | writeNetcdf | 0 | IO | switch | input | 0 | | | | Write NetCDF files for END files (single netcdf) | +| lfoptions | | | | repDischargeTs | 1 | DISCHARGE | switch rep tss | input | 1 | | | | Report discharge time series at gauges | +| lfoptions | | | | repInternalCom | 0 | LOG | switch rep tss | input | 0 | | | | Report internal number of sub step for soil, channel routing, water use | +| lfoptions | | | | repMBTs | 0 | LOG | switch rep tss | input | 0 | | | | Report timeseries of absolute cumulative mass balance error | +| lfoptions | | | | repStateSites | 0 | STATE | switch rep tss | input | 0 | | | | Report state variables at sites | +| lfoptions | | | | repRateSites | 0 | STATE | switch rep tss | input | 0 | | | | Report state variables rates at sites | +| lfoptions | | | | repStateUpsGauges | 0 | STATE | switch rep tss | input | 0 | | | | Report timeseries of model variables, averaged over contributing area of each gauging station | +| lfoptions | | | | repRateUpsGauges | 0 | STATE | switch rep tss | input | 0 | | | | Report timeseries of model rate variables, averaged over contributing area of each gauging station | +| lfoptions | | | | repMeteoUpsGauges | 0 | METEO | switch rep tss | input | 0 | | | | Report timeseries of meteo input data | +| lfoptions | | | | repLZAvInflowSites | 0 | INFLOW | switch rep tss | input | 0 | | | | Report time serie of average percolation rate from upper to lower groundwater zone at sites | +| lfoptions | | | | repLZAvInflowUpsGauges | 0 | INFLOW | switch rep tss | input | 0 | | | | Report time serie of average percolation rate from upper to lower groundwater zone at gauges | +| lfoptions | | | | repwateruseGauges | 0 | WATER ABSTRACTION | switch rep tss | input | 0 | | | | Report water use ts at gauges | +| lfoptions | | | | repwateruseSites | 0 | WATER ABSTRACTION | switch rep tss | input | 0 | | | | Report water use ts at sistes | +| lfoptions | | | | repWaterLevelTs | 0 | WATER LEVELS | switch rep tss | input | 0 | | | | Report water level ts | +| lfoptions | | | | repPFUpsGauges | 0 | SOIL | switch rep tss | input | 0 | | | | Report PF ts at gauges | +| lfoptions | | | | repPFSites | 0 | SOIL | switch rep tss | input | 0 | | | | Report PF ts at sistes | +| lfoptions | | | | repsimulateLakes | 0 | LAKES | switch rep tss | input | 0 | | | | Report time series of lakes | +| lfoptions | | | | repsimulateReservoirs | 0 | RESERVOIRS | switch rep tss | input | 0 | | | | Report time series of reservoirs | +| lfoptions | | | | repsimulatePolders | 0 | POLDERS | switch rep tss | input | 0 | | | | Report time series of polders | +| lfoptions | | | | repBal1 | 0 | LOG | switch rep tss | input | 0 | | | | Report water balance TS | +| lfoptions | | | | repStateMaps | 1 | STATE | switch rep maps | input | 1 | | | | Report maps of model state variables (as defined by "ReportSteps" variable) | +| lfoptions | | | | repEndMaps | 1 | STATE | switch rep maps | input | 1 | | | | Report maps of model state variables (at last time step) | +| lfoptions | | | | repPrecipitationMaps | 0 | METEO | switch rep maps | input | 0 | | | | Report precipitation | +| lfoptions | | | | repTavgMaps | 0 | METEO | switch rep maps | input | 0 | | | | Report average temperature maps | +| lfoptions | | | | repETRefMaps | 0 | EVAPO | switch rep maps | input | 0 | | | | Report reference evapo-transpiration | +| lfoptions | | | | repESRefMaps | 0 | EVAPO | switch rep maps | input | 0 | | | | Report reference soil evaporation | +| lfoptions | | | | repEWRefMaps | 0 | EVAPO | switch rep maps | input | 0 | | | | Report reference evaporation of intercepted water | +| lfoptions | | | | repAverageDis | 0 | DISCHARGE | switch rep maps | input | 0 | | | | Report average discharge | +| lfoptions | | | | repChanCrossSectionMaps | 0 | ROUTING | switch rep maps | input | 0 | | | | Report total cross-section area for channels | +| lfoptions | | | | repCumInterCeptionMaps | 0 | INTERCEPTION | switch rep maps | input | 0 | | | | Report cumulative interception | +| lfoptions | | | | repDischargeMaps | 0 | DISCHARGE | switch rep maps | input | 0 | | | | Report maps of discharge (for each time step) | +| lfoptions | | | | repDSLRMaps | 0 | METEO | switch rep maps | input | 0 | | | | Report maps with number of days since the last rainfall event | +| lfoptions | | | | repESActMaps | 0 | EVAPO | switch rep maps | input | 0 | | | | Report actual soil evaporation | +| lfoptions | | | | repEWIntMaps | 0 | EVAPO | switch rep maps | input | 0 | | | | Report evaporation of intercepted water | +| lfoptions | | | | repFrostIndexMaps | 0 | SNOW | switch rep maps | input | 0 | | | | Report frost index maps | +| lfoptions | | | | repGwLossMaps | 0 | GROUNDWATER | switch rep maps | input | 0 | | | | Report groundwater loss maps | +| lfoptions | | | | repGwPercUZLZMaps | 0 | GROUNDWATER | switch rep maps | input | 0 | | | | Report maps of percolation from upper to lower ground water zone (for each time step) | +| lfoptions | | | | repInfiltrationMaps | 0 | INFILTRATION | switch rep maps | input | 0 | | | | Report infiltration maps | +| lfoptions | | | | repInterceptionMaps | 0 | INTERCEPTION | switch rep maps | input | 0 | | | | Report interception maps | +| lfoptions | | | | repLeafDrainageMaps | 0 | LEAF | switch rep maps | input | 0 | | | | Report leaf drainage maps | +| lfoptions | | | | repLZAvInflowMap | 0 | GROUNDWATER | switch rep maps | input | 0 | | | | Report lower groundwater zone inflow maps | +| lfoptions | | | | repLZMaps | 0 | GROUNDWATER | switch rep maps | input | 0 | | | | Report maps of lower groundwater zone storage (for each time step) | +| lfoptions | | | | repLZOutflowMaps | 0 | GROUNDWATER | switch rep maps | input | 0 | | | | Report lower groundwater zone outflow maps | +| lfoptions | | | | repPercolationMaps | 0 | PERCOLATION | switch rep maps | input | 0 | | | | Report percolation maps | +| lfoptions | | | | repPFMaps | 0 | SOIL | switch rep maps | input | 0 | | | | Report pF and vegetation stress due to low soil moisture | +| lfoptions | | | | repPFForestMaps | 0 | SOIL | switch rep maps | input | 0 | | | | Report pF and vegetation stress due to low soil moisture for forest fraction | +| lfoptions | | | | repPrefFlowMaps | 0 | SOIL | switch rep maps | input | 0 | | | | Report preferential flow (rapid bypass soil matrix) | +| lfoptions | | | | repRainMaps | 0 | METEO | switch rep maps | input | 0 | | | | Report rain excluding snow | +| lfoptions | | | | repSeepSubToGWMaps | 0 | GROUNDWATER | switch rep maps | input | 0 | | | | Report flux between sub soil and GW | +| lfoptions | | | | repSnowCoverMaps | 0 | SNOW | switch rep maps | input | 0 | | | | Report maps of snow cover (for each time step) | +| lfoptions | | | | repSnowMaps | 0 | SNOW | switch rep maps | input | 0 | | | | Report maps of snow (for each time step) | +| lfoptions | | | | repSnowMeltMaps | 0 | SNOW | switch rep maps | input | 0 | | | | Report maps of snowmelt (for each time step) | +| lfoptions | | | | repSurfaceRunoffMaps | 0 | SURFACE | switch rep maps | input | 0 | | | | Report maps of surface runoff (for each time step) | +| lfoptions | | | | repTaMaps | 0 | TRANSPIRATION | switch rep maps | input | 0 | | | | Report transpiration maps | +| lfoptions | | | | repThetaMaps | 0 | SOIL | switch rep maps | input | 0 | | | | Reporting of *individual* model state variables as maps THETA | +| lfoptions | | | | repThetaForestMaps | 0 | SOIL | switch rep maps | input | 0 | | | | Reporting of *individual* model state variables as maps THETA FOREST | +| lfoptions | | | | repThetaIrrigationMaps | 0 | SOIL | switch rep maps | input | 0 | | | | Report irrigation mapsrE | +| lfoptions | | | | repTotalRunoffMaps | 0 | SOIL | switch rep maps | input | 0 | | | | Report total runoff | +| lfoptions | | | | repUZMaps | 0 | GROUNDWATER | switch rep maps | input | 0 | | | | Report maps of upper groundwater zone storage (for each time step) | +| lfoptions | | | | repUZOutflowMaps | 0 | GROUNDWATER | switch rep maps | input | 0 | | | | Report maps for upper groundwater zone outflow | +| lfoptions | | | | repWaterDepthMaps | 0 | ROUTING | switch rep maps | input | 0 | | | | Report water depth on soil surface | +| lfoptions | | | | repWaterLevelMaps | 0 | ROUTING | switch rep maps | input | 0 | | | | Report water level in channels | +| lfoptions | | | | ETActMaps | 0 | EVAPO | switch rep maps | input | 0 | | | | Report actual evapo-transpiration | +| lfoptions | | | | repFastRunoffMaps | 0 | ROUTING | switch rep maps | input | 0 | | | | Report fast runoff = surface + UZ | +| lfoptions | | | | repRWS | 0 | WATER STRESS | switch rep maps | input | 0 | | | | Report soil transpiration reduction factor RWP | +| lfoptions | | | | repStressDays | 0 | WATER STRESS | switch rep maps | input | 0 | | | | Report soil transpiration reduction factor RWP for forest | +| lfoptions | | | | repPF1Maps | 0 | SOIL | switch rep maps | input | 0 | | | | Report PF1 maps | +| lfoptions | | | | repPF2Maps | 0 | SOIL | switch rep maps | input | 0 | | | | Report PF2 maps | +| lfoptions | | | | repTotalAbs | 0 | WATER ABSTRACTION | switch rep maps | input | 0 | | | | Report total water abstraction | +| lfoptions | | | | repTotalWUse | 0 | WATER ABSTRACTION | switch rep maps | input | 0 | | | | Report total water use | +| lfoptions | | | | repWIndex | 0 | INDICATOR | switch rep maps | input | 0 | | | | Report indexes and indicators | + + + +**Table:** *Timeseries from LISFLOOD options.* + +| key | outputVar | where | repoption | restrictoption | operation | Description | +| -------------------- | ------------------------------------------------------------ | -------------- | ---------------------- | --------------------------- | --------------- | ------------------------------------------------------------ | +| DisTS | ChanQAvg | Gauges | repDischargeTs | | | Reported discharge at gauges [m3/s] | +| WaterLevelTS | WaterLevel | Gauges | repWaterLevelTs | nonInit,simulateWaterLevels | | Reported water level [m] | +| StepsSoilTS | NoSubSteps | 1 | repInternalCom | | mapmaximum | Number of sub-steps needed for soil moisture routine | +| StepsWaterUseTS | NoWaterUseExe | 1 | repInternalCom | nonInit,wateruse | | number of loops needed for water use routine | +| WaterMassBalanceTSS | MBError | Catchments | repMBTs | nonInit | | Reported mass balance error at outlet [cu m] | +| MassBalanceMMTSS | MBErrorMM | Catchments | repMBTs | nonInit | | Reported mass balance error at outlet (as mm water slice) | +| WaterDepthTS | WaterDepth | Sites | repStateSites | nonInit | | Water depth on soil surface [mm] | +| SnowCoverTS | SnowCover | Sites | repStateSites | nonInit | | Depth of snow cover on soil surface [mm] | +| LZTS | LZ | Sites | repStateSites | nonInit | | Storage in lower groundwater zone [mm] | +| DSLRTS | DSLR[0] | Sites | repStateSites | nonInit | | Days since last rain [days] | +| FrostIndexTS | FrostIndex | Sites | repStateSites | nonInit | | Frost index [degree-days] | +| RainTS | Rain | Sites | repRateSites | nonInit | | Rain (excluding snow) [mm/∆t] | +| SnowTS | Snow | Sites | repRateSites | nonInit | | Snow (excluding rain) [mm/∆t] | +| SnowmeltTS | SnowMelt | Sites | repRateSites | nonInit | | Reported snowmelt [mm/∆t] | +| EWIntTS | TaInterceptionAll | Sites | repRateSites | nonInit | | Reported evaporation from interception storage [mm/∆t] | +| TaTS | TaPixel | Sites | repRateSites | nonInit | | Reported transpiration [mm/∆t] | +| ESActTS | ESActPixel | Sites | repRateSites | nonInit | | Reported soil evaporation [mm/∆t] | +| InfiltrationTS | InfiltrationPixel | Sites | repRateSites | nonInit | | Reported infiltration [mm/∆t] | +| PrefFlowTS | PrefFlowPixel | Sites | repRateSites | nonInit | | Reported preferential flow [mm/∆t] | +| PercolationTS | SeepTopToSubPixelB | Sites | repRateSites | nonInit | | Reported percolation from 1st to 2nd soil layer [mm/∆t] | +| SeepSubToGWTS | SeepSubToGWPixel | Sites | repRateSites | nonInit | | Reported seepage to groundwateR [mm/∆t] | +| SurfaceRunoffTS | SurfaceRunoff | Sites | repRateSites | nonInit | | Reported surface runoff [mm/∆t] | +| TotalRunoffTS | TotalRunoff | Sites | repRateSites | nonInit | | Reported total runoff [mm/∆t] | +| UZOutflowTS | UZOutflowPixel | Sites | repRateSites | nonInit | | Reported upper groundwater zone outflow [mm/∆t] | +| LZOutflowTS | LZOutflowToChannelPixel | Sites | repRateSites | nonInit | | Reported lower zone outflow [mm/∆t] | +| GwPercUZLZTS | GwPercUZLZPixel | Sites | repRateSites | nonInit | | Reported percolation from upper to lower zone [mm/∆t] | +| GwLossTS | GwLossPixel | Sites | repRateSites | nonInit | | Reported loss from lower zone [mm/∆t] | +| PrecipitationAvUpsTS | Precipitation | Gauges | repMeteoUpsGauges | nonInit | total | Precipitation [mm/time step] | +| TavgAvUpsTS | Tavg | Gauges | repMeteoUpsGauges | nonInit | total | Average temperature upstream of gauges [deg C] | +| ETRefAvUpsTS | ETRef | Gauges | repMeteoUpsGauges | nonInit | total | Reference evapotranspiration [mm/time step] | +| EWRefAvUpsTS | EWRef | Gauges | repMeteoUpsGauges | nonInit | total | Potential open water evaporation [mm/time step] | +| WaterDepthAvUpsTS | WaterDepth | Gauges | repStateUpsGauges | nonInit | total | Water depth on soil surface [mm] | +| SnowCoverAvUpsTS | SnowCover | Gauges | repStateUpsGauges | | total | Depth of snow cover on soil surface [mm] | +| LZAvUpsTS | LZ | Gauges | repStateUpsGauges | nonInit | total | Storage in lower groundwater zone [mm] | +| DSLRAvUpsTS | DSLR[0] | Gauges | repStateUpsGauges | nonInit | total | Days since last rain [days] | +| FrostIndexAvUpsTS | FrostIndex | Gauges | repStateUpsGauges | nonInit | total | Frost index [degree-days] | +| RainAvUpsTS | Rain | Gauges | repRateUpsGauges | nonInit | total | Rain (excluding snow) [mm/∆t] | +| SnowAvUpsTS | Snow | Gauges | repRateUpsGauges | nonInit | total | Snow (excluding rain) [mm/∆t] | +| SnowmeltAvUpsTS | SnowMelt | Gauges | repRateUpsGauges | nonInit | total | Snow melt [mm/∆t] | +| EWIntAvUpsTS | TaInterceptionAll | Gauges | repRateUpsGauges | nonInit | total | Evaporation from interception storage [mm/∆t] | +| TaAvUpsTS | TaPixel | Gauges | repRateUpsGauges | nonInit | total | Actual transpiration [mm/∆t] | +| ESActAvUpsTS | ESActPixel | Gauges | repRateUpsGauges | nonInit | total | Actual evaporation [mm/∆t] | +| InfiltrationAvUpsTS | InfiltrationPixel | Gauges | repRateUpsGauges | nonInit | total | Infiltration [mm/∆t] | +| PrefFlowAvUpsTS | PrefFlowPixel | Gauges | repRateUpsGauges | nonInit | total | Preferential flow [mm/∆t] | +| PercolationAvUpsTS | SeepTopToSubPixelB | Gauges | repRateUpsGauges | nonInit | total | Percolation flow [mm/∆t] | +| SeepSubToGWAvUpsTS | SeepSubToGWPixel | Gauges | repRateUpsGauges | nonInit | total | Seepage from lower soil layer to groundwater [mm/∆t] | +| SurfaceRunoffAvUpsTS | SurfaceRunoff | Gauges | repRateUpsGauges | | total | Surface runoff [mm/∆t] | +| TotalRunoffAvUpsTS | TotalRunoff | Gauges | repRateUpsGauges | | total | Total runoff [mm/∆t] | +| UZOutflowAvUpsTS | UZOutflowPixel | Gauges | repRateUpsGauges | nonInit | total | Outflow from upper zone (to channel) [mm/∆t] | +| LZOutflowAvUpsTS | LZOutflowToChannelPixel | Gauges | repRateUpsGauges | nonInit | total | Outflow from lower zone (to channel) [mm/∆t] | +| GwPercUZLZAvUpsTS | GwPercUZLZPixel | Gauges | repRateUpsGauges | nonInit | total | Reported percolation from upper to lower zone [mm/∆t] | +| GwLossAvUpsTS | GwLossPixel | Gauges | repRateUpsGauges | nonInit | total | Reported loss from lower zone [mm/∆t] | +| LakeInflowTS | LakeInflowM3S | LakeSites | repsimulateLakes | nonInit,simulateLakes | | Output timeseries file with lake inflow [cu m /s] | +| LakeOutflowTS | LakeOutflowM3S | LakeSites | repsimulateLakes | nonInit,simulateLakes | | Output timeseries file with lake outflow [cu m /s] | +| LakeLevelTS | LakeLevel | LakeSites | repsimulateLakes | nonInit,simulateLakes | | Output timeseries file with lake level [m] | +| ReservoirFillTS | ReservoirFill | ReservoirSites | repsimulateReservoirs | nonInit,simulateReservoirs | | name of output TSS file with Reservoir Filling | +| ReservoirInflowTS | ReservoirInflowM3S | ReservoirSites | repsimulateReservoirs | nonInit,simulateReservoirs | | name of output TSS file with Reservoir Inflow | +| ReservoirOutflowTS | ReservoirOutflowM3S | ReservoirSites | repsimulateReservoirs | nonInit,simulateReservoirs | | name of output TSS file with Reservoir Outflow | +| PolderLevelTS | PolderLevel | PolderSites | repsimulatePolders | nonInit,simulatePolders | | name of output TSS file with polder level [m] | +| PolderFluxTS | PolderFlux | PolderSites | repsimulatePolders | nonInit,simulatePolders | | name of output TSS file with polder flux [cu m / s]. Positive for flow from channel to polder, negative for polder to channel | +| WaterUseTS | WUseSumM3 | Gauges | repwateruseGauges | nonInit,wateruse | | Time series of upstream water use at gauging stations | +| WaterUseSitesTS | WUseSumM3 | Sites | repwateruseSites | nonInit,wateruse | | Time series of upstream water use at sites | +| PF1TS | pF1[0] | Sites | repPFSites | nonInit,simulatePF | | Reported pF upper soil layer [-] | +| PF1ForestTS | pF1[1] | Sites | repPFSites | nonInit,simulatePF | | Reported pF upper soil layer for forest [-] | +| PF2TS | pF2[0] | Sites | repPFSites | nonInit,simulatePF | | Reported pF lower soil layer [-] | +| PF2ForestTS | pF2[1] | Sites | repPFSites | nonInit,simulatePF | | Reported pF lower soil layer for forest [-] | +| PF1AvUpsTS | pF1[0] | Gauges | repPFUpsGauges | nonInit,simulatePF | total | Reported average value of pF upstream of gauges for upper soil layer [-] | +| PF1ForestAvUpsTS | pF1[1] | Gauges | repPFUpsGauges | nonInit,simulatePF | total | Reported average value of pF upstream of gauges for upper soil layer for forest [-] | +| PF2AvUpsTS | pF2[0] | Gauges | repPFUpsGauges | nonInit,simulatePF | total | Reported average value of pF upstream of gauges for lower soil layer [-] | +| PF2ForestAvUpsTS | pF2[1] | Gauges | repPFUpsGauges | nonInit,simulatePF | total | Reported average value of pF upstream of gauges for lower soil layer for forest [-] | +| LZAvInflowTS | LZAvInflow | Sites | repLZAvInflowSites | | | Time series of average percolation rate from upper to lower groundwater zone (reported at sites) | +| LZAvInflowAvUps | LZAvInflow | Gauges | repLZAvInflowUpsGauges | total | LZAvInflowAvUps | | +| PrecipitationAvUpsTS | Precipitation | Gauges | repBal1 | | total | Precipitation [mm/time step] | +| TotalRunoffAvUpsTS | TotalRunoff | Gauges | repBal1 | | total | Total runoff [mm/∆t] | +| GwLossAvUpsTS | GwLossPixel | Gauges | repBal1 | | total | Reported loss from lower zone [mm/∆t] | +| TaAvUpsTS | TaPixel | Gauges | repBal1 | nonInit | total | Actual transpiration [mm/∆t] | +| ESActAvUpsTS | ESActPixel | Gauges | repBal1 | nonInit | total | Actual evaporation [mm/∆t] | +| EWIntAvUpsTS | TaInterceptionAll | Gauges | repBal1 | nonInit | total | Evaporation from interception storage [mm/∆t] | +| EvaOpenWaterAvUpsTS | EvaAddM3*self.var.M3toMM | Gauges | repBal1 | nonInit | total | EvaOpenWaterAvUpsTS | +| actETPUpsTS | ESActPixel+self.var.TaPixel+self.var.TaInterceptionAll+self.var.EvaAddM3*self.var.M3toMM | Gauges | repBal1 | nonInit | total | actETPUpsTS | +| RunLossUpsTS | TotalRunoff+self.var.GwLossPixel | Gauges | repBal1 | nonInit | total | RunLossUpsTS | +| actETPUpsTS | ESActPixel+self.var.TaPixel+self.var.TaInterceptionAll+self.var.EvaAddM3*self.var.M3toMM | Gauges | repBal1 | nonInit | total | actETPUpsTS | +| RunLossUpsTS | TotalRunoff+self.var.GwLossPixel | Gauges | repBal1 | nonInit | total | RunLossUpsTS | + + + +**Table:** *Maps from LISFLOOD options.* + +| key | outputVar | unit | steps | all | end | monthly | restrictoption | Description | +| ------------------------------------------------ | ------------------------------------------------------------ | ----------- | --------------- | ----------------------- | ----------------------------- | ------------------ | ------------------------------------------- | ------------------------------------------------------------ | +| LZAvInflowMap | LZAvInflow | mm | | | InitLisflood,repLZAvInflowMap | | | Reported map of average percolation rate from upper to lower groundwater zone (reported for end of simulation) | +| DischargeMaps | ChanQAvg | m3/s | | repDischargeMaps | | | nonInit | Reported discharge [cu m/s] (average over the timesteps) | +| WaterLevelMaps | WaterLevel | m | | repWaterLevelMaps | | | nonInit,simulateWaterLevels | Reported water level [m] | +| AvgDis | avgdis | m3/s | | | repAverageDis | | nonInit | Average discharge map [m3/s] | +| AvgDis | avgdis | m3/s | | | InitLisflood | | SplitRouting | Average discharge map [m3/s] | +| WaterDepthState | WaterDepth | m | repStateMaps | | | | nonInit | Reported overland flow water depth | +| OFDirectState | OFM3Direct | m3 | repStateMaps | | | | nonInit | Reported water volume for direct fraction on catchment surface | +| OFOtherState | OFM3Other | m3 | repStateMaps | | | | nonInit | Reported water volume for other fraction on catchment surface | +| OFForestState | OFM3Forest | m3 | repStateMaps | | | | nonInit | Reported water volume for forest fraction on catchment surface | +| ChanCrossSectionState | TotalCrossSectionArea | m2 | repStateMaps | | | | nonInit | Reported chan cross-section area | +| DSLRState | DSLR[0] | - | repStateMaps | | | | nonInit | Reported days since last rain | +| DSLRForestState | DSLR[1] | - | repStateMaps | | | | nonInit | Reported days since last rain for forest | +| DSLRIrrigationState | DSLR[2] | - | repStateMaps | | | | nonInit | Reported days since last rain irrigation | +| SnowCoverAState | SnowCoverS[0] | mm | repStateMaps | | | | nonInit | Reported snow cover in snow zone A [mm] | +| SnowCoverBState | SnowCoverS[1] | mm | repStateMaps | | | | nonInit | Reported snow cover in snow zone B [mm] | +| SnowCoverCState | SnowCoverS[2] | mm | repStateMaps | | | | nonInit | Reported snow cover in snow zone C [mm] | +| FrostIndexState | FrostIndex | degC/day | repStateMaps | | | | nonInit | Reported frost index | +| CumInterceptionState | CumInterception[0] | mm | repStateMaps | | | | nonInit | Reported interception storage | +| CumInterceptionForestState | CumInterception[1] | mm | repStateMaps | | | | nonInit | Reported interception storage for forest | +| CumInterceptionIrrigationState | CumInterception[2] | mm | repStateMaps | | | | nonInit | Reported interception storage | +| Theta1State | Theta1a[0] | - | repStateMaps | | | | nonInit | Reported volumetric soil moisture content for superficial soil layer 1 [V/V] | +| Theta1ForestState | Theta1a[1] | - | repStateMaps | | | | nonInit | Reported volumetric soil moisture content for superficial soil layer forest fraction [V/V] | +| Theta1IrrigationState | Theta1a[2] | - | repStateMaps | | | | nonInit | Reported volumetric soil moisture content for superficial soil layer irrigation fraction [V/V] | +| Theta2State | Theta1b[0] | - | repStateMaps | | | | nonInit | Reported volumetric soil moisture content for upper layer [V/V] | +| Theta2ForestState | Theta1b[1] | - | repStateMaps | | | | nonInit | Reported volumetric soil moisture content for upper layer forest fraction [V/V] | +| Theta2IrrigationState | Theta1b[2] | - | repStateMaps | | | | nonInit | Reported volumetric soil moisture content for upper soil layer irrigation fraction [V/V] | +| Theta3State | Theta2[0] | - | repStateMaps | | | | nonInit | Reported volumetric soil moisture content for lower soil layer [V/V] | +| Theta3ForestState | Theta2[1] | - | repStateMaps | | | | nonInit | Reported volumetric soil moisture content for lower soil layer forest fraction [V/V] | +| Theta3IrrigationState | Theta2[2] | - | repStateMaps | | | | nonInit | Reported volumetric soil moisture content for lower soil layer irrigation fraction [V/V] | +| UZState | UZ[0] | mm | repStateMaps | | | | nonInit | Reported storage in upper groundwater zone response box [mm] | +| UZForestState | UZ[1] | mm | repStateMaps | | | | nonInit | Reported storage in upper groundwater zone response box [mm] | +| UZIrrigationState | UZ[2] | mm | repStateMaps | | | | nonInit | Reported storage in upper groundwater zone response box [mm] | +| LZState | LZ | mm | repStateMaps | | | | nonInit | Reported storage in lower response box [mm] | +| CumIntSealedState | CumInterSealed | mm | repStateMaps | | | | nonInit | Reported cumulative depressions storage [mm] | +| DischargeMaps | ChanQAvg | m3/s | repStateMaps | | | | nonInit | Reported discharge [cu m/s] (average over the timesteps) | +| ChanQState | ChanQ | m3/s | repStateMaps | | | | nonInit | Reported istantaneous discarge at end of time step | +| LakeLevelState | LakeLevel | m | repStateMaps | | | | nonInit,simulateLakes | Output map(s) with lake level [m] | +| ReservoirFillState | ReservoirFill | - | repStateMaps | | | | nonInit,simulateReservoirs | Output map(s) with Reservoir Filling [-] | +| CrossSection2State | CrossSection2Area | m | repStateMaps | | | | nonInit,SplitRouting | Cross section area for split routing [m2] | +| ChSideState | Sideflow1Chan | m^2/s | repStateMaps | | | | nonInit, SplitRouting | Sideflow to channel for 1st line of routing [m^2/s] | +| PolderLevelState | PolderLevel | m | repStateMaps | | | | nonInit,simulatePolders | Output map(s) with polder level | +| WaterDepthEnd | WaterDepth | m | | | repEndMaps | | nonInit | Reported overlandflow water depth | +| OFDirectEnd | OFM3Direct | m^3 | | | repEndMaps | | nonInit | Reported water volume for direct fraction on catchment surface | +| OFOtherEnd | OFM3Other | m^3 | | | repEndMaps | | nonInit | Reported water volume for other fraction on catchment surface | +| OFForestEnd | OFM3Forest | m^3 | | | repEndMaps | | nonInit | Reported water volume for forest fraction on catchment surface | +| ChanCrossSectionEnd | TotalCrossSectionArea | m2 | | | repEndMaps | | nonInit | Reported chan cross-section area | +| DSLREnd | DSLR[0] | days | | | repEndMaps | | nonInit | Reported days since last rain | +| DSLRForestEnd | DSLR[1] | days | | | repEndMaps | | nonInit | Reported days since last rain for forest fraction | +| DSLRIrrigationEnd | DSLR[2] | days | | | repEndMaps | | nonInit | Reported days since last rain for irrigation fraction | +| SnowCoverAEnd | SnowCoverS[0] | mm | | | repEndMaps | | nonInit | Reported snow cover in snow zone A [mm] | +| SnowCoverBEnd | SnowCoverS[1] | mm | | | repEndMaps | | nonInit | Reported snow cover in snow zone B [mm] | +| SnowCoverCEnd | SnowCoverS[2] | mm | | | repEndMaps | | nonInit | Reported snow cover in snow zone C [mm] | +| FrostIndexEnd | FrostIndex | degC/day | | | repEndMaps | | nonInit | Reported frost index | +| CumInterceptionEnd | CumInterception[0] | mm | | | repEndMaps | | nonInit | Reported interception storage | +| CumInterceptionForestEnd | CumInterception[1] | mm | | | repEndMaps | | nonInit | Reported interception storage for forest | +| CumInterceptionIrrigationEnd | CumInterception[2] | mm | | | repEndMaps | | nonInit | Reported interception storage for irrigation | +| Theta1End | Theta1a[0] | mm | | | repEndMaps | | nonInit | Reported volumetric soil moisture content for superficial soil layer [V/V] | +| Theta1ForestEnd | Theta1a[1] | mm | | | repEndMaps | | nonInit | Reported volumetric soil moisture content for uperficial soil layer for forest [V/V] | +| Theta1IrrigationEnd | Theta1a[2] | mm | | | repEndMaps | | nonInit | Reported volumetric soil moisture content for uperficial soil layer [V/V] | +| Theta2End | Theta1b[0] | mm | | | repEndMaps | | nonInit | Reported volumetric soil moisture content for upper soil layer [V/V] | +| Theta2ForestEnd | Theta1b[1] | mm | | | repEndMaps | | nonInit | Reported volumetric soil moisture content for upper soil layer for forest [V/V] | +| Theta2IrrigationEnd | Theta1b[2] | mm | | | repEndMaps | | nonInit | Reported volumetric soil moisture content for upper soil layer [V/V] | +| Theta3End | Theta2[0] | mm | | | repEndMaps | | nonInit | Reported volumetric soil moisture content for lower soil layer [V/V] | +| Theta3ForestEnd | Theta2[1] | mm | | | repEndMaps | | nonInit | Reported volumetric soil moisture content for lower soil layer [V/V] | +| Theta3IrrigationEnd | Theta2[2] | mm | | | repEndMaps | | nonInit | Reported volumetric soil moisture content for lower soil layer [V/V] | +| UZEnd | UZ[0] | mm | | | repEndMaps | | nonInit | Reported storage in upper groundwater zone response box [mm] | +| UZForestEnd | UZ[1] | mm | | | repEndMaps | | nonInit | Reported storage in upper groundwaterzone response box [mm] | +| UZIrrigationEnd | UZ[2] | mm | | | repEndMaps | | nonInit | Reported storage in upper groundwater zone response box for irrigation [mm] | +| LZEnd | LZ | mm | | | repEndMaps | | nonInit | Reported storage in lower groundwater zone response box [mm] | +| CumIntSealedEnd | CumInterSealed | mm | | | repEndMaps | | nonInit | Reported cumulative depressions storage [mm] | +| DischargeEnd | ChanQAvg | m3/s | | | repEndMaps | | nonInit | Reported discharge [cu m/s] (average over the timesteps) | +| ChanQEnd | ChanQ | m3/s | | | repEndMaps | | nonInit | Reported istantaneous discarge at end of time step | +| LakeLevelEnd | LakeLevel | m | | | repEndMaps | | nonInit,simulateLakes | Reported lake level | +| ReservoirFillEnd | ReservoirFill | m | | | repEndMaps | | nonInit,simulateReservoirs | Reported reservoir filling | +| CrossSection2End | CrossSection2Area | m | | | repEndMaps | | nonInit,SplitRouting | Cross section area for split routing [m2] | +| ChSideEnd | Sideflow1Chan | m | | | repEndMaps | | nonInit,SplitRouting | Reported channel side flow | +| PolderLevelEnd | PolderLevel | m | | | repEndMaps | | nonInit,simulatePolders | Output map(s) with polder level | +| PrecipitationMapsOut | Precipitation | mm/timestep | | repPrecipitationMaps | | | | Precipitation [mm per time step] | +| TavgMapsOut | Tavg | degree | | repTavgMaps | | | | Average DAILY temperature [degrees C] | +| ETRefMapsOut | ETRef | mm | | repETRefMaps | | | | Potential reference evapotranspiration [mm per time step] | +| ESRefMapsOut | ESRef | mm | | repESRefMaps | | | | Potential evaporation from bare soil surface [mm per time step] | +| EWRefMapsOut | EWRef | mm | | repEWRefMaps | | | | Potential evaporation from open water surface [mm per time step] | +| WaterDepthMaps | WaterDepth | m | | repWaterDepthMaps | | | nonInit | Reported water depth | +| OFDirectMaps | OFM3Direct | m3 | | repWaterDepthMaps | | | nonInit | Reported water volume for direct fraction on catchment surface | +| OFOtherMaps | OFM3Other | m3 | | repWaterDepthMaps | | | nonInit | Reported water volume for other fraction on catchment surface | +| OFForestMaps | OFM3Forest | m3 | | repWaterDepthMaps | | | nonInit | Reported water volume for forest fraction on catchment surface | +| ChanCrossSectionMaps | TotalCrossSectionArea | m2 | | repChanCrossSectionMaps | | | nonInit | Reported chan cross-section area | +| DSLRMaps | DSLR[0] | | | repDSLRMaps | | | nonInit | Reported days since last rain | +| DSLRForestMaps | DSLR[1] | | | repDSLRMaps | | | nonInit | Reported days since last rain | +| SnowCoverMaps | SnowCover | mm | | repSnowCoverMaps | | | nonInit | Reported snow cover | +| FrostIndexMaps | FrostIndex | degC/day | | repFrostIndexMaps | | | nonInit | Reported frost index | +| CumInterceptionMaps | CumInterception[0] | mm | | repCumInterCeptionMaps | | | nonInit | Reported interception storage | +| Theta1Maps | Theta1a[0] | - | | repThetaMaps | | | nonInit | Reported volumetric soil moisture content for soil layer 1a [V/V] | +| Theta1ForestMaps | Theta1a[1] | - | | repThetaForestMaps | | | nonInit | Reported volumetric soil moisture content for soil layer 1a forest fraction [V/V] | +| Theta1IrrigationMaps | Theta1a[2] | - | | repThetaIrrigationMaps | | | nonInit | Reported volumetric soil moisture content for soil layer 1a irrigation fraction [V/V] | +| Theta2Maps | Theta1b[0] | - | | repThetaMaps | | | nonInit | Reported volumetric soil moisture content for soil layer 2 [V/V] | +| Theta2ForestMaps | Theta1b[1] | - | | repThetaForestMaps | | | nonInit | Reported volumetric soil moisture content for soil layer 1b forest fraction [V/V] | +| Theta2IrrigationMaps | Theta1b[2] | - | | repThetaIrrigationMaps | | | nonInit | Reported volumetric soil moisture content for soil layer 1b irrigation fraction [V/V] | +| Theta3Maps | Theta2[0] | - | | repThetaMaps | | | nonInit | Reported volumetric soil moisture content for soil layer 2 [V/V] | +| Theta3ForestMaps | Theta2[1] | - | | repThetaForestMaps | | | nonInit | Reported volumetric soil moisture content for soil layer 2 forest fraction [V/V] | +| Theta3IrrigationMaps | Theta2[2] | - | | repThetaIrrigationMaps | | | nonInit | Reported volumetric soil moisture content for soil layer 2 irrigation fraction [V/V] | +| UZMaps | UZ[0] | mm | | repUZMaps | | | nonInit | Reported storage in upper groundwater zone response box [mm] | +| UZForestMaps | UZ[1] | mm | | repUZMaps | | | nonInit | Reported storage in upper response box [mm] | +| LZMaps | LZ | mm | | repLZMaps | | | nonInit | Reported storage in lower groundwater zone response box [mm] | +| RainMaps | Rain | mm | | repRainMaps | | | nonInit | Reported rain (excluding snow)[mm/∆t] | +| SnowMaps | Snow | mm | | repSnowMaps | | | nonInit | Reported snow (excluding rain)[mm/∆t] | +| SnowMeltMaps | SnowMelt | mm | | repSnowMeltMaps | | | nonInit | Reported snowmelt [mm/∆t] | +| InterceptionMaps | Interception[0] | mm | | repInterceptionMaps | | | nonInit | Reported interception [mm/∆t] | +| InterceptionForestMaps | Interception[1] | mm | | repInterceptionMaps | | | nonInit | Reported interception forest [mm/∆t] | +| EWIntMaps | TaInterception[0] | mm | | repEWIntMaps | | | nonInit | Reported evaporation of intercepted water [mm/∆t] | +| EWIntForestMaps | TaInterception[1] | mm | | repEWIntMaps | | | nonInit | Reported evaporation of intercepted water [mm/∆t] | +| LeafDrainageMaps | LeafDrainage[0] | mm | | repLeafDrainageMaps | | | nonInit | Reported leaf drainage [mm/∆t] | +| LeafDrainageForestMaps | LeafDrainage[1] | mm | | repLeafDrainageMaps | | | nonInit | Reported leaf drainage Forest [mm/∆t] | +| TaMaps | Ta[0] | mm | | repTaMaps | | | nonInit | Reported transpiration [mm/∆t] | +| TaForestMaps | Ta[1] | mm | | repTaMaps | | | nonInit | Reported transpiration forest [mm/∆t] | +| ESActMaps | ESAct[0] | mm | | repESActMaps | | | nonInit | Reported soil evaporation [mm/∆t] | +| ESActForestMaps | ESAct[1] | mm | | repESActMaps | | | nonInit | Reported soil evaporation [mm/∆t] | +| InfiltrationMaps | Infiltration[0] | mm | | repInfiltrationMaps | | | nonInit | Reported infiltration [mm/∆t] | +| InfiltrationForestMaps | Infiltration[1] | mm | | repInfiltrationMaps | | | nonInit | Reported infiltration for forest [mm/∆t] | +| PrefFlowMaps | PrefFlow[0] | mm | | repPrefFlowMaps | | | nonInit | Reported preferential flow [mm/∆t] | +| PrefFlowForestMaps | PrefFlow[1] | mm | | repPrefFlowMaps | | | nonInit | Reported preferential flow [mm/∆t] | +| PercolationMaps | SeepTopToSub[0] | mm | | repPercolationMaps | | | nonInit | Reported percolation from 1st to 2nd soil layer [mm/∆t] | +| PercolationForestMaps | SeepTopToSub[1] | mm | | repPercolationMaps | | | nonInit | Reported percolation from 1st to 2nd soil layer for forest [mm/∆t] | +| SeepSubToGWMaps | SeepSubToGW[0] | mm | | repSeepSubToGWMaps | | | nonInit | Reported seepage to groundwater [mm/∆t] | +| SeepSubToGWForestMaps | SeepSubToGW[1] | mm | | repSeepSubToGWMaps | | | nonInit | Reported seepage to groundwater for forest [mm/∆t] | +| UZOutflowMaps | UZOutflowPixel | mm | | repUZOutflowMaps | | | nonInit | Reported upper groundwater zone outflow [mm/∆t] | +| UZOutflowForestMaps | UZOutflowPixel | mm | | repUZOutflowMaps | | | nonInit | Reported upper groundwater zone outflow [mm/∆t] | +| LZOutflowMaps | LZOutflowToChannelPixel | mm | | repLZOutflowMaps | | | nonInit | Reported lower groundwater zone outflow [mm/∆t] | +| GwPercUZLZMaps | GwPercUZLZ[0] | mm | | repGwPercUZLZMaps | | | nonInit | Reported percolation from upper to lower groundwater zone [mm/∆t] | +| GwPercUZLZForestMaps | GwPercUZLZ[1] | mm | | repGwPercUZLZMaps | | | nonInit | Reported percolation from upper to lower groundwater zone [mm/∆t] | +| GwLossMaps | GwLossPixel | mm | | repGwLossMaps | | | nonInit | Reported GWloss [mm/∆t] | +| DirectRunoffMaps | DirectRunoff | mm | | repSurfaceRunoffMaps | | | nonInit | Reported Direct Runoff [mm/∆t] | +| SurfaceRunoffMaps | SurfaceRunoff | mm | | repSurfaceRunoffMaps | | | nonInit | Reported surface runoff [mm/∆t] | +| TotalRunoffMaps | TotalRunoff | mm | | repSurfaceRunoffMaps | | | nonInit | Reported total runoff [mm/∆t] | +| TotalToChanMaps | ToChanM3Runoff*self.var.M3toMM | mm | | repSurfaceRunoffMaps | | | nonInit | Reported total runoff that enters the channel: groundwater + surface runoff [mm/∆t] | +| FastRunoffMaps | SurfaceRunoff+self.var.UZOutflowPixel | mm | | repSurfaceRunoffMaps | | | nonInit | Reported fast runoff = surface + UZ [mm/∆t] | +| FlowVelocityMSecMaps | FlowVelocity | m/s | | repSurfaceRunoffMaps | | | nonInit | Reported FlowVelocityMSecMaps [m/s] | +| TravelDistanceMMaps | TravelDistance | m | | repSurfaceRunoffMaps | | | nonInit | Reported TravelDistance [m] | +| PF1Maps | pF0[0] | mm | repPFMaps | | | | nonInit,simulatePF | Reported pF 1st upper soil layer [-] | +| PF1ForestMaps | pF0[1] | mm | repPFForestMaps | | | nonInit,simulatePF | Reported pF upper soil layer for forest [-] | | +| PF2Maps | pF1[0] | mm | repPFMaps | | | | nonInit,simulatePF | Reported pF 2nd upper soil layer [-] | +| PF2ForestMaps | pF1[1] | mm | repPFForestMaps | | | nonInit,simulatePF | Reported pF lower soil layer for forest [-] | | +| PF3Maps | pF2[0] | mm | repPFMaps | | | | nonInit,simulatePF | Reported pF 3rd soil layer [-] | +| SMStressMap | SoilMoistureStressDays[0] | days | repStressDays | | | | nonInit | Reported number of days in simulation with soil moisture stress [days] | +| SMStressForestMap | SoilMoistureStressDays[1] | days | repStressDays | | | | nonInit | Reported number of days in simulation with soil moisture stress for forest fraction [days] | +| ETActMaps | ESActPixel+self.var.TaPixel+self.var.TaInterceptionAll+self.var.EvaAddM3*self.var.M3toMM | mm | | repE2O1 | | | nonInit | Reported actual evapotranspiration [mm/∆t] | +| TaMaps | TaPixel | mm | | repE2O1 | | | nonInit | Reported transpiration [mm/∆t] | +| ESActMaps | ESActPixel | mm | | repE2O1 | | | nonInit | Reported soil evaporation [mm/∆t] | +| EWIntMaps | TaInterceptionAll | mm | | repE2O1 | | | nonInit | Reported evaporation of intercepted water [mm/∆t] | +| EWater | EvaAddM3*self.var.M3toMM | mm | | repE2O1 | | | nonInit | ? | +| RainMaps | Rain | mm | | repE2O1 | | | nonInit | Reported rain (excluding snow)[mm/∆t] | +| SnowMeltMaps | SnowMelt | mm | | repE2O1 | | | nonInit | Reported snowmelt [mm/∆t] | +| SnowCoverMaps | SnowCover | mm | | repE2O1 | | | nonInit | Reported snow cover | +| TotalRunoffMaps | ToChanM3Runoff*self.var.M3toMM | mm | | repE2O1 | | | nonInit | Reported total runoff [mm/∆t] | +| FastRunoffMaps | SurfaceRunoff+self.var.UZOutflowPixel | mm | | repE2O1 | | | nonInit | Reported fast runoff = surface + UZ [mm/∆t] | +| LZOutflowMaps | LZOutflowToChannelPixel | mm | | repE2O1 | | | nonInit | Reported lower groundwater zone outflow [mm/∆t] | +| LZMaps | LZ | mm | | repE2O2 | | | nonInit | Reported storage in lower groundwater zone response box [mm] | +| GwLossMaps | GwLossPixel | mm | | repE2O2 | | | nonInit | Reported GWloss [mm/∆t] | +| PrefFlowMaps | PrefFlowPixel | mm | | repE2O2 | | | nonInit | Reported preferential flow [mm/∆t] | +| SeepSubToGWMaps | SeepSubToGWPixel | mm | | repE2O2 | | | nonInit | Reported seepage to groundwater [mm/∆t] | +| GwPercUZLZMaps | GwPercUZLZPixel | mm | | repE2O2 | | | nonInit | Reported percolation from upper to lower groundwater zone [mm/∆t] | +| WaterUseMaps | WUseAddM3*self.var.M3toMM | mm | | repE2O2 | | | nonInit | path and prefix of the reported water use m3 s-1 as a result of demand and availability | +| Theta1Maps | Theta1a[0] | mm | | repE2O2 | | | nonInit | Reported volumetric soil moisture content for soil layer 1 [V/V] | +| Theta2Maps | Theta1b[0] | mm | | repE2O2 | | | nonInit | Reported volumetric soil moisture content for soil layer 2 [V/V] | +| Theta3Maps | Theta2[0] | mm | | repE2O2 | | | nonInit | Reported volumetric soil moisture content for soil layer 3 [V/V] | +| TotalAbsGroundwater | TotalAbstractionFromGroundwaterM3*self.var.M3toMM | mm | repTotalAbs | | | | nonInit,wateruse | TotalAbstractionFromGroundwater [mm] | +| TotalAbsSurface | TotalAbstractionFromSurfaceWaterM3*self.var.M3toMM | mm | repTotalAbs | | | | nonInit,wateruse | TotalAbstractionFromSurfaceWater [mm] | +| TotalAbsSurfaceRegion | AreaTotalAbstractionFromSurfaceWaterM3*self.var.M3toMM | mm | repTotalAbs | | | | nonInit,wateruse,wateruseRegion | TotalAbstractionFromSurfaceWater [mm] summed up for water regions | +| TotalAbsGroundwaterRegion | AreaTotalAbstractionFromGroundwaterM3*self.var.M3toMM | mm | repTotalAbs | | | | nonInit,wateruse,wateruseRegion | TotalAbstractionFromGroundwater [mm] summed up for water regions | +| TotalIrrigationAbstractionM3 | TotalIrrigationAbstractionM3 | m3 | repTotalAbs | | | | nonInit,wateruse | TotalIrrigationAbstraction [m3] | +| TotalPaddyRiceIrrigationAbstractionM3 | TotalPaddyRiceIrrigationAbstractionM3 | m3 | repTotalAbs | | | | nonInit,wateruse | TotalPaddyRiceIrrigationAbstraction [m3] | +| TotalLivestockAbstractionM3 | TotalLivestockAbstractionM3 | m3 | repTotalAbs | | | | nonInit,wateruse | TotalLivestockAbstraction [m3] | +| DomesticConsumptiveUse | DomesticConsumptiveUseMM | mm | repTotalAbs | | | | nonInit,wateruse | DomesticConsumptiveUseMM [mm] | +| LivestockConsumptiveUse | LivestockConsumptiveUseMM | mm | repTotalAbs | | | | nonInit,wateruse | LivestockConsumptiveUseMM [mm] | +| IndustrialConsumptiveUse | IndustrialConsumptiveUseMM | mm | repTotalAbs | | | | nonInit,wateruse | IndustrialConsumptiveUseMM [mm] | +| EnergyConsumptiveUse | EnergyConsumptiveUseMM | mm | repTotalAbs | | | | nonInit,wateruse | EnergyConsumptiveUseMM [mm] | +| IrrigationWaterAbstraction | IrrigationWaterAbstractionM3*self.var.M3toMM + self.var.PaddyRiceWaterAbstractionFromSurfaceWaterM3*self.var.M3toMM | mm | repTotalAbs | | | | nonInit,wateruse | IrrigationWaterAbstraction [mm] | +| TotalWUse | WUseAddM3*self.var.M3toMM | mm | repTotalWUse | | | | nonInit,wateruse | Water use (water demand is reduced by water available | +| TotalWUseRegion | totalAddM3*self.var.M3toMM | mm | repTotalWUse | | | | nonInit,wateruse,wateruseRegion | Water use (water demand is reduced by water available) summed up for water regions | +| WEI_Cns | WEI_Cns | - | repWIndex | | | TRUE | nonInit,wateruse,indicator | Water Exploitation Index - Consumption; for water regions (this is the official EU WEI+): consumption / internal and external availability | +| WEI_Abs | WEI_Abs | - | repWIndex | | | TRUE | nonInit,wateruse,indicator | Water Exploitation Index - Abstraction; for water regions: abstraction / internal and external availability | +| WEI_Dem | WEI_Dem | - | repWIndex | | | TRUE | nonInit,wateruse,indicator | Water Exploitation Index - Demand; for water regions: demand / internal and external availability | +| RegionMonthReservoirAndLakeStorageM3 | RegionMonthReservoirAndLakeStorageM3 | M3 | repWIndex | | | TRUE | nonInit,wateruse,wateruseRegion,indicator | Reservoir and Lake storage in m3 at end of month | +| RegionMonthWaterAbstractedfromLakesReservoirsM3 | RegionMonthWaterAbstractedfromLakesReservoirsM3 | M3 | repWIndex | | | TRUE | nonInit,wateruse,wateruseRegion,indicator | Reservoir and Lake abstraction in m3 | +| RegionMonthIrrigationShortageM3 | RegionMonthIrrigationShortageM3 | M3 | repWIndex | | | TRUE | nonInit,wateruse,wateruseRegion,indicator | Irrigation water shortage in m3 for month | +| RegionMonthInternalFlowM3 | RegionMonthInternalFlowM3 | M3 | repWIndex | | | TRUE | nonInit,wateruse,wateruseRegion,indicator | Internal available water | +| RegionMonthExternalInflowM3 | RegionMonthExternalInflowM3 | M3 | repWIndex | | | TRUE | nonInit,wateruse,wateruseRegion,indicator | External available water | +| RegionMonthWConsumptionM3 | RegionMonthWConsumptionM3 | M3 | repWIndex | | | TRUE | nonInit,wateruse,wateruseRegion,indicator | Region Water Consumption | +| RegionMonthWAbstractionM3 | RegionMonthWAbstractionM3 | M3 | repWIndex | | | TRUE | nonInit,wateruse,wateruseRegion,indicator | Region Water Demand | +| RegionMonthWDemandM3 | RegionMonthWDemandM3 | M3 | repWIndex | | | TRUE | nonInit,wateruse,wateruseRegion,indicator | Region Water Demand | +| MonthETpotMM | MonthETpotMM | mm | repWIndex | | | TRUE | nonInit,wateruse,,indicator | Monthly evapotranspiration deficit in mm | +| MonthETactMM | MonthETactMM | mm | repWIndex | | | TRUE | nonInit,wateruse,indicator | Monthly evapotranspiration deficit in mm | +| MonthETdifMM | MonthETdifMM | mm | repWIndex | | | TRUE | nonInit,wateruse,indicator | Monthly evapotranspiration deficit in mm | +| WaterDependencyIndex | WaterDependencyIndex | - | repWIndex | | | TRUE | nonInit,wateruse,indicator | Monthly Water Dependency Index (0-1) (De Roo 2015) WDI = Upstream Inflow Actually Used / Total Water Demand Values close to 1 give extreme dependency on upstream water | +| WaterSecurityIndex | WaterSecurityIndex | - | repWIndex | | | TRUE | nonInit,wateruse,indicator | Monthly Water Security Index (0-1) (De Roo 2015) WSI = Upstream Inflow Actually Used / Upstream Inflow Available Values close to 1 give extreme vulnerability to upstream water | +| WaterSustainabilityIndex | WaterSustainabilityIndex | - | repWIndex | | | TRUE | nonInit,wateruse,indicator | Monthly Water Sustainability Index (0-1) (De Roo 2015) WTI = 1-SurfaceWaterDeficit / TotalWaterDemand Values of 1 indicate complete sustainable conditions, no water deficit Values less than 1 indicate that considerable deep groundwater resources or desalinated water is used | +| FalkenmarkM3Capita1 | FalkenmarkM3Capita1 | M3Capita | repWIndex | | | TRUE | nonInit,wateruse,indicator | Monthly Falkenmark 1 Index (tochanm3) | +| FalkenmarkM3Capita2 | FalkenmarkM3Capita2 | M3Capita | repWIndex | | | TRUE | nonInit,wateruse,indicator | Monthly Falkenmark 2 Index (tochanm3+reservoirlakeabstraction) | +| FalkenmarkM3Capita3 | FalkenmarkM3Capita3 | M3Capita | repWIndex | | | TRUE | nonInit,wateruse,indicator | Monthly Falkenmark 3 Index (tochanm3+reservoirlakeabstraction+externalinflow) | +| TotalAbstractionFromGroundwaterM3 | TotalAbstractionFromGroundwaterM3 | m3 | repTotalAbs | | | | nonInit,wateruse | Abstraction from groundwater in m3 per timestep | +| TotalAbstractionFromSurfaceWaterM3 | TotalAbstractionFromSurfaceWaterM3 | m3 | repTotalAbs | | | | nonInit,wateruse | Abstraction from surface water in m3 per timestep | +| PotentialSurfaceWaterAvailabilityForIrrigationM3 | PotentialSurfaceWaterAvailabilityForIrrigationM3 | m3 | repTotalAbs | | | | nonInit,wateruse | Surface water availability in m3 for potential irrigation for each day | +| TotalAbsGroundwater | TotalAbstractionFromGroundwaterM3*self.var.M3toMM | mm | repTotalAbs | | | | nonInit,wateruse | TotalAbstractionFromGroundwater [mm] | +| AreaTotalAbstractionFromSurfaceWaterM3 | AreaTotalAbstractionFromSurfaceWaterM3 | m3 | repTotalAbs | | | | nonInit,wateruse | AreaTotalAbstractionFromSurfaceWaterM3 | +| AreaTotalAbstractionFromGroundwaterM3 | AreaTotalAbstractionFromGroundwaterM3 | m3 | repTotalAbs | | | | nonInit,wateruse | Region abstraction from groundwater in m3 per timestep | +| AreatotalWaterAbstractedfromLakesReservoirsM3 | AreatotalWaterAbstractedfromLakesReservoirsM3 | m3 | repTotalAbs | | | | nonInit,wateruse | Region Total Abstraction From Lakes and Reservoirs in m3, per timestep | +| LakeAbstractionM3 | LakeAbstractionM3 | m3 | repTotalAbs | | | | nonInit,wateruse,simulateLakes | Lake Abstraction per timestep in m3 | +| ReservoirAbstractionM3 | ReservoirAbstractionM3 | m3 | repTotalAbs | | | | nonInit,wateruse,simulateReservoirs | ReservoirAbstraction per timestep in M3 | +| LakeStorageM3 | LakeStorageM3 | m3 | repTotalAbs | | | | nonInit,wateruse,simulateLakes | Reported lake storage | +| ReservoirStorageM3 | ReservoirStorageM3 | m3 | repTotalAbs | | | | nonInit,wateruse,simulateReservoirs | ReservoirStorage in M3 | +| TotalDemandM3 | TotalDemandM3 | m3 | repTotalAbs | | | | nonInit,wateruse | Total Abstraction Demand | +| WUseAddM3 | WUseAddM3 | m3 | repTotalAbs | | | | nonInit,wateruse | WUseAddM3 | +| totalAddM3 | totalAddM3 | m3 | repTotalAbs | | | | nonInit,wateruse | totalAddM3 | +| AreatotalIrrigationUseM3 | AreatotalIrrigationUseM3 | m3 | repTotalAbs | | | | nonInit,wateruse | AreatotalIrrigationUseM3 | +| FractionAbstractedFromChannels | FractionAbstractedFromChannels | - | repTotalAbs | | | | nonInit,wateruse | FractionAbstractedFromChannels | +| EFlowIndicator | EFlowIndicator | - | repTotalAbs | | | | nonInit,wateruse,indicator | EFlowIndicator (1 on day with ChanQ smaller than EflowThreshold, 0 on normal days) | + diff --git a/docs/4_annex_state-variables/index.md b/docs/4_annex_state-variables/index.md new file mode 100644 index 00000000..03258ae9 --- /dev/null +++ b/docs/4_annex_state-variables/index.md @@ -0,0 +1,40 @@ +**Table:** *State variables.* + +| Key | LISFLOOD file name | LISFLOOD variable | Unit | Description | +| ------------------------------ | ------------------ | --------------------- | ---- | ------------------------------------------------------------ | +| OFDirectState | ofdir | OFM3Direct | m3 | Water volume on catchment surface for direct fraction [m3] | +| OFOtherState | ofoth | OFM3Other | m3 | Water volume on catchment surface for other fraction [m3] | +| OFForestState | offor | OFM3Forest | m3 | Water volume on catchment surface for forest fraction [m3] | +| ChanCrossSectionState | chcro | TotalCrossSectionArea | m | Total cross-section area of channel | +| DSLRState | dslr | DSLR[0] | day | Reported days since last rain | +| DSLRForestState | dslf | DSLR[1] | day | Reported days since last rain for forest | +| DSLRIrrigationState | dsli | DSLR[2] | day | Reported days since last rain irrigation | +| SnowCoverAState | scova | SnowCoverS[0] | mm | Reported snow cover in snow zone A [mm] | +| SnowCoverBState | scovb | SnowCoverS[1] | mm | Reported snow cover in snow zone B [mm] | +| SnowCoverCState | scovc | SnowCoverS[2] | mm | Reported snow cover in snow zone C [mm] | +| FrostIndexState | frost | FrostIndex | C/day| Reported frost index | +| CumInterceptionState | cum | CumInterception[0] | mm | Reported interception storage | +| CumInterceptionForestState | cumf | CumInterception[1] | mm | Reported interception storage for forest | +| CumInterceptionIrrigationState | cumi | CumInterception[2] | mm | Reported interception storage for irrigation | +| Theta1State | tha | Theta1a[0] | - | Reported volumetric soil moisture content for top soil layer 1a [V/V] | +| Theta1ForestState | thfa | Theta1a[1] | - | Reported volumetric soil moisture content for top soil layer 1a forest fraction [V/V] | +| Theta1IrrigationState | thia | Theta1a[2] | - | Reported volumetric soil moisture content for top soil layer 1a irrigation fraction [V/V] | +| Theta2State | thb | Theta1b[0] | - | Reported volumetric soil moisture content for soil layer 1b [V/V] | +| Theta2ForestState | thfb | Theta1b[1] | - | Reported volumetric soil moisture content for soil layer 1b forest fraction [V/V] | +| Theta2IrrigationState | thib | Theta1b[2] | - | Reported volumetric soil moisture content for soil layer 1b irrigation fraction [V/V] | +| Theta3State | thc | Theta2[0] | - | Reported volumetric soil moisture content for soil layer 2 [V/V] | +| Theta3ForestState | thfc | Theta2[1] | - | Reported volumetric soil moisture content for soil layer 2 forest fraction [V/V] | +| Theta3IrrigationState | thic | Theta2[2] | - | Reported volumetric soil moisture content for soil layer 2 irrigation fraction [V/V] | +| UZState | uz | UZ[0] | mm | Reported storage in upper groundwater zone response box [mm] | +| UZForestState | uzf | UZ[1] | mm | Reported storage in upper groundwater zone response box for forest [mm] | +| UZIrrigationState | uzi | UZ[2] | mm | Reported storage in upper groundwater zone response box for irrigation [mm] | +| LZState | lz | LZ | mm | Reported storage in lower response box [mm] | +| CumIntSealedState | cseal | CumInterSealed | mm | Reported cumulative depressions storage [mm] | +| DischargeMaps | dis | ChanQAvg | m3/s | Reported discharge [cu m/s] (average over the timesteps) (not used for warm start) | +| ChanQState | chanq | ChanQ | m3/s | Reported istantaneous discarge at end of time step | +| LakeLevelState | lakeh | LakeLevel | m | Output map(s) with lake level [m] | +| LakePrevInflowState | lakeprevinq | LakeInflowOld | m3/s | Output map with lake inflow at previous routing sub-step (ChanQ(t-1)) [m3/s] | +| LakePrevOutflowState | lakeprevoutq | LakeOutflow | m3/s | Output map with lake outflow at previous routing sub-step (ChanQ(t-1)) [m3/s] | +| ReservoirFillState | rsfil | ReservoirFill | - | Output map(s) with Reservoir Filling [V/V] | +| CrossSection2State | ch2cr | CrossSection2Area | m2 | Cross section area for split routing [m2] | +| ChSideState | chside | Sideflow1Chan | m2/s | Sideflow to channel for 1st line of routing [m2/s] | diff --git a/docs/4_annex_tests/index.md b/docs/4_annex_tests/index.md new file mode 100644 index 00000000..04343343 --- /dev/null +++ b/docs/4_annex_tests/index.md @@ -0,0 +1,794 @@ +# Testing OSLisflood developments + +In this document we report details about all kind of tests we execute during development cycles. + +## Introduction + +In [tests/](https://github.com/ec-jrc/lisflood-code/tree/master/tests){:target="_blank"} folder of lisflood-code repository there are several unit +tests ensuring that all *helper components* of Lisflood work as expected. +These components are not strictly related to the hydrological model but are essential for the execution. + +Most of unit tests are executed mocking I/O, to keep them reasonably fast. + +Please note that in same folder there are other tests that actually test the model in a black-box fashion. +These tests are much slower as they execute lisflood for longer periods and write results on disk (TSS and netCDF maps) which are then compared + +- to a *test oracle dataset*, +- or to results from another simulation (executed in the same test) with different parameters but same expected values. + +See the dedicated paragraph on this page for more details. + +Static data and fixtures (i.e. static maps and meteo forcings) comes from two catchments. +They are netCDF files reduced in space (Po catchment area) and time (6 hourly data from 2015-12-10 12:00 to 2017-12-29 12:00) from original EFAS dataset. + +In tests where values comparison are needed, we use [lisfloodutilities.compare](https://github.com/ec-jrc/lisflood-utilities/blob/master/src/lisfloodutilities/compare/__init__.py){:target="_blank"} +helper classes (NetCDFComparator, TSSComparator). + +These classes compare netCDF and TSSs values between two dataset of OSLisflood results, using `atol=0.0001` and `rtol=0.001` (defaults values in NetCDFComparator and TSSComparator). +See [`numpy.allclose`](https://numpy.org/doc/stable/reference/generated/numpy.allclose.html){:target="_blank"} for more details. + +Some tests use `array_equal` option in order to compare values using [`numpy.array_equal`](https://numpy.org/doc/stable/reference/generated/numpy.array_equal.html){:target="_blank"} function. + +Tests that are using Comparator classes are: + +| Test name | File | Usage and tolerences | +|--------------------------|--------------------------|-----------------------------------------------------------------------------------| +| test_dates_steps_day | test_dates_steps.py | NetCDFComparator(array_equal=True) | +| test_dates_steps_6h | test_dates_steps.py | NetCDFComparator(array_equal=True) | +| test_end_state_reported | test_state_end_maps.py | NetCDFComparator(array_equal=True) | +| test_dis_daily | test_results.py | NetCDFComparator(atol=0.0001, rtol=0.001), TSSComparator(atol=0.0001, rtol=0.001) | +| test_dis_6h | test_results.py | NetCDFComparator(atol=0.0001, rtol=0.001), TSSComparator(atol=0.0001, rtol=0.001) | +| test_init_daily | test_results.py | NetCDFComparator(atol=0.0001, rtol=0.001), TSSComparator(atol=0.0001, rtol=0.001) | +| test_init_6h | test_results.py | NetCDFComparator(atol=0.0001, rtol=0.001), TSSComparator(atol=0.0001, rtol=0.001) | +| test_warmstart_daily | test_warmstart.py | NetCDFComparator(atol=0.0001, rtol=0.001), TSSComparator(array_equal=True) | +| test_warmstart_6h | test_warmstart.py | NetCDFComparator(atol=0.0001, rtol=0.001), TSSComparator(array_equal=True) | +| test_subcacthment_daily | test_subcatchments.py | NetCDFComparator(array_equal=True) | +| test_subcacthment_6h | test_subcatchments.py | NetCDFComparator(array_equal=True) | +| test_reported_steps | test_reported_steps.py | NetCDFComparator(array_equal=True) | +| test_waterabstraction_24h| test_water_abstraction.py| NetCDFComparator(array_equal=True) | +| test_waterabstraction_6h | test_water_abstraction.py| NetCDFComparator(array_equal=True) | + + +## How to execute tests + +In order to execute tests decribed in this page, you need to download source code and create a conda environment for OSLisflood. + +Then, from project folder, run + +```bash +pytest tests/ +``` + +As defined in pytest.ini, this is equivalent to + +```bash +pytest tests/ -ra -x -l --cov=lisflood --cov-config=.coveragerc -m "not slow" -vv +``` + +This will skip all tests marked as slow (which can run for 30 mins/1 hour). +To execute slow tests simply run: + +```bash +pytest tests/ -m "slow" +``` + +### Output sample of pytest execution + +
Toggle + +
+ +```text + +(lisflood) [master]user@Enki:~/projects/lisflood-code $ pytest tests/ +================================ test session starts ================================ +platform linux -- Python 3.7.8, pytest-5.2.1, py-1.8.0, pluggy-0.13.0 +cachedir: .pytest_cache +rootdir: /home/user/projects/lisflood-code, inifile: pytest.ini +plugins: env-0.6.2, cov-2.8.1, mock-2.0.0 + +tests/test_dates_steps.py::TestStepsDates::test_dates_steps_daily PASSED [ 2%] +tests/test_dates_steps.py::TestStepsDates::test_dates_steps_6h PASSED [ 4%] +tests/test_options.py::TestOptions::test_basic PASSED [ 6%] +tests/test_options.py::TestOptions::test_split_routing_only PASSED [ 8%] +tests/test_options.py::TestOptions::test_reservoirs_only PASSED [ 11%] +tests/test_options.py::TestOptions::test_lakes_only PASSED [ 13%] +tests/test_options.py::TestOptions::test_rice_only PASSED [ 15%] +tests/test_options.py::TestOptions::test_pf_only PASSED [ 17%] +tests/test_options.py::TestOptions::test_waterabstraction_only PASSED [ 20%] +tests/test_options.py::TestWrongTimestepInit::test_raisexc PASSED [ 22%] +tests/test_reported_maps.py::TestReportedMaps::test_prerun PASSED [ 24%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_dischargemaps PASSED [ 26%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_dischargemaps_not_called PASSED [ 28%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_lakes PASSED [ 31%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_lakes_not_called PASSED [ 33%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_reservoirs PASSED [ 35%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_reservoirs_not_called PASSED [ 37%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_snowmaps PASSED [ 40%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_snowmaps_not_called PASSED [ 42%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_pfmaps PASSED [ 44%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_pfmaps_not_called PASSED [ 46%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_lzmaps PASSED [ 48%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_lzmaps_not_called PASSED [ 51%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_uzmaps PASSED [ 53%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_uzmaps_not_called PASSED [ 55%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_gwpercuzlzmaps PASSED [ 57%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_gwpercuzlzmaps_not_called PASSED [ 60%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_totalabs PASSED [ 62%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_totalabs_not_called PASSED [ 64%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_totalwuse PASSED [ 66%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_totalwuse_not_called PASSED [ 68%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_windex PASSED [ 71%] +tests/test_reported_maps.py::TestReportedMaps::test_rep_windex_not_called PASSED [ 73%] +tests/test_reported_tss.py::TestReportedTSS::test_rep_dischargetss PASSED [ 75%] +tests/test_reported_tss.py::TestReportedTSS::test_rep_dischargetss_not_called PASSED [ 77%] +tests/test_reported_tss.py::TestReportedTSS::test_rep_stateupgaugestss PASSED [ 80%] +tests/test_reported_tss.py::TestReportedTSS::test_rep_stateupgaugestss_not_called PASSED [ 82%] +tests/test_reported_tss.py::TestReportedTSS::test_rep_rateupgaugestss PASSED [ 84%] +tests/test_reported_tss.py::TestReportedTSS::test_rep_rateupgaugestss_not_called PASSED [ 86%] +tests/test_reported_tss.py::TestReportedTSS::test_rep_meteoupgaugestss PASSED [ 88%] +tests/test_reported_tss.py::TestReportedTSS::test_rep_meteoupgaugestss_not_called PASSED [ 91%] +tests/test_state_end_maps.py::TestRepMaps::test_no_reported PASSED [ 93%] +tests/test_state_end_maps.py::TestRepMaps::test_end_reported PASSED [ 95%] +tests/test_state_end_maps.py::TestRepMaps::test_state_reported PASSED [ 97%] +tests/test_state_end_maps.py::TestRepMaps::test_end_state_reported PASSED [100%] + +----------- coverage: platform linux, python 3.7.8-final-0 ----------- +Name Stmts Miss Cover +---------------------------------------------------------------------------------- +src/lisflood/Lisflood_EnKF.py 21 12 43% +src/lisflood/Lisflood_dynamic.py 89 16 82% +src/lisflood/Lisflood_initial.py 108 8 93% +src/lisflood/Lisflood_monteCarlo.py 11 4 64% +src/lisflood/__init__.py 13 1 92% +src/lisflood/global_modules/__init__.py 0 0 100% +src/lisflood/global_modules/add1.py 634 261 59% +src/lisflood/global_modules/checkers.py 36 21 42% +src/lisflood/global_modules/decorators.py 16 9 44% +src/lisflood/global_modules/default_options.py 4 0 100% +src/lisflood/global_modules/errors.py 26 7 73% +src/lisflood/global_modules/output.py 190 59 69% +src/lisflood/global_modules/settings.py 395 64 84% +src/lisflood/global_modules/stateVar.py 93 79 15% +src/lisflood/global_modules/zusatz.py 237 172 27% +src/lisflood/hydrological_modules/__init__.py 42 31 26% +src/lisflood/hydrological_modules/evapowater.py 72 24 67% +src/lisflood/hydrological_modules/frost.py 18 0 100% +src/lisflood/hydrological_modules/groundwater.py 54 3 94% +src/lisflood/hydrological_modules/indicatorcalc.py 106 4 96% +src/lisflood/hydrological_modules/inflow.py 58 28 52% +src/lisflood/hydrological_modules/kinematic_wave_parallel.py 105 9 91% +src/lisflood/hydrological_modules/lakes.py 120 14 88% +src/lisflood/hydrological_modules/landusechange.py 28 7 75% +src/lisflood/hydrological_modules/leafarea.py 35 0 100% +src/lisflood/hydrological_modules/miscInitial.py 94 10 89% +src/lisflood/hydrological_modules/opensealed.py 20 0 100% +src/lisflood/hydrological_modules/polder.py 25 6 76% +src/lisflood/hydrological_modules/readmeteo.py 30 5 83% +src/lisflood/hydrological_modules/reservoir.py 128 5 96% +src/lisflood/hydrological_modules/riceirrigation.py 49 0 100% +src/lisflood/hydrological_modules/routing.py 178 8 96% +src/lisflood/hydrological_modules/snow.py 63 0 100% +src/lisflood/hydrological_modules/soil.py 177 0 100% +src/lisflood/hydrological_modules/soilloop.py 172 3 98% +src/lisflood/hydrological_modules/structures.py 15 0 100% +src/lisflood/hydrological_modules/surface_routing.py 64 0 100% +src/lisflood/hydrological_modules/transmission.py 29 11 62% +src/lisflood/hydrological_modules/waterabstraction.py 230 16 93% +src/lisflood/hydrological_modules/waterbalance.py 77 62 19% +src/lisflood/hydrological_modules/waterlevel.py 27 9 67% +src/lisflood/hydrological_modules/wateruse.py 8 3 62% +src/lisflood/main.py 88 37 58% +---------------------------------------------------------------------------------- +TOTAL 3985 1008 75% + + +============ 45 passed, 10 deselected in 90.49s (0:01:30) ============ + +``` + +
+
+ +## Unit Tests + +### Testing Options +In LF, you activate/deactivate a hydrological module by setting 1/0 in *lfoptions* section of the input XML settings file. + +This test ensures that all modules are called/not called when activated/not activated. +The following table summarize the matrix of combinations of options we test: + +| **setoption** | **BASIC** | **SPLIT ROUTING ONLY** | **RESERVOIRS ONLY** | **LAKES ONLY** | **RICE ONLY** | **WATER ABSTRACTION ONLY** | **PF ONLY** | **FULL** | +| ----------------- | --------- | ---------------------- | ------------------- | -------------- | ------------- | -------------------------- | ----------- | -------- | +| groundwaterSmooth | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | +| wateruse | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | +| TransientWaterDemandChange | 0| 0 | 0 | 0 | 0 | 1 | 0 | 1 | +| wateruseRegion | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | +| drainedIrrigation | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | +| riceIrrigation | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | +| openwaterevapo | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | +| simulateLakes | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | +| simulateReservoirs| 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | +| simulatePF | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | +| SplitRouting | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | + +#### Implementation + +[test_options.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_options.py){:target="_blank"} + +We define a test for each combination from the table above then we check that a particular function inside the module is called with expected arguments. +We use a mocked `loadmap` function (the function that LF uses to load netCDF or PCRaster maps) and check that it's called/not called as expected by the module under test. + +**Example: test_rice_only** +Only option *riceIrrigation* is set, then we mock function *loadmap* imported from rice.py and other modules. + +* Test asserts that loadmap is never called from other modules (e.g. reservoir). +* Test asserts that loadmap is called with following arguments from riceirrigation module: + +```python +from unittest.mock import call +import lisflood +... +... +def test_rice_only(self): + ... + calls = [call('RiceFlooding'), call('RicePercolation'), call('RicePlantingDay1'), call('RiceHarvestDay1'), call('RicePlantingDay2'), call('RiceHarvestDay2')] + lisflood.hydrological_modules.riceirrigation.loadmap.assert_has_calls(calls) + assert not lisflood.hydrological_modules.reservoir.loadmap.called + ... +``` + +### Testing state maps and end maps +Make sure that OSLisflood prints state maps and end maps. Last step in state maps must be identical to the only step in end maps. + +#### Implementation + +[test_state_end_maps.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_state_end_maps.py){:target="_blank"} + + +|Test case | Expected | +|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------| +| test_no_reported | no .nc and .tss files are being written when no report options are setno .nc and .tss files are being written when no report options are set | +| test_end_reported | only End Maps are reported when 'repEndMaps' is activated | +| test_state_reported | only State Maps are reported when 'repStateMaps' is activated | +| test_end_state_reported | State Maps and End Maps are reported and that last timestep values in State Maps are array equal to the values in End Maps | + + +### Testing reporting maps +Make sure that OSLisflood prints maps when reporting options are active. +In LF, you activate/deactivate report maps/tss options by setting 1/0 in *lfoptions* section of the input XML settings file. + +| **setoption** | +| --------------------- | +| repDischargeMaps | +| repsimulateLakes | +| repsimulateReservoirs | +| repSnowMaps | +| repPFMaps | +| repLZMaps | +| repUZMaps | +| repGwPercUZLZMaps | +| repTotalAbs | +| repTotalWUse | +| repWIndex | + +#### Implementation +[test_reported_maps.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_reported_maps.py){:target="_blank"} + +In order to test that a specific map is written when a report map option is activated, +we mock the ```lisflood.global_modules.output.writenet``` (the function LF uses to write netCDF maps) and assert that +it was called with expected arguments. + +**Example: test_rep_snowmaps** +Activate repSnowMaps and repStateMaps and assert that writenet function was called with argument 'SnowMaps'. + +*Note: the actual code asserting writenet calls is in TestSettings._reported_map method.* + +```python +def test_rep_snowmaps(self): + self._reported_map(self.settings_file, opts_to_set=['repSnowMaps', 'repStateMaps'], + map_to_check='SnowMaps') +``` + + +### Testing reporting timeseries (TSS files) +Make sure that OSLisflood prints TSS files when reporting options are active. + +| **setoption** | +| ------------------| +| repDischargeTs | +| repStateUpsGauges | +| repRateUpsGauges | +| repMeteoUpsGauges | + +#### Implementation +[test_reported_tss.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_reported_tss.py){:target="_blank"} + +In order to test that a specific TSS is written when a report tss option is activated, +we mock the ```lisflood.global_modules.output.TimeoutputTimeseries``` (the PCRaster framework class that LF uses to write TSS files) + and assert that it was initiliazed with expected arguments. + +**Example: test_rep_dischargetss** +Activate repDischargeTs and assert that a TimeoutputTimeseries object was initialized with the TSS filename 'disWin.tss' (as defined in XML settings file used for this test). + +*Note: the actual code asserting TimeoutputTimeseries calls is in TestSettings._reported_tss method.* + +```python +def test_rep_dischargetss(self): + self._reported_tss(self.settings_files['full'], + opts_to_set=['repDischargeTs'], + tss_to_check='disWin.tss') +``` + +### Testing reporting steps +Make sure that OSLisflood prints state files following reporting steps formula in ReportSteps xml option. + +#### Implementation +[test_reported_steps.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_reported_steps.py){:target="_blank"} + +In order to test that specific files are written when a step matches the ReportSteps formula, we use a test formula 'starttime+10..endtime'. +Then we geterate specific outputs for the desired steps and compare the two output using NetCDFComparator(array_equal=True) + +**Example: test_reported_steps** + +```python + def test_reported_steps(self): + + strReportStepA = 'starttime+10..endtime' + settings_a = setoptions(self.settings_file, + vars_to_set={'StepStart': '01/07/2016 00:00', 'StepEnd': '01/08/2016 00:00', + 'PathOut': '$(PathRoot)/out/a', + 'ReportSteps': strReportStepA, + }) + mk_path_out(self.out_dir_a) + lisfloodexe(settings_a) + + int_start, _ = datetoint(settings_a.binding['StepStart'], settings_a.binding) + int_end, _ = datetoint(settings_a.binding['StepEnd'], settings_a.binding) + + strReportStepB = '' + for i in range(int_start,int_end,10): + if strReportStepB != '': + strReportStepB = strReportStepB + ',' + strReportStepB = strReportStepB + str(i) + + settings_b = setoptions(self.settings_file, + vars_to_set={'StepStart': '01/07/2016 00:00', 'StepEnd': '01/08/2016 00:00', + 'PathOut': '$(PathRoot)/out/b', + 'ReportSteps': strReportStepB, + }) + mk_path_out(self.out_dir_b) + lisfloodexe(settings_b) + + comparator = NetCDFComparator(settings_a.maskpath, array_equal=True) + comparator.compare_dirs(self.out_dir_b, self.out_dir_a) + assert not comparator.errors +``` + + +### Testing Init run output maps +Make sure OSLisflood can run an initial run to generate AVGDIS and LZAVIN maps with proper extension (.nc or .map) + +#### Implementation +[test_reported_maps.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_reported_maps.py){:target="_blank"} + +Test asserts that writenet was called with 'AvgDis' and 'LZAvInflowMap' arguments (LF variables for avgdis.nc and lzavin.nc files) and with the correct filename. + + +```python +def test_prerun(self): + self._reported_map(self.settings_files['initrun'], + map_to_check=['AvgDis', 'LZAvInflowMap'], + files_to_check=['avgdis.nc', 'lzavin.nc']) + +``` + +### Testing StepStart and StepEnd variables +To define start and end simulation timesteps in LF you may use date time notation (21/12/2000 06:00) or integer timesteps (e.g. 215, calculated from CalendarDayStart using DtSec steps). +We need to ensure that either using dates or integers for StepStart and StepEnd gives equivalent setups. + +Tests are done with daily and 6-hourly timesteps (i.e. DtSec=86400 and DtSec=21600). + +#### Implementation +[test_dates_steps.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_dates_steps.py){:target="_blank"} + +Execute lisflood with report options activated, using dates formats for StepStart and StepEnd and a daily timestep. +Then execute lisflood with same setup, this time using integers for StepStart and StepEnd. +**Assert that results are identical.** + +Test is repeated for 6-hourly timesteps. An additional test is done to check dates before year 1970. + +**Example: test_dates_steps_daily** + +```python +def test_dates_steps_daily(self): + settings_a = self.setoptions(self.settings_files['full'], + opts_to_set=['repStateMaps', 'repEndMaps', 'repDischargeMaps', + 'repSnowMaps', 'repLZMaps', 'repUZMaps'], + vars_to_set={'StepStart': '30/07/2016 06:00', 'StepEnd': '01/08/2016 06:00', + 'PathOut': '$(PathRoot)/out/1'} + ) + mk_path_out('data/LF_ETRS89_UseCase/out/1') + lisfloodexe(settings_a) + settings_b = self.setoptions(self.settings_files['full'], + opts_to_set=['repStateMaps', 'repEndMaps', 'repDischargeMaps', + 'repSnowMaps', 'repLZMaps', 'repUZMaps'], + vars_to_set={'StepStart': 6057, 'StepEnd': 6059, + 'PathOut': '$(PathRoot)/out/2'}) + mk_path_out('data/LF_ETRS89_UseCase/out/2') + + lisfloodexe(settings_b) + + assert settings_a.step_start_int == 6057 + assert settings_a.step_end_int == 6059 + assert settings_a.step_start == settings_a.step_start_dt.strftime('%d/%m/%Y %H:%M') + assert settings_a.step_end == settings_a.step_end_dt.strftime('%d/%m/%Y %H:%M') + assert settings_b.step_start_dt == datetime.datetime(2016, 7, 30, 6, 0) + assert settings_b.step_end_dt == datetime.datetime(2016, 8, 1, 6, 0) + + comparator = NetCDFComparator(settings_a.maskpath) + out_a = settings_a.output_dir + out_b = settings_b.output_dir + comparator.compare_dirs(out_a, out_b) +``` + +### Testing Water Abstraction +The test verifies the use of the correct (closest, antecedent timestamp, and closest, antecedent day of the year) water demand information, unsing the following options: +TransientWaterDemandChange = this option allows to read water demand information from a netcdf stack which includes simulation start and end dates. The water demand information for the closest, antecedent timestamp (dd/mm/yyyy) to the modelled time step is used in the computations. +UseWaterDemandAveYear = this option allows to read water demand information from a netcdf stack with a single year temporal coverage. The water demand information for the closest, antecedent day of the year (dd/mm) to the modelled time step is used in the computations. +For more information please refer to [Water use - LISFLOOD (ec-jrc.github.io)](https://ec-jrc.github.io/lisflood-model/2_18_stdLISFLOOD_water-use/) + +#### Implementation +[test_water_abstraction.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_water_abstraction.py){:target="_blank"} +The test uses two datasets: waterdemand19902019, that includes daily data from 1990 to 2019, and waterdemand, that includes only one year used as reference for any year. +Test asserts that output generated using TransientWaterDemandChange with useWaterDemandAveYear flag active using the reference dataset included into the waterdemand folder is the same of the one generated disabling useWaterDemandAveYear flag and using the waterdemand19902019 folder. + + +```python + def run_lisflood_waterabstraction(self, dt_sec): + + settings_a = setoptions(self.settings_file, + opts_to_set=('TransientWaterDemandChange', 'useWaterDemandAveYear'), + vars_to_set={'StepStart': '30/07/2016 00:00', 'StepEnd': '01/08/2016 00:00', + 'DtSec': dt_sec, 'PathOut': '$(PathRoot)/out/a', + 'PathWaterUse': '$(PathRoot)/maps/waterdemand' + }) + mk_path_out(self.out_dir_a) + lisfloodexe(settings_a) + + settings_b = setoptions(self.settings_file, + opts_to_set=('TransientWaterDemandChange'), + opts_to_unset=('useWaterDemandAveYear'), + vars_to_set={'StepStart': '30/07/2016 00:00', 'StepEnd': '01/08/2016 00:00', + 'DtSec': dt_sec, 'PathOut': '$(PathRoot)/out/b', + 'PathWaterUse': '$(PathRoot)/maps/waterdemand19902019'}) + mk_path_out(self.out_dir_b) + lisfloodexe(settings_b) + + comparator = NetCDFComparator(settings_a.maskpath, array_equal=True) + comparator.compare_dirs(self.out_dir_b, self.out_dir_a) + +``` + +## Other LF tests included in repository + +There are other tests included in [tests/](https://github.com/ec-jrc/lisflood-code/tree/master/tests){:target="_blank"}. +folder of repository that can't be defined as unit tests. + +These tests execute the development version of lisflood with some predefined XML settings, +and asserts that results are equal to a reference dataset (test oracle data in black-box terminology). + +In order to reduce dataset size, we use a test catchment (same as [LF_ETRS89_UseCase](https://github.com/ec-jrc/lisflood-usecases/tree/master/LF_ETRS89_UseCase){:target="_blank"}) +with static data clipped from EFAS domain. Meteo netCDF forcings are also cut from domain and contain 6 hourly data from 2015-12-10 12:00 to 2017-12-29 12:00. + +**Note:** These tests fail when hydrological model is changed between reference version and current version under test. + +### Testing LF Results + +These tests do short execution (max 1 year) of lisflood on the Po test catchment clipped from the full setup (EFAS) +and assert that results are within defined tolerances if compared with test oracle. + +All test cases are executed with following modules activated: + +| Activated modules | +|---------------------------| +|SplitRouting | +|simulateReservoirs | +|groundwaterSmooth | +|drainedIrrigation | +|openwaterevapo | +|riceIrrigation | +|indicator | + +#### Implementation + +[test_results.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_results.py){:target="_blank"} + + +|Test case | DtSec | Simulation period | Expected | +|---------------------|-------|------------------------------------|--------------------------------------------------------------| +| test_init_daily | 86400 |31/12/2015 06:00 - 06/01/2017 06:00 | avgdis.nc and lzavin.nc diffs are within tolerances | +| test_init_6h | 21600 |31/12/2015 06:00 - 06/01/2017 06:00 | avgdis.nc and lzavin.nc diffs are within tolerances | +| test_dis_daily | 86400 |02/01/2016 06:00 - 02/07/2016 06:00 | dis.nc, dis.tss and chanQWin.tss diffs are within tolerances | +| test_dis_6h | 21600 |02/01/2016 06:00 - 02/07/2016 06:00 | dis.nc, dis.tss and chanQWin.tss diffs are within tolerances | +| test_initvars | 86400 |02/01/2016 06:00 - 05/02/2016 06:00 | all init files *.end.nc are written in output folder | + + +|Initial state files checked by **test_initvars** | +|-------------------------------------------------| +|ch2cr.end.nc, chanq.end.nc, chcro.end.nc, chside.end.nc, cseal.end.nc, cum.end.nc, cumf.end.nc, cumi.end.nc, dslf.end.nc, dsli.end.nc, dslr.end.nc, frost.end.nc, lakeh.end.nc, lakeprevinq.end.nc, lakeprevoutq.end.nc, lz.end.nc, ofdir.end.nc, offor.end.nc, ofoth.end.nc, rsfil.end.nc, scova.end.nc, scovb.end.nc, scovc.end.nc, tha.end.nc, thb.end.nc, thc.end.nc, thfa.end.nc, thfb.end.nc, thfc.end.nc, thia.end.nc, thib.end.nc,thic.end.nc, uz.end.nc, uzf.end.nc, uzi.end.nc| + +### Testing Warm start +Test ensures that a long cold run is equivalent to an initial cold start + repeated warm starts. +It's a regression test as it was introduced along with warmstart fixes and checks that the inconsistency between cold and warm runs won't be reintroduced. + +* run continuously for a long period and save output in a folder `reference` +* run on the same period but restarting OSLisflood at every step (start and stop) +* Compare all state maps from `reference` with state maps of each warm start execution. Maps must be identical at the timestep of the warm run. + +|Test case | DtSec | Simulation period | Expected | +|----------------------|-------|------------------------------------|------------------------------------------------| +| test_warmstart_daily | 86400 |02/01/2016 06:00 - 30/12/2016 06:00 | nc diffs are within tolerances, TSSs identical | +| test_warmstart_6h | 21600 |01/03/2016 06:00 - 31/07/2016 06:00 | nc diffs are within tolerances, TSSs identical | + +All test cases are executed with following modules activated: + +| Activated modules | +|---------------------------| +|SplitRouting | +|groundwaterSmooth | +|drainedIrrigation | +|openwaterevapo | +|riceIrrigation | +|indicator | + +**Note:** Due the current implementation of the reservoir module (and its calibration methods), this test could fail on certain domains having reservoirs with particular attributes. In the current test basin (PO basin) the test must be successful with reservoir ON. +**Note:** This test doesn't use a reference dataset so it's not a black-box test. It ensures that cold and warm runs are equivalent. + +#### Implementation +[test_warmstart.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_warmstart.py){:target="_blank"} + +To illustrate implementation of this test we take test_warmstart_daily as example. test_warmstart_6h is similar but with a shorter simulation period and DtSec=21600. +1. Execute an initialization run for year 2000 and save avgdis.nc and lzavin.nc outputs in a folder. +```python +settings_prerun = self.setoptions(self.settings_files['prerun'], opts_to_unset=modules_to_unset, + vars_to_set={'DtSec': dt_sec, + 'PathOut': path_out_init, + 'StepStart': step_start, + 'StepEnd': step_end}) +# ** execute +lisfloodexe(settings_prerun) +``` + +2. Execute a long run for year 2000 (with cold.xml), using avgdis.nc and lzavin.nc from step 1, and save output in a folder as reference data. +```python +lzavin_path = settings_prerun.binding['LZAvInflowMap'] +avgdis_path = settings_prerun.binding['AvgDis'] +settings_longrun = self.setoptions(self.settings_files['cold'], + opts_to_unset=modules_to_unset, + vars_to_set={'StepStart': step_start, + 'StepEnd': step_end, + 'LZAvInflowMap': lzavin_path, + 'PathOut': path_out_reference, + 'AvgDis': avgdis_path, + 'DtSec': dt_sec}) +# ** execute +lisfloodexe(settings_longrun) +``` + +3. Execute a cold run for the first day of simulation, using avgdis.nc and lzavin.nc from step 1. +```python +settings_coldstart = self.setoptions(self.settings_files['cold'], + opts_to_unset=modules_to_unset, + vars_to_set={'StepStart': step_start, + 'StepEnd': step_start, + 'LZAvInflowMap': lzavin_path, + 'PathOut': path_out, + 'AvgDis': avgdis_path, + 'DtSec': dt_sec}) +# ** execute +lisfloodexe(settings_coldstart) +``` + +4. Execute a warm start for each subsequent day of the simulation period, using output of the previous run (the first cold run or the previous warm run) as init state variables. +```python +# warm run (2. single step warm start/stop with initial conditions from previous run) +prev_settings = settings_coldstart +warm_step_start = prev_settings.step_end_dt + timedelta(seconds=dt_sec) +warm_step_end = warm_step_start +timestep_init = prev_settings.step_end_dt.strftime('%d/%m/%Y %H:%M') +maskinfo = MaskInfo.instance() +nc_comparator = NetCDFComparator(maskinfo.info.mask) +tss_comparator = TSSComparator(array_equal=True) +while warm_step_start <= step_end_dt: + path_init = prev_settings.output_dir + + settings_warmstart = self.setoptions( + self.settings_files['warm'], + opts_to_unset=modules_to_unset, + vars_to_set={ + 'StepStart': warm_step_start.strftime('%d/%m/%Y %H:%M'), + 'StepEnd': warm_step_end.strftime('%d/%m/%Y %H:%M'), + 'LZAvInflowMap': lzavin_path, + 'PathOut': path_out, + 'PathInit': path_init, + 'timestepInit': timestep_init, + 'AvgDis': avgdis_path, + 'ReportSteps': report_steps, + 'DtSec': dt_sec} + ) + # ** execute + lisfloodexe(settings_warmstart) +``` + +5. At the end of each warm run, compare current warm run output with values from long run, at the specific timestep. Values must be equal. +```python +# ****** compare ******* +timestep_dt = settings_warmstart.step_end_dt # NetCDFComparator takes datetime.datetime as timestep +timestep = settings_warmstart.step_end_int +nc_comparator.compare_dirs(path_out, path_out_reference, timestep=timestep_dt) +tss_comparator.compare_dirs(path_out, path_out_reference, timestep=timestep) +``` + +**Note**: test doesn't check results at each warm run output but only every of steps in order to speed up a bit. + + +### Testing Sub Catchments + +Run a simulation on entire domain (e.g. Po basin), then run one subcatchment for the same period of time. +Compare all state maps. Results must be identical. + +**Important note:** Since water abastraction modules are introducing incongruities in subcatchments, +we've added a test that assert that values are different between the two identical runs when +water demand modules are activated (e.g. `wateruse=1` and `groundwatersmooth=1`). + +This test demonstrates that wateruse module introduces incongruities between running the model on subcatchments and on the entire domain. + + +|Test case | DtSec | Simulation period | Expected | +|-------------------------------------------------------|-------|------------------------------------|--------------------------------| +| test_subcacthment_daily | 86400 |02/01/2016 06:00 - 30/03/2016 06:00 | all netcdf are array equal | +| test_subcacthment_6h | 21600 |01/03/2016 06:00 - 30/03/2016 06:00 | all netcdf are array equal | +| test_subcacthment_daily_wateruse_groundwatersmooth_OFF| 86400 |02/01/2016 06:00 - 30/01/2016 06:00 | all netcdf are array equal | +| test_subcacthment_daily_wateruse_groundwatersmooth_ON | 86400 |02/01/2016 06:00 - 30/01/2016 06:00 | the results are not identical | + +**Note:** This test doesn't use a reference dataset so it's not a black-box test. It ensures that simulations on domain and its subdomains are equivalent. + + +#### Implementation +[test_subcatchments.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_subcatchments.py){:target="_blank"} + +```python +settings_files = { + 'cold': os.path.join(os.path.dirname(__file__), 'data/LF_ETRS89_UseCase/settings/cold.xml'), +} +modules_to_unset = [ + 'wateruse', + 'useWaterDemandAveYear', + 'wateruseRegion', + 'TransientWaterDemandChange', +] +modules_to_unsetGW= [ + 'groundwaterSmooth', +] + +def test_subcacthment_daily(self): + step_start = '02/01/2016 06:00' + step_end = '30/03/2016 06:00' + dt_sec = 86400 + report_steps = '3650..4100' + self.run_subcathmenttest_by_dtsec(dt_sec, step_end, step_start, report_steps=report_steps) + +def test_subcacthment_daily_wateruse_groundwatersmooth_ON(self): + step_start = '02/01/2016 06:00' + step_end = '30/01/2016 06:00' + dt_sec = 86400 + report_steps = '3650..4100' + with pytest.raises(AssertionError) as excinfo: + self.run_subcathmenttest_by_dtsec(dt_sec, step_end, step_start, report_steps=report_steps, wateruse_on=True, groundwatersmooth_off=False) + assert 'Arrays are not equal' in str(excinfo.value) + +``` + +The method `run_subcathmenttest_by_dtsec` executes two cold runs of lisflood: one on domain and one on subdomain, and then compare results using subdomain mask. + +```python +def run_subcathmenttest_by_dtsec(self, dt_sec, step_end, step_start, report_steps='1..9999', wateruse_on=False): + modules_to_unset = self.modules_to_unset if not wateruse_on else [] + modules_to_set = self.modules_to_unset if wateruse_on else [] + # long run entire domain + + path_out_domain = mk_path_out('data/LF_ETRS89_UseCase/out/longrun_domain{}'.format(dt_sec)) + settings_longrun = self.setoptions(self.settings_files['cold'], opts_to_unset=modules_to_unset, + opts_to_set=modules_to_set, + vars_to_set={'StepStart': step_start, + 'StepEnd': step_end, + 'PathOut': path_out_domain, + 'ReportSteps': report_steps, + 'DtSec': dt_sec}) + # ** execute + lisfloodexe(settings_longrun) + + # long run entire on subdomain + path_out_subdomain = mk_path_out('data/LF_ETRS89_UseCase/out/longrun_subdomain{}'.format(dt_sec)) + settings_longrun_subdomain = self.setoptions(self.settings_files['cold'], opts_to_unset=modules_to_unset, + vars_to_set={'StepStart': step_start, + 'StepEnd': step_end, + 'PathOut': path_out_subdomain, + 'ReportSteps': report_steps, + 'MaskMap': '$(PathRoot)/maps/subcatchment_mask.map', + 'DtSec': dt_sec}) + # ** execute + lisfloodexe(settings_longrun_subdomain) + + # ****** compare ******* + # compare using the last maskmap (subcatchment_mask.map) + settings = LisSettings.instance() + nc_comparator = NetCDFComparator(settings.maskpath, array_equal=True) + nc_comparator.compare_dirs(path_out_subdomain, path_out_domain) +``` + +### Testing Inflow + +This test verifies the correct functioning of the option inflow. Uses a catchment with a nested sub-catchment, i.e. a catchment with 2 output points, one upstream of the other. After completing a 1 year model run for the full catchment, the upstream output point is used as inflow point to model the sub-catchment. Only discharge files are compared, differences should be <0.001 m3/s. + +#### Implementation + +[test_inflow.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_inflow.py){:target="_blank"} + + +|Test case | DtSec | Simulation period | Expected | +|---------------------|-------|------------------------------------|--------------------------------------------------------------| +| test_inflow_daily | 86400 |02/01/2016 06:00 - 30/01/2016 06:00 | reference dis.tss and new dis.tss are within tolerances | +| test_inflow_6h | 21600 |01/03/2016 06:00 - 30/03/2016 06:00 | reference dis.tss and new dis.tss are within tolerances | + +### Testing Reference system + +Verifies the correct functioning of the code for projected and geographic coordinate systems + +#### Implementation + +[test_latlon.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_latlon.py){:target="_blank"} + + +|Test case | DtSec | Simulation period | Expected | +|---------------------|-------|------------------------------------|--------------------------------------------------------------| +| test_lat_lon_short | 86400 |01/01/2016 00:00 - 01/02/2016 00:00 | dis_run.tss and reference dis_short.tss are within tolerances| +| test_lat_lon_long | 21600 |02/01/1986 00:00 - 01/01/2018 00:00 | dis_run.tss and reference dis_long.tss are within tolerances | + + +### Testing Caching + +Verifies the use of cached files. It compares the output generated and the number of cached files used. + +#### Implementation + +[test_caching.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_caching.py){:target="_blank"} + + +|Test case | DtSec | Simulation period | Expected | +|---------------------|-------|------------------------------------|--------------------------------------------------------------| +| test_caching_24h | 86400 |30/07/2016 06:00 - 01/08/2016 06:00 | compares output generated with and without cached files | +| test_caching_6h | 21600 |30/07/2016 06:00 - 01/08/2016 06:00 | compares output generated with and without cached files | + +### Testing Chunking + +Verifies chunking files using NetCDFTimeChunks with values `1`, `10`, `auto` and `-1` + +#### Implementation + +[test_chunking.py](https://github.com/ec-jrc/lisflood-code/blob/master/tests/test_chunking.py){:target="_blank"} + + +|Test case | DtSec | Simulation period | Expected | +|---------------------|-------|------------------------------------|--------------------------------------------------------------| +| test_chunking_24h | 86400 |30/07/2016 06:00 - 01/09/2016 06:00 | compares output chunking files with reference files | +| test_chunking_6h | 21600 |30/07/2016 06:00 - 01/09/2016 06:00 | compares output chunking files with reference files | + +## Release test for EFAS and GloFAS + +At each release, in addition to pass all tests described above, OSLisflood is tested also with full domains of EFAS and GLOFAS. +These tests are executed by internal OSLisflood developers when hydrological model is not changed. + + +[🔝](#top) diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 00000000..be226c6a --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gem 'github-pages', group: :jekyll_plugins +gem 'faraday', '< 1.5.1' diff --git a/docs/LICENSE.txt b/docs/LICENSE.txt new file mode 100644 index 00000000..afcb825c --- /dev/null +++ b/docs/LICENSE.txt @@ -0,0 +1,63 @@ +The MIT License (MIT) + +Copyright (c) 2013-2018 Michael Rose and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Minimal Mistakes incorporates icons from [The Noun Project](https://thenounproject.com/) +creators Garrett Knoll, Arthur Shlain, and Tracy Tam. +Icons are distributed under Creative Commons Attribution 3.0 United States (CC BY 3.0 US). + +Minimal Mistakes incorporates [Font Awesome](http://fontawesome.io/), +Copyright (c) 2017 Dave Gandy. +Font Awesome is distributed under the terms of the [SIL OFL 1.1](http://scripts.sil.org/OFL) +and [MIT License](http://opensource.org/licenses/MIT). + +Minimal Mistakes incorporates photographs from [Unsplash](https://unsplash.com). + +Minimal Mistakes incorporates [Susy](http://susy.oddbird.net/), +Copyright (c) 2017, Miriam Eric Suzanne. +Susy is distributed under the terms of the [BSD 3-clause "New" or "Revised" License](https://opensource.org/licenses/BSD-3-Clause). + +Minimal Mistakes incorporates [Breakpoint](http://breakpoint-sass.com/). +Breakpoint is distributed under the terms of the [MIT/GPL Licenses](http://opensource.org/licenses/MIT). + +Minimal Mistakes incorporates [FitVids.js](https://github.com/davatron5000/FitVids.js/), +Copyright (c) 2013 Dave Rubert and Chris Coyier. +FitVids is distributed under the terms of the [WTFPL License](http://sam.zoy.org/wtfpl/). + +Minimal Mistakes incorporates [Magnific Popup](http://dimsemenov.com/plugins/magnific-popup/), +Copyright (c) 2014-2016 Dmitry Semenov, http://dimsemenov.com. +Magnific Popup is distributed under the terms of the MIT License. + +Minimal Mistakes incorporates [jQuery Smooth Scroll](https://github.com/kswedberg/jquery-smooth-scroll), +Copyright (c) 2017 Karl Swedberg. +jQuery Smooth Scroll is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT). + +Minimal Mistakes incorporates [GreedyNav.js](https://github.com/lukejacksonn/GreedyNav), +Copyright (c) 2015 Luke Jackson. +GreedyNav.js is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT). + +Minimal Mistakes incorporates [Jekyll Group-By-Array](https://github.com/mushishi78/jekyll-group-by-array), +Copyright (c) 2015 Max White . +Jekyll Group-By-Array is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT). + +Minimal Mistakes incorporates [Lunr](http://lunrjs.com), +Copyright (c) 2017 Oliver Nightingale. +Lunr is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT). diff --git a/docs/Rakefile b/docs/Rakefile new file mode 100644 index 00000000..921330e6 --- /dev/null +++ b/docs/Rakefile @@ -0,0 +1,76 @@ +require "bundler/gem_tasks" +require "jekyll" +require "listen" + +def listen_ignore_paths(base, options) + [ + /_config\.ya?ml/, + /_site/, + /\.jekyll-metadata/ + ] +end + +def listen_handler(base, options) + site = Jekyll::Site.new(options) + Jekyll::Command.process_site(site) + proc do |modified, added, removed| + t = Time.now + c = modified + added + removed + n = c.length + relative_paths = c.map{ |p| Pathname.new(p).relative_path_from(base).to_s } + print Jekyll.logger.message("Regenerating:", "#{relative_paths.join(", ")} changed... ") + begin + Jekyll::Command.process_site(site) + puts "regenerated in #{Time.now - t} seconds." + rescue => e + puts "error:" + Jekyll.logger.warn "Error:", e.message + Jekyll.logger.warn "Error:", "Run jekyll build --trace for more information." + end + end +end + +task :preview do + base = Pathname.new('.').expand_path + options = { + "source" => base.join('test').to_s, + "destination" => base.join('test/_site').to_s, + "force_polling" => false, + "serving" => true, + "theme" => "minimal-mistakes-jekyll" + } + + options = Jekyll.configuration(options) + + ENV["LISTEN_GEM_DEBUGGING"] = "1" + listener = Listen.to( + base.join("_data"), + base.join("_includes"), + base.join("_layouts"), + base.join("_sass"), + base.join("assets"), + options["source"], + :ignore => listen_ignore_paths(base, options), + :force_polling => options['force_polling'], + &(listen_handler(base, options)) + ) + + begin + listener.start + Jekyll.logger.info "Auto-regeneration:", "enabled for '#{options["source"]}'" + + unless options['serving'] + trap("INT") do + listener.stop + puts " Halting auto-regeneration." + exit 0 + end + + loop { sleep 1000 } + end + rescue ThreadError + # You pressed Ctrl-C, oh my! + end + + Jekyll::Commands::Serve.process(options) +end diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 00000000..806d9cca --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,267 @@ +# Welcome to Jekyll! +# +# This config file is meant for settings that affect your entire site, values +# which you are expected to set up once and rarely need to edit after that. +# For technical reasons, this file is *NOT* reloaded automatically when you use +# `jekyll serve`. If you change this file, please restart the server process. + +# Theme Settings +# +# Review documentation to determine if you should use `theme` or `remote_theme` +# https://mmistakes.github.io/minimal-mistakes/docs/quick-start-guide/#installing-the-theme + +# theme : "minimal-mistakes-jekyll" +# remote_theme : "mmistakes/minimal-mistakes" +theme: jekyll-theme-minimal +minimal_mistakes_skin : "default" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise" + +# Site Settings +locale : "en-US" +title : "LISFLOOD" +title_separator : "-" +name : "JRC D2,E1" +description : "Lisflood User Guide" +url : # the base hostname & protocol for your site e.g. "https://mmistakes.github.io" +baseurl : "/lisflood-code" # the subpath of your site, e.g. "/blog" +repository : # GitHub username/repo-name e.g. "mmistakes/minimal-mistakes" +teaser : # path of fallback teaser image, e.g. "/assets/images/500x300.png" +# breadcrumbs : false # true, false (default) +words_per_minute : 200 +staticman: + allowedFields : # ['name', 'email', 'url', 'message'] + branch : # "master" + commitMessage : # "New comment." + filename : # comment-{@timestamp} + format : # "yml" + moderation : # true + path : # "/_data/comments/{options.slug}" (default) + requiredFields : # ['name', 'email', 'message'] + transforms: + email : # "md5" + generatedFields: + date: + type : # "date" + options: + format : # "iso8601" (default), "timestamp-seconds", "timestamp-milliseconds" + +# Site Author +author: + name : "JRC D2,E1" + avatar : # path of avatar image, e.g. "/assets/images/bio-photo.jpg" + bio : "Index" + location : "" + email : + uri : + home : # null (default), "absolute or relative url to link to author home" + bitbucket : + codepen : + dribbble : + flickr : + facebook : + foursquare : + github : + gitlab : + google_plus : + keybase : + instagram : + lastfm : + linkedin : # "john-doe-12345678" (the last part of your profile url, e.g. https://www.linkedin.com/in/john-doe-12345678) + pinterest : + soundcloud : + stackoverflow : # "123456/username" (the last part of your profile url, e.g. https://stackoverflow.com/users/123456/username) + steam : # "steamId" (the last part of your profile url, e.g. https://steamcommunity.com/id/steamId/) + tumblr : + twitter : + vine : + weibo : + xing : + youtube : # "https://youtube.com/c/MichaelRoseDesign" + + +# Reading Files +include: ["_pages"] +exclude: + - "*.sublime-project" + - "*.sublime-workspace" + - vendor + - .asset-cache + - .bundle + - .jekyll-assets-cache + - .sass-cache + - .idea/ + - assets/js/plugins + - assets/js/_main.js + - assets/js/vendor + - Capfile + - CHANGELOG + - config + - Gemfile + - Gruntfile.js + - gulpfile.js + - LICENSE + - log + - node_modules + - package.json + - Rakefile + - README + - tmp + - /docs # ignore Minimal Mistakes /docs + - /test # ignore Minimal Mistakes /test +keep_files: + - .git + - .svn +encoding: "utf-8" +markdown_ext: "markdown,mkdown,mkdn,mkd,md" + + +# Conversion +markdown: kramdown +highlighter: rouge +lsi: false +excerpt_separator: "\n\n" +incremental: false + + +# Markdown Processing +kramdown: + input: GFM + hard_wrap: false + auto_ids: true + footnote_nr: 1 + entity_output: as_char + toc_levels: 1..3 + smart_quotes: lsquo,rsquo,ldquo,rdquo + enable_coderay: false + + +# Sass/SCSS +sass: + sass_dir: _sass + style: compressed # http://sass-lang.com/documentation/file.SASS_REFERENCE.html#output_style + + +# Outputting +permalink: /:categories/:title/ +#paginate: 5 # amount of posts to show +#paginate_path: /page:num/ +timezone: # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + + +# Plugins (previously gems:) +plugins: + - jekyll-sitemap + +# mimic GitHub Pages with --safe +whitelist: + - jekyll-sitemap + +category_archive: + type: liquid + path: /categories/ +tag_archive: + type: liquid + path: /tags/ + +# HTML Compression +# - http://jch.penibelst.de/ +compress_html: + clippings: all + ignore: + envs: development + + +# Defaults + +defaults: + # _pages + - scope: + path: "" + type: pages + values: + layout: single + author_profile: true + read_time: false + toc: true + toc_sticky: true + comments: # true + share: false + related: false + sidebar: + + - section_title: "Introduction" + items: + - title: "About LISFLOOD" + url: 1_introduction_LISFLOOD + - title: "About this user guide" + url: 1_introduction_usermanual + + - section_title: "Installation" + items: + - title: "Installation and testing" + url: 3_step2_installation + + - section_title: "Step-by-step user guide" + items: + - title: "Step 0: Essential before getting started" + url: 2_ESSENTIAL_setting-file + - title: "Step 1: Time convention within LISFLOOD model" + url: 2_ESSENTIAL_time-management + - title: "Step 2: Preparing the settings file" + url: 3_step3_preparing-setting-file + - title: "Step 3: Preparing input files" + url: 3_step4_preparing-input-files + - title: "Step 4: Initialisation of LISFLOOD" + url: 3_step5_model-initialisation + - title: "Step 5: Running LISFLOOD" + url: 3_step6_running-LISFLOOD + - title: "Step 6: model output" + url: 3_step6_model-output + - title: "Step 7: commmand line flags" + url: 3_step7_commmand-line-flags + + - section_title: "Static maps" + items: + - title: "Introduction" + url: 4_Static-Maps-introduction + - title: "General maps" + url: 4_Static-Maps_general-maps + - title: "Topography maps" + url: 4_Static-Maps_topography + - title: "Land use maps" + url: 4_Static-Maps_land-use + - title: "Land use depending maps" + url: 4_Static-Maps_land-use-depending + - title: "Soil hydraulic properties maps" + url: 4_Static-Maps_soil-hydraulic-properties + - title: "Channel geometry maps" + url: 4_Static-Maps_channel-geometry + - title: "Leaf area index maps" + url: 4_Static-Maps_leaf-area-index + - title: "Reservoirs and lakes maps" + url: 4_Static-Maps_reservoirs-lakes + - title: "Rice calendar maps" + url: 4_Static-Maps_rice-calendar + - title: "Static maps: appendix" + url: 4_Static-Maps_appendix + + - section_title: "Annex" + items: + - title: "LISFLOOD input files" + url: 4_annex_input-files + - title: "LISFLOOD output files" + url: 4_annex_output-files + - title: "LISFLOOD settings and options" + url: 4_annex_settings_and_options + - title: "LISFLOOD state variables" + url: 4_annex_state-variables + - title: "LISFLOOD parameters range and default values" + url: 4_annex_parameters + - title: "LISFLOOD Tests documentation" + url: 4_annex_tests + + - section_title: "Not to forget" + items: + - title: "References" + url: 0_references + - title: "Disclaimer" + url: 0_disclaimer diff --git a/docs/_data/navigation.yml b/docs/_data/navigation.yml new file mode 100644 index 00000000..10c26af7 --- /dev/null +++ b/docs/_data/navigation.yml @@ -0,0 +1,15 @@ +# main links +main: + - section_title: "LISFLOOD" + - title: "Lisflood OS page" + url: https://ec-jrc.github.io/lisflood/ + - title: "Model Documentation" + url: https://ec-jrc.github.io/lisflood-model/ + - title: "User Guide" + url: https://ec-jrc.github.io/lisflood-code/ + - title: "Use Cases" + url: https://github.com/ec-jrc/lisflood-usecases/ + - title: "Utilities" + url: https://github.com/ec-jrc/lisflood-utilities/ + - title: "LISVAP" + url: https://ec-jrc.github.io/lisflood-lisvap/ diff --git a/docs/_data/ui-text.yml b/docs/_data/ui-text.yml new file mode 100644 index 00000000..51692d82 --- /dev/null +++ b/docs/_data/ui-text.yml @@ -0,0 +1,1034 @@ +# User interface text and labels + +# English (default) +# ----------------- +en: &DEFAULT_EN + page : "Page" + pagination_previous : "Previous" + pagination_next : "Next" + breadcrumb_home_label : "Home" + breadcrumb_separator : "/" + menu_label : "Toggle Menu" + toc_label : "On This Page" + ext_link_label : "Direct Link" + less_than : "less than" + minute_read : "minute read" + share_on_label : "Share on" + meta_label : + tags_label : "Tags:" + categories_label : "Categories:" + date_label : "Updated:" + comments_label : "Leave a Comment" + comments_title : "Comments" + more_label : "Learn More" + related_label : "You May Also Enjoy" + follow_label : "Follow:" + feed_label : "Feed" + powered_by : "Powered by" + website_label : "Website" + email_label : "Email" + recent_posts : "Recent Posts" + undefined_wpm : "Undefined parameter words_per_minute at _config.yml" + comment_form_info : "Your email address will not be published. Required fields are marked" + comment_form_comment_label : "Comment" + comment_form_md_info : "Markdown is supported." + comment_form_name_label : "Name" + comment_form_email_label : "Email address" + comment_form_website_label : "Website (optional)" + comment_btn_submit : "Submit Comment" + comment_btn_submitted : "Submitted" + comment_success_msg : "Thanks for your comment! It will show on the site once it has been approved." + comment_error_msg : "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again." + loading_label : "Loading..." + search_placeholder_text : "Enter your search term..." + results_found : "Result(s) found" + back_to_top : "Back to top" +en-US: + <<: *DEFAULT_EN +en-CA: + <<: *DEFAULT_EN +en-GB: + <<: *DEFAULT_EN +en-AU: + <<: *DEFAULT_EN + +# Spanish +# ------- +es: &DEFAULT_ES + page : "Página" + pagination_previous : "Anterior" + pagination_next : "Siguiente" + breadcrumb_home_label : "Inicio" + breadcrumb_separator : "/" + menu_label : + toc_label : "Contenidos" + ext_link_label : "Enlace" + less_than : "menos de" + minute_read : "minuto de lectura" + share_on_label : "Compartir" + meta_label : + tags_label : "Etiquetas:" + categories_label : "Categorías:" + date_label : "Actualizado:" + comments_label : "Comentar" + comments_title : + more_label : "Ver más" + related_label : "Podrías ver también" + follow_label : "Seguir:" + feed_label : "Feed" + powered_by : "Powered by" + website_label : "Sitio web" + email_label : "Email" + recent_posts : "Entradas recientes" + undefined_wpm : "Parametro words_per_minute (Palabras por minuto) no definido en _config.yml" + comment_form_info : "Su dirección de correo no será publicada. Se han resaltado los campos requeridos" + comment_form_comment_label : "Comentario" + comment_form_md_info : "Markdown está soportado." + comment_form_name_label : "Nombre" + comment_form_email_label : "Dirección de E-mail" + comment_form_website_label : "Sitio web (opcional)" + comment_btn_submit : "Enviar Commentario" + comment_btn_submitted : "Enviado" + comment_success_msg : "Gracias por su comentario!, Este se visualizará en el sitio una vez haya sido aprobado" + comment_error_msg : "Lo sentimos, ha ocurrido un error al enviar su comentario. Por favor asegurese que todos los campos han sido diligenciados e intente de nuevo" + loading_label : "Cargando..." +es-ES: + <<: *DEFAULT_ES +es-CO: + <<: *DEFAULT_ES + +# French +# ------ +fr: &DEFAULT_FR + page : "Page" + pagination_previous : "Précédent" + pagination_next : "Suivant" + breadcrumb_home_label : "Accueil" + breadcrumb_separator : "/" + menu_label : + toc_label : "Sur cette page" + ext_link_label : "Lien direct" + less_than : "moins de" + minute_read : "minute de lecture" + share_on_label : "Partager sur" + meta_label : + tags_label : "Tags :" + categories_label : "Catégories :" + date_label : "Mis à jour :" + comments_label : "Laisser un commentaire" + comments_title : + more_label : "Lire plus" + related_label : "Vous pourriez aimer aussi" + follow_label : "Contact" + feed_label : "Flux" + powered_by : "Propulsé par" + website_label : "Site" + email_label : "Email" + recent_posts : "Posts récents" + undefined_wpm : "Le paramètre words_per_minute n'est pas défini dans _config.yml" + comments_title : "Commentaires" + comment_form_info : "Votre adresse email ne sera pas visible. Les champs obligatoires sont marqués" + comment_form_comment_label : "Commentaire" + comment_form_md_info : "Markdown est supporté." + comment_form_name_label : "Nom" + comment_form_email_label : "Adresse mail" + comment_form_website_label : "Site web (optionnel)" + comment_btn_submit : "Envoyer" + comment_btn_submitted : "Envoyé" + comment_success_msg : "Merci pour votre commentaire, il sera visible sur le site une fois approuvé." + comment_error_msg : "Désolé, une erreur est survenue lors de la soumission. Vérifiez que les champs obligatoires ont été remplis et réessayez." + loading_label : "Chargement..." +fr-FR: + <<: *DEFAULT_FR +fr-BE: + <<: *DEFAULT_FR +fr-CH: + <<: *DEFAULT_FR + +# Turkish +# ------- +tr: &DEFAULT_TR + page : "Sayfa" + pagination_previous : "Önceki" + pagination_next : "Sonraki" + breadcrumb_home_label : "Ana Sayfa" + breadcrumb_separator : "/" + menu_label : + toc_label : "İçindekiler" + ext_link_label : "Doğrudan Bağlantı" + less_than : "Şu süreden az: " + minute_read : "dakika tahmini okuma süresi" + share_on_label : "Paylaş" + meta_label : + tags_label : "Etiketler:" + categories_label : "Kategoriler:" + date_label : "Güncelleme tarihi:" + comments_label : "Yorum yapın" + comments_title : "Yorumlar" + more_label : "Daha fazlasını öğrenin" + related_label : "Bunlar ilginizi çekebilir:" + follow_label : "Takip et:" + feed_label : "RSS" + powered_by : "Emeği geçenler: " + website_label : "Web sayfası" + email_label : "E-posta" + recent_posts : "Son yazılar" + undefined_wpm : "_config.yml dosyasında tanımlanmamış words_per_minute parametresi" + comment_form_info : "Email adresiniz gösterilmeyecektir. Zorunlu alanlar işaretlenmiştir" + comment_form_comment_label : "Yorumunuz" + comment_form_md_info : "Markdown desteklenmektedir." + comment_form_name_label : "Adınız" + comment_form_email_label : "Email adresiniz" + comment_form_website_label : "Websiteniz (opsiyonel)" + comment_btn_submit : "Yorum Yap" + comment_btn_submitted : "Gönderildi" + comment_success_msg : "Yorumunuz için teşekkürler! Yorumunuz onaylandıktan sonra sitede gösterilecektir." + comment_error_msg : "Maalesef bir hata oluştu. Lütfen zorunlu olan tüm alanları doldurduğunuzdan emin olun ve sonrasında tekrar deneyin." + loading_label : "Yükleniyor..." +tr-TR: + <<: *DEFAULT_TR + +# Portuguese +# ---------- +pt: &DEFAULT_PT + page : "Página" + pagination_previous : "Anterior" + pagination_next : "Seguinte" + breadcrumb_home_label : "Início" + breadcrumb_separator : "/" + menu_label : + toc_label : "Nesta Página" + ext_link_label : "Link Direto" + less_than : "menos de" + minute_read : "minutos de leitura" + share_on_label : "Partilhar no" + meta_label : + tags_label : "Etiquetas:" + categories_label : "Categorias:" + date_label : "Atualizado:" + comments_label : "Deixe um Comentário" + comments_title : "Comentários" + more_label : "Saber mais" + related_label : "Também pode gostar de" + follow_label : "Siga:" + feed_label : "Feed" + powered_by : "Feito com" + website_label : "Site" + email_label : "Email" + recent_posts : "Artigos Recentes" + undefined_wpm : "Parâmetro words_per_minute não definido em _config.yml" + comment_form_info : "O seu endereço email não será publicado. Os campos obrigatórios estão assinalados" + comment_form_comment_label : "Comentário" + comment_form_md_info : "Markdown é suportado." + comment_form_name_label : "Nome" + comment_form_email_label : "Endereço Email" + comment_form_website_label : "Site (opcional)" + comment_btn_submit : "Sumbeter Comentário" + comment_btn_submitted : "Submetido" + comment_success_msg : "Obrigado pelo seu comentário! Será visível no site logo que aprovado." + comment_error_msg : "Lamento, ocorreu um erro na sua submissão. Por favor verifique se todos os campos obrigatórios estão corretamente preenchidos e tente novamente." + loading_label : "A carregar..." +pt-PT: + <<: *DEFAULT_PT +# Brazilian Portuguese +pt-BR: + page : "Página" + pagination_previous : "Anterior" + pagination_next : "Próxima" + breadcrumb_home_label : "Home" + breadcrumb_separator : "/" + menu_label : + toc_label : "Nesta página" + ext_link_label : "Link direto" + less_than : "menos que" + minute_read : "minuto(s) de leitura" + share_on_label : "Compartilhe em" + meta_label : + tags_label : "Tags:" + categories_label : "Categorias:" + date_label : "Atualizado em:" + comments_label : "Deixe um comentário" + comments_title : + more_label : "Aprenda mais" + related_label : "Talvez você goste também" + follow_label : "Acompanhe em" + feed_label : "Feed" + powered_by : "Feito com" + website_label : "Site" + email_label : "Email" + recent_posts : "Postagens recentes" + undefined_wpm : "Parâmetro indefinido em words_per_minute no _config.yml" + comment_form_info : "Seu email não será publicado. Os campos obrigatórios estão marcados" + comment_form_comment_label : "Comentário" + comment_form_md_info : "Markdown é suportado." + comment_form_name_label : "Nome" + comment_form_email_label : "Email" + comment_form_website_label : "Site (opcional)" + comment_btn_submit : "Enviar Comentário" + comment_btn_submitted : "Enviado" + comment_success_msg : "Obrigado pelo seu comentário! Ele aparecerá no site assim que for aprovado." + comment_error_msg : "Desculpe, ocorreu um erro no envio. Por favor verifique se todos os campos obrigatórios foram preenchidos e tente novamente." + loading_label : "Carregando..." + +# Italian +# ------- +it: &DEFAULT_IT + page : "Pagina" + pagination_previous : "Precedente" + pagination_next : "Prossima" + breadcrumb_home_label : "Home" + breadcrumb_separator : "/" + menu_label : + toc_label : "Indice della pagina" + ext_link_label : "Link" + less_than : "meno di" + minute_read : "minuto/i di lettura" + share_on_label : "Condividi" + meta_label : + tags_label : "Tags:" + categories_label : "Categorie:" + date_label : "Aggiornato:" + comments_label : "Scrivi un commento" + comments_title : + more_label : "Scopri di più" + related_label : "Potrebbe Piacerti Anche" + follow_label : "Segui:" + feed_label : "Feed" + powered_by : "Powered by" + website_label : "Website" + email_label : "Email" + recent_posts : "Articoli Recenti" + undefined_wpm : "Parametro words_per_minute non definito in _config.yml" + comment_form_info : "Il tuo indirizzo email non sarà pubblicato. Sono segnati i campi obbligatori" + comment_form_comment_label : "Commenta" + comment_form_md_info : "Il linguaggio Markdown è supportato" + comment_form_name_label : "Nome" + comment_form_email_label : "Indirizzo email" + comment_form_website_label : "Sito Web (opzionale)" + comment_btn_submit : "Invia commento" + comment_btn_submitted : "Inviato" + comment_success_msg : "Grazie per il tuo commento! Verrà visualizzato nel sito una volta che sarà approvato." + comment_error_msg : "C'è stato un errore con il tuo invio. Assicurati che tutti i campi richiesti siano stati completati e riprova." + loading_label : "Caricamento..." +it-IT: + <<: *DEFAULT_IT + +# Chinese (zh-CN Chinese - China) +# -------------------------------- +zh: &DEFAULT_ZH_HANS + page : "页面" + pagination_previous : "向前" + pagination_next : "向后" + breadcrumb_home_label : "首页" + breadcrumb_separator : "/" + menu_label : "切换菜单" + toc_label : "在本页上" + ext_link_label : "直接链接" + less_than : "少于" + minute_read : "分钟读完" + share_on_label : "分享" + meta_label : + tags_label : "标签:" + categories_label : "分类:" + date_label : "更新时间:" + comments_label : "留下评论" + comments_title : "评论" + more_label : "了解更多" + related_label : "猜您还喜欢" + follow_label : "关注:" + feed_label : "Feed" + powered_by : "技术来自于" + website_label : "网站" + email_label : "电子邮箱" + recent_posts : "最新文章" + undefined_wpm : "_config.yml配置中words_per_minute字段未定义" + comment_form_info : "您的电子邮箱地址并不会被展示。请填写标记为必须的字段。" + comment_form_comment_label : "评论" + comment_form_md_info : "Markdown语法已支持。" + comment_form_name_label : "姓名" + comment_form_email_label : "电子邮箱" + comment_form_website_label : "网站(可选)" + comment_btn_submit : "提交评论" + comment_btn_submitted : "已提交" + comment_success_msg : "感谢您的评论!被批准后它会立即在此站点展示。" + comment_error_msg : "很抱歉,您的提交存在错误。请确保所有必填字段都已填写正确,然后再试一次。" + loading_label : "正在加载..." +zh-CN: + <<: *DEFAULT_ZH_HANS +zh-SG: + <<: *DEFAULT_ZH_HANS +# Taiwan (Traditional Chinese) +zh-TW: &DEFAULT_ZH_HANT + page : "頁面" + pagination_previous : "較舊" + pagination_next : "較新" + breadcrumb_home_label : "首頁" + breadcrumb_separator : "/" + menu_label : "切換選單" + toc_label : "本頁" + ext_link_label : "外部連結" + less_than : "少於" + minute_read : "分鐘閱讀" + share_on_label : "分享到" + meta_label : + tags_label : "標籤:" + categories_label : "分類:" + date_label : "更新時間:" + comments_label : "留言" + comments_title : "留言內容" + more_label : "了解更多" + related_label : "猜您有與趣" + follow_label : "追蹤:" + feed_label : "RSS Feed" + powered_by : "Powered by" + website_label : "網站" + email_label : "電子信箱" + recent_posts : "最新文章" + undefined_wpm : "_config.yml 中未定義 words_per_minute" + comment_form_info : "您的電子信箱不會被公開. 必填部份已標記" + comment_form_comment_label : "留言內容" + comment_form_md_info : "支援Markdown語法。" + comment_form_name_label : "名字" + comment_form_email_label : "電子信箱帳號" + comment_form_website_label : "網頁 (可選填)" + comment_btn_submit : "送出留言" + comment_btn_submitted : "已送出" + comment_success_msg : "感謝您的留言! 審核後將會顯示在站上。" + comment_error_msg : "抱歉,部份資料輸入有問題。請確認資料填寫正確後再試一次。" + loading_label : "載入中..." +zh-HK: + <<: *DEFAULT_ZH_HANT + +# German / Deutsch +# ---------------- +de: &DEFAULT_DE + page : "Seite" + pagination_previous : "Vorherige" + pagination_next : "Nächste" + breadcrumb_home_label : "Start" + breadcrumb_separator : "/" + menu_label : "Menü ein-/ausschalten" + toc_label : "Auf dieser Seite" + ext_link_label : "Direkter Link" + less_than : "weniger als" + minute_read : "Minuten zum lesen" + share_on_label : "Teilen auf" + meta_label : + tags_label : "Tags:" + categories_label : "Kategorien:" + date_label : "Aktualisiert:" + comments_label : "Hinterlassen Sie einen Kommentar" + comments_title : "Kommentare" + more_label : "Mehr anzeigen" + related_label : "Ihnen gefällt vielleicht auch" + follow_label : "Folgen:" + feed_label : "Feed" + powered_by : "Möglich durch" + website_label : "Webseite" + email_label : "E-Mail" + recent_posts : "Aktuelle Beiträge" + undefined_wpm : "Undefinierter Parameter words_per_minute in _config.yml" + comment_form_info : "Ihre E-Mail Adresse wird nicht veröffentlicht. Benötigte Felder sind markiert" + comment_form_comment_label : "Kommentar" + comment_form_md_info : "Markdown wird unterstützt." + comment_form_name_label : "Name" + comment_form_email_label : "E-Mail-Addresse" + comment_form_website_label : "Webseite (optional)" + comment_btn_submit : "Kommentar absenden" + comment_btn_submitted : "Versendet" + comment_success_msg : "Danke für Ihren Kommentar! Er wird auf der Seite angezeigt, nachdem er geprüft wurde." + comment_error_msg : "Entschuldigung, es gab einen Fehler. Bitte füllen Sie alle benötigten Felder aus und versuchen Sie es erneut." + loading_label : "Lade..." + search_placeholder_text : "Suchbegriff eingeben..." + results_found : "Ergebnis(se) gefunden" +de-DE: + <<: *DEFAULT_DE +de-AT: + <<: *DEFAULT_DE +de-CH: + <<: *DEFAULT_DE +de-BE: + <<: *DEFAULT_DE +de-LI: + <<: *DEFAULT_DE +de-LU: + <<: *DEFAULT_DE + +# Nepali (Nepal) +# -------------- +ne: &DEFAULT_NE + page : "पृष्‍ठ" + pagination_previous : "अघिल्लो" + pagination_next : "अर्को" + breadcrumb_home_label : "गृह" + breadcrumb_separator : "/" + menu_label : "टगल मेनु" + toc_label : "यो पृष्‍ठमा" + ext_link_label : "सिधा सम्पर्क" + less_than : "कम्तिमा" + minute_read : "मिनेट पढ्नुहोस्" + share_on_label : "शेयर गर्नुहोस्" + meta_label : + tags_label : "ट्यागहरू:" + categories_label : "वर्गहरु:" + date_label : "अद्यावधिक:" + comments_label : "टिप्पणी दिनुहोस्" + comments_title : "टिप्पणीहरू" + more_label : "अझै सिक्नुहोस्" + related_label : "तपाईं रुचाउन सक्नुहुन्छ " + follow_label : "पछ्याउनुहोस्:" + feed_label : "फिड" + powered_by : "Powered by" + website_label : "वेबसाइट" + email_label : "इमेल" + recent_posts : "ताजा लेखहरु" + undefined_wpm : "अपरिभाषित प्यारामिटर शब्दहरू_प्रति_मिनेट at _config.yml" + comment_form_info : "तपाइँको इमेल ठेगाना प्रकाशित गरिने छैन।आवश्यक जानकारीहरुमा चिन्ह लगाइको छ" + comment_form_comment_label : "टिप्पणी" + comment_form_md_info : "मार्कडाउन समर्थित छ।" + comment_form_name_label : "नाम" + comment_form_email_label : "इमेल ठेगाना" + comment_form_website_label : "वेबसाइट (वैकल्पिक)" + comment_btn_submit : "टिप्पणी दिनुहोस् " + comment_btn_submitted : "टिप्पणी भयो" + comment_success_msg : "तपाईंको टिप्पणीको लागि धन्यवाद! एक पटक यो अनुमोदन गरेपछी यो साइटमा देखाउनेछ।" + comment_error_msg : "माफ गर्नुहोस्, तपाईंको टिप्पणी त्रुटि थियो।सबै आवश्यक जानकारीहरु पूरा गरिएको छ भने निश्चित गर्नुहोस् र फेरि प्रयास गर्नुहोस्।" + loading_label : "लोड हुँदैछ ..." +ne-NP: + <<: *DEFAULT_NE + +# Korean +# ------ +ko: &DEFAULT_KO + page : "페이지" + pagination_previous : "이전" + pagination_next : "다음" + breadcrumb_home_label : "Home" + breadcrumb_separator : "/" + menu_label : "토글 메뉴" + toc_label : "On This Page" + ext_link_label : "직접 링크" + less_than : "최대" + minute_read : "분 소요" + share_on_label : "공유하기" + meta_label : + tags_label : "태그:" + categories_label : "카테고리:" + date_label : "업데이트:" + comments_label : "댓글남기기" + comments_title : "댓글" + more_label : "더 보기" + related_label : "참고" + follow_label : "팔로우:" + feed_label : "피드" + powered_by : "Powered by" + website_label : "웹사이트" + email_label : "이메일" + recent_posts : "최근 포스트" + undefined_wpm : "Undefined parameter words_per_minute at _config.yml" + comment_form_info : "이메일은 공개되지 않습니다. 작성 필요 필드:" + comment_form_comment_label : "댓글" + comment_form_md_info : "마크다운을 지원합니다." + comment_form_name_label : "이름" + comment_form_email_label : "이메일" + comment_form_website_label : "웹사이트(선택사항)" + comment_btn_submit : "댓글 등록" + comment_btn_submitted : "등록됨" + comment_success_msg : "감사합니다! 댓글이 머지된 후 확인하실 수 있습니다." + comment_error_msg : "댓글 등록에 문제가 있습니다. 필요 필드를 작성했는지 확인하고 다시 시도하세요." + loading_label : "로딩중..." +ko-KR: + <<: *DEFAULT_KO + +# Russian / Русский +# ----------------- +ru: &DEFAULT_RU + page : "Страница" + pagination_previous : "Предыдущая" + pagination_next : "Следующая" + breadcrumb_home_label : "Главная" + breadcrumb_separator : "/" + menu_label : "Выпадающее меню" + toc_label : "Содержание" + ext_link_label : "Прямая ссылка" + less_than : "менее" + minute_read : "мин на чтение" + share_on_label : "Поделиться" + meta_label : + tags_label : "Метки:" + categories_label : "Разделы:" + date_label : "Дата изменения:" + comments_label : "Оставить комментарий" + comments_title : "Комментарии" + more_label : "Читать далее" + related_label : "Вам также может понравиться" + follow_label : "Связаться со мной:" + feed_label : "RSS-лента" + powered_by : "Сайт работает на" + website_label : "Сайт" + email_label : "Электронная почта" + recent_posts : "Свежие записи" + undefined_wpm : "Не определён параметр words_per_minute в _config.yml" + comment_form_info : "Ваш адрес электронной почты не будет опубликован. Обязательные поля помечены" + comment_form_comment_label : "Комментарий" + comment_form_md_info : "Поддерживается синтаксис Markdown." + comment_form_name_label : "Имя" + comment_form_email_label : "Электронная почта" + comment_form_website_label : "Ссылка на сайт (необязательно)" + comment_btn_submit : "Оставить комментарий" + comment_btn_submitted : "Отправлено" + comment_success_msg : "Спасибо за Ваш комментарий! Он будет опубликован на сайте после проверки." + comment_error_msg : "К сожалению, произошла ошибка с отправкой комментария. Пожалуйста, убедитесь, что все обязательные поля заполнены и попытайтесь снова." + loading_label : "Отправка..." + search_placeholder_text : "Введите поисковый запрос..." + results_found : "Найдено" +ru-RU: + <<: *DEFAULT_RU + +# Lithuanian / Lietuviškai +# ------------------------ +lt: &DEFAULT_LT + page : "Puslapis" + pagination_previous : "Ankstesnis" + pagination_next : "Sekantis" + breadcrumb_home_label : "Pagrindinis" + breadcrumb_separator : "/" + menu_label : "Meniu rodymas" + toc_label : "Turinys" + ext_link_label : "Tiesioginė nuoroda" + less_than : "mažiau nei" + minute_read : "min. skaitymo" + share_on_label : "Pasidalinti" + meta_label : + tags_label : "Žymės:" + categories_label : "Kategorijos:" + date_label : "Atnaujinta:" + comments_label : "Palikti komentarą" + comments_title : "Komentaras" + more_label : "Skaityti daugiau" + related_label : "Taip pat turėtų patikti" + follow_label : "Sekti:" + feed_label : "Šaltinis" + powered_by : "Sukurta su" + website_label : "Tinklapis" + email_label : "El. paštas" + recent_posts : "Naujausi įrašai" + undefined_wpm : "Nedeklaruotas parametras words_per_minute faile _config.yml" + comment_form_info : "El. pašto adresas nebus viešinamas. Būtini laukai pažymėti." + comment_form_comment_label : "Komentaras" + comment_form_md_info : "Markdown palaikomas." + comment_form_name_label : "Vardas" + comment_form_email_label : "El. paštas" + comment_form_website_label : "Tinklapis (nebūtina)" + comment_btn_submit : "Komentuoti" + comment_btn_submitted : "Įrašytas" + comment_success_msg : "Ačiū už komentarą! Jis bus parodytas kai bus patvirtintas." + comment_error_msg : "Atleiskite, įvyko netikėta klaida įrašant komentarą. Pasitikrinkite ar užpildėte visus būtinus laukus ir pamėginkite dar kartą." + loading_label : "Kraunama..." +lt-LT: + <<: *DEFAULT_LT + +# Greek +# ----- +gr: &DEFAULT_GR + page : "Σελίδα" + pagination_previous : "Προηγούμενo" + pagination_next : "Επόμενo" + breadcrumb_home_label : "Αρχική" + breadcrumb_separator : "/" + menu_label : "Μενού" + toc_label : "Περιεχόμενα" + ext_link_label : "Εξωτερικός Σύνδεσμος" + less_than : "Λιγότερο από" + minute_read : "λεπτά ανάγνωσης" + share_on_label : "Μοιραστείτε το" + meta_label : + tags_label : "Ετικέτες:" + categories_label : "Κατηγορίες:" + date_label : "Ενημερώθηκε:" + comments_label : "Αφήστε ένα σχόλιο" + comments_title : "Σχόλια" + more_label : "Διάβαστε περισσότερα" + related_label : "Σχετικές αναρτήσεις" + follow_label : "Ακολουθήστε:" + feed_label : "RSS Feed" + powered_by : "Δημιουργήθηκε με" + website_label : "Ιστοσελίδα" + email_label : "Email" + recent_posts : "Τελευταίες αναρτήσεις" + undefined_wpm : "Δεν έχει οριστεί η παράμετρος words_per_minute στο αρχείο _config.yml" + comment_form_info : "Η διεύθυνση email σας δεν θα δημοσιευθεί. Τα απαιτούμενα πεδία εμφανίζονται με αστερίσκο" + comment_form_comment_label : "Σχόλιο" + comment_form_md_info : "Το πεδίο υποστηρίζει Markdown." + comment_form_name_label : "Όνομα" + comment_form_email_label : "Διεύθυνση email" + comment_form_website_label : "Ιστοσελίδα (προαιρετικό)" + comment_btn_submit : "Υπόβαλε ένα σχόλιο" + comment_btn_submitted : "Έχει υποβληθεί" + comment_success_msg : "Ευχαριστούμε για το σχόλιό σας! Θα εμφανιστεί στην ιστοσελίδα αφού εγκριθεί." + comment_error_msg : "Λυπούμαστε, παρουσιάστηκε σφάλμα με την υποβολή σας. Παρακαλούμε βεβαιωθείτε ότι έχετε όλα τα απαιτούμενα πεδία συμπληρωμένα και δοκιμάστε ξανά." + loading_label : "Φόρτωση..." + search_placeholder_text : "Εισάγετε όρο αναζήτησης..." + results_found : "Αποτελέσματα" +gr-GR: + <<: *DEFAULT_GR + +# Swedish +# ------- +sv: &DEFAULT_SV + page : "Sidan" + pagination_previous : "Föregående" + pagination_next : "Nästa" + breadcrumb_home_label : "Hem" + breadcrumb_separator : "/" + menu_label : "Meny ridå" + toc_label : "På denna sida" + ext_link_label : "Direkt länk" + less_than : "mindre än" + minute_read : "minut läsning" + share_on_label : "Dela på" + meta_label : + tags_label : "Taggar:" + categories_label : "Kategorier:" + date_label : "Uppdaterades:" + comments_label : "Lämna en kommentar" + comments_title : "Kommentarer" + more_label : "Lär dig mer" + related_label : "Du kanske vill även läsa:" + follow_label : "Följ:" + feed_label : "Flöde" + powered_by : "Framställd med" + website_label : "Webbsida" + email_label : "E-post" + recent_posts : "Senaste inlägg" + undefined_wpm : "Odefinerade parametrar words_per_minute i _config.yml" + comment_form_info : "Din e-post adress kommer inte att publiceras. Obligatoriska fält är markerade." + comment_form_comment_label : "Kommentar" + comment_form_md_info : "Använd Markdown för text-formateringen." + comment_form_name_label : "Namn" + comment_form_email_label : "E-post adress" + comment_form_website_label : "Webdsida (valfritt)" + comment_btn_submit : "Skicka en kommentar" + comment_btn_submitted : "Kommentaren har tagits emot" + comment_success_msg : "Tack för din kommentar! Den kommer att visas på sidan så fort den har godkännts." + comment_error_msg : "Tyvärr det har blivit något fel i en av fälten, se till att du fyller i alla rutor och försök igen." + loading_label : "Laddar..." +sv-SE: + <<: *DEFAULT_SV +sv-FI: + <<: *DEFAULT_SV + +# Dutch +# ----- +nl: &DEFAULT_NL + page : "Pagina" + pagination_previous : "Vorige" + pagination_next : "Volgende" + breadcrumb_home_label : "Home" + breadcrumb_separator : "/" + menu_label : "Wissel Menu" + toc_label : "Op deze pagina" + ext_link_label : "Directe Link" + less_than : "minder dan" + minute_read : "minuut gelezen" + share_on_label : "Deel op" + meta_label : + tags_label : "Labels:" + categories_label : "Categorieën:" + date_label : "Bijgewerkt:" + comments_label : "Laat een reactie achter" + comments_title : "Commentaren" + more_label : "Meer informatie" + related_label : "Bekijk ook eens" + follow_label : "Volg:" + feed_label : "Feed" + powered_by : "Aangedreven door" + website_label : "Website" + email_label : "Email" + recent_posts : "Recente berichten" + undefined_wpm : "Niet gedefinieerde parameter words_per_minute bij _config.yml" + comment_form_info : "Uw e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd" + comment_form_comment_label : "Commentaar" + comment_form_md_info : "Markdown wordt ondersteund." + comment_form_name_label : "Naam" + comment_form_email_label : "E-mailadres" + comment_form_website_label : "Website (optioneel)" + comment_btn_submit : "Commentaar toevoegen" + comment_btn_submitted : "Toegevoegd" + comment_success_msg : "Bedankt voor uw reactie! Het zal op de site worden weergegeven zodra het is goedgekeurd." + comment_error_msg : "Sorry, er is een fout opgetreden bij uw inzending. Zorg ervoor dat alle vereiste velden zijn voltooid en probeer het opnieuw." + loading_label : "Laden..." +nl-BE: + <<: *DEFAULT_NL +nl-NL: + <<: *DEFAULT_NL + +# Indonesian +# ---------- +id: &DEFAULT_ID + page : "Halaman" + pagination_previous : "Kembali" + pagination_next : "Maju" + breadcrumb_home_label : "Home" + breadcrumb_separator : "/" + menu_label : "Menu Toggle" + toc_label : "Pada Halaman Ini" + ext_link_label : "Link langsung" + less_than : "Kurang dari" + minute_read : "Waktu baca" + share_on_label : "Berbagi di" + meta_label : + tags_label : "Golongan:" + categories_label : "Kategori:" + date_label : "Diupdate:" + comments_label : "Tinggalkan komentar" + comments_title : "Komentar" + more_label : "Pelajari lagi" + related_label : "Anda juga akan suka" + follow_label : "Ikuti:" + feed_label : "Feed" + powered_by : "Didukung oleh" + website_label : "Website" + email_label : "Email" + recent_posts : "Posting terbaru" + undefined_wpm : "Parameter terdeskripsi words_per_minute di _config.yml" + comment_form_info : "Email Anda tidak akan dipublish. Kolom yang diperlukan ditandai" + comment_form_comment_label : "Komentar" + comment_form_md_info : "Markdown disupport." + comment_form_name_label : "Nama" + comment_form_email_label : "Alamat email" + comment_form_website_label : "Website (opsional)" + comment_btn_submit : "Submit Komentar" + comment_btn_submitted : "Telah disubmit" + comment_success_msg : "Terimakasih atas komentar Anda! Komentar ini akan tampil setelah disetujui." + comment_error_msg : "Maaf, ada kesalahan pada submisi Anda. Pastikan seluruh kolom sudah dilengkapi dan coba kembali." + loading_label : "Sedang meload..." +id-ID: + <<: *DEFAULT_ID + +# Vietnamese +# ---------- +vi: &DEFAULT_VI + page : "Trang" + pagination_previous : "Trước" + pagination_next : "Sau" + breadcrumb_home_label : "Trang chủ" + breadcrumb_separator : "/" + menu_label : "Menu" + toc_label : "Tại trang này" + ext_link_label : "Đường dẫn trực tiếp" + less_than : "nhỏ hơn" + minute_read : "phút đọc" + share_on_label : "Chia sẻ tại" + meta_label : + tags_label : "Nhãn:" + categories_label : "Chủ đề:" + date_label : "Cập nhật:" + comments_label : "Để lại bình luận" + comments_title : "Bình luận" + more_label : "Mở rộng" + related_label : "Có thể bạn cũng thích" + follow_label : "Theo dõi:" + feed_label : "Feed" + powered_by : "Được hỗ trợ bởi" + website_label : "Website" + email_label : "Email" + recent_posts : "Bài viết mới" + undefined_wpm : "Chưa định nghĩa thông số words_per_minute tại _config.yml" + comment_form_info : "Email của bạn sẽ được giữ bí mật. Các phần bắt buộc được đánh dấu." + comment_form_comment_label : "Bình luận" + comment_form_md_info : "Hỗ trợ Markdown." + comment_form_name_label : "Tên" + comment_form_email_label : "Địa chỉ email" + comment_form_website_label : "Website (không bắt buộc)" + comment_btn_submit : "Gửi bình luận" + comment_btn_submitted : "Đã được gửi" + comment_success_msg : "Cảm ơn bạn đã bình luận! Bình luận sẽ xuất hiện sau khi được duyệt." + comment_error_msg : "Rất tiếc, có lỗi trong việc gửi bình luận. Hãy đảm bảo toàn bộ các phần bắt buộc đã được điền đầy đủ và thử lại." + loading_label : "Đang tải..." +vi-VN: + <<: *DEFAULT_VI + +# Danish +# ------ +da: &DEFAULT_DA + page : "Side" + pagination_previous : "Forrige" + pagination_next : "Næste" + breadcrumb_home_label : "Home" + breadcrumb_separator : "/" + menu_label : "Vis/skjul menu" + toc_label : "På denne side" + ext_link_label : "Direkte link" + less_than : "mindre end" + minute_read : "minutters læsning" + share_on_label : "Del på" + meta_label : + tags_label : "Nøgleord:" + categories_label : "Kategorier:" + date_label : "Opdateret:" + comments_label : "Skriv en kommentar" + comments_title : "Kommentarer" + more_label : "Lær mere" + related_label : "Måske kan du også lide" + follow_label : "Følg:" + feed_label : "Feed" + powered_by : "Drives af" + website_label : "Website" + email_label : "E-mail" + recent_posts : "Seneste indlæg" + undefined_wpm : "Parameteren words_per_minute er ikke defineret i _config.yml" + comment_form_info : "Din e-mail bliver ikke offentliggjort. Obligatoriske felter er markeret" + comment_form_comment_label : "Kommentar" + comment_form_md_info : "Markdown er understøttet." + comment_form_name_label : "Navn" + comment_form_email_label : "E-mail" + comment_form_website_label : "Website (frivillig)" + comment_btn_submit : "Send kommentar" + comment_btn_submitted : "Sendt" + comment_success_msg : "Tak for din kommentar! Den bliver vist på siden, så snart den er godkendt." + comment_error_msg : "Desværre skete der en fejl. Prøv igen, mens du sørger for at alle obligatoriske felter er udfyldt." + loading_label : "Indlæser..." + search_placeholder_text : "Hvad leder du efter..." + results_found : "Resultat(er) fundet" + back_to_top : "Tilbage til toppen" +da-DK: + <<: *DEFAULT_DA + +# Polish +# ------ +pl: &DEFAULT_PL + page : "Strona" + pagination_previous : "Poprzednia" + pagination_next : "Następna" + breadcrumb_home_label : "Strona główna" + breadcrumb_separator : "/" + menu_label : "Przełącz menu" + toc_label : "Spis treści" + ext_link_label : "Link bezpośredni" + less_than : "mniej niż" + minute_read : "minut(y)" + share_on_label : "Udostępnij" + meta_label : + tags_label : "Tagi:" + categories_label : "Kategorie:" + date_label : "Ostatnia aktualizacja:" + comments_label : "Zostaw komentarz" + comments_title : "Komentarze" + more_label : "Dowiedz się więcej" + related_label : "Także może Ci się spodobać" + follow_label : "Śledź:" + feed_label : "Feed" + powered_by : "Powstało dzięki" + website_label : "Strona" + email_label : "Email" + recent_posts : "Najnowsze wpisy" + undefined_wpm : "Parametr words_per_minute nie został zdefiniowany w _config.yml." + comment_form_info : "Twój adres email nie będzie udostępiony. Wymagane pola są oznaczone." + comment_form_comment_label : "Skomentuj" + comment_form_md_info : "Markdown jest wspierany" + comment_form_name_label : "Imię" + comment_form_email_label : "Adres email" + comment_form_website_label : "Strona www (opcjonalna)" + comment_btn_submit : "Skomentuj" + comment_btn_submitted : "Komentarz dodany" + comment_success_msg : "Dziękuję za Twój komentarz! Zostanie dodany po akceptacji." + comment_error_msg : "Niestety wystąpił błąd. Proszę upewnij się, że wszystkie wymagane pola zostały wypełnione i spróbuj ponownie." + loading_label : "Trwa ładowanie strony..." +pl-PL: + <<: *DEFAULT_PL + +# Japanese +# -------- +ja: &DEFAULT_JA + page : "ページ" + pagination_previous : "前へ" + pagination_next : "次へ" + breadcrumb_home_label : "ホーム" + breadcrumb_separator : "/" + menu_label : "メニュー" + toc_label : "目次" + ext_link_label : "リンク" + less_than : + minute_read : + share_on_label : "共有" + meta_label : + tags_label : "タグ:" + categories_label : "カテゴリー:" + date_label : "更新日時:" + comments_label : "コメントする" + comments_title : "コメント" + more_label : "さらに詳しく" + related_label : "関連記事" + follow_label : "フォロー" + feed_label : + powered_by : + website_label : + email_label : + recent_posts : "最近の投稿" + undefined_wpm : "パラメータ words_per_minute が _config.yml で定義されていません" + comment_form_info : "メールアドレスが公開されることはありません。次の印のある項目は必ず入力してください:" + comment_form_comment_label : "コメント" + comment_form_md_info : "Markdown を使用できます" + comment_form_name_label : "名前" + comment_form_email_label : "メールアドレス" + comment_form_website_label : "URL (任意)" + comment_btn_submit : "コメントを送信する" + comment_btn_submitted : "送信しました" + comment_success_msg : "コメントありがとうございます! コメントは承認されるとページに表示されます。" + comment_error_msg : "送信エラーです。必須項目がすべて入力されていることを確認して再送信してください。" + loading_label : "読み込み中..." + search_placeholder_text : "検索キーワードを入力してください..." + results_found : "件" +ja-JP: + <<: *DEFAULT_JA + +# Slovak +# ----------------- +sk: &DEFAULT_SK + page : "Stránka" + pagination_previous : "Predošlá" + pagination_next : "Ďalšia" + breadcrumb_home_label : "Domov" + breadcrumb_separator : "/" + menu_label : "Menu" + toc_label : "Obsah" + ext_link_label : "Priamy odkaz" + less_than : "menej ako" + minute_read : "minút" + share_on_label : "Zdieľaj na" + meta_label : + tags_label : "Tagy:" + categories_label : "Kategórie:" + date_label : "Aktualizované:" + comments_label : "Zanechaj odkaz" + comments_title : "Komentáre" + more_label : "Dozvedieť sa viac" + related_label : "Podobné články" + follow_label : "Sleduj:" + feed_label : "Zoznam" + powered_by : "Stránka vytvorená pomocou" + website_label : "Web stránka" + email_label : "Email" + recent_posts : "Najnovšie príspevky" + undefined_wpm : "Nedefinovaný parameter words_per_minute v _config.yml" + comment_form_info : "Tvoja emailová adresa nebude publikovaná. Požadované polia sú označené" + comment_form_comment_label : "Komentár" + comment_form_md_info : "Markdown je podporovaný." + comment_form_name_label : "Meno" + comment_form_email_label : "Emailová adresa" + comment_form_website_label : "Webstránka (voliteľné)" + comment_btn_submit : "Vlož komentár" + comment_btn_submitted : "Vložený" + comment_success_msg : "Ďakujem za tvoj komentár! Po schválení bude zobrazený na stránke." + comment_error_msg : "Prepáč, pri ukladaní nastala chyba. Ubezpeč sa prosím, že si vyplnil všetky požadované polia a skús znova." + loading_label : "Načítava sa..." + search_placeholder_text : "Zadaj hľadaný výraz..." + results_found : "Nájdených výsledkov" + back_to_top : "Na začiatok stránky" +sk-SK: + <<: *DEFAULT_SK + +# Another locale +# -------------- +# diff --git a/docs/_includes/analytics-providers/custom.html b/docs/_includes/analytics-providers/custom.html new file mode 100644 index 00000000..c34b97ad --- /dev/null +++ b/docs/_includes/analytics-providers/custom.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/docs/_includes/analytics-providers/google-gtag.html b/docs/_includes/analytics-providers/google-gtag.html new file mode 100644 index 00000000..16d0cf17 --- /dev/null +++ b/docs/_includes/analytics-providers/google-gtag.html @@ -0,0 +1,9 @@ + + + diff --git a/docs/_includes/analytics-providers/google-universal.html b/docs/_includes/analytics-providers/google-universal.html new file mode 100644 index 00000000..58d3e515 --- /dev/null +++ b/docs/_includes/analytics-providers/google-universal.html @@ -0,0 +1,10 @@ + diff --git a/docs/_includes/analytics-providers/google.html b/docs/_includes/analytics-providers/google.html new file mode 100644 index 00000000..99412b0e --- /dev/null +++ b/docs/_includes/analytics-providers/google.html @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/docs/_includes/analytics.html b/docs/_includes/analytics.html new file mode 100644 index 00000000..371469f0 --- /dev/null +++ b/docs/_includes/analytics.html @@ -0,0 +1,14 @@ +{% if jekyll.environment == 'production' and site.analytics.provider and page.analytics != false %} + +{% case site.analytics.provider %} +{% when "google" %} + {% include /analytics-providers/google.html %} +{% when "google-universal" %} + {% include /analytics-providers/google-universal.html %} +{% when "google-gtag" %} + {% include /analytics-providers/google-gtag.html %} +{% when "custom" %} + {% include /analytics-providers/custom.html %} +{% endcase %} + +{% endif %} \ No newline at end of file diff --git a/docs/_includes/archive-single.html b/docs/_includes/archive-single.html new file mode 100644 index 00000000..fa550252 --- /dev/null +++ b/docs/_includes/archive-single.html @@ -0,0 +1,38 @@ +{% if post.header.teaser %} + {% capture teaser %}{{ post.header.teaser }}{% endcapture %} +{% else %} + {% assign teaser = site.teaser %} +{% endif %} + +{% if post.id %} + {% assign title = post.title | markdownify | remove: "

" | remove: "

" %} +{% else %} + {% assign title = post.title %} +{% endif %} + +
+
+ {% if include.type == "grid" and teaser %} +
+ +
+ {% endif %} +

+ {% if post.link %} + {{ title }} Permalink + {% else %} + {{ title }} + {% endif %} +

+ {% if post.read_time %} +

{% include read-time.html %}

+ {% endif %} + {% if post.excerpt %}

{{ post.excerpt | markdownify | strip_html | truncate: 160 }}

{% endif %} +
+
\ No newline at end of file diff --git a/docs/_includes/author-profile-custom-links.html b/docs/_includes/author-profile-custom-links.html new file mode 100644 index 00000000..cf86521a --- /dev/null +++ b/docs/_includes/author-profile-custom-links.html @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/docs/_includes/author-profile.html b/docs/_includes/author-profile.html new file mode 100644 index 00000000..bd560f71 --- /dev/null +++ b/docs/_includes/author-profile.html @@ -0,0 +1,263 @@ +{% assign author = page.author | default: page.authors[0] | default: site.author %} +{% assign author = site.data.authors[author] | default: author %} + +
+ + {% if author.avatar %} +
+ {% if author.avatar contains "://" %} + {% assign author_src = author.avatar %} + {% else %} + {% assign author_src = author.avatar | relative_url %} + {% endif %} + + {% if author.home %} + {% if author.home contains "://" %} + {% assign author_link = author.home %} + {% else %} + {% assign author_link = author.home | relative_url %} + {% endif %} + + {{ author.name }} + + {% else %} + {{ author.name }} + {% endif %} +
+ {% endif %} + +
+ {% if author.home %} +

{{ author.name }}

+ {% else %} +

{{ author.name }}

+ {% endif %} + {% if author.bio %} +

+ {{ author.bio }} +

+ {% endif %} +
+ +
+ + +
+
diff --git a/docs/_includes/base_path b/docs/_includes/base_path new file mode 100644 index 00000000..36826c4f --- /dev/null +++ b/docs/_includes/base_path @@ -0,0 +1,5 @@ +{% if site.url %} + {% assign base_path = site.url | append: site.baseurl %} +{% else %} + {% assign base_path = site.github.url %} +{% endif %} \ No newline at end of file diff --git a/docs/_includes/breadcrumbs.html b/docs/_includes/breadcrumbs.html new file mode 100644 index 00000000..82fe2cc4 --- /dev/null +++ b/docs/_includes/breadcrumbs.html @@ -0,0 +1,39 @@ +{% case site.category_archive.type %} + {% when "liquid" %} + {% assign path_type = "#" %} + {% when "jekyll-archives" %} + {% assign path_type = nil %} +{% endcase %} + +{% if page.collection != 'posts' %} + {% assign path_type = nil %} + {% assign crumb_path = '/' %} +{% else %} + {% assign crumb_path = site.category_archive.path %} +{% endif %} + + diff --git a/docs/_includes/browser-upgrade.html b/docs/_includes/browser-upgrade.html new file mode 100644 index 00000000..ec6ad0ac --- /dev/null +++ b/docs/_includes/browser-upgrade.html @@ -0,0 +1,3 @@ + diff --git a/docs/_includes/category-list.html b/docs/_includes/category-list.html new file mode 100644 index 00000000..7cffdb76 --- /dev/null +++ b/docs/_includes/category-list.html @@ -0,0 +1,26 @@ +{% case site.category_archive.type %} + {% when "liquid" %} + {% assign path_type = "#" %} + {% when "jekyll-archives" %} + {% assign path_type = nil %} +{% endcase %} + +{% if site.category_archive.path %} + {% comment %} + + + {% endcomment %} + {% capture page_categories %}{% for category in page.categories %}{{ category | downcase }}#{{ category }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} + {% assign category_hashes = page_categories | split: ',' | sort %} + +

+ {{ site.data.ui-text[site.locale].categories_label | default: "Categories:" }} + + {% for hash in category_hashes %} + {% assign keyValue = hash | split: '#' %} + {% capture category_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %} + {% unless forloop.last %}, {% endunless %} + {% endfor %} + +

+{% endif %} \ No newline at end of file diff --git a/docs/_includes/comment.html b/docs/_includes/comment.html new file mode 100644 index 00000000..7b33f46d --- /dev/null +++ b/docs/_includes/comment.html @@ -0,0 +1,22 @@ + diff --git a/docs/_includes/comments-providers/custom.html b/docs/_includes/comments-providers/custom.html new file mode 100644 index 00000000..90993691 --- /dev/null +++ b/docs/_includes/comments-providers/custom.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/docs/_includes/comments-providers/discourse.html b/docs/_includes/comments-providers/discourse.html new file mode 100644 index 00000000..aca62cc8 --- /dev/null +++ b/docs/_includes/comments-providers/discourse.html @@ -0,0 +1,13 @@ +{% if site.comments.discourse.server %} +{% capture canonical %}{% if site.permalink contains '.html' %}{{ page.url | absolute_url }}{% else %}{{ page.url | absolute_url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %} + + +{% endif %} diff --git a/docs/_includes/comments-providers/disqus.html b/docs/_includes/comments-providers/disqus.html new file mode 100644 index 00000000..8cf7acab --- /dev/null +++ b/docs/_includes/comments-providers/disqus.html @@ -0,0 +1,15 @@ +{% if site.comments.disqus.shortname %} + + +{% endif %} diff --git a/docs/_includes/comments-providers/facebook.html b/docs/_includes/comments-providers/facebook.html new file mode 100644 index 00000000..009dc1c6 --- /dev/null +++ b/docs/_includes/comments-providers/facebook.html @@ -0,0 +1,8 @@ +
+ \ No newline at end of file diff --git a/docs/_includes/comments-providers/google-plus.html b/docs/_includes/comments-providers/google-plus.html new file mode 100644 index 00000000..0b4ff6b7 --- /dev/null +++ b/docs/_includes/comments-providers/google-plus.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/docs/_includes/comments-providers/scripts.html b/docs/_includes/comments-providers/scripts.html new file mode 100644 index 00000000..fb3fb79f --- /dev/null +++ b/docs/_includes/comments-providers/scripts.html @@ -0,0 +1,18 @@ +{% if site.comments.provider and page.comments %} +{% case site.comments.provider %} + {% when "disqus" %} + {% include /comments-providers/disqus.html %} + {% when "discourse" %} + {% include /comments-providers/discourse.html %} + {% when "facebook" %} + {% include /comments-providers/facebook.html %} + {% when "google-plus" %} + {% include /comments-providers/google-plus.html %} + {% when "staticman" %} + {% include /comments-providers/staticman.html %} + {% when "staticman_v2" %} + {% include /comments-providers/staticman_v2.html %} + {% when "custom" %} + {% include /comments-providers/custom.html %} +{% endcase %} +{% endif %} \ No newline at end of file diff --git a/docs/_includes/comments-providers/staticman.html b/docs/_includes/comments-providers/staticman.html new file mode 100644 index 00000000..8ff912f2 --- /dev/null +++ b/docs/_includes/comments-providers/staticman.html @@ -0,0 +1,42 @@ +{% if site.repository and site.staticman.branch %} + +{% endif %} \ No newline at end of file diff --git a/docs/_includes/comments-providers/staticman_v2.html b/docs/_includes/comments-providers/staticman_v2.html new file mode 100644 index 00000000..8ff912f2 --- /dev/null +++ b/docs/_includes/comments-providers/staticman_v2.html @@ -0,0 +1,42 @@ +{% if site.repository and site.staticman.branch %} + +{% endif %} \ No newline at end of file diff --git a/docs/_includes/comments.html b/docs/_includes/comments.html new file mode 100644 index 00000000..8709d694 --- /dev/null +++ b/docs/_includes/comments.html @@ -0,0 +1,171 @@ +
+ {% capture comments_label %}{{ site.data.ui-text[site.locale].comments_label | default: "Comments" }}{% endcapture %} + {% case site.comments.provider %} + {% when "discourse" %} +

{{ comments_label }}

+
+ {% when "disqus" %} +

{{ comments_label }}

+
+ {% when "facebook" %} +

{{ comments_label }}

+
+ {% when "google-plus" %} +

{{ comments_label }}

+
Loading Google+ Comments ...
+ + {% endif %} + {% endif %} + + {% when "staticman" %} +
+ {% if site.repository and site.staticman.branch %} + +
+ {% if site.data.comments[page.slug] %} +

{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}

+ {% assign comments = site.data.comments[page.slug] | sort %} + + {% for comment in comments %} + {% assign email = comment[1].email %} + {% assign name = comment[1].name %} + {% assign url = comment[1].url %} + {% assign date = comment[1].date %} + {% assign message = comment[1].message %} + {% include comment.html index=forloop.index email=email name=name url=url date=date message=message %} + {% endfor %} + {% endif %} +
+ + + +
+

{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}

+

{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} *

+
+
+ + {{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }} +
+ +
+ + + +
+
+ + +
+
+ + +
+
+ + +
+ + + + +
+ +
+
+
+ + {% endif %} +
+ {% when "custom" %} +
+ {% endcase %} +
\ No newline at end of file diff --git a/docs/_includes/documents-collection.html b/docs/_includes/documents-collection.html new file mode 100644 index 00000000..13b4006e --- /dev/null +++ b/docs/_includes/documents-collection.html @@ -0,0 +1,19 @@ +{% assign entries = site[include.collection] %} + +{% if include.sort_by == 'title' %} + {% if include.sort_order == 'reverse' %} + {% assign entries = entries | sort: 'title' | reverse %} + {% else %} + {% assign entries = entries | sort: 'title' %} + {% endif %} +{% elsif include.sort_by == 'date' %} + {% if include.sort_order == 'reverse' %} + {% assign entries = entries | sort: 'date' | reverse %} + {% else %} + {% assign entries = entries | sort: 'date' %} + {% endif %} +{% endif %} + +{%- for post in entries -%} + {% include archive-single.html %} +{%- endfor -%} diff --git a/docs/_includes/feature_row b/docs/_includes/feature_row new file mode 100644 index 00000000..89dfc1b4 --- /dev/null +++ b/docs/_includes/feature_row @@ -0,0 +1,53 @@ +{% if include.id %} + {% assign feature_row = page[include.id] %} +{% else %} + {% assign feature_row = page.feature_row %} +{% endif %} + +
+ + {% for f in feature_row %} + + {% if f.url contains "://" %} + {% capture f_url %}{{ f.url }}{% endcapture %} + {% else %} + {% capture f_url %}{{ f.url | relative_url }}{% endcapture %} + {% endif %} + +
+
+ {% if f.image_path %} +
+ {% if f.alt %}{{ f.alt }}{% endif %} + {% if f.image_caption %} + {{ f.image_caption | markdownify | remove: "

" | remove: "

" }}
+ {% endif %} +
+ {% endif %} + +
+ {% if f.title %} +

{{ f.title }}

+ {% endif %} + + {% if f.excerpt %} +
+ {{ f.excerpt | markdownify }} +
+ {% endif %} + + {% if f.url %} +

{{ f.btn_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}

+ {% endif %} +
+
+
+ {% endfor %} + +
\ No newline at end of file diff --git a/docs/_includes/figure b/docs/_includes/figure new file mode 100644 index 00000000..3fb15c0f --- /dev/null +++ b/docs/_includes/figure @@ -0,0 +1,12 @@ +
+ {% if include.alt %}{{ include.alt }}{% endif %} + {% if include.caption %} +
{{ include.caption | markdownify | remove: "

" | remove: "

" }}
+ {% endif %} +
diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html new file mode 100644 index 00000000..3df1ea9c --- /dev/null +++ b/docs/_includes/footer.html @@ -0,0 +1,5 @@ + + diff --git a/docs/_includes/footer/custom.html b/docs/_includes/footer/custom.html new file mode 100644 index 00000000..d512599d --- /dev/null +++ b/docs/_includes/footer/custom.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/docs/_includes/gallery b/docs/_includes/gallery new file mode 100644 index 00000000..ab2fd618 --- /dev/null +++ b/docs/_includes/gallery @@ -0,0 +1,47 @@ +{% if include.id %} + {% assign gallery = page[include.id] %} +{% else %} + {% assign gallery = page.gallery %} +{% endif %} + +{% if gallery.size == 2 %} + {% assign gallery_layout = 'half' %} +{% elsif gallery.size >= 3 %} + {% assign gallery_layout = 'third' %} +{% else %} + {% assign gallery_layout = '' %} +{% endif %} + + \ No newline at end of file diff --git a/docs/_includes/group-by-array b/docs/_includes/group-by-array new file mode 100644 index 00000000..708de41a --- /dev/null +++ b/docs/_includes/group-by-array @@ -0,0 +1,47 @@ + + + +{% assign __empty_array = '' | split: ',' %} +{% assign group_names = __empty_array %} +{% assign group_items = __empty_array %} + + +{% assign __names = include.collection | map: include.field %} + + +{% assign __names = __names | join: ',' | join: ',' | split: ',' %} + + +{% assign __names = __names | sort %} +{% for name in __names %} + + +{% unless name == previous %} + + +{% assign group_names = group_names | push: name %} +{% endunless %} + +{% assign previous = name %} +{% endfor %} + + + +{% for name in group_names %} + + +{% assign __item = __empty_array %} +{% for __element in include.collection %} +{% if __element[include.field] contains name %} +{% assign __item = __item | push: __element %} +{% endif %} +{% endfor %} + + +{% assign group_items = group_items | push: __item %} +{% endfor %} \ No newline at end of file diff --git a/docs/_includes/head.html b/docs/_includes/head.html new file mode 100644 index 00000000..1dfd9599 --- /dev/null +++ b/docs/_includes/head.html @@ -0,0 +1,57 @@ + + +{% include seo.html %} + + + + + + + + + + + + + + + + +{% if site.head_scripts %} + {% for script in site.head_scripts %} + {% if script contains "://" %} + {% capture script_path %}{{ script }}{% endcapture %} + {% else %} + {% capture script_path %}{{ script | relative_url }}{% endcapture %} + {% endif %} + + {% endfor %} +{% endif %} \ No newline at end of file diff --git a/docs/_includes/head/custom.html b/docs/_includes/head/custom.html new file mode 100644 index 00000000..978d84fd --- /dev/null +++ b/docs/_includes/head/custom.html @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/_includes/masthead.html b/docs/_includes/masthead.html new file mode 100644 index 00000000..152519f9 --- /dev/null +++ b/docs/_includes/masthead.html @@ -0,0 +1,42 @@ +
+
{{ site.title }}
+
+ +
+ +
+
+
diff --git a/docs/_includes/nav_list b/docs/_includes/nav_list new file mode 100644 index 00000000..b1d06c30 --- /dev/null +++ b/docs/_includes/nav_list @@ -0,0 +1,47 @@ +{% assign navigation = site.data.navigation[include.nav] %} + + \ No newline at end of file diff --git a/docs/_includes/page__hero.html b/docs/_includes/page__hero.html new file mode 100644 index 00000000..61d4cf41 --- /dev/null +++ b/docs/_includes/page__hero.html @@ -0,0 +1,61 @@ +{% if page.header.image contains "://" %} + {% capture img_path %}{{ page.header.image }}{% endcapture %} +{% else %} + {% capture img_path %}{{ page.header.image | relative_url }}{% endcapture %} +{% endif %} + +{% if page.header.cta_url contains "://" %} + {% capture cta_path %}{{ page.header.cta_url }}{% endcapture %} +{% else %} + {% capture cta_path %}{{ page.header.cta_url | relative_url }}{% endcapture %} +{% endif %} + +{% if page.header.overlay_image contains "://" %} + {% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %} +{% elsif page.header.overlay_image %} + {% capture overlay_img_path %}{{ page.header.overlay_image | relative_url }}{% endcapture %} +{% endif %} + +{% if page.header.overlay_filter contains "rgba" %} + {% capture overlay_filter %}{{ page.header.overlay_filter }}{% endcapture %} +{% elsif page.header.overlay_filter %} + {% capture overlay_filter %}rgba(0, 0, 0, {{ page.header.overlay_filter }}){% endcapture %} +{% endif %} + +{% if page.header.image_description %} + {% assign image_description = page.header.image_description %} +{% else %} + {% assign image_description = page.title %} +{% endif %} + +{% assign image_description = image_description | markdownify | strip_html | strip_newlines | escape_once %} + +
+ {% if page.header.overlay_color or page.header.overlay_image %} +
+

+ {% if paginator and site.paginate_show_page_num %} + {{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %} + {% else %} + {{ page.title | default: site.title | markdownify | remove: "

" | remove: "

" }} + {% endif %} +

+ {% if page.header.show_overlay_excerpt != false and page.excerpt %} +

{{ page.excerpt | markdownify | remove: "

" | remove: "

" }}

+ {% endif %} + {% if site.read_time and page.read_time %} +

{% include read-time.html %}

+ {% endif %} + {% if page.header.cta_url %} +

{{ page.header.cta_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}

+ {% endif %} +
+ {% else %} + {{ image_description }} + {% endif %} + {% if page.header.caption %} + {{ page.header.caption | markdownify | remove: "

" | remove: "

" }}
+ {% endif %} +
diff --git a/docs/_includes/page__hero_video.html b/docs/_includes/page__hero_video.html new file mode 100644 index 00000000..8586a95a --- /dev/null +++ b/docs/_includes/page__hero_video.html @@ -0,0 +1,4 @@ +{% capture video_id %}{{ page.header.video.id }}{% endcapture %} +{% capture video_provider %}{{ page.header.video.provider }}{% endcapture %} + +{% include video id=video_id provider=video_provider %} diff --git a/docs/_includes/page__taxonomy.html b/docs/_includes/page__taxonomy.html new file mode 100644 index 00000000..75c76c81 --- /dev/null +++ b/docs/_includes/page__taxonomy.html @@ -0,0 +1,7 @@ +{% if site.tag_archive.type and page.tags[0] %} + {% include tag-list.html %} +{% endif %} + +{% if site.category_archive.type and page.categories[0] %} + {% include category-list.html %} +{% endif %} \ No newline at end of file diff --git a/docs/_includes/paginator.html b/docs/_includes/paginator.html new file mode 100644 index 00000000..592a2cfc --- /dev/null +++ b/docs/_includes/paginator.html @@ -0,0 +1,69 @@ +{% if paginator.total_pages > 1 %} + +{% endif %} diff --git a/docs/_includes/post_pagination.html b/docs/_includes/post_pagination.html new file mode 100644 index 00000000..a93c6279 --- /dev/null +++ b/docs/_includes/post_pagination.html @@ -0,0 +1,14 @@ +{% if page.previous or page.next %} + +{% endif %} \ No newline at end of file diff --git a/docs/_includes/posts-category.html b/docs/_includes/posts-category.html new file mode 100644 index 00000000..98be3e96 --- /dev/null +++ b/docs/_includes/posts-category.html @@ -0,0 +1,3 @@ +{%- for post in site.categories[include.taxonomy] -%} + {% include archive-single.html %} +{%- endfor -%} diff --git a/docs/_includes/posts-tag.html b/docs/_includes/posts-tag.html new file mode 100644 index 00000000..180a2f31 --- /dev/null +++ b/docs/_includes/posts-tag.html @@ -0,0 +1,3 @@ +{%- for post in site.tags[include.taxonomy] -%} + {% include archive-single.html %} +{%- endfor -%} diff --git a/docs/_includes/read-time.html b/docs/_includes/read-time.html new file mode 100644 index 00000000..df88d529 --- /dev/null +++ b/docs/_includes/read-time.html @@ -0,0 +1,15 @@ +{% assign words_per_minute = site.words_per_minute | default: 200 %} + +{% if post.read_time %} + {% assign words = post.content | strip_html | number_of_words %} +{% elsif page.read_time %} + {% assign words = page.content | strip_html | number_of_words %} +{% endif %} + +{% if words < words_per_minute %} + {{ site.data.ui-text[site.locale].less_than | default: "less than" }} 1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }} +{% elsif words == words_per_minute %} + 1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }} +{% else %} + {{ words | divided_by:words_per_minute }} {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }} +{% endif %} \ No newline at end of file diff --git a/docs/_includes/scripts.html b/docs/_includes/scripts.html new file mode 100644 index 00000000..144c38cb --- /dev/null +++ b/docs/_includes/scripts.html @@ -0,0 +1,28 @@ +{% if site.footer_scripts %} + {% for script in site.footer_scripts %} + {% if script contains "://" %} + {% capture script_path %}{{ script }}{% endcapture %} + {% else %} + {% capture script_path %}{{ script | relative_url }}{% endcapture %} + {% endif %} + + {% endfor %} +{% else %} + + +{% endif %} + +{% if site.search == true or page.layout == "search" %} + {%- assign search_provider = site.search_provider | default: "lunr" -%} + {%- case search_provider -%} + {%- when "lunr" -%} + {% include search/lunr-search-scripts.html %} + {%- when "google" -%} + {% include search/google-search-scripts.html %} + {%- when "algolia" -%} + {% include search/algolia-search-scripts.html %} + {%- endcase -%} +{% endif %} + +{% include analytics.html %} +{% include /comments-providers/scripts.html %} \ No newline at end of file diff --git a/docs/_includes/search/algolia-search-scripts.html b/docs/_includes/search/algolia-search-scripts.html new file mode 100644 index 00000000..1ec021df --- /dev/null +++ b/docs/_includes/search/algolia-search-scripts.html @@ -0,0 +1,54 @@ + + + + + + diff --git a/docs/_includes/search/google-search-scripts.html b/docs/_includes/search/google-search-scripts.html new file mode 100644 index 00000000..4af7423b --- /dev/null +++ b/docs/_includes/search/google-search-scripts.html @@ -0,0 +1,30 @@ + \ No newline at end of file diff --git a/docs/_includes/search/lunr-search-scripts.html b/docs/_includes/search/lunr-search-scripts.html new file mode 100644 index 00000000..574c3900 --- /dev/null +++ b/docs/_includes/search/lunr-search-scripts.html @@ -0,0 +1,10 @@ +{% assign lang = site.locale | slice: 0,2 | default: "en" %} +{% case lang %} +{% when "gr" %} + {% assign lang = "gr" %} +{% else %} + {% assign lang = "en" %} +{% endcase %} + + + \ No newline at end of file diff --git a/docs/_includes/search/search_form.html b/docs/_includes/search/search_form.html new file mode 100644 index 00000000..329c30d1 --- /dev/null +++ b/docs/_includes/search/search_form.html @@ -0,0 +1,18 @@ +
+{%- assign search_provider = site.search_provider | default: "lunr" -%} +{%- case search_provider -%} + {%- when "lunr" -%} + +
+ {%- when "google" -%} +
+ +
+
+ +
+ {%- when "algolia" -%} + +
+{%- endcase -%} +
\ No newline at end of file diff --git a/docs/_includes/seo.html b/docs/_includes/seo.html new file mode 100644 index 00000000..2ac0b649 --- /dev/null +++ b/docs/_includes/seo.html @@ -0,0 +1,166 @@ + +{%- if site.url -%} + {%- assign seo_url = site.url | append: site.baseurl -%} +{%- endif -%} +{%- assign seo_url = seo_url | default: site.github.url -%} + +{% if site.title_separator %} + {% assign title_separator = site.title_separator | default: '-' | replace: '|', '|' %} +{% endif %} + +{%- if page.title -%} + {%- assign seo_title = page.title | append: " " | append: title_separator | append: " " | append: site.title -%} +{%- endif -%} + +{%- if seo_title -%} + {%- assign seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once -%} +{%- endif -%} + +{%- assign canonical_url = page.url | replace: "index.html", "" | absolute_url %} + +{%- assign seo_description = page.description | default: page.excerpt | default: site.description -%} +{%- if seo_description -%} + {%- assign seo_description = seo_description | markdownify | strip_html | strip_newlines | escape_once -%} +{%- endif -%} + +{%- assign author = page.author | default: page.authors[0] | default: site:author -%} +{%- assign author = site.data.authors[author] | default: author -%} + +{%- if author.twitter -%} + {%- assign author_twitter = author.twitter | replace: "@", "" -%} +{%- endif -%} + +{%- assign page_large_image = page.header.og_image | default: page.header.overlay_image | default: page.header.image -%} +{%- unless page_large_image contains '://' -%} + {%- assign page_large_image = page_large_image | absolute_url -%} +{%- endunless -%} +{%- assign page_large_image = page_large_image | escape -%} + +{%- assign page_teaser_image = page.header.teaser | default: site.og_image -%} +{%- unless page_teaser_image contains '://' -%} + {%- assign page_teaser_image = page_teaser_image | absolute_url -%} +{%- endunless -%} +{%- assign page_teaser_image = page_teaser_image | escape -%} + +{%- assign site_og_image = site.og_image -%} +{%- unless site_og_image contains '://' -%} + {%- assign site_og_image = site_og_image | absolute_url -%} +{%- endunless -%} +{%- assign site_og_image = site_og_image | escape -%} + +{%- if page.date -%} + {%- assign og_type = "article" -%} +{%- else -%} + {%- assign og_type = "website" -%} +{%- endif -%} + +{{ seo_title | default: site.title }}{% if paginator %}{% unless paginator.page == 1 %} {{ title_separator }} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}{% endif %} + + +{% if author.name %} + +{% endif %} + + + + + + + +{% if page.excerpt %} + +{% endif %} + +{% if page_large_image %} + +{% elsif page_teaser_image %} + +{% endif %} + +{% if site.twitter.username %} + + + + + + {% if page_large_image %} + + + {% else %} + + {% if page_teaser_image %} + + {% endif %} + {% endif %} + + {% if author_twitter %} + + {% endif %} +{% endif %} + +{% if page.date %} + +{% endif %} + +{% if og_type == "article" and page.last_modified_at %} + +{% endif %} + +{% if site.facebook %} + {% if site.facebook.publisher %} + + {% endif %} + + {% if site.facebook.app_id %} + + {% endif %} +{% endif %} + + + +{% if paginator.previous_page %} + +{% endif %} +{% if paginator.next_page %} + +{% endif %} + +{% if site.og_image %} + +{% endif %} + +{% if site.social %} + +{% endif %} + +{% if site.google_site_verification %} + +{% endif %} +{% if site.bing_site_verification %} + +{% endif %} +{% if site.alexa_site_verification %} + +{% endif %} +{% if site.yandex_site_verification %} + +{% endif %} +{% if site.naver-site-verification %} + +{% endif %} + diff --git a/docs/_includes/sidebar.html b/docs/_includes/sidebar.html new file mode 100644 index 00000000..507443f0 --- /dev/null +++ b/docs/_includes/sidebar.html @@ -0,0 +1,26 @@ +{% if page.sidebar %} + +{% endif %} diff --git a/docs/_includes/social-share.html b/docs/_includes/social-share.html new file mode 100644 index 00000000..10161aa0 --- /dev/null +++ b/docs/_includes/social-share.html @@ -0,0 +1,13 @@ + diff --git a/docs/_includes/tag-list.html b/docs/_includes/tag-list.html new file mode 100644 index 00000000..73f86e28 --- /dev/null +++ b/docs/_includes/tag-list.html @@ -0,0 +1,26 @@ +{% case site.tag_archive.type %} + {% when "liquid" %} + {% assign path_type = "#" %} + {% when "jekyll-archives" %} + {% assign path_type = nil %} +{% endcase %} + +{% if site.tag_archive.path %} + {% comment %} + + + {% endcomment %} + {% capture page_tags %}{% for tag in page.tags %}{{ tag | downcase }}#{{ tag }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} + {% assign tag_hashes = page_tags | split: ',' | sort %} + +

+ {{ site.data.ui-text[site.locale].tags_label | default: "Tags:" }} + + {% for hash in tag_hashes %} + {% assign keyValue = hash | split: '#' %} + {% capture tag_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %} + {% unless forloop.last %}, {% endunless %} + {% endfor %} + +

+{% endif %} \ No newline at end of file diff --git a/docs/_includes/toc b/docs/_includes/toc new file mode 100644 index 00000000..232d033c --- /dev/null +++ b/docs/_includes/toc @@ -0,0 +1,7 @@ + diff --git a/docs/_includes/toc.html b/docs/_includes/toc.html new file mode 100644 index 00000000..27023f71 --- /dev/null +++ b/docs/_includes/toc.html @@ -0,0 +1,75 @@ +{% capture tocWorkspace %} + {%- comment -%} + Version 1.0.2 + + "...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe + + Usage: + {% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %} + + Parameters: + * html (string) - the HTML of compiled markdown generated by kramdown in Jekyll + + Optional Parameters: + * sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC + * class (string) : '' - a CSS class assigned to the TOC + * id (string) : '' - an ID to assigned to the TOC + * h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored + * h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored + + Output: + An unordered list representing the table of contents of a markdown block. This snippet will only generate the table of contents and will NOT output the markdown given to it + {%- endcomment -%} + + {% capture my_toc %}{% endcapture %} + {% assign minHeader = include.h_min | default: 1 %} + {% assign maxHeader = include.h_max | default: 6 %} + {% assign nodes = include.html | split: ' maxHeader %} + {% continue %} + {% endif %} + + {% if firstHeader %} + {% assign firstHeader = false %} + {% assign minHeader = headerLevel %} + {% endif %} + + {% assign indentAmount = headerLevel | minus: minHeader | add: 1 %} + {% assign _workspace = node | split: '' | first }}>{% endcapture %} + {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %} + + {% assign space = '' %} + {% for i in (1..indentAmount) %} + {% assign space = space | prepend: ' ' %} + {% endfor %} + + {% capture my_toc %}{{ my_toc }} +{{ space }}- [{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}](#{{ html_id }}){% endcapture %} + + {% endfor %} + + {% if include.class %} + {% capture my_toc %}{:.{{ include.class }}} +{{ my_toc | lstrip }}{% endcapture %} + {% endif %} + + {% if include.id %} + {% capture my_toc %}{: #{{ include.id }}} +{{ my_toc | lstrip }}{% endcapture %} + {% endif %} +{% endcapture %}{% assign tocWorkspace = '' %}{{ my_toc | markdownify | strip }} \ No newline at end of file diff --git a/docs/_includes/video b/docs/_includes/video new file mode 100644 index 00000000..01b58dda --- /dev/null +++ b/docs/_includes/video @@ -0,0 +1,11 @@ +{% capture video_id %}{{ include.id }}{% endcapture %} +{% capture video_provider %}{{ include.provider }}{% endcapture %} + + +
+{% if video_provider == "vimeo" %} + +{% elsif video_provider == "youtube" %} + +{% endif %} +
diff --git a/docs/_layouts/archive-taxonomy.html b/docs/_layouts/archive-taxonomy.html new file mode 100644 index 00000000..6939122d --- /dev/null +++ b/docs/_layouts/archive-taxonomy.html @@ -0,0 +1,15 @@ +--- +layout: default +author_profile: false +--- + +
+ {% include sidebar.html %} + +
+

{{ page.title }}

+ {% for post in page.posts %} + {% include archive-single.html %} + {% endfor %} +
+
\ No newline at end of file diff --git a/docs/_layouts/archive.html b/docs/_layouts/archive.html new file mode 100644 index 00000000..08beb89a --- /dev/null +++ b/docs/_layouts/archive.html @@ -0,0 +1,26 @@ +--- +layout: default +--- + +{% if page.header.overlay_color or page.header.overlay_image or page.header.image %} + {% include page__hero.html %} +{% elsif page.header.video.id and page.header.video.provider %} + {% include page__hero_video.html %} +{% endif %} + +{% if page.url != "/" and site.breadcrumbs %} + {% unless paginator %} + {% include breadcrumbs.html %} + {% endunless %} +{% endif %} + +
+ {% include sidebar.html %} + +
+ {% unless page.header.overlay_color or page.header.overlay_image %} +

{{ page.title }}

+ {% endunless %} + {{ content }} +
+
\ No newline at end of file diff --git a/docs/_layouts/categories.html b/docs/_layouts/categories.html new file mode 100644 index 00000000..0c7521f3 --- /dev/null +++ b/docs/_layouts/categories.html @@ -0,0 +1,48 @@ +--- +layout: archive +--- + +{{ content }} + +
    + {% assign categories_max = 0 %} + {% for category in site.categories %} + {% if category[1].size > categories_max %} + {% assign categories_max = category[1].size %} + {% endif %} + {% endfor %} + {% for i in (1..categories_max) reversed %} + {% for category in site.categories %} + {% if category[1].size == i %} +
  • + + {{ category[0] }} {{ i }} + +
  • + {% endif %} + {% endfor %} + {% endfor %} +
+ +{% assign categories_max = 0 %} +{% for category in site.categories %} + {% if category[1].size > categories_max %} + {% assign categories_max = category[1].size %} + {% endif %} +{% endfor %} + +{% for i in (1..categories_max) reversed %} + {% for category in site.categories %} + {% if category[1].size == i %} +
+

{{ category[0] }}

+
+ {% for post in category.last %} + {% include archive-single.html type=page.entries_layout %} + {% endfor %} +
+ {{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} ↑ +
+ {% endif %} + {% endfor %} +{% endfor %} diff --git a/docs/_layouts/category.html b/docs/_layouts/category.html new file mode 100644 index 00000000..79b81ce0 --- /dev/null +++ b/docs/_layouts/category.html @@ -0,0 +1,9 @@ +--- +layout: archive +--- + +{{ content }} + +
+ {% include posts-category.html taxonomy=page.taxonomy type=page.entries_layout %} +
diff --git a/docs/_layouts/collection.html b/docs/_layouts/collection.html new file mode 100644 index 00000000..3bcd916a --- /dev/null +++ b/docs/_layouts/collection.html @@ -0,0 +1,9 @@ +--- +layout: archive +--- + +{{ content }} + +
+ {% include documents-collection.html collection=page.collection sort_by=page.sort_by sort_order=page.sort_order type=page.entries_layout %} +
diff --git a/docs/_layouts/compress.html b/docs/_layouts/compress.html new file mode 100644 index 00000000..550fa27b --- /dev/null +++ b/docs/_layouts/compress.html @@ -0,0 +1,10 @@ +--- +# Jekyll layout that compresses HTML +# v3.0.2 +# http://jch.penibelst.de/ +# © 2014–2015 Anatol Broder +# MIT License +--- + +{% capture _LINE_FEED %} +{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "" %}{% endif %}{% unless _pre_before contains "" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " ;; ;" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %}
Step Bytes
raw {{ content | size }}{% if _profile_endings %}
endings {{ _profile_endings }}{% endif %}{% if _profile_startings %}
startings {{ _profile_startings }}{% endif %}{% if _profile_comments %}
comments {{ _profile_comments }}{% endif %}{% if _profile_collapse %}
collapse {{ _profile_collapse }}{% endif %}{% if _profile_clippings %}
clippings {{ _profile_clippings }}{% endif %}
{% endif %}{% endif %} \ No newline at end of file diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html new file mode 100644 index 00000000..b6c2e3a8 --- /dev/null +++ b/docs/_layouts/default.html @@ -0,0 +1,42 @@ +--- +--- + + + + + + {% include head.html %} + {% include head/custom.html %} + + + + + {% include browser-upgrade.html %} + {% include masthead.html %} + +
+ {{ content }} +
+ + {% if site.search == true %} +
+ {% include search/search_form.html %} +
+ {% endif %} + + + + {% include scripts.html %} + + + \ No newline at end of file diff --git a/docs/_layouts/home.html b/docs/_layouts/home.html new file mode 100644 index 00000000..bcce92ab --- /dev/null +++ b/docs/_layouts/home.html @@ -0,0 +1,11 @@ +--- +layout: archive +--- + +

{{ site.data.ui-text[site.locale].recent_posts | default: "Recent Posts" }}

+ +{% for post in paginator.posts %} + {% include archive-single.html %} +{% endfor %} + +{% include paginator.html %} diff --git a/docs/_layouts/posts.html b/docs/_layouts/posts.html new file mode 100644 index 00000000..76d25f9d --- /dev/null +++ b/docs/_layouts/posts.html @@ -0,0 +1,29 @@ +--- +layout: archive +--- + +{{ content }} + + + +{% assign postsByYear = site.posts | group_by_exp: 'post', 'post.date | date: "%Y"' %} +{% for year in postsByYear %} +
+

{{ year.name }}

+
+ {% for post in year.items %} + {% include archive-single.html type=page.entries_layout %} + {% endfor %} +
+ {{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} ↑ +
+{% endfor %} diff --git a/docs/_layouts/search.html b/docs/_layouts/search.html new file mode 100644 index 00000000..c0b8c32c --- /dev/null +++ b/docs/_layouts/search.html @@ -0,0 +1,42 @@ +--- +layout: default +--- + +{% if page.header.overlay_color or page.header.overlay_image or page.header.image %} + {% include page__hero.html %} +{% endif %} + +{% if page.url != "/" and site.breadcrumbs %} + {% unless paginator %} + {% include breadcrumbs.html %} + {% endunless %} +{% endif %} + +
+ {% include sidebar.html %} + +
+ {% unless page.header.overlay_color or page.header.overlay_image %} +

{{ page.title }}

+ {% endunless %} + + {{ content }} + + {%- assign search_provider = site.search_provider | default: "lunr" -%} + {%- case search_provider -%} + {%- when "lunr" -%} + +
+ {%- when "google" -%} +
+ +
+
+ +
+ {%- when "algolia" -%} + +
+ {%- endcase -%} +
+
\ No newline at end of file diff --git a/docs/_layouts/single.html b/docs/_layouts/single.html new file mode 100644 index 00000000..a8d88333 --- /dev/null +++ b/docs/_layouts/single.html @@ -0,0 +1,92 @@ +--- +layout: default +--- + +{% if page.header.overlay_color or page.header.overlay_image or page.header.image %} + {% include page__hero.html %} +{% elsif page.header.video.id and page.header.video.provider %} + {% include page__hero_video.html %} +{% endif %} + +{% if page.url != "/" and site.breadcrumbs %} + {% unless paginator %} + {% include breadcrumbs.html %} + {% endunless %} +{% endif %} + +
+ {% include sidebar.html %} + +
+ {% if page.title %}{% endif %} + {% if page.excerpt %}{% endif %} + {% if page.date %}{% endif %} + {% if page.last_modified_at %}{% endif %} + +
+ + + + + + + + + +
+ {% if page.toc %} + + {% endif %} + {{ content }} + {% if page.link %}{% endif %} +
+ +
+ {% if site.data.ui-text[site.locale].meta_label %} +

{{ site.data.ui-text[site.locale].meta_label }}

+ {% endif %} + {% include page__taxonomy.html %} + {% if page.last_modified_at %} +

{{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}

+ {% elsif page.date %} +

{{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}

+ {% endif %} +
+ + {% if page.share %}{% include social-share.html %}{% endif %} + + {% include post_pagination.html %} +
+ + {% if jekyll.environment == 'production' and site.comments.provider and page.comments %} + {% include comments.html %} + {% endif %} +
+ + {% comment %}{% endcomment %} + {% if page.id and page.related and site.related_posts.size > 0 %} + + {% comment %}{% endcomment %} + {% elsif page.id and page.related %} + + {% endif %} +
diff --git a/docs/_layouts/splash.html b/docs/_layouts/splash.html new file mode 100644 index 00000000..c9cc6998 --- /dev/null +++ b/docs/_layouts/splash.html @@ -0,0 +1,22 @@ +--- +layout: default +--- + +{% if page.header.overlay_color or page.header.overlay_image or page.header.image %} + {% include page__hero.html %} +{% elsif page.header.video.id and page.header.video.provider %} + {% include page__hero_video.html %} +{% endif %} + +
+
+ {% if page.title %}{% endif %} + {% if page.excerpt %}{% endif %} + {% if page.date %}{% endif %} + {% if page.last_modified_at %}{% endif %} + +
+ {{ content }} +
+
+
\ No newline at end of file diff --git a/docs/_layouts/tag.html b/docs/_layouts/tag.html new file mode 100644 index 00000000..5f83c2aa --- /dev/null +++ b/docs/_layouts/tag.html @@ -0,0 +1,9 @@ +--- +layout: archive +--- + +{{ content }} + +
+ {% include posts-tag.html taxonomy=page.taxonomy type=page.entries_layout %} +
diff --git a/docs/_layouts/tags.html b/docs/_layouts/tags.html new file mode 100644 index 00000000..1c0e7023 --- /dev/null +++ b/docs/_layouts/tags.html @@ -0,0 +1,48 @@ +--- +layout: archive +--- + +{{ content }} + +
    + {% assign tags_max = 0 %} + {% for tag in site.tags %} + {% if tag[1].size > tags_max %} + {% assign tags_max = tag[1].size %} + {% endif %} + {% endfor %} + {% for i in (1..tags_max) reversed %} + {% for tag in site.tags %} + {% if tag[1].size == i %} +
  • + + {{ tag[0] }} {{ i }} + +
  • + {% endif %} + {% endfor %} + {% endfor %} +
+ +{% assign tags_max = 0 %} +{% for tag in site.tags %} + {% if tag[1].size > tags_max %} + {% assign tags_max = tag[1].size %} + {% endif %} +{% endfor %} + +{% for i in (1..tags_max) reversed %} + {% for tag in site.tags %} + {% if tag[1].size == i %} +
+

{{ tag[0] }}

+
+ {% for post in tag.last %} + {% include archive-single.html type=page.entries_layout %} + {% endfor %} +
+ {{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} ↑ +
+ {% endif %} + {% endfor %} +{% endfor %} diff --git a/docs/_sass/minimal-mistakes.scss b/docs/_sass/minimal-mistakes.scss new file mode 100644 index 00000000..6522b962 --- /dev/null +++ b/docs/_sass/minimal-mistakes.scss @@ -0,0 +1,40 @@ +/*! + * Minimal Mistakes Jekyll Theme 4.11.2 by Michael Rose + * Copyright 2013-2018 Michael Rose - mademistakes.com | @mmistakes + * Licensed under MIT (https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt) +*/ + +/* Variables */ +@import "minimal-mistakes/variables"; + +/* Mixins and functions */ +@import "minimal-mistakes/vendor/breakpoint/breakpoint"; +@include breakpoint-set("to ems", true); +@import "minimal-mistakes/vendor/magnific-popup/magnific-popup"; // Magnific Popup +@import "minimal-mistakes/vendor/susy/susy"; +@import "minimal-mistakes/mixins"; + +/* Core CSS */ +@import "minimal-mistakes/reset"; +@import "minimal-mistakes/base"; +@import "minimal-mistakes/forms"; +@import "minimal-mistakes/tables"; +@import "minimal-mistakes/animations"; + +/* Components */ +@import "minimal-mistakes/buttons"; +@import "minimal-mistakes/notices"; +@import "minimal-mistakes/masthead"; +@import "minimal-mistakes/navigation"; +@import "minimal-mistakes/footer"; +@import "minimal-mistakes/search"; +@import "minimal-mistakes/syntax"; + +/* Utility classes */ +@import "minimal-mistakes/utilities"; + +/* Layout specific */ +@import "minimal-mistakes/page"; +@import "minimal-mistakes/archive"; +@import "minimal-mistakes/sidebar"; +@import "minimal-mistakes/print"; diff --git a/docs/_sass/minimal-mistakes/_animations.scss b/docs/_sass/minimal-mistakes/_animations.scss new file mode 100644 index 00000000..25ef77fb --- /dev/null +++ b/docs/_sass/minimal-mistakes/_animations.scss @@ -0,0 +1,21 @@ +/* ========================================================================== + ANIMATIONS + ========================================================================== */ + +@-webkit-keyframes intro { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +@keyframes intro { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/_archive.scss b/docs/_sass/minimal-mistakes/_archive.scss new file mode 100644 index 00000000..40d156e2 --- /dev/null +++ b/docs/_sass/minimal-mistakes/_archive.scss @@ -0,0 +1,362 @@ +/* ========================================================================== + ARCHIVE + ========================================================================== */ + +.archive { + margin-bottom: 2em; + + @include breakpoint($large) { + float: right; + width: calc(100% - #{$right-sidebar-width-narrow}); + padding-right: $right-sidebar-width-narrow; + } + + @include breakpoint($x-large) { + width: calc(100% - #{$right-sidebar-width}); + padding-right: $right-sidebar-width; + } +} + +.archive__subtitle { + margin: 1.414em 0 0; + padding-bottom: 0.5em; + font-size: $type-size-5; + color: $muted-text-color; + border-bottom: 1px solid $border-color; + + + .list__item .archive__item-title { + margin-top: 0.5em; + } +} + +.archive__item-title { + margin-bottom: 0.25em; + font-family: $sans-serif-narrow; + line-height: initial; + overflow: hidden; + text-overflow: ellipsis; + + a { + color: inherit; + } + + a + a { + opacity: 0.5; + } +} + +/* remove border*/ +.page__content { + .archive__item-title { + margin-top: 1em; + border-bottom: none; + } +} + +.archive__item-excerpt { + margin-top: 0; + font-size: $type-size-6; + + & + p { + text-indent: 0; + } +} + +.archive__item-teaser { + position: relative; + border-radius: $border-radius; + overflow: hidden; + + img { + width: 100%; + } +} + +.archive__item-caption { + position: absolute; + bottom: 0; + right: 0; + margin: 0 auto; + padding: 2px 5px; + color: #fff; + font-family: $caption-font-family; + font-size: $type-size-8; + background: #000; + text-align: right; + z-index: 5; + opacity: 0.5; + border-radius: $border-radius 0 0 0; + + @include breakpoint($large) { + padding: 5px 10px; + } + + a { + color: #fff; + text-decoration: none; + } +} + +/* + List view + ========================================================================== */ + +.list__item { + .page__meta { + margin: 0 0 4px; + font-size: 0.6em; + } +} + +/* + Grid view + ========================================================================== */ + +.archive { + .grid__wrapper { + /* extend grid elements to the right */ + + @include breakpoint($large) { + margin-right: -1 * $right-sidebar-width-narrow; + } + + @include breakpoint($x-large) { + margin-right: -1 * $right-sidebar-width; + } + } +} + +.grid__item { + margin-bottom: 2em; + + @include breakpoint($small) { + float: left; + width: span(5 of 10); + + &:nth-child(2n + 1) { + clear: both; + margin-left: 0; + } + + &:nth-child(2n + 2) { + clear: none; + margin-left: gutter(of 10); + } + } + + @include breakpoint($medium) { + margin-left: 0; /* override margin*/ + margin-right: 0; /* override margin*/ + width: span(3 of 12); + + &:nth-child(2n + 1) { + clear: none; + } + + &:nth-child(4n + 1) { + clear: both; + } + + &:nth-child(4n + 2) { + clear: none; + margin-left: gutter(1 of 12); + } + + &:nth-child(4n + 3) { + clear: none; + margin-left: gutter(1 of 12); + } + + &:nth-child(4n + 4) { + clear: none; + margin-left: gutter(1 of 12); + } + } + + .page__meta { + margin: 0 0 4px; + font-size: 0.6em; + } + + .archive__item-title { + margin-top: 0.5em; + font-size: $type-size-5; + } + + .archive__item-excerpt { + display: none; + + @include breakpoint($medium) { + display: block; + font-size: $type-size-6; + } + } + + .archive__item-teaser { + @include breakpoint($small) { + max-height: 200px; + } + + @include breakpoint($medium) { + max-height: 120px; + } + } +} + +/* + Features + ========================================================================== */ + +.feature__wrapper { + @include clearfix(); + margin-bottom: 2em; + border-bottom: 1px solid $border-color; +} + +.feature__item { + margin-bottom: 2em; + font-size: 1.25rem; + + @include breakpoint($small) { + float: left; + margin-bottom: 0; + width: span(4 of 12); + + &:nth-child(3n + 1) { + clear: both; + margin-left: 0; + } + + &:nth-child(3n + 2) { + clear: none; + margin-left: gutter(of 12); + } + + &:nth-child(3n + 3) { + clear: none; + margin-left: gutter(of 12); + } + + .feature__item-teaser { + max-height: 200px; + overflow: hidden; + } + } + + &--left { + float: left; + margin-left: 0; + margin-right: 0; + width: 100%; + clear: both; + font-size: 1.25rem; + + .archive__item-teaser { + margin-bottom: 2em; + } + + @include breakpoint($small) { + .archive__item-teaser { + float: left; + width: span(5 of 12); + } + + .archive__item-body { + float: right; + padding-left: gutter(0.5 of 12); + padding-right: gutter(1 of 12); + width: span(7 of 12); + } + } + } + + &--right { + float: left; + margin-left: 0; + margin-right: 0; + width: 100%; + clear: both; + font-size: 1.25rem; + + .archive__item-teaser { + margin-bottom: 2em; + } + + @include breakpoint($small) { + text-align: right; + + .archive__item-teaser { + float: right; + width: span(5 of 12); + } + + .archive__item-body { + float: right; + width: span(7 of 12); + padding-left: gutter(0.5 of 12); + padding-right: gutter(1 of 12); + } + } + } + + &--center { + float: left; + margin-left: 0; + margin-right: 0; + width: 100%; + clear: both; + font-size: 1.25rem; + + .archive__item-teaser { + margin-bottom: 2em; + } + + @include breakpoint($small) { + text-align: center; + + .archive__item-teaser { + margin: 0 auto; + width: span(5 of 12); + } + + .archive__item-body { + margin: 0 auto; + width: span(7 of 12); + } + } + } +} + +/* Place inside an archive layout */ + +.archive { + .feature__wrapper { + .archive__item-title { + margin-top: 0.25em; + font-size: 1em; + } + } + + .feature__item, + .feature__item--left, + .feature__item--center, + .feature__item--right { + font-size: 1em; + } +} + +/* + Wide Pages + ========================================================================== */ + + .wide { + .archive { + @include breakpoint($large) { + padding-right: 0; + } + + @include breakpoint($x-large) { + padding-right: 0; + } + } +} \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/_base.scss b/docs/_sass/minimal-mistakes/_base.scss new file mode 100644 index 00000000..dee2a66f --- /dev/null +++ b/docs/_sass/minimal-mistakes/_base.scss @@ -0,0 +1,365 @@ +/* ========================================================================== + BASE ELEMENTS + ========================================================================== */ + +html { + /* sticky footer fix */ + position: relative; + min-height: 100%; +} +h1[id]::before,h2[id]::before,h3[id]::before { + display: block; + content: " "; + margin-top: -75px; // Set the Appropriate Height + height: 75px; // Set the Appropriate Height + visibility: hidden; +} + +body { + margin: 0; + padding: 0; + color: $text-color; + font-family: $global-font-family; + line-height: 1.5; + + &.overflow--hidden { + /* when primary navigation is visible, the content in the background won't scroll */ + overflow: hidden; + } +} + +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 2em 0 0.5em; + line-height: 1.2; + font-family: $header-font-family; + font-weight: bold; +} + +h1 { + margin-top: 0; + font-size: $type-size-3; +} + +h2 { + font-size: $type-size-4; +} + +h3 { + font-size: $type-size-5; +} + +h4 { + font-size: $type-size-6; +} + +h5 { + font-size: $type-size-6; +} + +h6 { + font-size: $type-size-6; +} + +small, +.small { + font-size: $type-size-6; +} + +p { + margin-bottom: 1.3em; +} + +u, +ins { + text-decoration: none; + border-bottom: 1px solid $text-color; + a { + color: inherit; + } +} + +del a { + color: inherit; +} + +/* reduce orphans and widows when printing */ + +p, +pre, +blockquote, +ul, +ol, +dl, +figure, +table, +fieldset { + orphans: 3; + widows: 3; +} + +/* abbreviations */ + +abbr[title], +abbr[data-original-title] { + text-decoration: none; + cursor: help; + border-bottom: 1px dotted $text-color; +} + +/* blockquotes */ + +blockquote { + margin: 2em 1em 2em 0; + padding-left: 1em; + padding-right: 1em; + font-style: italic; + border-left: 0.25em solid $primary-color; + + cite { + font-style: italic; + + &:before { + content: "\2014"; + padding-right: 5px; + } + } +} + +/* links */ + +a { + &:focus { + @extend %tab-focus; + } + + &:hover, + &:active { + color: $link-color-hover; + outline: 0; + } + + &:visited { + color: $link-color-visited; + } +} + +/* buttons */ + +button:focus { + @extend %tab-focus; +} + +/* code */ + +tt, +code, +kbd, +samp, +pre { + font-family: $monospace; +} + +pre { + overflow-x: auto; /* add scrollbars to wide code blocks*/ +} + +p > code, +a > code, +li > code, +figcaption > code, +td > code { + padding-top: 0.1rem; + padding-bottom: 0.1rem; + font-size: $type-size-6; + background: $code-background-color; + border-radius: $border-radius; + + &:before, + &:after { + letter-spacing: -0.2em; + content: "\00a0"; /* non-breaking space*/ + } +} + +/* horizontal rule */ + +hr { + display: block; + margin: 1em 0; + border: 0; + border-top: 1px solid $border-color; +} + +/* lists */ + +ul li, +ol li { + margin-bottom: 0.5em; +} + +li ul, +li ol { + margin-top: 0.5em; +} + +/* + Media and embeds + ========================================================================== */ + +/* Figures and images */ + +figure { + display: -webkit-box; + display: flex; + -webkit-box-pack: justify; + justify-content: space-between; + -webkit-box-align: start; + align-items: flex-start; + flex-wrap: wrap; + margin: 2em 0; + + img, + iframe, + .fluid-width-video-wrapper { + margin-bottom: 1em; + } + + img { + width: 100%; + border-radius: $border-radius; + -webkit-transition: $global-transition; + transition: $global-transition; + } + + > a { + display: block; + } + + &.half { + > a, + > img { + @include breakpoint($small) { + width: calc(50% - 0.5em); + } + } + + figcaption { + width: 100%; + } + } + + &.third { + > a, + > img { + @include breakpoint($small) { + width: calc(33.3333% - 0.5em); + } + } + + figcaption { + width: 100%; + } + } +} + +/* Figure captions */ + +figcaption { + margin-bottom: 0.5em; + color: $muted-text-color; + font-family: $caption-font-family; + font-size: $type-size-6; + + a { + -webkit-transition: $global-transition; + transition: $global-transition; + + &:hover { + color: $link-color-hover; + } + } +} + +/* Fix IE9 SVG bug */ + +svg:not(:root) { + overflow: hidden; +} + +/* + Navigation lists + ========================================================================== */ + +/** + * Removes margins, padding, and bullet points from navigation lists + * + * Example usage: + * + */ + +nav { + ul { + margin: 0; + padding: 0; + } + + li { + list-style: none; + } + + a { + text-decoration: none; + } + + /* override white-space for nested lists */ + ul li, + ol li { + margin-bottom: 0; + } + + li ul, + li ol { + margin-top: 0; + } +} + +/* + Global animation transition + ========================================================================== */ + +b, +i, +strong, +em, +blockquote, +p, +q, +span, +figure, +img, +h1, +h2, +header, +input, +a, +tr, +td, +form button, +input[type="submit"], +.btn, +.highlight, +.archive__item-teaser { + -webkit-transition: $global-transition; + transition: $global-transition; +} diff --git a/docs/_sass/minimal-mistakes/_buttons.scss b/docs/_sass/minimal-mistakes/_buttons.scss new file mode 100644 index 00000000..6027eac7 --- /dev/null +++ b/docs/_sass/minimal-mistakes/_buttons.scss @@ -0,0 +1,98 @@ +/* ========================================================================== + BUTTONS + ========================================================================== */ + +/* + Default button + ========================================================================== */ + +.btn { + /* default */ + display: inline-block; + margin-bottom: 0.25em; + padding: 0.5em 1em; + font-family: $sans-serif; + font-size: $type-size-6; + font-weight: bold; + text-align: center; + text-decoration: none; + border-width: 0; + border-radius: $border-radius; + cursor: pointer; + + .icon { + margin-right: 0.5em; + } + + .icon + .hidden { + margin-left: -0.5em; /* override for hidden text*/ + } + + /* button colors */ + $buttoncolors: + (primary, $primary-color), + (inverse, #fff), + (light-outline, transparent), + (success, $success-color), + (warning, $warning-color), + (danger, $danger-color), + (info, $info-color), + (facebook, $facebook-color), + (twitter, $twitter-color), + (google-plus, $google-plus-color), + (linkedin, $linkedin-color); + + @each $buttoncolor, $color in $buttoncolors { + &--#{$buttoncolor} { + @include yiq-contrasted($color); + @if ($buttoncolor == inverse) { + border: 1px solid $border-color; + } + @if ($buttoncolor == light-outline) { + border: 1px solid #fff; + } + + &:hover { + @include yiq-contrasted(mix(#000, $color, 20%)); + } + + &:visited { + @include yiq-contrasted($color); + } + } + } + + /* fills width of parent container */ + &--block { + display: block; + width: 100%; + + + .btn--block { + margin-top: 0.25em; + } + } + + /* disabled */ + &--disabled { + pointer-events: none; + cursor: not-allowed; + filter: alpha(opacity=65); + box-shadow: none; + opacity: 0.65; + } + + /* extra large button */ + &--x-large { + font-size: $type-size-4; + } + + /* large button */ + &--large { + font-size: $type-size-5; + } + + /* small button */ + &--small { + font-size: $type-size-7; + } +} \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/_footer.scss b/docs/_sass/minimal-mistakes/_footer.scss new file mode 100644 index 00000000..766c6c72 --- /dev/null +++ b/docs/_sass/minimal-mistakes/_footer.scss @@ -0,0 +1,91 @@ +/* ========================================================================== + FOOTER + ========================================================================== */ + +.page__footer { + @include clearfix; + float: left; + margin-left: 0; + margin-right: 0; + width: 100%; + clear: both; + /* sticky footer fix start */ + position: absolute; + bottom: 0; + height: auto; + /* sticky footer fix end */ + margin-top: 3em; + color: $muted-text-color; + -webkit-animation: $intro-transition; + animation: $intro-transition; + -webkit-animation-delay: 0.45s; + animation-delay: 0.45s; + background-color: $footer-background-color; + + footer { + @include clearfix; + margin-left: auto; + margin-right: auto; + margin-top: 2em; + max-width: 100%; + padding: 0 1em 2em; + + @include breakpoint($x-large) { + max-width: $x-large; + } + } + + a { + color: inherit; + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } + + .fas, + .fab, + .far, + .fal { + color: $muted-text-color; + } +} + +.page__footer-copyright { + font-family: $global-font-family; + font-size: $type-size-7; +} + +.page__footer-follow { + ul { + margin: 0; + padding: 0; + list-style-type: none; + } + + li { + display: inline-block; + padding-top: 5px; + padding-bottom: 5px; + font-family: $sans-serif-narrow; + font-size: $type-size-6; + text-transform: uppercase; + } + + li + li:before { + content: ""; + padding-right: 5px; + } + + a { + padding-right: 10px; + font-weight: bold; + } + + .social-icons { + a { + white-space: nowrap; + } + } +} diff --git a/docs/_sass/minimal-mistakes/_forms.scss b/docs/_sass/minimal-mistakes/_forms.scss new file mode 100644 index 00000000..f9372166 --- /dev/null +++ b/docs/_sass/minimal-mistakes/_forms.scss @@ -0,0 +1,393 @@ +/* ========================================================================== + Forms + ========================================================================== */ + +form { + margin: 0 0 5px 0; + padding: 1em; + background-color: $form-background-color; + + fieldset { + margin-bottom: 5px; + padding: 0; + border-width: 0; + } + + legend { + display: block; + width: 100%; + margin-bottom: 5px * 2; + *margin-left: -7px; + padding: 0; + color: $text-color; + border: 0; + white-space: normal; + } + + p { + margin-bottom: 5px / 2; + } + + ul { + list-style-type: none; + margin: 0 0 5px 0; + padding: 0; + } + + br { + display: none; + } +} + +label, +input, +button, +select, +textarea { + vertical-align: baseline; + *vertical-align: middle; +} + +input, +button, +select, +textarea { + box-sizing: border-box; + font-family: $sans-serif; +} + +label { + display: block; + margin-bottom: 0.25em; + color: $text-color; + cursor: pointer; + + small { + font-size: $type-size-6; + } + + input, + textarea, + select { + display: block; + } +} + +input, +textarea, +select { + display: inline-block; + width: 100%; + padding: 0.25em; + margin-bottom: 0.5em; + color: $text-color; + background-color: $background-color; + border: $border-color; + border-radius: $border-radius; + box-shadow: $box-shadow; +} + +.input-mini { + width: 60px; +} + +.input-small { + width: 90px; +} + +input[type="image"], +input[type="checkbox"], +input[type="radio"] { + width: auto; + height: auto; + padding: 0; + margin: 3px 0; + *margin-top: 0; + line-height: normal; + cursor: pointer; + border-radius: 0; + border: 0 \9; +} + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + padding: 0; + *width: 13px; + *height: 13px; +} + +input[type="image"] { + border: 0; + box-shadow: none; +} + +input[type="file"] { + width: auto; + padding: initial; + line-height: initial; + border: initial; + background-color: transparent; + background-color: initial; + box-shadow: none; +} + +input[type="button"], +input[type="reset"], +input[type="submit"] { + width: auto; + height: auto; + cursor: pointer; + *overflow: visible; +} + +select, +input[type="file"] { + *margin-top: 4px; +} + +select { + width: auto; + background-color: #fff; +} + +select[multiple], +select[size] { + height: auto; +} + +textarea { + resize: vertical; + height: auto; + overflow: auto; + vertical-align: top; +} + +input[type="hidden"] { + display: none; +} + +.form { + position: relative; +} + +.radio, +.checkbox { + padding-left: 18px; + font-weight: normal; +} + +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -18px; +} + +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} + +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; +} + +/* + Disabled state + ========================================================================== */ + +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + opacity: 0.5; + cursor: not-allowed; +} + +/* + Focus & active state + ========================================================================== */ + +input:focus, +textarea:focus { + border-color: $primary-color; + outline: 0; + outline: thin dotted \9; + box-shadow: inset 0 1px 3px rgba($text-color, 0.06), + 0 0 5px rgba($primary-color, 0.7); +} + +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus, +select:focus { + box-shadow: none; +} + +/* + Help text + ========================================================================== */ + +.help-block, +.help-inline { + color: $muted-text-color; +} + +.help-block { + display: block; + margin-bottom: 1em; + line-height: 1em; +} + +.help-inline { + display: inline-block; + vertical-align: middle; + padding-left: 5px; +} + +/* + .form-group + ========================================================================== */ + +.form-group { + margin-bottom: 5px; + padding: 0; + border-width: 0; +} + +/* + .form-inline + ========================================================================== */ + +.form-inline input, +.form-inline textarea, +.form-inline select { + display: inline-block; + margin-bottom: 0; +} + +.form-inline label { + display: inline-block; +} + +.form-inline .radio, +.form-inline .checkbox, +.form-inline .radio { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} + +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-left: 0; + margin-right: 3px; +} + +/* + .form-search + ========================================================================== */ + +.form-search input, +.form-search textarea, +.form-search select { + display: inline-block; + margin-bottom: 0; +} + +.form-search .search-query { + padding-left: 14px; + padding-right: 14px; + margin-bottom: 0; + border-radius: 14px; +} + +.form-search label { + display: inline-block; +} + +.form-search .radio, +.form-search .checkbox, +.form-inline .radio { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} + +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"] { + float: left; + margin-left: 0; + margin-right: 3px; +} + +/* + .form--loading + ========================================================================== */ + +.form--loading:before { + content: ""; +} + +.form--loading .form__spinner { + display: block; +} + +.form:before { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(255, 255, 255, 0.7); + z-index: 10; +} + +.form__spinner { + display: none; + position: absolute; + top: 50%; + left: 50%; + z-index: 11; +} + +/* + Google search form + ========================================================================== */ + +#goog-fixurl { + ul { + list-style: none; + margin-left: 0; + padding-left: 0; + li { + list-style-type: none; + } + } +} + +#goog-wm-qt { + width: auto; + margin-right: 10px; + margin-bottom: 20px; + padding: 8px 20px; + display: inline-block; + font-size: $type-size-6; + background-color: #fff; + color: #000; + border-width: 2px !important; + border-style: solid !important; + border-color: $border-color; + border-radius: $border-radius; +} + +#goog-wm-sb { + @extend .btn; +} diff --git a/docs/_sass/minimal-mistakes/_masthead.scss b/docs/_sass/minimal-mistakes/_masthead.scss new file mode 100644 index 00000000..3317c7fd --- /dev/null +++ b/docs/_sass/minimal-mistakes/_masthead.scss @@ -0,0 +1,83 @@ +/* ========================================================================== + MASTHEAD + ========================================================================== */ + +.masthead { + position: relative; + border-bottom: 1px solid $border-color; + -webkit-animation: $intro-transition; + animation: $intro-transition; + -webkit-animation-delay: 0.15s; + animation-delay: 0.15s; + z-index: 20; + + &__inner-wrap { + @include clearfix; + margin-left: auto; + margin-right: auto; + padding: 1em; + max-width: 100%; + display: -webkit-box; + display: flex; + -webkit-box-pack: justify; + justify-content: space-between; + font-family: $sans-serif-narrow; + + @include breakpoint($x-large) { + max-width: $x-large; + } + + nav { + z-index: 10; + } + + a { + text-decoration: none; + } + } +} + +.site-title { + display: -webkit-box; + display: flex; + padding: 0.5rem 0; + align-self: stretch; + -webkit-box-align: center; + align-items: center; + font-weight: bold; + z-index: 20; +} + +.masthead__menu { + float: left; + margin-left: 0; + margin-right: 0; + width: 100%; + clear: both; + + .site-nav { + margin-left: 0; + + @include breakpoint($small) { + float: right; + } + } + + ul { + margin: 0; + padding: 0; + clear: both; + list-style-type: none; + } +} + +.masthead__menu-item { + display: block; + list-style-type: none; + white-space: nowrap; + + &--lg { + padding-right: 2em; + font-weight: 700; + } +} diff --git a/docs/_sass/minimal-mistakes/_mixins.scss b/docs/_sass/minimal-mistakes/_mixins.scss new file mode 100644 index 00000000..1d221fc8 --- /dev/null +++ b/docs/_sass/minimal-mistakes/_mixins.scss @@ -0,0 +1,92 @@ +/* ========================================================================== + MIXINS + ========================================================================== */ + +%tab-focus { + /* Default*/ + outline: thin dotted $warning-color; + /* Webkit*/ + outline: 5px auto $warning-color; + outline-offset: -2px; +} + +/* + em function + ========================================================================== */ + +@function em($target, $context: $doc-font-size) { + @return ($target / $context) * 1em; +} + + +/* + Bourbon clearfix + ========================================================================== */ + +/* + * Provides an easy way to include a clearfix for containing floats. + * link http://cssmojo.com/latest_new_clearfix_so_far/ + * + * example scss - Usage + * + * .element { + * @include clearfix; + * } + * + * example css - CSS Output + * + * .element::after { + * clear: both; + * content: ""; + * display: table; + * } +*/ + +@mixin clearfix { + clear: both; + + &::after { + clear: both; + content: ""; + display: table; + } +} + +/* + Compass YIQ Color Contrast + https://github.com/easy-designs/yiq-color-contrast + ========================================================================== */ + +@function yiq-is-light( + $color, + $threshold: $yiq-contrasted-threshold +) { + $red: red($color); + $green: green($color); + $blue: blue($color); + + $yiq: (($red*299)+($green*587)+($blue*114))/1000; + + @if $yiq-debug { @debug $yiq, $threshold; } + + @return if($yiq >= $threshold, true, false); +} + +@function yiq-contrast-color( + $color, + $dark: $yiq-contrasted-dark-default, + $light: $yiq-contrasted-light-default, + $threshold: $yiq-contrasted-threshold +) { + @return if(yiq-is-light($color, $threshold), $yiq-contrasted-dark-default, $yiq-contrasted-light-default); +} + +@mixin yiq-contrasted( + $background-color, + $dark: $yiq-contrasted-dark-default, + $light: $yiq-contrasted-light-default, + $threshold: $yiq-contrasted-threshold +) { + background-color: $background-color; + color: yiq-contrast-color($background-color, $dark, $light, $threshold); +} \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/_navigation.scss b/docs/_sass/minimal-mistakes/_navigation.scss new file mode 100644 index 00000000..3c16c3f6 --- /dev/null +++ b/docs/_sass/minimal-mistakes/_navigation.scss @@ -0,0 +1,562 @@ +/* ========================================================================== + NAVIGATION + ========================================================================== */ + +/* + Breadcrumb navigation links + ========================================================================== */ + +.breadcrumbs { + @include clearfix; + margin: 0 auto; + max-width: 100%; + padding-left: 2em; + padding-right: 2em; + font-family: $sans-serif; + -webkit-animation: $intro-transition; + animation: $intro-transition; + -webkit-animation-delay: 0.3s; + animation-delay: 0.3s; + + @include breakpoint($large) { + padding-left: 1em; + padding-right: 1em; + } + + @include breakpoint($x-large) { + max-width: $x-large; + } + + ol { + padding: 0; + list-style: none; + font-size: $type-size-6; + + @include breakpoint($large) { + float: right; + width: span(10 of 12); + } + + @include breakpoint($x-large) { + padding-left: gutter(0.5 of 12); + } + } + + li { + display: inline; + } + + .current { + font-weight: bold; + } +} + +/* + Post pagination navigation links + ========================================================================== */ + +.pagination { + @include clearfix(); + float: left; + margin-top: 1em; + padding-top: 1em; + width: 100%; + + ul { + margin: 0; + padding: 0; + list-style-type: none; + font-family: $sans-serif; + } + + li { + display: block; + float: left; + margin-left: -1px; + + a { + display: block; + margin-bottom: 0.25em; + padding: 0.5em 1em; + font-family: $sans-serif; + font-size: 14px; + font-weight: bold; + line-height: 1.5; + text-align: center; + text-decoration: none; + color: $muted-text-color; + border: 1px solid mix(#000, $border-color, 25%); + border-radius: 0; + + &:hover { + color: $link-color-hover; + } + + &.current, + &.current.disabled { + color: #fff; + background: $primary-color; + } + + &.disabled { + color: rgba($muted-text-color, 0.5); + pointer-events: none; + cursor: not-allowed; + } + } + + &:first-child { + margin-left: 0; + + a { + border-top-left-radius: $border-radius; + border-bottom-left-radius: $border-radius; + } + } + + &:last-child { + a { + border-top-right-radius: $border-radius; + border-bottom-right-radius: $border-radius; + } + } + } + + /* next/previous buttons */ + &--pager { + display: block; + padding: 1em 2em; + float: left; + width: 50%; + font-family: $sans-serif; + font-size: $type-size-5; + font-weight: bold; + text-align: center; + text-decoration: none; + color: $muted-text-color; + border: 1px solid mix(#000, $border-color, 25%); + border-radius: $border-radius; + + &:hover { + @include yiq-contrasted($muted-text-color); + } + + &:first-child { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + &:last-child { + margin-left: -1px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + &.disabled { + color: rgba($muted-text-color, 0.5); + pointer-events: none; + cursor: not-allowed; + } + } +} + +.page__content + .pagination, +.page__meta + .pagination, +.page__share + .pagination, +.page__comments + .pagination { + margin-top: 2em; + padding-top: 2em; + border-top: 1px solid $border-color; +} + +/* + Priority plus navigation + ========================================================================== */ + +.greedy-nav { + position: fixed; + float: left; + top: 0; + width: 100%; + display: -webkit-box; + display: flex; + -webkit-box-align: center; + align-items: stretch; + background: $background-color; + margin-left: -1em; + margin-right: -1em; + + a { + display: block; + margin: 0 1rem; + padding: 0.5rem 0; + color: $masthead-link-color; + text-decoration: none; + + &:hover { + color: $masthead-link-color-hover; + } + + &.site-title { + margin-left: 0; + } + } + + &__toggle { + padding: 0 0.5rem; + align-self: stretch; + border: 0; + outline: none; + color: #fff; + background-color: $primary-color; + cursor: pointer; + } + + .visible-links { + display: -webkit-box; + display: flex; + float: left; + align-items: stretch; + -webkit-box-pack: end; + //justify-content: flex-end; + -webkit-box-flex: 1; + flex: 1; + overflow: auto; + + li { + -webkit-box-flex: 0; + flex: none; + } + + a { + position: relative; + + &:before { + content: ""; + position: absolute; + left: 0; + bottom: 0; + height: 4px; + background: $primary-color; + width: 100%; + -webkit-transition: $global-transition; + transition: $global-transition; + -webkit-transform: scaleX(0) translate3d(0, 0, 0); + transform: scaleX(0) translate3d(0, 0, 0); /* hide*/ + } + + &:hover:before { + -webkit-transform: scaleX(1); + -ms-transform: scaleX(1); + transform: scaleX(1); /* reveal*/ + } + } + } + + .hidden-links { + position: absolute; + top: 100%; + right: 0; + margin-top: 15px; + padding: 5px; + border: 1px solid $border-color; + border-radius: $border-radius; + background: $background-color; + box-shadow: 0 2px 4px 0 rgba(#000, 0.16), 0 2px 10px 0 rgba(#000, 0.12); + + &.hidden { + display: none; + } + + a { + margin: 0; + padding: 10px 20px; + font-size: $type-size-5; + + &:hover { + color: $masthead-link-color-hover; + background: $navicon-link-color-hover; + } + } + + &:before { + content: ""; + position: absolute; + top: -11px; + right: 10px; + width: 0; + border-style: solid; + border-width: 0 10px 10px; + border-color: $border-color transparent; + display: block; + z-index: 0; + } + + &:after { + content: ""; + position: absolute; + top: -10px; + right: 10px; + width: 0; + border-style: solid; + border-width: 0 10px 10px; + border-color: $background-color transparent; + display: block; + z-index: 1; + } + + li { + display: block; + border-bottom: 1px solid $border-color; + + &:last-child { + border-bottom: none; + } + } + } +} + +.no-js { + .greedy-nav { + .visible-links { + -ms-flex-wrap: wrap; + flex-wrap: wrap; + overflow: visible; + } + } +} + +/* + Navigation list + ========================================================================== */ + +.nav__list { + margin-bottom: 1.5em; + + input[type="checkbox"], + label { + display: none; + } + + @include breakpoint(max-width ($large - 1px)) { + label { + position: relative; + display: inline-block; + padding: 0.5em 2.5em 0.5em 1em; + color: $gray; + font-size: $type-size-6; + font-weight: bold; + border: 1px solid $light-gray; + border-radius: $border-radius; + z-index: 20; + -webkit-transition: 0.2s ease-out; + transition: 0.2s ease-out; + cursor: pointer; + + &:before, + &:after { + content: ""; + position: absolute; + right: 1em; + top: 1.25em; + width: 0.75em; + height: 0.125em; + line-height: 1; + background-color: $gray; + -webkit-transition: 0.2s ease-out; + transition: 0.2s ease-out; + } + + &:after { + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + } + + &:hover { + color: #fff; + border-color: $gray; + background-color: mix(white, #000, 20%); + + &:before, + &:after { + background-color: #fff; + } + } + } + + /* selected*/ + input:checked + label { + color: white; + background-color: mix(white, #000, 20%); + + &:before, + &:after { + background-color: #fff; + } + } + + /* on hover show expand*/ + label:hover:after { + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + } + + input:checked + label:hover:after { + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + } + + ul { + margin-bottom: 1em; + } + + a { + display: block; + padding: 0.25em 0; + + @include breakpoint($large) { + padding-top: 0.125em; + padding-bottom: 0.125em; + } + + &:hover { + text-decoration: underline; + } + } + } +} + +.nav__list .nav__items { + margin: 0; + font-size: 1.25rem; + + a { + color: inherit; + } + + .active { + margin-left: -0.5em; + padding-left: 0.5em; + padding-right: 0.5em; + font-weight: bold; + } + + @include breakpoint(max-width ($large - 1px)) { + position: relative; + max-height: 0; + opacity: 0%; + overflow: hidden; + z-index: 10; + -webkit-transition: 0.3s ease-in-out; + transition: 0.3s ease-in-out; + -webkit-transform: translate(0, 10%); + -ms-transform: translate(0, 10%); + transform: translate(0, 10%); + } +} + +@include breakpoint(max-width ($large - 1px)) { + .nav__list input:checked ~ .nav__items { + -webkit-transition: 0.5s ease-in-out; + transition: 0.5s ease-in-out; + max-height: 9999px; /* exaggerate max-height to accommodate tall lists*/ + overflow: visible; + opacity: 1; + margin-top: 1em; + -webkit-transform: translate(0, 0); + -ms-transform: translate(0, 0); + transform: translate(0, 0); + } +} + +.nav__title { + margin: 0; + padding: 0.5rem 1rem; + font-family: $sans-serif-narrow; + font-size: $type-size-5; + font-weight: bold; +} + +.nav__sub-title { + display: block; + margin: 0.5rem 0; + padding: 0.5rem 0; + font-family: $sans-serif-narrow; + font-size: $type-size-6; + font-weight: bold; + text-transform: uppercase; + border-bottom: 1px solid $border-color; +} + +/* + Table of contents navigation + ========================================================================== */ + +.toc { + font-family: $sans-serif-narrow; + color: $gray; + text-transform: uppercase; + letter-spacing: 1px; + background-color: $background-color; + border: 1px solid $border-color; + border-radius: $border-radius; + box-shadow: $box-shadow; + + .nav__title { + color: #fff; + font-size: $type-size-6; + background: $primary-color; + border-top-left-radius: $border-radius; + border-top-right-radius: $border-radius; + } +} + +.toc__menu { + margin: 0; + padding: 0; + width: 100%; + list-style: none; + font-size: 0.8rem; + + a { + display: block; + padding: 0.5rem 1rem; + color: $muted-text-color; + font-size: $type-size-8; + font-weight: bold; + line-height: 1.5; + border-bottom: 1px solid $border-color; + + &:hover { + color: $text-color; + } + } + + li ul > li a { + padding-left: 1.75rem; + font-weight: normal; + } + + /* hide sub sub links on small screens*/ + li > ul li { + display: none; + + @include breakpoint($medium) { + display: block; + } + } +} +.toc__menu li ul li ul > li a { + padding-left: 2.5rem; +} + +.toc__menu li ul li ul li ul > li a { + padding-left: 3rem; +} + +.toc__menu li ul li ul li ul li ul > li a { + padding-left: 3.5rem; +} diff --git a/docs/_sass/minimal-mistakes/_notices.scss b/docs/_sass/minimal-mistakes/_notices.scss new file mode 100644 index 00000000..7f9b733f --- /dev/null +++ b/docs/_sass/minimal-mistakes/_notices.scss @@ -0,0 +1,100 @@ +/* ========================================================================== + NOTICE TEXT BLOCKS + ========================================================================== */ + +/** + * Default Kramdown usage (no indents!): + *
+ * #### Headline for the Notice + * Text for the notice + *
+ */ + +@mixin notice($notice-color) { + margin: 2em 0 !important; /* override*/ + padding: 1em; + color: $dark-gray; + font-family: $global-font-family; + font-size: $type-size-6 !important; + text-indent: initial; /* override*/ + background-color: mix(#fff, $notice-color, 90%); + border-radius: $border-radius; + box-shadow: 0 1px 1px rgba($notice-color, 0.25); + + h4 { + margin-top: 0 !important; /* override*/ + margin-bottom: 0.75em; + } + + @at-root .page__content #{&} h4 { + /* using at-root to override .page-content h4 font size*/ + margin-bottom: 0; + font-size: 1em; + } + + p { + &:last-child { + margin-bottom: 0 !important; /* override*/ + } + } + + h4 + p { + /* remove space above paragraphs that appear directly after notice headline*/ + margin-top: 0; + padding-top: 0; + } + + a { + color: $notice-color; + + &:hover { + color: mix(#000, $notice-color, 40%); + } + } + + code { + background-color: mix(#fff, $notice-color, 95%) + } + + ul { + &:last-child { + margin-bottom: 0; /* override*/ + } + } +} + +/* Default notice */ + +.notice { + @include notice($light-gray); +} + +/* Primary notice */ + +.notice--primary { + @include notice($primary-color); +} + +/* Info notice */ + +.notice--info { + @include notice($info-color); +} + +/* Warning notice */ + +.notice--warning { + @include notice($warning-color); +} + +/* Success notice */ + +.notice--success { + @include notice($success-color); +} + +/* Danger notice */ + +.notice--danger { + @include notice($danger-color); +} \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/_page.scss b/docs/_sass/minimal-mistakes/_page.scss new file mode 100644 index 00000000..0dcd8d5d --- /dev/null +++ b/docs/_sass/minimal-mistakes/_page.scss @@ -0,0 +1,520 @@ +/* ========================================================================== + SINGLE PAGE/POST + ========================================================================== */ + +#main { + @include clearfix; + margin-left: 2em; + margin-top: 2em; + margin-right: 0; + padding-left: 1em; + padding-right: 1em; + -webkit-animation: $intro-transition; + animation: $intro-transition; + max-width: 100%; + -webkit-animation-delay: 0.15s; + animation-delay: 0.15s; + + @include breakpoint($x-large) { + max-width: $x-large; + } +} + +.page { + @include breakpoint($large) { + float: right; + width: calc(100% - #{$right-sidebar-width-narrow}); + padding-right: $right-sidebar-width-narrow; + } + + @include breakpoint($x-large) { + width: calc(100% - #{$right-sidebar-width}); + padding-right: $right-sidebar-width; + } + + .page__inner-wrap { + float: left; + margin-left: 0; + margin-right: 0; + width: 130%; + clear: both; + + .page__content, + .page__meta, + .page__share { + position: relative; + float: left; + margin-left: 1em; + margin-right: 0; + width: 100%; + clear: both; + } + } +} + +.page__title { + margin-top: 0; + line-height: 1; + + & + .page__meta { + margin-top: -0.5em; + } +} + +.page__lead { + font-family: $global-font-family; + font-size: $type-size-4; +} + +.page__content { + h2 { + padding-bottom: 0.5em; + border-bottom: 1px solid $border-color; + } + + p, + li, + dl { + font-size: 1em; + } + + /* paragraph indents */ + p { + margin: 0 0 $indent-var; + + /* sibling indentation*/ + @if $paragraph-indent == true { + & + p { + text-indent: $indent-var; + margin-top: -($indent-var); + } + } + } + + a:not(.btn) { + &:hover { + text-decoration: underline; + + img { + box-shadow: 0 0 10px rgba(#000, 0.25); + } + } + } + + dt { + margin-top: 1em; + font-family: $sans-serif; + font-weight: bold; + } + + dd { + margin-left: 1em; + font-family: $sans-serif; + font-size: $type-size-6; + } + + .small { + font-size: $type-size-6; + } + + /* blockquote citations */ + blockquote + .small { + margin-top: -1.5em; + padding-left: 1.25rem; + } +} + +.page__hero { + position: relative; + margin-bottom: 2em; + @include clearfix; + -webkit-animation: $intro-transition; + animation: $intro-transition; + -webkit-animation-delay: 0.25s; + animation-delay: 0.25s; + + &--overlay { + position: relative; + margin-bottom: 2em; + padding: 3em 0; + @include clearfix; + background-size: cover; + background-repeat: no-repeat; + background-position: center; + -webkit-animation: $intro-transition; + animation: $intro-transition; + -webkit-animation-delay: 0.25s; + animation-delay: 0.25s; + + a { + color: #fff; + } + + .wrapper { + padding-left: 1em; + padding-right: 1em; + + @include breakpoint($x-large) { + max-width: $x-large; + } + } + + .page__title, + .page__meta, + .page__lead, + .btn { + color: #fff; + text-shadow: 1px 1px 4px rgba(#000, 0.5); + } + + .page__lead { + max-width: $medium; + } + + .page__title { + font-size: $type-size-2; + + @include breakpoint($small) { + font-size: $type-size-1; + } + } + } +} + +.page__hero-image { + width: 100%; + height: auto; + -ms-interpolation-mode: bicubic; +} + +.page__hero-caption { + position: absolute; + bottom: 0; + right: 0; + margin: 0 auto; + padding: 2px 5px; + color: #fff; + font-family: $caption-font-family; + font-size: $type-size-7; + background: #000; + text-align: right; + z-index: 5; + opacity: 0.5; + border-radius: $border-radius 0 0 0; + + @include breakpoint($large) { + padding: 5px 10px; + } + + a { + color: #fff; + text-decoration: none; + } +} + +/* + Social sharing + ========================================================================== */ + +.page__share { + margin-top: 2em; + padding-top: 1em; + border-top: 1px solid $border-color; + + @include breakpoint(max-width $small) { + .btn span { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; + } + } +} + +.page__share-title { + margin-bottom: 10px; + font-size: $type-size-6; + text-transform: uppercase; +} + +/* + Page meta + ========================================================================== */ + +.page__meta { + margin-top: 2em; + color: $muted-text-color; + font-family: $sans-serif; + font-size: $type-size-6; + + p { + margin: 0; + } + + a { + color: inherit; + } +} + +.page__meta-title { + margin-bottom: 10px; + font-size: $type-size-6; + text-transform: uppercase; +} + +/* + Page taxonomy + ========================================================================== */ + +.page__taxonomy { + .sep { + display: none; + } + + strong { + margin-right: 10px; + } +} + +.page__taxonomy-item { + display: inline-block; + margin-right: 5px; + margin-bottom: 8px; + padding: 5px 10px; + text-decoration: none; + border: 1px solid mix(#000, $border-color, 25%); + border-radius: $border-radius; + + &:hover { + text-decoration: none; + color: $link-color-hover; + } +} + +.taxonomy__section { + margin-bottom: 2em; + padding-bottom: 1em; + + &:not(:last-child) { + border-bottom: solid 1px $border-color; + } + + .archive__item-title { + margin-top: 0; + } + + .archive__subtitle { + clear: both; + border: 0; + } + + + .taxonomy__section { + margin-top: 2em; + } +} + +.taxonomy__title { + margin-bottom: 0.5em; + color: lighten($text-color, 60%); +} + +.taxonomy__count { + color: lighten($text-color, 50%); +} + +.taxonomy__index { + display: grid; + grid-column-gap: 2em; + grid-template-columns: repeat(2, 1fr); + margin: 1.414em 0; + padding: 0; + font-size: 0.75em; + list-style: none; + + @include breakpoint($large) { + grid-template-columns: repeat(3, 1fr); + } + + a { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + padding: 0.25em 0; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + color: inherit; + text-decoration: none; + border-bottom: 1px solid $border-color; + } +} + +.back-to-top { + display: block; + clear: both; + color: lighten($text-color, 50%); + font-size: 0.6em; + text-transform: uppercase; + text-align: right; + text-decoration: none; +} + +/* + Comments + ========================================================================== */ + +.page__comments { + float: left; + margin-left: 0; + margin-right: 0; + width: 100%; + clear: both; +} + +.page__comments-title { + margin-top: 2rem; + margin-bottom: 10px; + padding-top: 2rem; + font-size: $type-size-6; + border-top: 1px solid $border-color; + text-transform: uppercase; +} + +.page__comments-form { + -webkit-transition: $global-transition; + transition: $global-transition; + + &.disabled { + input, + button, + textarea, + label { + pointer-events: none; + cursor: not-allowed; + filter: alpha(opacity=65); + box-shadow: none; + opacity: 0.65; + } + } +} + +.comment { + @include clearfix(); + margin: 1em 0; + + &:not(:last-child) { + border-bottom: 1px solid $border-color; + } +} + +.comment__avatar-wrapper { + float: left; + width: 60px; + height: 60px; + + @include breakpoint($large) { + width: 100px; + height: 100px; + } +} + +.comment__avatar { + width: 40px; + height: 40px; + border-radius: 50%; + + @include breakpoint($large) { + width: 80px; + height: 80px; + padding: 5px; + border: 1px solid $border-color; + } +} + +.comment__content-wrapper { + float: right; + width: calc(100% - 60px); + + @include breakpoint($large) { + width: calc(100% - 100px); + } +} + +.comment__author { + margin: 0; + + a { + text-decoration: none; + } +} + +.comment__date { + @extend .page__meta; + margin: 0; + + a { + text-decoration: none; + } +} + +/* + Related + ========================================================================== */ + +.page__related { + @include clearfix(); + float: left; + margin-top: 2em; + padding-top: 1em; + border-top: 1px solid $border-color; + + @include breakpoint($large) { + float: right; + width: calc(100% - #{$right-sidebar-width-narrow}); + } + + @include breakpoint($x-large) { + width: calc(100% - #{$right-sidebar-width}); + } + + a { + color: inherit; + text-decoration: none; + } +} + +.page__related-title { + margin-bottom: 10px; + font-size: $type-size-6; + text-transform: uppercase; +} + +/* + Wide Pages + ========================================================================== */ + +.wide { + .page { + @include breakpoint($large) { + padding-right: 0; + } + + @include breakpoint($x-large) { + padding-right: 0; + } + } + + .page__related { + @include breakpoint($large) { + padding-right: 0; + } + + @include breakpoint($x-large) { + padding-right: 0; + } + } +} diff --git a/docs/_sass/minimal-mistakes/_print.scss b/docs/_sass/minimal-mistakes/_print.scss new file mode 100644 index 00000000..b93f1d40 --- /dev/null +++ b/docs/_sass/minimal-mistakes/_print.scss @@ -0,0 +1,252 @@ +/* ========================================================================== + PRINT STYLES + ========================================================================== */ + +@media print { + + [hidden] { + display: none; + } + + * { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + } + + html { + margin: 0; + padding: 0; + min-height: auto !important; + font-size: 16px; + } + + body { + margin: 0 auto; + background: #fff !important; + color: #000 !important; + font-size: 1rem; + line-height: 1.5; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + color: #000; + line-height: 1.2; + margin-bottom: 0.75rem; + margin-top: 0; + } + + h1 { + font-size: 2.5rem; + } + + h2 { + font-size: 2rem; + } + + h3 { + font-size: 1.75rem; + } + + h4 { + font-size: 1.5rem; + } + + h5 { + font-size: 1.25rem; + } + + h6 { + font-size: 1rem; + } + + a, + a:visited { + color: #000; + text-decoration: underline; + word-wrap: break-word; + } + + table { + border-collapse: collapse; + } + + thead { + display: table-header-group; + } + + table, + th, + td { + border-bottom: 1px solid #000; + } + + td, + th { + padding: 8px 16px; + } + + img { + border: 0; + display: block; + max-width: 100% !important; + vertical-align: middle; + } + + hr { + border: 0; + border-bottom: 2px solid #bbb; + height: 0; + margin: 2.25rem 0; + padding: 0; + } + + dt { + font-weight: bold; + } + + dd { + margin: 0; + margin-bottom: 0.75rem; + } + + abbr[title], + acronym[title] { + border: 0; + text-decoration: none; + } + + table, + blockquote, + pre, + code, + figure, + li, + hr, + ul, + ol, + a, + tr { + page-break-inside: avoid; + } + + h2, + h3, + h4, + p, + a { + orphans: 3; + widows: 3; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + page-break-after: avoid; + page-break-inside: avoid; + } + + h1 + p, + h2 + p, + h3 + p { + page-break-before: avoid; + } + + img { + page-break-after: auto; + page-break-before: auto; + page-break-inside: avoid; + } + + pre { + white-space: pre-wrap !important; + word-wrap: break-word; + } + + a[href^='http://']:after, + a[href^='https://']:after, + a[href^='ftp://']:after { + content: " (" attr(href) ")"; + font-size: 80%; + } + + abbr[title]:after, + acronym[title]:after { + content: " (" attr(title) ")"; + } + + #main { + max-width: 100%; + } + + .page { + margin: 0; + padding: 0; + width: 100%; + } + + .page-break, + .page-break-before { + page-break-before: always; + } + + .page-break-after { + page-break-after: always; + } + + .no-print { + display: none; + } + + a.no-reformat:after { + content: ''; + } + + abbr[title].no-reformat:after, + acronym[title].no-reformat:after { + content: ''; + } + + .page__hero-caption { + color: #000 !important; + background: #fff !important; + opacity: 1; + + a { + color: #000 !important; + } + } + +/* + Hide the following elements on print + ========================================================================== */ + + .masthead, + .toc, + .page__share, + .page__related, + .pagination, + .ads, + .page__footer, + .page__comments-form, + .author__avatar, + .author__content, + .author__urls-wrapper, + .nav__list, + .sidebar, + .adsbygoogle { + display: none !important; + height: 1px !important; + } +} \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/_reset.scss b/docs/_sass/minimal-mistakes/_reset.scss new file mode 100644 index 00000000..2259fd0c --- /dev/null +++ b/docs/_sass/minimal-mistakes/_reset.scss @@ -0,0 +1,187 @@ +/* ========================================================================== + STYLE RESETS + ========================================================================== */ + +* { box-sizing: border-box; } + +html { + /* apply a natural box layout model to all elements */ + box-sizing: border-box; + background-color: $background-color; + font-size: 16px; + + @include breakpoint($medium) { + font-size: 18px; + } + + @include breakpoint($large) { + font-size: 20px; + } + + @include breakpoint($x-large) { + font-size: 22px; + } + + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +/* Remove margin */ + +body { margin: 0; } + +/* Selected elements */ + +::-moz-selection { + color: #fff; + background: #000; +} + +::selection { + color: #fff; + background: #000; +} + +/* Display HTML5 elements in IE6-9 and FF3 */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section { + display: block; +} + +/* Display block in IE6-9 and FF3 */ + +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +/* Prevents modern browsers from displaying 'audio' without controls */ + +audio:not([controls]) { + display: none; +} + +a { + color: $link-color; +} + +/* Apply focus state */ + +a:focus { + @extend %tab-focus; +} + +/* Remove outline from links */ + +a:hover, +a:active { + outline: 0; +} + +/* Prevent sub and sup affecting line-height in all browsers */ + +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* img border in anchor's and image quality */ + +img { + /* Responsive images (ensure images don't scale beyond their parents) */ + max-width: 100%; /* part 1: Set a maximum relative to the parent*/ + width: auto\9; /* IE7-8 need help adjusting responsive images*/ + height: auto; /* part 2: Scale the height according to the width, otherwise you get stretching*/ + + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; +} + +/* Prevent max-width from affecting Google Maps */ + +#map_canvas img, +.google-maps img { + max-width: none; +} + +/* Consistent form font size in all browsers, margin changes, misc */ + +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} + +button, +input { + *overflow: visible; /* inner spacing ie IE6/7*/ + line-height: normal; /* FF3/4 have !important on line-height in UA stylesheet*/ +} + +button::-moz-focus-inner, +input::-moz-focus-inner { /* inner padding and border oddities in FF3/4*/ + padding: 0; + border: 0; +} + +button, +html input[type="button"], // avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* corrects inability to style clickable `input` types in iOS*/ + cursor: pointer; /* improves usability and consistency of cursor style between image-type `input` and others*/ +} + +label, +select, +button, +input[type="button"], +input[type="reset"], +input[type="submit"], +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; /* improves usability and consistency of cursor style between image-type `input` and others*/ +} + +input[type="search"] { /* Appearance in Safari/Chrome*/ + box-sizing: border-box; + -webkit-appearance: textfield; +} + +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; /* inner-padding issues in Chrome OSX, Safari 5*/ +} + +textarea { + overflow: auto; /* remove vertical scrollbar in IE6-9*/ + vertical-align: top; /* readability and alignment cross-browser*/ +} \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/_search.scss b/docs/_sass/minimal-mistakes/_search.scss new file mode 100644 index 00000000..fe3c4367 --- /dev/null +++ b/docs/_sass/minimal-mistakes/_search.scss @@ -0,0 +1,125 @@ +/* ========================================================================== + SEARCH + ========================================================================== */ + +.layout--search { + .archive__item-teaser { + margin-bottom: 0.25em; + } +} + +.search__toggle { + margin-left: 1rem; + margin-right: 1rem; + border: 0; + outline: none; + color: $muted-text-color; + background-color: transparent; + cursor: pointer; + -webkit-transition: 0.2s; + transition: 0.2s; + + &:hover { + color: $text-color; + } +} + +.search-icon { + width: 100%; + height: 100%; +} + +.search-content { + display: none; + visibility: hidden; + padding-top: 1em; + padding-bottom: 1em; + + &__inner-wrap { + width: 100%; + margin-left: auto; + margin-right: auto; + padding-left: 1em; + padding-right: 1em; + -webkit-animation: $intro-transition; + animation: $intro-transition; + -webkit-animation-delay: 0.15s; + animation-delay: 0.15s; + + @include breakpoint($x-large) { + max-width: $x-large; + } + } + + .search-input { + display: block; + margin-bottom: 0; + padding: 0; + border: none; + outline: none; + box-shadow: none; + background-color: transparent; + font-size: $type-size-3; + + @include breakpoint($large) { + font-size: $type-size-2; + } + + @include breakpoint($x-large) { + font-size: $type-size-1; + } + } + + &.is--visible { + display: block; + visibility: visible; + + &::after { + content: ""; + display: block; + } + } + + .results__found { + margin-top: 0.5em; + font-size: $type-size-6; + } + + .archive__item { + margin-bottom: 2em; + + @include breakpoint($large) { + width: 75%; + } + + @include breakpoint($x-large) { + width: 50%; + } + } + + .archive__item-title { + margin-top: 0; + } + + .archive__item-excerpt { + margin-bottom: 0; + } +} + +/* Algolia search */ + +.ais-search-box { + max-width: 100% !important; + margin-bottom: 2em; +} + +.archive__item-title .ais-Highlight { + color: $link-color; + font-style: normal; + text-decoration: underline; +} +.archive__item-excerpt .ais-Highlight { + color: $link-color; + font-style: normal; + font-weight: bold; +} diff --git a/docs/_sass/minimal-mistakes/_sidebar.scss b/docs/_sass/minimal-mistakes/_sidebar.scss new file mode 100644 index 00000000..0a39e364 --- /dev/null +++ b/docs/_sass/minimal-mistakes/_sidebar.scss @@ -0,0 +1,301 @@ +/* ========================================================================== + SIDEBAR + ========================================================================== */ + +/* + Default + ========================================================================== */ + +.sidebar { + @include clearfix(); + margin-bottom: 1em; + padding-right: 1em; + + @include breakpoint(max-width $large) { + /* fix z-index order of follow links */ + position: relative; + z-index: 10; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + @include breakpoint($large) { + float: left; + width: calc(#{$right-sidebar-width-narrow} - 1em); + opacity: 0.75; + -webkit-transition: opacity 0.2s ease-in-out; + transition: opacity 0.2s ease-in-out; + + &:hover { + opacity: 1; + } + + &.sticky { + overflow-y: auto; + /* calculate height of nav list */ + height: calc( + 100vh - 90px - 2em + ); // viewport height - approx. masthead height - main content top margin + } + } + + @include breakpoint($x-large) { + width: calc(#{$right-sidebar-width} - 1em); + } + + h2, + h3, + h4, + h5, + h6 { + margin-bottom: 0; + font-family: $sans-serif-narrow; + } + + p, + li { + font-family: $sans-serif; + font-size: $type-size-6; + line-height: 1.5; + } + + img { + width: 100%; + } +} + +.sidebar__right { + margin-bottom: 1em; + //margin-top: 3em; + + @include breakpoint($large) { + position: sticky !important; + float: right !important; + top: 0; + right: 0; + width: $right-sidebar-width-narrow; + margin-right: -1 * $right-sidebar-width-narrow; + padding-left: 1em; + padding-top: 3em !important; + z-index: 10; + } + + @include breakpoint($x-large) { + width: $right-sidebar-width; + margin-right: -1 * $right-sidebar-width; + } +} + +.splash .sidebar__right { + @include breakpoint($large) { + position: relative; + float: right; + margin-right: 0; + } + + @include breakpoint($x-large) { + margin-right: 0; + } +} + +/* + Author profile and links + ========================================================================== */ + +.author__avatar { + display: table-cell; + vertical-align: top; + width: 36px; + height: 36px; + + @include breakpoint($large) { + display: block; + width: auto; + height: auto; + } + + img { + max-width: 110px; + border-radius: 50%; + + @include breakpoint($large) { + padding: 5px; + border: 1px solid $border-color; + } + } +} + +.author__content { + display: table-cell; + vertical-align: top; + padding-left: 15px; + padding-right: 25px; + line-height: 1; + + @include breakpoint($large) { + display: block; + width: 100%; + padding-left: 0; + padding-right: 0; + } + + a { + color: inherit; + text-decoration: none; + } +} + +.author__name { + margin: 0; + + @include breakpoint($large) { + margin-top: 10px; + margin-bottom: 10px; + } +} +.sidebar .author__name { + font-family: $sans-serif; + font-size: $type-size-5; +} + +.author__bio { + margin: 0; + + @include breakpoint($large) { + margin-top: 10px; + margin-bottom: 20px; + } +} + +.author__urls-wrapper { + position: relative; + display: table-cell; + vertical-align: middle; + font-family: $sans-serif; + z-index: 10; + position: relative; + cursor: pointer; + + li:last-child { + a { + margin-bottom: 0; + } + } + + @include breakpoint($large) { + display: block; + } + + button { + margin-bottom: 0; + + @include breakpoint($large) { + display: none; + } + } +} + +.author__urls { + display: none; + position: absolute; + right: 0; + margin-top: 15px; + padding: 10px; + list-style-type: none; + border: 1px solid $border-color; + border-radius: $border-radius; + background: $background-color; + z-index: -1; + box-shadow: 0 2px 4px 0 rgba(#000, 0.16), 0 2px 10px 0 rgba(#000, 0.12); + cursor: default; + + &.is--visible { + display: block; + } + + @include breakpoint($large) { + display: block; + position: relative; + margin: 0; + padding: 0; + border: 0; + background: transparent; + box-shadow: none; + } + + &:before { + display: block; + content: ""; + position: absolute; + top: -11px; + left: calc(50% - 10px); + width: 0; + border-style: solid; + border-width: 0 10px 10px; + border-color: $border-color transparent; + z-index: 0; + + @include breakpoint($large) { + display: none; + } + } + + &:after { + display: block; + content: ""; + position: absolute; + top: -10px; + left: calc(50% - 10px); + width: 0; + border-style: solid; + border-width: 0 10px 10px; + border-color: $background-color transparent; + z-index: 1; + + @include breakpoint($large) { + display: none; + } + } + + li { + white-space: nowrap; + } + + a { + display: block; + margin-bottom: 5px; + padding-right: 5px; + padding-top: 2px; + padding-bottom: 2px; + color: inherit; + font-size: $type-size-5; + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } +} + +/* + Wide Pages + ========================================================================== */ + +.wide .sidebar__right { + margin-bottom: 1em; + @include breakpoint($large) { + position: initial; + top: initial; + right: initial; + width: initial; + margin-right: initial; + padding-left: initial; + z-index: initial; + } + + @include breakpoint($x-large) { + width: initial; + margin-right: initial; + } +} + diff --git a/docs/_sass/minimal-mistakes/_syntax.scss b/docs/_sass/minimal-mistakes/_syntax.scss new file mode 100644 index 00000000..72652020 --- /dev/null +++ b/docs/_sass/minimal-mistakes/_syntax.scss @@ -0,0 +1,324 @@ +/* ========================================================================== + Syntax highlighting + ========================================================================== */ + +div.highlighter-rouge, +figure.highlight { + position: relative; + margin-bottom: 1em; + background: $base00; + color: $base05; + font-family: $monospace; + font-size: $type-size-6; + line-height: 1.8; + border-radius: $border-radius; + + > pre, + pre.highlight { + margin: 0; + padding: 1em; + } +} + +.highlight table { + margin-bottom: 0; + font-size: 1em; + border: 0; + + td { + padding: 0; + width: calc(100% - 1em); + border: 0; + + /* line numbers*/ + &.gutter, + &.rouge-gutter { + padding-right: 1em; + width: 1em; + color: $base04; + border-right: 1px solid $base04; + text-align: right; + } + + /* code */ + &.code, + &.rouge-code { + padding-left: 1em; + } + } + + pre { + margin: 0; + } +} + +.highlight pre { + width: 100%; +} + +.highlight .hll { + background-color: $base06; +} +.highlight { + .c { + /* Comment */ + color: $base04; + } + .err { + /* Error */ + color: $base08; + } + .k { + /* Keyword */ + color: $base0e; + } + .l { + /* Literal */ + color: $base09; + } + .n { + /* Name */ + color: $base05; + } + .o { + /* Operator */ + color: $base0c; + } + .p { + /* Punctuation */ + color: $base05; + } + .cm { + /* Comment.Multiline */ + color: $base04; + } + .cp { + /* Comment.Preproc */ + color: $base04; + } + .c1 { + /* Comment.Single */ + color: $base04; + } + .cs { + /* Comment.Special */ + color: $base04; + } + .gd { + /* Generic.Deleted */ + color: $base08; + } + .ge { + /* Generic.Emph */ + font-style: italic; + } + .gh { + /* Generic.Heading */ + color: $base05; + font-weight: bold; + } + .gi { + /* Generic.Inserted */ + color: $base0b; + } + .gp { + /* Generic.Prompt */ + color: $base04; + font-weight: bold; + } + .gs { + /* Generic.Strong */ + font-weight: bold; + } + .gu { + /* Generic.Subheading */ + color: $base0c; + font-weight: bold; + } + .kc { + /* Keyword.Constant */ + color: $base0e; + } + .kd { + /* Keyword.Declaration */ + color: $base0e; + } + .kn { + /* Keyword.Namespace */ + color: $base0c; + } + .kp { + /* Keyword.Pseudo */ + color: $base0e; + } + .kr { + /* Keyword.Reserved */ + color: $base0e; + } + .kt { + /* Keyword.Type */ + color: $base0a; + } + .ld { + /* Literal.Date */ + color: $base0b; + } + .m { + /* Literal.Number */ + color: $base09; + } + .s { + /* Literal.String */ + color: $base0b; + } + .na { + /* Name.Attribute */ + color: $base0d; + } + .nb { + /* Name.Builtin */ + color: $base05; + } + .nc { + /* Name.Class */ + color: $base0a; + } + .no { + /* Name.Constant */ + color: $base08; + } + .nd { + /* Name.Decorator */ + color: $base0c; + } + .ni { + /* Name.Entity */ + color: $base05; + } + .ne { + /* Name.Exception */ + color: $base08; + } + .nf { + /* Name.Function */ + color: $base0d; + } + .nl { + /* Name.Label */ + color: $base05; + } + .nn { + /* Name.Namespace */ + color: $base0a; + } + .nx { + /* Name.Other */ + color: $base0d; + } + .py { + /* Name.Property */ + color: $base05; + } + .nt { + /* Name.Tag */ + color: $base0c; + } + .nv { + /* Name.Variable */ + color: $base08; + } + .ow { + /* Operator.Word */ + color: $base0c; + } + .w { + /* Text.Whitespace */ + color: $base05; + } + .mf { + /* Literal.Number.Float */ + color: $base09; + } + .mh { + /* Literal.Number.Hex */ + color: $base09; + } + .mi { + /* Literal.Number.Integer */ + color: $base09; + } + .mo { + /* Literal.Number.Oct */ + color: $base09; + } + .sb { + /* Literal.String.Backtick */ + color: $base0b; + } + .sc { + /* Literal.String.Char */ + color: $base05; + } + .sd { + /* Literal.String.Doc */ + color: $base04; + } + .s2 { + /* Literal.String.Double */ + color: $base0b; + } + .se { + /* Literal.String.Escape */ + color: $base09; + } + .sh { + /* Literal.String.Heredoc */ + color: $base0b; + } + .si { + /* Literal.String.Interpol */ + color: $base09; + } + .sx { + /* Literal.String.Other */ + color: $base0b; + } + .sr { + /* Literal.String.Regex */ + color: $base0b; + } + .s1 { + /* Literal.String.Single */ + color: $base0b; + } + .ss { + /* Literal.String.Symbol */ + color: $base0b; + } + .bp { + /* Name.Builtin.Pseudo */ + color: $base05; + } + .vc { + /* Name.Variable.Class */ + color: $base08; + } + .vg { + /* Name.Variable.Global */ + color: $base08; + } + .vi { + /* Name.Variable.Instance */ + color: $base08; + } + .il { + /* Literal.Number.Integer.Long */ + color: $base09; + } +} + +.gist { + th, td { + border-bottom: 0; + } +} \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/_tables.scss b/docs/_sass/minimal-mistakes/_tables.scss new file mode 100644 index 00000000..a2f85090 --- /dev/null +++ b/docs/_sass/minimal-mistakes/_tables.scss @@ -0,0 +1,37 @@ +/* ========================================================================== + TABLES + ========================================================================== */ + +table { + margin-bottom: 1em; + width: 100%; + font-family: $global-font-family; + font-size: $type-size-7; + border-collapse: collapse; + + & + table { + margin-top: 1em; + } +} + +thead { + background-color: $border-color; + border-bottom: 2px solid mix(#000, $border-color, 25%); +} + +th { + padding: 0.5em; + font-weight: bold; + text-align: left; +} + +td { + padding: 0.5em; + border-bottom: 1px solid mix(#000, $border-color, 25%); +} + +tr, +td, +th { + vertical-align: middle; +} \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/_utilities.scss b/docs/_sass/minimal-mistakes/_utilities.scss new file mode 100644 index 00000000..d539dd12 --- /dev/null +++ b/docs/_sass/minimal-mistakes/_utilities.scss @@ -0,0 +1,524 @@ +/* ========================================================================== + UTILITY CLASSES + ========================================================================== */ + +/* + Visibility + ========================================================================== */ + +/* http://www.456bereastreet.com/archive/200711/screen_readers_sometimes_ignore_displaynone/ */ + +.hidden, +.is--hidden { + display: none; + visibility: hidden; +} + +/* for preloading images */ + +.load { + display: none; +} + +.transparent { + opacity: 0; +} + +/* https://developer.yahoo.com/blogs/ydn/clip-hidden-content-better-accessibility-53456.html */ + +.visually-hidden, +.screen-reader-text, +.screen-reader-text span, +.screen-reader-shortcut { + position: absolute !important; + clip: rect(1px, 1px, 1px, 1px); + height: 1px !important; + width: 1px !important; + border: 0 !important; + overflow: hidden; +} + +body:hover .visually-hidden a, +body:hover .visually-hidden input, +body:hover .visually-hidden button { + display: none !important; +} + +/* screen readers */ + +.screen-reader-text:focus, +.screen-reader-shortcut:focus { + clip: auto !important; + height: auto !important; + width: auto !important; + display: block; + font-size: 1em; + font-weight: bold; + padding: 15px 23px 14px; + background: #fff; + z-index: 100000; + text-decoration: none; + box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); +} + +/* + Skip links + ========================================================================== */ + +.skip-link { + position: fixed; + z-index: 20; + margin: 0; + font-family: $sans-serif; + white-space: nowrap; +} + +.skip-link li { + height: 0; + width: 0; + list-style: none; +} + +/* + Type + ========================================================================== */ + +.text-left { + text-align: left; +} + +.text-center { + text-align: center; +} + +.text-right { + text-align: right; +} + +.text-justify { + text-align: justify; +} + +.text-nowrap { + white-space: nowrap; +} + +/* + Alignment + ========================================================================== */ + +/* clearfix */ + +.cf { + clear: both; +} + +.wrapper { + margin-left: auto; + margin-right: auto; + width: 100%; +} + +/* + Images + ========================================================================== */ + +/* image align left */ + +.align-left { + display: block; + margin-left: auto; + margin-right: auto; + + @include breakpoint($small) { + float: left; + margin-right: 1em; + } +} + +/* image align right */ + +.align-right { + display: block; + margin-left: auto; + margin-right: auto; + + @include breakpoint($small) { + float: right; + margin-left: 1em; + } +} + +/* image align center */ + +.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +/* file page content container */ + +.full { + @include breakpoint($large) { + margin-right: -1 * span(2.5 of 12) !important; + } +} + +/* + Icons + ========================================================================== */ + +.icon { + display: inline-block; + fill: currentColor; + width: 1em; + height: 1.1em; + line-height: 1; + position: relative; + top: -0.1em; + vertical-align: middle; +} + +/* social icons*/ + +.social-icons { + .fas, + .fab, + .far, + .fal { + color: $text-color; + } + + .fa-behance, + .fa-behance-square { + color: $behance-color; + } + + .fa-bitbucket { + color: $bitbucket-color; + } + + .fa-dribbble, + .fa-dribble-square { + color: $dribbble-color; + } + + .fa-facebook, + .fa-facebook-square, + .fa-facebook-f { + color: $facebook-color; + } + + .fa-flickr { + color: $flickr-color; + } + + .fa-foursquare { + color: $foursquare-color; + } + + .fa-github, + .fa-github-alt, + .fa-github-square { + color: $github-color; + } + + .fa-gitlab { + color: $gitlab-color; + } + + .fa-google-plus, + .fa-google-plus-square, + .fa-google-plus-g { + color: $google-plus-color; + } + + .fa-instagram { + color: $instagram-color; + } + + .fa-lastfm, + .fa-lastfm-square { + color: $lastfm-color; + } + + .fa-linkedin, + .fa-linkedin-in { + color: $linkedin-color; + } + + .fa-pinterest, + .fa-pinterest-p, + .fa-pinterest-square { + color: $pinterest-color; + } + + .fa-rss, + .fa-rss-square { + color: $rss-color; + } + + .fa-soundcloud { + color: $soundcloud-color; + } + + .fa-stack-exchange, + .fa-stack-overflow { + color: $stackoverflow-color; + } + + .fa-tumblr, + .fa-tumblr-square { + color: $tumblr-color; + } + + .fa-twitter, + .fa-twitter-square { + color: $twitter-color; + } + + .fa-vimeo, + .fa-vimeo-square, + .fa-vimeo-v { + color: $vimeo-color; + } + + .fa-vine { + color: $vine-color; + } + + .fa-youtube { + color: $youtube-color; + } + + .fa-xing, + .fa-xing-square { + color: $xing-color; + } +} + +/* + Navicons + ========================================================================== */ + +.navicon { + position: relative; + width: $navicon-width; + height: $navicon-height; + background: #fff; + margin: auto; + -webkit-transition: 0.3s; + transition: 0.3s; + + &:before, + &:after { + content: ""; + position: absolute; + left: 0; + width: $navicon-width; + height: $navicon-height; + background: #fff; + -webkit-transition: 0.3s; + transition: 0.3s; + } + + &:before { + top: (-2 * $navicon-height); + } + + &:after { + bottom: (-2 * $navicon-height); + } +} + +.close .navicon { + /* hide the middle line*/ + background: transparent; + + /* overlay the lines by setting both their top values to 0*/ + &:before, + &:after { + -webkit-transform-origin: 50% 50%; + -ms-transform-origin: 50% 50%; + transform-origin: 50% 50%; + top: 0; + width: $navicon-width; + } + + /* rotate the lines to form the x shape*/ + &:before { + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + } + &:after { + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + } +} + +/* + Sticky, fixed to top content + ========================================================================== */ + +.sticky { + @include breakpoint($large) { + @include clearfix(); + position: -webkit-sticky; + position: sticky; + top: 2em; + + > * { + display: block; + } + } +} + +/* + Wells + ========================================================================== */ + +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + border-radius: $border-radius; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} + +/* + Modals + ========================================================================== */ + +.show-modal { + overflow: hidden; + position: relative; + + &:before { + position: absolute; + content: ""; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 999; + background-color: rgba(255, 255, 255, 0.85); + } + + .modal { + display: block; + } +} + +.modal { + display: none; + position: fixed; + width: 300px; + top: 50%; + left: 50%; + margin-left: -150px; + margin-top: -150px; + min-height: 0; + z-index: 9999; + background: #fff; + border: 1px solid $border-color; + border-radius: $border-radius; + box-shadow: $box-shadow; + + &__title { + margin: 0; + padding: 0.5em 1em; + } + + &__supporting-text { + padding: 0 1em 0.5em 1em; + } + + &__actions { + padding: 0.5em 1em; + border-top: 1px solid $border-color; + } +} + +/* + Footnotes + ========================================================================== */ + +.footnote { + color: mix(#fff, $gray, 25%); + text-decoration: none; +} + +.footnotes { + color: mix(#fff, $gray, 25%); + + ol, + li, + p { + margin-bottom: 0; + font-size: $type-size-6; + } +} + +a.reversefootnote { + color: $gray; + text-decoration: none; + + &:hover { + text-decoration: underline; + } +} + +/* + Required + ========================================================================== */ + +.required { + color: $danger-color; + font-weight: bold; +} + +/* + Google Custom Search Engine + ========================================================================== */ + +.gsc-control-cse { + table, + tr, + td { + border: 0; /* remove table borders widget */ + } +} + +/* + Responsive Video Embed + ========================================================================== */ + +.responsive-video-container { + position: relative; + margin-bottom: 1em; + padding-bottom: 56.25%; + height: 0; + overflow: hidden; + max-width: 100%; + + iframe, + object, + embed { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } +} + +// full screen video fixes +:-webkit-full-screen-ancestor { + .masthead, + .page__footer { + position: static; + } +} diff --git a/docs/_sass/minimal-mistakes/_variables.scss b/docs/_sass/minimal-mistakes/_variables.scss new file mode 100644 index 00000000..23123af1 --- /dev/null +++ b/docs/_sass/minimal-mistakes/_variables.scss @@ -0,0 +1,154 @@ +/* ========================================================================== + Variables + ========================================================================== */ + +/* + Typography + ========================================================================== */ + +$doc-font-size: 16 !default; + +/* paragraph indention */ +$paragraph-indent: false !default; // true, false (default) +$indent-var: 1.3em !default; + +/* system typefaces */ +$serif: Georgia, Times, serif !default; +$sans-serif: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", + "Helvetica Neue", "Lucida Grande", Arial, sans-serif !default; +$monospace: Monaco, Consolas, "Lucida Console", monospace !default; + +/* sans serif typefaces */ +$sans-serif-narrow: $sans-serif !default; +$helvetica: Helvetica, "Helvetica Neue", Arial, sans-serif !default; + +/* serif typefaces */ +$georgia: Georgia, serif !default; +$times: Times, serif !default; +$bodoni: "Bodoni MT", serif !default; +$calisto: "Calisto MT", serif !default; +$garamond: Garamond, serif !default; + +$global-font-family: $sans-serif !default; +$header-font-family: $sans-serif !default; +$caption-font-family: $serif !default; + +/* type scale */ +$type-size-1: 2.441em !default; // ~39.056px +$type-size-2: 1.953em !default; // ~31.248px +$type-size-3: 1.563em !default; // ~25.008px +$type-size-4: 1.25em !default; // ~20px +$type-size-5: 1em !default; // ~16px +$type-size-6: 0.75em !default; // ~12px +$type-size-7: 0.6875em !default; // ~11px +$type-size-8: 0.625em !default; // ~10px + +/* + Colors + ========================================================================== */ + +$gray: #7a8288 !default; +$dark-gray: mix(#000, $gray, 40%) !default; +$darker-gray: mix(#000, $gray, 60%) !default; +$light-gray: mix(#fff, $gray, 50%) !default; +$lighter-gray: mix(#fff, $gray, 90%) !default; + +$background-color: #fff !default; +$code-background-color: #fafafa !default; +$code-background-color-dark: $light-gray !default; +$text-color: $dark-gray !default; +$muted-text-color: mix(#fff, $text-color, 35%) !default; +$border-color: $lighter-gray !default; +$form-background-color: $lighter-gray !default; +$footer-background-color: $lighter-gray !default; + +$primary-color: #7a8288 !default; +$success-color: #62c462 !default; +$warning-color: #f89406 !default; +$danger-color: #ee5f5b !default; +$info-color: #52adc8 !default; + +/* YIQ color contrast */ +$yiq-contrasted-dark-default: $dark-gray !default; +$yiq-contrasted-light-default: #fff !default; +$yiq-contrasted-threshold: 175 !default; +$yiq-debug: false !default; + +/* brands */ +$behance-color: #1769ff !default; +$bitbucket-color: #205081 !default; +$dribbble-color: #ea4c89 !default; +$facebook-color: #3b5998 !default; +$flickr-color: #ff0084 !default; +$foursquare-color: #0072b1 !default; +$github-color: #171516 !default; +$gitlab-color: #e24329 !default; +$google-plus-color: #dd4b39 !default; +$instagram-color: #517fa4 !default; +$lastfm-color: #d51007 !default; +$linkedin-color: #007bb6 !default; +$pinterest-color: #cb2027 !default; +$rss-color: #fa9b39 !default; +$soundcloud-color: #ff3300 !default; +$stackoverflow-color: #fe7a15 !default; +$tumblr-color: #32506d !default; +$twitter-color: #55acee !default; +$vimeo-color: #1ab7ea !default; +$vine-color: #00bf8f !default; +$youtube-color: #bb0000 !default; +$xing-color: #006567 !default; + +/* links */ +$link-color: $info-color !default; +$link-color-hover: mix(#000, $link-color, 25%) !default; +$link-color-visited: mix(#fff, $link-color, 25%) !default; +$masthead-link-color: $primary-color !default; +$masthead-link-color-hover: mix(#000, $primary-color, 25%) !default; +$navicon-link-color-hover: mix(#fff, $primary-color, 75%) !default; + +/* syntax highlighting (base16) */ +$base00: #263238 !default; +$base01: #2e3c43 !default; +$base02: #314549 !default; +$base03: #546e7a !default; +$base04: #b2ccd6 !default; +$base05: #eeffff !default; +$base06: #eeffff !default; +$base07: #ffffff !default; +$base08: #f07178 !default; +$base09: #f78c6c !default; +$base0a: #ffcb6b !default; +$base0b: #c3e88d !default; +$base0c: #89ddff !default; +$base0d: #82aaff !default; +$base0e: #c792ea !default; +$base0f: #ff5370 !default; + +/* + Breakpoints + ========================================================================== */ + +$small: 600px !default; +$medium: 768px !default; +$medium-wide: 900px !default; +$large: 1024px !default; +$x-large: 1500px !default; + +/* + Grid + ========================================================================== */ + +$right-sidebar-width-narrow: 200px !default; +$right-sidebar-width: 400px !default; +$right-sidebar-width-wide: 450px !default; + +/* + Other + ========================================================================== */ + +$border-radius: 4px !default; +$box-shadow: 0 1px 1px rgba(0, 0, 0, 0.125) !default; +$navicon-width: 1.5rem !default; +$navicon-height: 0.25rem !default; +$global-transition: all 0.2s ease-in-out !default; +$intro-transition: intro 0.3s both !default; diff --git a/docs/_sass/minimal-mistakes/skins/_air.scss b/docs/_sass/minimal-mistakes/skins/_air.scss new file mode 100644 index 00000000..0e5360c3 --- /dev/null +++ b/docs/_sass/minimal-mistakes/skins/_air.scss @@ -0,0 +1,23 @@ +/* ========================================================================== + Air skin + ========================================================================== */ + +/* Colors */ +$background-color: #eeeeee !default; +$text-color: #222831 !default; +$muted-text-color: #393e46 !default; +$primary-color: #0092ca !default; +$border-color: mix(#fff, #393e46, 75%) !default; +$footer-background-color: $primary-color !default; +$link-color: #393e46 !default; +$masthead-link-color: $text-color !default; +$masthead-link-color-hover: $text-color !default; +$navicon-link-color-hover: mix(#fff, $text-color, 80%) !default; + +.page__footer { + color: #fff !important; // override +} + +.page__footer-follow .social-icons .svg-inline--fa { + color: inherit; +} diff --git a/docs/_sass/minimal-mistakes/skins/_aqua.scss b/docs/_sass/minimal-mistakes/skins/_aqua.scss new file mode 100644 index 00000000..f5a69af5 --- /dev/null +++ b/docs/_sass/minimal-mistakes/skins/_aqua.scss @@ -0,0 +1,30 @@ +/* ========================================================================== + Aqua skin + ========================================================================== */ + +/* Colors */ +$gray : #1976d2 !default; +$dark-gray : mix(#000, $gray, 40%) !default; +$darker-gray : mix(#000, $gray, 60%) !default; +$light-gray : mix(#fff, $gray, 50%) !default; +$lighter-gray : mix(#fff, $gray, 90%) !default; + +$body-color : #fff !default; +$background-color : #f0fff0 !default; +$code-background-color : $lighter-gray !default; +$code-background-color-dark : $light-gray !default; +$text-color : $dark-gray !default; +$border-color : $lighter-gray !default; + +$primary-color : $gray !default; +$success-color : #27ae60 !default; +$warning-color : #e67e22 !default; +$danger-color : #c0392b !default; +$info-color : #03a9f4 !default; + +/* links */ +$link-color : $info-color !default; +$link-color-hover : mix(#000, $link-color, 25%) !default; +$link-color-visited : mix(#fff, $link-color, 25%) !default; +$masthead-link-color : $primary-color !default; +$masthead-link-color-hover : mix(#000, $primary-color, 25%) !default; \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/skins/_contrast.scss b/docs/_sass/minimal-mistakes/skins/_contrast.scss new file mode 100644 index 00000000..4635e533 --- /dev/null +++ b/docs/_sass/minimal-mistakes/skins/_contrast.scss @@ -0,0 +1,51 @@ +/* ========================================================================== + Contrast skin + ========================================================================== */ + +/* Colors */ +$text-color: #000 !default; +$muted-text-color: $text-color !default; +$primary-color: #ff0000 !default; +$border-color: mix(#fff, $text-color, 75%) !default; +$footer-background-color: #000 !default; +$link-color: #0000ff !default; +$masthead-link-color: $text-color !default; +$masthead-link-color-hover: $text-color !default; +$navicon-link-color-hover: mix(#fff, $text-color, 80%) !default; + +/* contrast syntax highlighting (base16) */ +$base00: #000000 !default; +$base01: #242422 !default; +$base02: #484844 !default; +$base03: #6c6c66 !default; +$base04: #918f88 !default; +$base05: #b5b3aa !default; +$base06: #d9d7cc !default; +$base07: #fdfbee !default; +$base08: #ff6c60 !default; +$base09: #e9c062 !default; +$base0a: #ffffb6 !default; +$base0b: #a8ff60 !default; +$base0c: #c6c5fe !default; +$base0d: #96cbfe !default; +$base0e: #ff73fd !default; +$base0f: #b18a3d !default; + +.page__content { + .notice, + .notice--primary, + .notice--info, + .notice--warning, + .notice--success, + .notice--danger { + color: $text-color; + } +} + +.page__footer { + color: #fff !important; // override +} + +.page__footer-follow .social-icons .svg-inline--fa { + color: inherit; +} diff --git a/docs/_sass/minimal-mistakes/skins/_dark.scss b/docs/_sass/minimal-mistakes/skins/_dark.scss new file mode 100644 index 00000000..4f0a77e0 --- /dev/null +++ b/docs/_sass/minimal-mistakes/skins/_dark.scss @@ -0,0 +1,42 @@ +/* ========================================================================== + Dark skin + ========================================================================== */ + +/* Colors */ +$background-color: #252a34 !default; +$text-color: #eaeaea !default; +$primary-color: #00adb5 !default; +$border-color: mix(#fff, $background-color, 20%) !default; +$code-background-color: mix(#000, $background-color, 15%) !default; +$code-background-color-dark: mix(#000, $background-color, 20%) !default; +$form-background-color: mix(#000, $background-color, 15%) !default; +$footer-background-color: mix(#000, $background-color, 30%) !default; +$link-color: mix($primary-color, $text-color, 40%) !default; +$link-color-hover: mix(#fff, $link-color, 25%) !default; +$link-color-visited: mix(#000, $link-color, 25%) !default; +$masthead-link-color: $text-color !default; +$masthead-link-color-hover: mix(#000, $text-color, 20%) !default; +$navicon-link-color-hover: mix(#000, $background-color, 30%) !default; + +/* dark syntax highlighting (base16) */ +$base00: #ffffff !default; +$base01: #e0e0e0 !default; +$base02: #d0d0d0 !default; +$base03: #b0b0b0 !default; +$base04: #000000 !default; +$base05: #101010 !default; +$base06: #151515 !default; +$base07: #202020 !default; +$base08: #ff0086 !default; +$base09: #fd8900 !default; +$base0a: #aba800 !default; +$base0b: #00c918 !default; +$base0c: #1faaaa !default; +$base0d: #3777e6 !default; +$base0e: #ad00a1 !default; +$base0f: #cc6633 !default; + +.author__urls.social-icons .svg-inline--fa, +.page__footer-follow .social-icons .svg-inline--fa { + color: inherit; +} diff --git a/docs/_sass/minimal-mistakes/skins/_default.scss b/docs/_sass/minimal-mistakes/skins/_default.scss new file mode 100644 index 00000000..7489b584 --- /dev/null +++ b/docs/_sass/minimal-mistakes/skins/_default.scss @@ -0,0 +1,5 @@ +/* ========================================================================== + Default skin + ========================================================================== */ + +// Intentionally left blank diff --git a/docs/_sass/minimal-mistakes/skins/_dirt.scss b/docs/_sass/minimal-mistakes/skins/_dirt.scss new file mode 100644 index 00000000..5090f559 --- /dev/null +++ b/docs/_sass/minimal-mistakes/skins/_dirt.scss @@ -0,0 +1,33 @@ +/* ========================================================================== + Dirt skin + ========================================================================== */ + +/* Colors */ +$background-color: #f3f3f3 !default; +$text-color: #343434 !default; +$muted-text-color: #8e8b82 !default; +$primary-color: #343434 !default; +$border-color: #e9dcbe !default; +$footer-background-color: #e9dcbe !default; +$link-color: #343434 !default; +$masthead-link-color: $text-color !default; +$masthead-link-color-hover: $text-color !default; +$navicon-link-color-hover: mix(#fff, $text-color, 80%) !default; + +/* dirt syntax highlighting (base16) */ +$base00: #231e18 !default; +$base01: #302b25 !default; +$base02: #48413a !default; +$base03: #9d8b70 !default; +$base04: #b4a490 !default; +$base05: #cabcb1 !default; +$base06: #d7c8bc !default; +$base07: #e4d4c8 !default; +$base08: #d35c5c !default; +$base09: #ca7f32 !default; +$base0a: #e0ac16 !default; +$base0b: #b7ba53 !default; +$base0c: #6eb958 !default; +$base0d: #88a4d3 !default; +$base0e: #bb90e2 !default; +$base0f: #b49368 !default; diff --git a/docs/_sass/minimal-mistakes/skins/_mint.scss b/docs/_sass/minimal-mistakes/skins/_mint.scss new file mode 100644 index 00000000..575e977d --- /dev/null +++ b/docs/_sass/minimal-mistakes/skins/_mint.scss @@ -0,0 +1,23 @@ +/* ========================================================================== + Mint skin + ========================================================================== */ + +/* Colors */ +$background-color: #f3f6f6 !default; +$text-color: #40514e !default; +$muted-text-color: #40514e !default; +$primary-color: #11999e !default; +$border-color: mix(#fff, #40514e, 75%) !default; +$footer-background-color: #30e3ca !default; +$link-color: #11999e !default; +$masthead-link-color: $text-color !default; +$masthead-link-color-hover: $text-color !default; +$navicon-link-color-hover: mix(#fff, $text-color, 80%) !default; + +.page__footer { + color: #fff !important; // override +} + +.page__footer-follow .social-icons .svg-inline--fa { + color: inherit; +} diff --git a/docs/_sass/minimal-mistakes/skins/_neon.scss b/docs/_sass/minimal-mistakes/skins/_neon.scss new file mode 100644 index 00000000..5da3688f --- /dev/null +++ b/docs/_sass/minimal-mistakes/skins/_neon.scss @@ -0,0 +1,53 @@ +/* ========================================================================== + Neon skin + ========================================================================== */ + +/* Colors */ +$background-color: #141010 !default; +$text-color: #fff6fb !default; +$primary-color: #f21368 !default; +$border-color: mix(#fff, $background-color, 20%) !default; +$code-background-color: mix(#000, $background-color, 15%) !default; +$code-background-color-dark: mix(#000, $background-color, 20%) !default; +$form-background-color: mix(#000, $background-color, 15%) !default; +$footer-background-color: mix($primary-color, #000, 10%) !default; +$link-color: $primary-color !default; +$link-color-hover: mix(#fff, $link-color, 25%) !default; +$link-color-visited: mix(#000, $link-color, 25%) !default; +$masthead-link-color: $text-color !default; +$masthead-link-color-hover: mix(#000, $text-color, 20%) !default; +$navicon-link-color-hover: mix(#000, $background-color, 30%) !default; + +/* neon syntax highlighting (base16) */ +$base00: #ffffff !default; +$base01: #e0e0e0 !default; +$base02: #d0d0d0 !default; +$base03: #b0b0b0 !default; +$base04: #000000 !default; +$base05: #101010 !default; +$base06: #151515 !default; +$base07: #202020 !default; +$base08: #ff0086 !default; +$base09: #fd8900 !default; +$base0a: #aba800 !default; +$base0b: #00c918 !default; +$base0c: #1faaaa !default; +$base0d: #3777e6 !default; +$base0e: #ad00a1 !default; +$base0f: #cc6633 !default; + +.author__urls.social-icons .svg-inline--fa, +.page__footer-follow .social-icons .svg-inline--fa { + color: inherit; +} + +/* next/previous buttons */ +.pagination--pager { + color: $text-color; + background-color: $primary-color; + border-color: transparent; + + &:visited { + color: $text-color; + } +} diff --git a/docs/_sass/minimal-mistakes/skins/_plum.scss b/docs/_sass/minimal-mistakes/skins/_plum.scss new file mode 100644 index 00000000..b777a8ea --- /dev/null +++ b/docs/_sass/minimal-mistakes/skins/_plum.scss @@ -0,0 +1,60 @@ +/* ========================================================================== + Plum skin + ========================================================================== */ + +/* Colors */ +$background-color: #521477 !default; +$text-color: #fffd86 !default; +$primary-color: #c327ab !default; +$border-color: mix(#fff, $background-color, 20%) !default; +$code-background-color: mix(#000, $background-color, 15%) !default; +$code-background-color-dark: mix(#000, $background-color, 20%) !default; +$form-background-color: mix(#000, $background-color, 15%) !default; +$footer-background-color: mix(#000, $background-color, 25%) !default; +$link-color: $primary-color !default; +$link-color-hover: mix(#fff, $link-color, 25%) !default; +$link-color-visited: mix(#000, $link-color, 25%) !default; +$masthead-link-color: $text-color !default; +$masthead-link-color-hover: mix(#000, $text-color, 20%) !default; +$navicon-link-color-hover: mix(#000, $background-color, 30%) !default; + +/* plum syntax highlighting (base16) */ +$base00: #ffffff !default; +$base01: #e0e0e0 !default; +$base02: #d0d0d0 !default; +$base03: #b0b0b0 !default; +$base04: #000000 !default; +$base05: #101010 !default; +$base06: #151515 !default; +$base07: #202020 !default; +$base08: #ff0086 !default; +$base09: #fd8900 !default; +$base0a: #aba800 !default; +$base0b: #00c918 !default; +$base0c: #1faaaa !default; +$base0d: #3777e6 !default; +$base0e: #ad00a1 !default; +$base0f: #cc6633 !default; + +.author__urls.social-icons .svg-inline--fa, +.page__footer-follow .social-icons .svg-inline--fa { + color: inherit; +} + +.page__content { + a, + a:visited { + color: inherit; + } +} + +/* next/previous buttons */ +.pagination--pager { + color: $text-color; + background-color: $primary-color; + border-color: transparent; + + &:visited { + color: $text-color; + } +} diff --git a/docs/_sass/minimal-mistakes/skins/_sunrise.scss b/docs/_sass/minimal-mistakes/skins/_sunrise.scss new file mode 100644 index 00000000..1f0dca39 --- /dev/null +++ b/docs/_sass/minimal-mistakes/skins/_sunrise.scss @@ -0,0 +1,44 @@ +/* ========================================================================== + Sunrise skin + ========================================================================== */ + +/* Colors */ +$dark-gray: #0e2431 !default; +$background-color: #e8d5b7 !default; +$text-color: #000 !default; +$muted-text-color: $dark-gray !default; +$primary-color: #fc3a52 !default; +$border-color: mix(#000, $background-color, 20%) !default; +$code-background-color: mix(#fff, $background-color, 20%) !default; +$code-background-color-dark: mix(#000, $background-color, 10%) !default; +$form-background-color: mix(#fff, $background-color, 15%) !default; +$footer-background-color: #f9b248 !default; +$link-color: mix(#000, $primary-color, 10%) !default; +$link-color-hover: mix(#fff, $link-color, 25%) !default; +$link-color-visited: mix(#000, $link-color, 25%) !default; +$masthead-link-color: $text-color !default; +$masthead-link-color-hover: mix(#000, $text-color, 20%) !default; +$navicon-link-color-hover: mix(#000, $background-color, 30%) !default; + +/* sunrise syntax highlighting (base16) */ +$base00: #1d1f21 !default; +$base01: #282a2e !default; +$base02: #373b41 !default; +$base03: #969896 !default; +$base04: #b4b7b4 !default; +$base05: #c5c8c6 !default; +$base06: #e0e0e0 !default; +$base07: #ffffff !default; +$base08: #cc6666 !default; +$base09: #de935f !default; +$base0a: #f0c674 !default; +$base0b: #b5bd68 !default; +$base0c: #8abeb7 !default; +$base0d: #81a2be !default; +$base0e: #b294bb !default; +$base0f: #a3685a !default; + +.author__urls.social-icons .fa, +.page__footer-follow .social-icons .svg-inline--fa { + color: inherit; +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/_breakpoint.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/_breakpoint.scss new file mode 100644 index 00000000..a0528eb8 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/_breakpoint.scss @@ -0,0 +1,114 @@ +////////////////////////////// +// Default Variables +////////////////////////////// +$Breakpoint-Settings: ( + 'default media': all, + 'default feature': min-width, + 'default pair': width, + + 'force all media type': false, + 'to ems': false, + 'transform resolutions': true, + + 'no queries': false, + 'no query fallbacks': false, + + 'base font size': 16px, + + 'legacy syntax': false +); + +$breakpoint: () !default; + +////////////////////////////// +// Imports +////////////////////////////// +@import "settings"; +@import "context"; +@import "helpers"; +@import "parsers"; +@import "no-query"; + +@import "respond-to"; + +@import "legacy-settings"; + +////////////////////////////// +// Breakpoint Mixin +////////////////////////////// + +@mixin breakpoint($query, $no-query: false) { + @include legacy-settings-warning; + + // Reset contexts + @include private-breakpoint-reset-contexts(); + + $breakpoint: breakpoint($query, false); + + $query-string: map-get($breakpoint, 'query'); + $query-fallback: map-get($breakpoint, 'fallback'); + + $private-breakpoint-context-holder: map-get($breakpoint, 'context holder') !global; + $private-breakpoint-query-count: map-get($breakpoint, 'query count') !global; + + // Allow for an as-needed override or usage of no query fallback. + @if $no-query != false { + $query-fallback: $no-query; + } + + @if $query-fallback != false { + $context-setter: private-breakpoint-set-context('no-query', $query-fallback); + } + + // Print Out Query String + @if not breakpoint-get('no queries') { + @media #{$query-string} { + @content; + } + } + + @if breakpoint-get('no query fallbacks') != false or breakpoint-get('no queries') == true { + + $type: type-of(breakpoint-get('no query fallbacks')); + $print: false; + + @if ($type == 'bool') { + $print: true; + } + @else if ($type == 'string') { + @if $query-fallback == breakpoint-get('no query fallbacks') { + $print: true; + } + } + @else if ($type == 'list') { + @each $wrapper in breakpoint-get('no query fallbacks') { + @if $query-fallback == $wrapper { + $print: true; + } + } + } + + // Write Fallback + @if ($query-fallback != false) and ($print == true) { + $type-fallback: type-of($query-fallback); + + @if ($type-fallback != 'bool') { + #{$query-fallback} & { + @content; + } + } + @else { + @content; + } + } + } + + @include private-breakpoint-reset-contexts(); +} + + +@mixin mq($query, $no-query: false) { + @include breakpoint($query, $no-query) { + @content; + } +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/_context.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/_context.scss new file mode 100644 index 00000000..57947f5c --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/_context.scss @@ -0,0 +1,95 @@ +////////////////////////////// +// Private Breakpoint Variables +////////////////////////////// +$private-breakpoint-context-holder: (); +$private-breakpoint-query-count: 0 !default; + +////////////////////////////// +// Breakpoint Has Context +// Returns whether or not you are inside a Breakpoint query +////////////////////////////// +@function breakpoint-has-context() { + @if length($private-breakpoint-query-count) { + @return true; + } + @else { + @return false; + } +} + +////////////////////////////// +// Breakpoint Get Context +// $feature: Input feature to get it's current MQ context. Returns false if no context +////////////////////////////// +@function breakpoint-get-context($feature) { + @if map-has-key($private-breakpoint-context-holder, $feature) { + $get: map-get($private-breakpoint-context-holder, $feature); + // Special handling of no-query from get side so /false/ prepends aren't returned + @if $feature == 'no-query' { + @if type-of($get) == 'list' and length($get) > 1 and nth($get, 1) == false { + $get: nth($get, length($get)); + } + } + @return $get; + } + @else { + @if breakpoint-has-context() and $feature == 'media' { + @return breakpoint-get('default media'); + } + @else { + @return false; + } + } +} + +////////////////////////////// +// Private function to set context +////////////////////////////// +@function private-breakpoint-set-context($feature, $value) { + @if $value == 'monochrome' { + $feature: 'monochrome'; + } + + $current: map-get($private-breakpoint-context-holder, $feature); + @if $current and length($current) == $private-breakpoint-query-count { + @warn "You have already queried against `#{$feature}`. Unexpected things may happen if you query against the same feature more than once in the same `and` query. Breakpoint is overwriting the current context with `#{$value}`"; + } + + @if not map-has-key($private-breakpoint-context-holder, $feature) { + $v-holder: (); + @for $i from 1 to $private-breakpoint-query-count { + @if $feature == 'media' { + $v-holder: append($v-holder, breakpoint-get('default media')); + } + @else { + $v-holder: append($v-holder, false); + } + } + $v-holder: append($v-holder, $value); + $private-breakpoint-context-holder: map-merge($private-breakpoint-context-holder, ($feature: $v-holder)) !global; + } + @else { + $v-holder: map-get($private-breakpoint-context-holder, $feature); + $length: length($v-holder); + @for $i from $length to $private-breakpoint-query-count - 1 { + @if $feature == 'media' { + $v-holder: append($v-holder, breakpoint-get('default media')); + } + @else { + $v-holder: append($v-holder, false); + } + } + $v-holder: append($v-holder, $value); + $private-breakpoint-context-holder: map-merge($private-breakpoint-context-holder, ($feature: $v-holder)) !global; + } + + @return true; +} + +////////////////////////////// +// Private function to reset context +////////////////////////////// +@mixin private-breakpoint-reset-contexts { + $private-breakpoint-context-holder: () !global; + $private-breakpoint-query-count: 0 !global; +} \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/_helpers.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/_helpers.scss new file mode 100644 index 00000000..97e522d1 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/_helpers.scss @@ -0,0 +1,151 @@ +////////////////////////////// +// Converts the input value to Base EMs +////////////////////////////// +@function breakpoint-to-base-em($value) { + $value-unit: unit($value); + + // Will convert relative EMs into root EMs. + @if breakpoint-get('base font size') and type-of(breakpoint-get('base font size')) == 'number' and $value-unit == 'em' { + $base-unit: unit(breakpoint-get('base font size')); + + @if $base-unit == 'px' or $base-unit == '%' or $base-unit == 'em' or $base-unit == 'pt' { + @return base-conversion($value) / base-conversion(breakpoint-get('base font size')) * 1em; + } + @else { + @warn '#{breakpoint-get(\'base font size\')} is not set in valid units for font size!'; + @return false; + } + } + @else { + @return base-conversion($value); + } +} + +@function base-conversion($value) { + $unit: unit($value); + + @if $unit == 'px' { + @return $value / 16px * 1em; + } + @else if $unit == '%' { + @return $value / 100% * 1em; + } + @else if $unit == 'em' { + @return $value; + } + @else if $unit == 'pt' { + @return $value / 12pt * 1em; + } + @else { + @return $value; +// @warn 'Everything is terrible! What have you done?!'; + } +} + +////////////////////////////// +// Returns whether the feature can have a min/max pair +////////////////////////////// +$breakpoint-min-max-features: 'color', + 'color-index', + 'aspect-ratio', + 'device-aspect-ratio', + 'device-height', + 'device-width', + 'height', + 'monochrome', + 'resolution', + 'width'; + +@function breakpoint-min-max($feature) { + @each $item in $breakpoint-min-max-features { + @if $feature == $item { + @return true; + } + } + @return false; +} + +////////////////////////////// +// Returns whether the feature can have a string value +////////////////////////////// +$breakpoint-string-features: 'orientation', + 'scan', + 'color', + 'aspect-ratio', + 'device-aspect-ratio', + 'pointer', + 'luminosity'; + +@function breakpoint-string-value($feature) { + @each $item in $breakpoint-string-features { + @if breakpoint-min-max($item) { + @if $feature == 'min-#{$item}' or $feature == 'max-#{$item}' { + @return true; + } + } + @else if $feature == $item { + @return true; + } + } + @return false; +} + +////////////////////////////// +// Returns whether the feature is a media type +////////////////////////////// +$breakpoint-media-types: 'all', + 'braille', + 'embossed', + 'handheld', + 'print', + 'projection', + 'screen', + 'speech', + 'tty', + 'tv'; + +@function breakpoint-is-media($feature) { + @each $media in $breakpoint-media-types { + @if ($feature == $media) or ($feature == 'not #{$media}') or ($feature == 'only #{$media}') { + @return true; + } + } + + @return false; +} + +////////////////////////////// +// Returns whether the feature can stand alone +////////////////////////////// +$breakpoint-single-string-features: 'color', + 'color-index', + 'grid', + 'monochrome'; + +@function breakpoint-single-string($feature) { + @each $item in $breakpoint-single-string-features { + @if $feature == $item { + @return true; + } + } + @return false; +} + +////////////////////////////// +// Returns whether the feature +////////////////////////////// +@function breakpoint-is-resolution($feature) { + $resolutions: 'device-pixel-ratio', 'dpr'; + + @if breakpoint-get('transform resolutions') { + $resolutions: append($resolutions, 'resolution'); + } + + @each $reso in $resolutions { + @if index($feature, $reso) or index($feature, 'min-#{$reso}') or index($feature, 'max-#{$reso}') { + @return true; + } + } + + @return false; +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/_legacy-settings.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/_legacy-settings.scss new file mode 100644 index 00000000..e060ebe3 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/_legacy-settings.scss @@ -0,0 +1,50 @@ +@mixin legacy-settings-warning { + $legacyVars: ( + 'default-media': 'default media', + 'default-feature': 'default feature', + 'force-media-all': 'force all media type', + 'to-ems': 'to ems', + 'resolutions': 'transform resolutions', + 'no-queries': 'no queries', + 'no-query-fallbacks': 'no query fallbacks', + 'base-font-size': 'base font size', + 'legacy-syntax': 'legacy syntax' + ); + + @each $legacy, $new in $legacyVars { + @if global-variable-exists('breakpoint-' + $legacy) { + @warn "In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. Please change all instances of `$breakpoint-#{$legacy}: {{setting}}` to `@include breakpoint-set('#{$new}', {{setting}})`. Variable settings, as well as this warning will be deprecated in a future release." + } + }; + + ////////////////////////////// + // Hand correct each setting + ////////////////////////////// + @if global-variable-exists('breakpoint-default-media') and $breakpoint-default-media != breakpoint-get('default media') { + @include breakpoint-set('default media', $breakpoint-default-media); + } + @if global-variable-exists('breakpoint-default-feature') and $breakpoint-default-feature != breakpoint-get('default feature') { + @include breakpoint-set('default feature', $breakpoint-default-feature); + } + @if global-variable-exists('breakpoint-force-media-all') and $breakpoint-force-media-all != breakpoint-get('force all media type') { + @include breakpoint-set('force all media type', $breakpoint-force-media-all); + } + @if global-variable-exists('breakpoint-to-ems') and $breakpoint-to-ems != breakpoint-get('to ems') { + @include breakpoint-set('to ems', $breakpoint-to-ems); + } + @if global-variable-exists('breakpoint-resolutions') and $breakpoint-resolutions != breakpoint-get('transform resolutions') { + @include breakpoint-set('transform resolutions', $breakpoint-resolutions); + } + @if global-variable-exists('breakpoint-no-queries') and $breakpoint-no-queries != breakpoint-get('no queries') { + @include breakpoint-set('no queries', $breakpoint-no-queries); + } + @if global-variable-exists('breakpoint-no-query-fallbacks') and $breakpoint-no-query-fallbacks != breakpoint-get('no query fallbacks') { + @include breakpoint-set('no query fallbacks', $breakpoint-no-query-fallbacks); + } + @if global-variable-exists('breakpoint-base-font-size') and $breakpoint-base-font-size != breakpoint-get('base font size') { + @include breakpoint-set('base font size', $breakpoint-base-font-size); + } + @if global-variable-exists('breakpoint-legacy-syntax') and $breakpoint-legacy-syntax != breakpoint-get('legacy syntax') { + @include breakpoint-set('legacy syntax', $breakpoint-legacy-syntax); + } +} \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/_no-query.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/_no-query.scss new file mode 100644 index 00000000..0b5a81f6 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/_no-query.scss @@ -0,0 +1,15 @@ +@function breakpoint-no-query($query) { + @if type-of($query) == 'list' { + $keyword: nth($query, 1); + + @if type-of($keyword) == 'string' and ($keyword == 'no-query' or $keyword == 'no query' or $keyword == 'fallback') { + @return nth($query, 2); + } + @else { + @return false; + } + } + @else { + @return false; + } +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/_parsers.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/_parsers.scss new file mode 100644 index 00000000..f0b053fe --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/_parsers.scss @@ -0,0 +1,215 @@ +////////////////////////////// +// Import Parser Pieces +////////////////////////////// +@import "parsers/query"; +@import "parsers/single"; +@import "parsers/double"; +@import "parsers/triple"; +@import "parsers/resolution"; + +$Memo-Exists: function-exists(memo-get) and function-exists(memo-set); + +////////////////////////////// +// Breakpoint Function +////////////////////////////// +@function breakpoint($query, $contexts...) { + $run: true; + $return: (); + + // Grab the Memo Output if Memoization can be a thing + @if $Memo-Exists { + $return: memo-get(breakpoint, breakpoint $query $contexts); + + @if $return != null { + $run: false; + } + } + + @if not $Memo-Exists or $run { + // Internal Variables + $query-string: ''; + $query-fallback: false; + $return: (); + + // Reserve Global Private Breakpoint Context + $holder-context: $private-breakpoint-context-holder; + $holder-query-count: $private-breakpoint-query-count; + + // Reset Global Private Breakpoint Context + $private-breakpoint-context-holder: () !global; + $private-breakpoint-query-count: 0 !global; + + + // Test to see if it's a comma-separated list + $or-list: if(list-separator($query) == 'comma', true, false); + + + @if ($or-list == false and breakpoint-get('legacy syntax') == false) { + $query-string: breakpoint-parse($query); + } + @else { + $length: length($query); + + $last: nth($query, $length); + $query-fallback: breakpoint-no-query($last); + + @if ($query-fallback != false) { + $length: $length - 1; + } + + @if (breakpoint-get('legacy syntax') == true) { + $mq: (); + + @for $i from 1 through $length { + $mq: append($mq, nth($query, $i), comma); + } + + $query-string: breakpoint-parse($mq); + } + @else { + $query-string: ''; + @for $i from 1 through $length { + $query-string: $query-string + if($i == 1, '', ', ') + breakpoint-parse(nth($query, $i)); + } + } + } + + $return: ('query': $query-string, + 'fallback': $query-fallback, + 'context holder': $private-breakpoint-context-holder, + 'query count': $private-breakpoint-query-count + ); + @if length($contexts) > 0 and nth($contexts, 1) != false { + @if $query-fallback != false { + $context-setter: private-breakpoint-set-context('no-query', $query-fallback); + } + $context-map: (); + @each $context in $contexts { + $context-map: map-merge($context-map, ($context: breakpoint-get-context($context))); + } + $return: map-merge($return, (context: $context-map)); + } + + // Reset Global Private Breakpoint Context + $private-breakpoint-context-holder: () !global; + $private-breakpoint-query-count: 0 !global; + + @if $Memo-Exists { + $holder: memo-set(breakpoint, breakpoint $query $contexts, $return); + } + } + + @return $return; +} + +////////////////////////////// +// General Breakpoint Parser +////////////////////////////// +@function breakpoint-parse($query) { + // Increase number of 'and' queries + $private-breakpoint-query-count: $private-breakpoint-query-count + 1 !global; + + // Set up Media Type + $query-print: ''; + + $force-all: ((breakpoint-get('force all media type') == true) and (breakpoint-get('default media') == 'all')); + $empty-media: true; + @if ($force-all == true) or (breakpoint-get('default media') != 'all') { + // Force the print of the default media type if (force all is true and default media type is all) or (default media type is not all) + $query-print: breakpoint-get('default media'); + $empty-media: false; + } + + + $query-resolution: false; + + $query-holder: breakpoint-parse-query($query); + + + + // Loop over each parsed out query and write it to $query-print + $first: true; + + @each $feature in $query-holder { + $length: length($feature); + + // Parse a single feature + @if ($length == 1) { + // Feature is currently a list, grab the actual value + $feature: nth($feature, 1); + + // Media Type must by convention be the first item, so it's safe to flat override $query-print, which right now should only be the default media type + @if (breakpoint-is-media($feature)) { + @if ($force-all == true) or ($feature != 'all') { + // Force the print of the default media type if (force all is true and default media type is all) or (default media type is not all) + $query-print: $feature; + $empty-media: false; + + // Set Context + $context-setter: private-breakpoint-set-context(media, $query-print); + } + } + @else { + $parsed: breakpoint-parse-single($feature, $empty-media, $first); + $query-print: '#{$query-print} #{$parsed}'; + $first: false; + } + } + // Parse a double feature + @else if ($length == 2) { + @if (breakpoint-is-resolution($feature) != false) { + $query-resolution: $feature; + } + @else { + $parsed: null; + // If it's a string/number pair, + // we check to see if one is a single-string value, + // then we parse it as a normal double + $alpha: nth($feature, 1); + $beta: nth($feature, 2); + @if breakpoint-single-string($alpha) or breakpoint-single-string($beta) { + $parsed: breakpoint-parse-single($alpha, $empty-media, $first); + $query-print: '#{$query-print} #{$parsed}'; + $first: false; + $parsed: breakpoint-parse-single($beta, $empty-media, $first); + $query-print: '#{$query-print} #{$parsed}'; + } + @else { + $parsed: breakpoint-parse-double($feature, $empty-media, $first); + $query-print: '#{$query-print} #{$parsed}'; + $first: false; + } + } + } + // Parse a triple feature + @else if ($length == 3) { + $parsed: breakpoint-parse-triple($feature, $empty-media, $first); + $query-print: '#{$query-print} #{$parsed}'; + $first: false; + } + + } + + @if ($query-resolution != false) { + $query-print: breakpoint-build-resolution($query-print, $query-resolution, $empty-media, $first); + } + + // Loop through each feature that's been detected so far and append 'false' to the the value list to increment their counters + @each $f, $v in $private-breakpoint-context-holder { + $v-holder: $v; + $length: length($v-holder); + @if length($v-holder) < $private-breakpoint-query-count { + @for $i from $length to $private-breakpoint-query-count { + @if $f == 'media' { + $v-holder: append($v-holder, breakpoint-get('default media')); + } + @else { + $v-holder: append($v-holder, false); + } + } + } + $private-breakpoint-context-holder: map-merge($private-breakpoint-context-holder, ($f: $v-holder)) !global; + } + + @return $query-print; +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/_respond-to.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/_respond-to.scss new file mode 100644 index 00000000..e2462c5f --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/_respond-to.scss @@ -0,0 +1,82 @@ +//////////////////////// +// Default the Breakpoints variable +//////////////////////// +$breakpoints: () !default; +$BREAKPOINTS: () !default; + +//////////////////////// +// Respond-to API Mixin +//////////////////////// +@mixin respond-to($context, $no-query: false) { + @if length($breakpoints) > 0 and length($BREAKPOINTS) == 0 { + @warn "In order to avoid variable namespace collisions, we have updated the way to add breakpoints for respond-to. Please change all instances of `$breakpoints: add-breakpoint()` to `@include add-breakpoint()`. The `add-breakpoint()` function will be deprecated in a future release."; + $BREAKPOINTS: $breakpoints !global; + $breakpoints: () !global; + } + + @if type-of($BREAKPOINTS) != 'map' { + // Just in case someone writes gibberish to the $breakpoints variable. + @warn "Your breakpoints aren't a map! `respond-to` expects a map. Please check the value of $BREAKPOINTS variable."; + @content; + } + @else if map-has-key($BREAKPOINTS, $context) { + @include breakpoint(map-get($BREAKPOINTS, $context), $no-query) { + @content; + } + } + @else if not map-has-key($BREAKPOINTS, $context) { + @warn "`#{$context}` isn't a defined breakpoint! Please add it using `$breakpoints: add-breakpoint(`#{$context}`, $value);`"; + @content; + } + @else { + @warn "You haven't created any breakpoints yet! Make some already! `@include add-breakpoint($name, $bkpt)`"; + @content; + } +} + +////////////////////////////// +// Add Breakpoint to Breakpoints +// TODO: Remove function in next release +////////////////////////////// +@function add-breakpoint($name, $bkpt, $overwrite: false) { + $output: ($name: $bkpt); + + @if length($breakpoints) == 0 { + @return $output; + } + @else { + @if map-has-key($breakpoints, $name) and $overwrite != true { + @warn "You already have a breakpoint named `#{$name}`, please choose another breakpoint name, or pass in `$overwrite: true` to overwrite the previous breakpoint."; + @return $breakpoints; + } + @else if not map-has-key($breakpoints, $name) or $overwrite == true { + @return map-merge($breakpoints, $output); + } + } +} + +@mixin add-breakpoint($name, $bkpt, $overwrite: false) { + $output: ($name: $bkpt); + + @if length($BREAKPOINTS) == 0 { + $BREAKPOINTS: $output !global; + } + @else { + @if map-has-key($BREAKPOINTS, $name) and $overwrite != true { + @warn "You already have a breakpoint named `#{$name}`, please choose another breakpoint name, or pass in `$overwrite: true` to overwrite the previous breakpoint."; + $BREAKPOINTS: $BREAKPOINTS !global; + } + @else if not map-has-key($BREAKPOINTS, $name) or $overwrite == true { + $BREAKPOINTS: map-merge($BREAKPOINTS, $output) !global; + } + } +} + +@function get-breakpoint($name: false) { + @if $name == false { + @return $BREAKPOINTS; + } + @else { + @return map-get($BREAKPOINTS, $name); + } +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/_settings.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/_settings.scss new file mode 100644 index 00000000..05ee6894 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/_settings.scss @@ -0,0 +1,71 @@ +////////////////////////////// +// Has Setting +////////////////////////////// +@function breakpoint-has($setting) { + @if map-has-key($breakpoint, $setting) { + @return true; + } + @else { + @return false; + } +} + +////////////////////////////// +// Get Settings +////////////////////////////// +@function breakpoint-get($setting) { + @if breakpoint-has($setting) { + @return map-get($breakpoint, $setting); + } + @else { + @return map-get($Breakpoint-Settings, $setting); + } +} + +////////////////////////////// +// Set Settings +////////////////////////////// +@function breakpoint-set($setting, $value) { + @if (str-index($setting, '-') or str-index($setting, '_')) and str-index($setting, ' ') == null { + @warn "Words in Breakpoint settings should be separated by spaces, not dashes or underscores. Please replace dashes and underscores between words with spaces. Settings will not work as expected until changed."; + } + $breakpoint: map-merge($breakpoint, ($setting: $value)) !global; + @return true; +} + +@mixin breakpoint-change($setting, $value) { + $breakpoint-change: breakpoint-set($setting, $value); +} + +@mixin breakpoint-set($setting, $value) { + @include breakpoint-change($setting, $value); +} + +@mixin bkpt-change($setting, $value) { + @include breakpoint-change($setting, $value); +} +@mixin bkpt-set($setting, $value) { + @include breakpoint-change($setting, $value); +} + +////////////////////////////// +// Remove Setting +////////////////////////////// +@function breakpoint-reset($settings...) { + @if length($settings) == 1 { + $settings: nth($settings, 1); + } + + @each $setting in $settings { + $breakpoint: map-remove($breakpoint, $setting) !global; + } + @return true; +} + +@mixin breakpoint-reset($settings...) { + $breakpoint-reset: breakpoint-reset($settings); +} + +@mixin bkpt-reset($settings...) { + $breakpoint-reset: breakpoint-reset($settings); +} \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_double.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_double.scss new file mode 100644 index 00000000..24580c15 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_double.scss @@ -0,0 +1,33 @@ +////////////////////////////// +// Import Pieces +////////////////////////////// +@import "double/default-pair"; +@import "double/double-string"; +@import "double/default"; + +@function breakpoint-parse-double($feature, $empty-media, $first) { + $parsed: ''; + $leader: ''; + // If we're forcing + @if not ($empty-media) or not ($first) { + $leader: 'and '; + } + + $first: nth($feature, 1); + $second: nth($feature, 2); + + // If we've got two numbers, we know we need to use the default pair because there are no media queries that has a media feature that is a number + @if type-of($first) == 'number' and type-of($second) == 'number' { + $parsed: breakpoint-parse-default-pair($first, $second); + } + // If they are both strings, we send it through the string parser + @else if type-of($first) == 'string' and type-of($second) == 'string' { + $parsed: breakpoint-parse-double-string($first, $second); + } + // If it's a string/number pair, we parse it as a normal double + @else { + $parsed: breakpoint-parse-double-default($first, $second); + } + + @return $leader + $parsed; +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_query.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_query.scss new file mode 100644 index 00000000..b138b393 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_query.scss @@ -0,0 +1,82 @@ +@function breakpoint-parse-query($query) { + // Parse features out of an individual query + $feature-holder: (); + $query-holder: (); + $length: length($query); + + @if $length == 2 { + // If we've got a string/number, number/string, check to see if it's a valid string/number pair or two singles + @if (type-of(nth($query, 1)) == 'string' and type-of(nth($query, 2)) == 'number') or (type-of(nth($query, 1)) == 'number' and type-of(nth($query, 2)) == 'string') { + + $number: ''; + $value: ''; + + @if type-of(nth($query, 1)) == 'string' { + $number: nth($query, 2); + $value: nth($query, 1); + } + @else { + $number: nth($query, 1); + $value: nth($query, 2); + } + + // If the string value can be a single value, check to see if the number passed in is a valid input for said single value. Fortunately, all current single-value options only accept unitless numbers, so this check is easy. + @if breakpoint-single-string($value) { + @if unitless($number) { + $feature-holder: append($value, $number, space); + $query-holder: append($query-holder, $feature-holder, comma); + @return $query-holder; + } + } + // If the string is a media type, split the query + @if breakpoint-is-media($value) { + $query-holder: append($query-holder, nth($query, 1)); + $query-holder: append($query-holder, nth($query, 2)); + @return $query-holder; + } + // If it's not a single feature, we're just going to assume it's a proper string/value pair, and roll with it. + @else { + $feature-holder: append($value, $number, space); + $query-holder: append($query-holder, $feature-holder, comma); + @return $query-holder; + } + + } + // If they're both numbers, we assume it's a double and roll with that + @else if (type-of(nth($query, 1)) == 'number' and type-of(nth($query, 2)) == 'number') { + $feature-holder: append(nth($query, 1), nth($query, 2), space); + $query-holder: append($query-holder, $feature-holder, comma); + @return $query-holder; + } + // If they're both strings and neither are singles, we roll with that. + @else if (type-of(nth($query, 1)) == 'string' and type-of(nth($query, 2)) == 'string') { + @if not breakpoint-single-string(nth($query, 1)) and not breakpoint-single-string(nth($query, 2)) { + $feature-holder: append(nth($query, 1), nth($query, 2), space); + $query-holder: append($query-holder, $feature-holder, comma); + @return $query-holder; + } + } + } + @else if $length == 3 { + // If we've got three items and none is a list, we check to see + @if type-of(nth($query, 1)) != 'list' and type-of(nth($query, 2)) != 'list' and type-of(nth($query, 3)) != 'list' { + // If none of the items are single string values and none of the values are media values, we're good. + @if (not breakpoint-single-string(nth($query, 1)) and not breakpoint-single-string(nth($query, 2)) and not breakpoint-single-string(nth($query, 3))) and ((not breakpoint-is-media(nth($query, 1)) and not breakpoint-is-media(nth($query, 2)) and not breakpoint-is-media(nth($query, 3)))) { + $feature-holder: append(nth($query, 1), nth($query, 2), space); + $feature-holder: append($feature-holder, nth($query, 3), space); + $query-holder: append($query-holder, $feature-holder, comma); + @return $query-holder; + } + // let's check to see if the first item is a media type + @else if breakpoint-is-media(nth($query, 1)) { + $query-holder: append($query-holder, nth($query, 1)); + $feature-holder: append(nth($query, 2), nth($query, 3), space); + $query-holder: append($query-holder, $feature-holder); + @return $query-holder; + } + } + } + + // If it's a single item, or if it's not a special case double or triple, we can simply return the query. + @return $query; +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_resolution.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_resolution.scss new file mode 100644 index 00000000..19769adf --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_resolution.scss @@ -0,0 +1,31 @@ +@import "resolution/resolution"; + +@function breakpoint-build-resolution($query-print, $query-resolution, $empty-media, $first) { + $leader: ''; + // If we're forcing + @if not ($empty-media) or not ($first) { + $leader: 'and '; + } + + @if breakpoint-get('transform resolutions') and $query-resolution { + $resolutions: breakpoint-make-resolutions($query-resolution); + $length: length($resolutions); + $query-holder: ''; + + @for $i from 1 through $length { + $query: '#{$query-print} #{$leader}#{nth($resolutions, $i)}'; + @if $i == 1 { + $query-holder: $query; + } + @else { + $query-holder: '#{$query-holder}, #{$query}'; + } + } + + @return $query-holder; + } + @else { + // Return with attached resolution + @return $query-print; + } +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_single.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_single.scss new file mode 100644 index 00000000..d9fd764a --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_single.scss @@ -0,0 +1,26 @@ +////////////////////////////// +// Import Pieces +////////////////////////////// +@import "single/default"; + +@function breakpoint-parse-single($feature, $empty-media, $first) { + $parsed: ''; + $leader: ''; + // If we're forcing + @if not ($empty-media) or not ($first) { + $leader: 'and '; + } + + // If it's a single feature that can stand alone, we let it + @if (breakpoint-single-string($feature)) { + $parsed: $feature; + // Set Context + $context-setter: private-breakpoint-set-context($feature, $feature); + } + // If it's not a stand alone feature, we pass it off to the default handler. + @else { + $parsed: breakpoint-parse-default($feature); + } + + @return $leader + '(' + $parsed + ')'; +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_triple.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_triple.scss new file mode 100644 index 00000000..e2732067 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/_triple.scss @@ -0,0 +1,36 @@ +////////////////////////////// +// Import Pieces +////////////////////////////// +@import "triple/default"; + +@function breakpoint-parse-triple($feature, $empty-media, $first) { + $parsed: ''; + $leader: ''; + + // If we're forcing + @if not ($empty-media) or not ($first) { + $leader: 'and '; + } + + // separate the string features from the value numbers + $string: null; + $numbers: null; + @each $val in $feature { + @if type-of($val) == string { + $string: $val; + } + @else { + @if type-of($numbers) == 'null' { + $numbers: $val; + } + @else { + $numbers: append($numbers, $val); + } + } + } + + $parsed: breakpoint-parse-triple-default($string, nth($numbers, 1), nth($numbers, 2)); + + @return $leader + $parsed; + +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default-pair.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default-pair.scss new file mode 100644 index 00000000..f88432cc --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default-pair.scss @@ -0,0 +1,21 @@ +@function breakpoint-parse-default-pair($first, $second) { + $default: breakpoint-get('default pair'); + $min: ''; + $max: ''; + + // Sort into min and max + $min: min($first, $second); + $max: max($first, $second); + + // Set Context + $context-setter: private-breakpoint-set-context(min-#{$default}, $min); + $context-setter: private-breakpoint-set-context(max-#{$default}, $max); + + // Make them EMs if need be + @if (breakpoint-get('to ems') == true) { + $min: breakpoint-to-base-em($min); + $max: breakpoint-to-base-em($max); + } + + @return '(min-#{$default}: #{$min}) and (max-#{$default}: #{$max})'; +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default.scss new file mode 100644 index 00000000..73190ed5 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default.scss @@ -0,0 +1,22 @@ +@function breakpoint-parse-double-default($first, $second) { + $feature: ''; + $value: ''; + + @if type-of($first) == 'string' { + $feature: $first; + $value: $second; + } + @else { + $feature: $second; + $value: $first; + } + + // Set Context + $context-setter: private-breakpoint-set-context($feature, $value); + + @if (breakpoint-get('to ems') == true) { + $value: breakpoint-to-base-em($value); + } + + @return '(#{$feature}: #{$value})' +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_double-string.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_double-string.scss new file mode 100644 index 00000000..c6fd0cb0 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_double-string.scss @@ -0,0 +1,22 @@ +@function breakpoint-parse-double-string($first, $second) { + $feature: ''; + $value: ''; + + // Test to see which is the feature and which is the value + @if (breakpoint-string-value($first) == true) { + $feature: $first; + $value: $second; + } + @else if (breakpoint-string-value($second) == true) { + $feature: $second; + $value: $first; + } + @else { + @warn "Neither #{$first} nor #{$second} is a valid media query name."; + } + + // Set Context + $context-setter: private-breakpoint-set-context($feature, $value); + + @return '(#{$feature}: #{$value})'; +} \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/resolution/_resolution.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/resolution/_resolution.scss new file mode 100644 index 00000000..36804212 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/resolution/_resolution.scss @@ -0,0 +1,60 @@ +@function breakpoint-make-resolutions($resolution) { + $length: length($resolution); + + $output: (); + + @if $length == 2 { + $feature: ''; + $value: ''; + + // Find which is number + @if type-of(nth($resolution, 1)) == 'number' { + $value: nth($resolution, 1); + } + @else { + $value: nth($resolution, 2); + } + + // Determine min/max/standard + @if index($resolution, 'min-resolution') { + $feature: 'min-'; + } + @else if index($resolution, 'max-resolution') { + $feature: 'max-'; + } + + $standard: '(#{$feature}resolution: #{$value})'; + + // If we're not dealing with dppx, + @if unit($value) != 'dppx' { + $base: 96dpi; + @if unit($value) == 'dpcm' { + $base: 243.84dpcm; + } + // Write out feature tests + $webkit: ''; + $moz: ''; + $webkit: '(-webkit-#{$feature}device-pixel-ratio: #{$value / $base})'; + $moz: '(#{$feature}-moz-device-pixel-ratio: #{$value / $base})'; + // Append to output + $output: append($output, $standard, space); + $output: append($output, $webkit, space); + $output: append($output, $moz, space); + } + @else { + $webkit: ''; + $moz: ''; + $webkit: '(-webkit-#{$feature}device-pixel-ratio: #{$value / 1dppx})'; + $moz: '(#{$feature}-moz-device-pixel-ratio: #{$value / 1dppx})'; + $fallback: '(#{$feature}resolution: #{$value / 1dppx * 96dpi})'; + // Append to output + $output: append($output, $standard, space); + $output: append($output, $webkit, space); + $output: append($output, $moz, space); + $output: append($output, $fallback, space); + } + + } + + @return $output; +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/single/_default.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/single/_default.scss new file mode 100644 index 00000000..503ef427 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/single/_default.scss @@ -0,0 +1,13 @@ +@function breakpoint-parse-default($feature) { + $default: breakpoint-get('default feature'); + + // Set Context + $context-setter: private-breakpoint-set-context($default, $feature); + + @if (breakpoint-get('to ems') == true) and (type-of($feature) == 'number') { + @return '#{$default}: #{breakpoint-to-base-em($feature)}'; + } + @else { + @return '#{$default}: #{$feature}'; + } +} diff --git a/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/triple/_default.scss b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/triple/_default.scss new file mode 100644 index 00000000..7fa418dd --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/breakpoint/parsers/triple/_default.scss @@ -0,0 +1,18 @@ +@function breakpoint-parse-triple-default($feature, $first, $second) { + + // Sort into min and max + $min: min($first, $second); + $max: max($first, $second); + + // Set Context + $context-setter: private-breakpoint-set-context(min-#{$feature}, $min); + $context-setter: private-breakpoint-set-context(max-#{$feature}, $max); + + // Make them EMs if need be + @if (breakpoint-get('to ems') == true) { + $min: breakpoint-to-base-em($min); + $max: breakpoint-to-base-em($max); + } + + @return '(min-#{$feature}: #{$min}) and (max-#{$feature}: #{$max})'; +} diff --git a/docs/_sass/minimal-mistakes/vendor/magnific-popup/_magnific-popup.scss b/docs/_sass/minimal-mistakes/vendor/magnific-popup/_magnific-popup.scss new file mode 100644 index 00000000..27b27bcc --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/magnific-popup/_magnific-popup.scss @@ -0,0 +1,649 @@ +/* Magnific Popup CSS */ + +@import "settings"; + +//////////////////////// +// +// Contents: +// +// 1. Default Settings +// 2. General styles +// - Transluscent overlay +// - Containers, wrappers +// - Cursors +// - Helper classes +// 3. Appearance +// - Preloader & text that displays error messages +// - CSS reset for buttons +// - Close icon +// - "1 of X" counter +// - Navigation (left/right) arrows +// - Iframe content type styles +// - Image content type styles +// - Media query where size of arrows is reduced +// - IE7 support +// +//////////////////////// + + + +//////////////////////// +// 1. Default Settings +//////////////////////// + +$mfp-overlay-color: #0b0b0b !default; +$mfp-overlay-opacity: 0.8 !default; +$mfp-shadow: 0 0 8px rgba(0, 0, 0, 0.6) !default; // shadow on image or iframe +$mfp-popup-padding-left: 8px !default; // Padding from left and from right side +$mfp-popup-padding-left-mobile: 6px !default; // Same as above, but is applied when width of window is less than 800px + +$mfp-z-index-base: 1040 !default; // Base z-index of popup +$mfp-include-arrows: true !default; // include styles for nav arrows +$mfp-controls-opacity: 0.65 !default; +$mfp-controls-color: #FFF !default; +$mfp-controls-border-color: #3F3F3F !default; +$mfp-inner-close-icon-color: #333 !default; +$mfp-controls-text-color: #CCC !default; // Color of preloader and "1 of X" indicator +$mfp-controls-text-color-hover: #FFF !default; +$mfp-IE7support: true !default; // Very basic IE7 support + +// Iframe-type options +$mfp-include-iframe-type: true !default; +$mfp-iframe-padding-top: 40px !default; +$mfp-iframe-background: #000 !default; +$mfp-iframe-max-width: 900px !default; +$mfp-iframe-ratio: 9/16 !default; + +// Image-type options +$mfp-include-image-type: true !default; +$mfp-image-background: #444 !default; +$mfp-image-padding-top: 40px !default; +$mfp-image-padding-bottom: 40px !default; +$mfp-include-mobile-layout-for-image: true !default; // Removes paddings from top and bottom + +// Image caption options +$mfp-caption-title-color: #F3F3F3 !default; +$mfp-caption-subtitle-color: #BDBDBD !default; + +// A11y +$mfp-use-visuallyhidden: false !default; // Hide content from browsers, but make it available for screen readers + + + +//////////////////////// +// 2. General styles +//////////////////////// + +// Transluscent overlay +.mfp-bg { + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: $mfp-z-index-base + 2; + overflow: hidden; + position: fixed; + + background: $mfp-overlay-color; + opacity: $mfp-overlay-opacity; + @if $mfp-IE7support { + filter: unquote("alpha(opacity=#{$mfp-overlay-opacity*100})"); + } +} + +// Wrapper for popup +.mfp-wrap { + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: $mfp-z-index-base + 3; + position: fixed; + outline: none !important; + -webkit-backface-visibility: hidden; // fixes webkit bug that can cause "false" scrollbar +} + +// Root container +.mfp-container { + text-align: center; + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + padding: 0 $mfp-popup-padding-left; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +// Vertical centerer helper +.mfp-container { + &:before { + content: ''; + display: inline-block; + height: 100%; + vertical-align: middle; + } +} + +// Remove vertical centering when popup has class `mfp-align-top` +.mfp-align-top { + .mfp-container { + &:before { + display: none; + } + } +} + +// Popup content holder +.mfp-content { + position: relative; + display: inline-block; + vertical-align: middle; + margin: 0 auto; + text-align: left; + z-index: $mfp-z-index-base + 5; +} +.mfp-inline-holder, +.mfp-ajax-holder { + .mfp-content { + width: 100%; + cursor: auto; + } +} + +// Cursors +.mfp-ajax-cur { + cursor: progress; +} +.mfp-zoom-out-cur { + &, .mfp-image-holder .mfp-close { + cursor: -moz-zoom-out; + cursor: -webkit-zoom-out; + cursor: zoom-out; + } +} +.mfp-zoom { + cursor: pointer; + cursor: -webkit-zoom-in; + cursor: -moz-zoom-in; + cursor: zoom-in; +} +.mfp-auto-cursor { + .mfp-content { + cursor: auto; + } +} + +.mfp-close, +.mfp-arrow, +.mfp-preloader, +.mfp-counter { + -webkit-user-select:none; + -moz-user-select: none; + user-select: none; +} + +// Hide the image during the loading +.mfp-loading { + &.mfp-figure { + display: none; + } +} + +// Helper class that hides stuff +@if $mfp-use-visuallyhidden { + // From HTML5 Boilerplate https://github.com/h5bp/html5-boilerplate/blob/v4.2.0/doc/css.md#visuallyhidden + .mfp-hide { + border: 0 !important; + clip: rect(0 0 0 0) !important; + height: 1px !important; + margin: -1px !important; + overflow: hidden !important; + padding: 0 !important; + position: absolute !important; + width: 1px !important; + } +} @else { + .mfp-hide { + display: none !important; + } +} + + +//////////////////////// +// 3. Appearance +//////////////////////// + +// Preloader and text that displays error messages +.mfp-preloader { + color: $mfp-controls-text-color; + position: absolute; + top: 50%; + width: auto; + text-align: center; + margin-top: -0.8em; + left: 8px; + right: 8px; + z-index: $mfp-z-index-base + 4; + a { + color: $mfp-controls-text-color; + &:hover { + color: $mfp-controls-text-color-hover; + } + } +} + +// Hide preloader when content successfully loaded +.mfp-s-ready { + .mfp-preloader { + display: none; + } +} + +// Hide content when it was not loaded +.mfp-s-error { + .mfp-content { + display: none; + } +} + +// CSS-reset for buttons +button { + &.mfp-close, + &.mfp-arrow { + overflow: visible; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; + display: block; + outline: none; + padding: 0; + z-index: $mfp-z-index-base + 6; + -webkit-box-shadow: none; + box-shadow: none; + } + &::-moz-focus-inner { + padding: 0; + border: 0 + } +} + + +// Close icon +.mfp-close { + width: 44px; + height: 44px; + line-height: 44px; + + position: absolute; + right: 0; + top: 0; + text-decoration: none; + text-align: center; + opacity: $mfp-controls-opacity; + @if $mfp-IE7support { + filter: unquote("alpha(opacity=#{$mfp-controls-opacity*100})"); + } + padding: 0 0 18px 10px; + color: $mfp-controls-color; + + font-style: normal; + font-size: 28px; + font-family: $serif; + + &:hover, + &:focus { + opacity: 1; + @if $mfp-IE7support { + filter: unquote("alpha(opacity=#{1*100})"); + } + } + + &:active { + top: 1px; + } +} +.mfp-close-btn-in { + .mfp-close { + color: $mfp-inner-close-icon-color; + } +} +.mfp-image-holder, +.mfp-iframe-holder { + .mfp-close { + color: $mfp-controls-color; + right: -6px; + text-align: right; + padding-right: 6px; + width: 100%; + } +} + +// "1 of X" counter +.mfp-counter { + position: absolute; + top: 0; + right: 0; + color: $mfp-controls-text-color; + font-size: 12px; + line-height: 18px; +} + +// Navigation arrows +@if $mfp-include-arrows { + .mfp-arrow { + position: absolute; + opacity: $mfp-controls-opacity; + @if $mfp-IE7support { + filter: unquote("alpha(opacity=#{$mfp-controls-opacity*100})"); + } + margin: 0; + top: 50%; + margin-top: -55px; + padding: 0; + width: 90px; + height: 110px; + -webkit-tap-highlight-color: rgba(0,0,0,0); + &:active { + margin-top: -54px; + } + &:hover, + &:focus { + opacity: 1; + @if $mfp-IE7support { + filter: unquote("alpha(opacity=#{1*100})"); + } + } + &:before, + &:after, + .mfp-b, + .mfp-a { + content: ''; + display: block; + width: 0; + height: 0; + position: absolute; + left: 0; + top: 0; + margin-top: 35px; + margin-left: 35px; + border: medium inset transparent; + } + + &:after, + .mfp-a { + + border-top-width: 13px; + border-bottom-width: 13px; + top:8px; + } + + &:before, + .mfp-b { + border-top-width: 21px; + border-bottom-width: 21px; + opacity: 0.7; + } + + } + + .mfp-arrow-left { + left: 0; + + &:after, + .mfp-a { + border-right: 17px solid $mfp-controls-color; + margin-left: 31px; + } + &:before, + .mfp-b { + margin-left: 25px; + border-right: 27px solid $mfp-controls-border-color; + } + } + + .mfp-arrow-right { + right: 0; + &:after, + .mfp-a { + border-left: 17px solid $mfp-controls-color; + margin-left: 39px + } + &:before, + .mfp-b { + border-left: 27px solid $mfp-controls-border-color; + } + } +} + + + +// Iframe content type +@if $mfp-include-iframe-type { + .mfp-iframe-holder { + padding-top: $mfp-iframe-padding-top; + padding-bottom: $mfp-iframe-padding-top; + .mfp-content { + line-height: 0; + width: 100%; + max-width: $mfp-iframe-max-width; + } + .mfp-close { + top: -40px; + } + } + .mfp-iframe-scaler { + width: 100%; + height: 0; + overflow: hidden; + padding-top: $mfp-iframe-ratio * 100%; + iframe { + position: absolute; + display: block; + top: 0; + left: 0; + width: 100%; + height: 100%; + box-shadow: $mfp-shadow; + background: $mfp-iframe-background; + } + } +} + + + +// Image content type +@if $mfp-include-image-type { + + /* Main image in popup */ + img { + &.mfp-img { + width: auto; + max-width: 100%; + height: auto; + display: block; + line-height: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: $mfp-image-padding-top 0 $mfp-image-padding-bottom; + margin: 0 auto; + } + } + + /* The shadow behind the image */ + .mfp-figure { + line-height: 0; + &:after { + content: ''; + position: absolute; + left: 0; + top: $mfp-image-padding-top; + bottom: $mfp-image-padding-bottom; + display: block; + right: 0; + width: auto; + height: auto; + z-index: -1; + box-shadow: $mfp-shadow; + background: $mfp-image-background; + } + small { + color: $mfp-caption-subtitle-color; + display: block; + font-size: 12px; + line-height: 14px; + } + figure { + margin: 0; + } + figcaption { + margin-top: 0; + margin-bottom: 0; // reset for bottom spacing + } + } + .mfp-bottom-bar { + margin-top: -$mfp-image-padding-bottom + 4; + position: absolute; + top: 100%; + left: 0; + width: 100%; + cursor: auto; + } + .mfp-title { + text-align: left; + line-height: 18px; + color: $mfp-caption-title-color; + word-wrap: break-word; + padding-right: 36px; // leave some space for counter at right side + } + + .mfp-image-holder { + .mfp-content { + max-width: 100%; + } + } + + .mfp-gallery { + .mfp-image-holder { + .mfp-figure { + cursor: pointer; + } + } + } + + + @if $mfp-include-mobile-layout-for-image { + @media screen and (max-width: 800px) and (orientation:landscape), screen and (max-height: 300px) { + /** + * Remove all paddings around the image on small screen + */ + .mfp-img-mobile { + .mfp-image-holder { + padding-left: 0; + padding-right: 0; + } + img { + &.mfp-img { + padding: 0; + } + } + .mfp-figure { + // The shadow behind the image + &:after { + top: 0; + bottom: 0; + } + small { + display: inline; + margin-left: 5px; + } + } + .mfp-bottom-bar { + background: rgba(0,0,0,0.6); + bottom: 0; + margin: 0; + top: auto; + padding: 3px 5px; + position: fixed; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + &:empty { + padding: 0; + } + } + .mfp-counter { + right: 5px; + top: 3px; + } + .mfp-close { + top: 0; + right: 0; + width: 35px; + height: 35px; + line-height: 35px; + background: rgba(0, 0, 0, 0.6); + position: fixed; + text-align: center; + padding: 0; + } + } + } + } +} + + + +// Scale navigation arrows and reduce padding from sides +@media all and (max-width: 900px) { + .mfp-arrow { + -webkit-transform: scale(0.75); + transform: scale(0.75); + } + .mfp-arrow-left { + -webkit-transform-origin: 0; + transform-origin: 0; + } + .mfp-arrow-right { + -webkit-transform-origin: 100%; + transform-origin: 100%; + } + .mfp-container { + padding-left: $mfp-popup-padding-left-mobile; + padding-right: $mfp-popup-padding-left-mobile; + } +} + + + +// IE7 support +// Styles that make popup look nicier in old IE +@if $mfp-IE7support { + .mfp-ie7 { + .mfp-img { + padding: 0; + } + .mfp-bottom-bar { + width: 600px; + left: 50%; + margin-left: -300px; + margin-top: 5px; + padding-bottom: 5px; + } + .mfp-container { + padding: 0; + } + .mfp-content { + padding-top: 44px; + } + .mfp-close { + top: 0; + right: 0; + padding-top: 0; + } + } +} diff --git a/docs/_sass/minimal-mistakes/vendor/magnific-popup/_settings.scss b/docs/_sass/minimal-mistakes/vendor/magnific-popup/_settings.scss new file mode 100644 index 00000000..e7866b3f --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/magnific-popup/_settings.scss @@ -0,0 +1,46 @@ +//////////////////////// +// Settings // +//////////////////////// + +// overlay +$mfp-overlay-color: #000; // Color of overlay screen +$mfp-overlay-opacity: 0.8; // Opacity of overlay screen +$mfp-shadow: 0 0 8px rgba(0, 0, 0, 0.6); // Shadow on image or iframe + +// spacing +$mfp-popup-padding-left: 8px; // Padding from left and from right side +$mfp-popup-padding-left-mobile: 6px; // Same as above, but is applied when width of window is less than 800px + +$mfp-z-index-base: 1040; // Base z-index of popup + +// controls +$mfp-include-arrows: true; // Include styles for nav arrows +$mfp-controls-opacity: 1; // Opacity of controls +$mfp-controls-color: #fff; // Color of controls +$mfp-controls-border-color: #fff; // Border color of controls +$mfp-inner-close-icon-color: #fff; // Color of close button when inside +$mfp-controls-text-color: #ccc; // Color of preloader and "1 of X" indicator +$mfp-controls-text-color-hover: #fff; // Hover color of preloader and "1 of X" indicator +$mfp-IE7support: true; // Very basic IE7 support + +// Iframe-type options +$mfp-include-iframe-type: true; // Enable Iframe-type popups +$mfp-iframe-padding-top: 40px; // Iframe padding top +$mfp-iframe-background: #000; // Background color of iframes +$mfp-iframe-max-width: 900px; // Maximum width of iframes +$mfp-iframe-ratio: 9/16; // Ratio of iframe (9/16 = widescreen, 3/4 = standard, etc.) + +// Image-type options +$mfp-include-image-type: true; // Enable Image-type popups +$mfp-image-background: #444 !default; +$mfp-image-padding-top: 40px; // Image padding top +$mfp-image-padding-bottom: 40px; // Image padding bottom +$mfp-include-mobile-layout-for-image: true; // Removes paddings from top and bottom + +// Image caption options +$mfp-caption-title-color: #f3f3f3; // Caption title color +$mfp-caption-subtitle-color: #bdbdbd; // Caption subtitle color +.mfp-counter { font-family: $serif; } // Caption font family + +// A11y +$mfp-use-visuallyhidden: false; \ No newline at end of file diff --git a/docs/_sass/minimal-mistakes/vendor/susy/_su.scss b/docs/_sass/minimal-mistakes/vendor/susy/_su.scss new file mode 100644 index 00000000..83386adb --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/_su.scss @@ -0,0 +1,4 @@ +// Su +// == + +@import 'susy/su'; diff --git a/docs/_sass/minimal-mistakes/vendor/susy/_susy-prefix.scss b/docs/_sass/minimal-mistakes/vendor/susy/_susy-prefix.scss new file mode 100644 index 00000000..185b3561 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/_susy-prefix.scss @@ -0,0 +1,13 @@ +// Susy (Prefixed) +// =============== + +$susy-version: 3; + +@import 'susy/utilities'; +@import 'susy/su-validate'; +@import 'susy/su-math'; +@import 'susy/settings'; +@import 'susy/normalize'; +@import 'susy/parse'; +@import 'susy/syntax-helpers'; +@import 'susy/api'; diff --git a/docs/_sass/minimal-mistakes/vendor/susy/_susy.scss b/docs/_sass/minimal-mistakes/vendor/susy/_susy.scss new file mode 100644 index 00000000..bfda3d08 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/_susy.scss @@ -0,0 +1,5 @@ +// Susy (Un-Prefixed) +// ================== + +@import 'susy-prefix'; +@import 'susy/unprefix'; diff --git a/docs/_sass/minimal-mistakes/vendor/susy/plugins/_svg-grid.scss b/docs/_sass/minimal-mistakes/vendor/susy/plugins/_svg-grid.scss new file mode 100644 index 00000000..99db8d1e --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/plugins/_svg-grid.scss @@ -0,0 +1,5 @@ +// SVG Grid Background +// =================== + +@import 'svg-grid/prefix'; +@import 'svg-grid/svg-unprefix'; diff --git a/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_prefix.scss b/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_prefix.scss new file mode 100644 index 00000000..21fb45fa --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_prefix.scss @@ -0,0 +1,7 @@ +// Prefixed SVG Plugin +// =================== + +@import 'svg-settings'; +@import 'svg-utilities'; +@import 'svg-grid-math'; +@import 'svg-api'; diff --git a/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-api.scss b/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-api.scss new file mode 100644 index 00000000..7d880e3e --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-api.scss @@ -0,0 +1,114 @@ +/// Plugin: SVG Grid Image +/// ====================== +/// @group plugin_svg-grid +/// @see susy-svg-grid + + + +/// ## Overview +/// If you want to generate svg-backgrounds +/// for help visualizing and debugging your grids, +/// import the SVG Grid Plugin. +/// +/// The plugin adds `svg-grid-colors` setting +/// to your global defaults, +/// which you can override in `$susy`. +/// It also provides you with a new function, +/// `susy-svg-grid()`, +/// which will return inline svg for use in +/// backgrounds or generated content. +/// +/// This function come with an unprefixed alias by default, +/// using the `svg-grid` import. +/// If you only only want prefixed versions of the API, +/// import the `svg-grid/prefix` partial instead. +/// +/// @group plugin_svg-grid +/// +/// @example scss - importing the plugin +/// // The full path to import Susy will depend on your setup… +/// +/// // unprefixed +/// @import 'plugins/svg-grid'; +/// +/// // prefixed +/// @import 'plugins/svg-grid/prefix'; +/// +/// @example scss - generating background grids +/// .grid { +/// background: susy-svg-grid() no-repeat scroll; +/// } + + + +// SVG Grid +// -------- +/// Return inline svg-data in to display the grid. +/// +/// @group plugin_svg-grid +/// +/// @param {Map | List} $grid [$susy] - +/// Map or shorthand defining the current grid +/// @param {Color | List | null} $colors [null] - +/// Column color, or list of colors for column-gradient, +/// used to override the global `svg-grid-colors` setting +/// @param {Length | null} $offset [null] - +/// Manually override the default grid-image offset, +/// to account for grid edges +/// +/// @return {String} - +/// CSS inline-data SVG string, in `url()` format, +/// for use in image or content properties +/// @example scss +/// .grid { +/// background: susy-svg-grid() no-repeat scroll; +/// } +@function susy-svg-grid( + $grid: $susy, + $colors: null, + $offset: null +) { + // Grid parsing & normalizing + $grid: susy-compile($grid, $context-only: true); + + // Color and gradient handling + $gradient: ''; + + @if (not $colors) { + $colors: susy-get('svg-grid-colors'); + } + + @if length($colors) > 1 { + $gradient: _susy-svg-gradient($colors); + $colors: 'url(%23susy-svg-gradient)'; + } @else { + $colors: _susy-svg-color($colors); + } + + // Get a default image-width + $span: ( + 'span': map-get($grid, 'columns'), + 'spread': map-get($grid, 'container-spread'), + ); + $span: map-merge($grid, $span); + $image-width: su-call('su-span', $span); + $image-width: if((type-of($image-width) == 'number'), $image-width, 100%); + + // SVG construction + $columns: map-get($grid, 'columns'); + $offset: $offset or _susy-svg-offset($grid); + + $attrs: 'fill="#{$colors}" width="#{$image-width}"'; + $svg: 'data:image/svg+xml,'; + $svg: $svg + '%3Csvg xmlns="http://www.w3.org/2000/svg" #{$attrs} %3E'; + $svg: $svg + $gradient; + + @for $column from 1 through length($columns) { + $width: susy-span(1 narrow at $column, $grid); + $x: _susy-svg-column-position($column, $grid); + + $svg: $svg + _susy-svg-rect($x, $width, $offset); + } + + @return url('#{$svg}%3C/svg%3E'); +} diff --git a/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-grid-math.scss b/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-grid-math.scss new file mode 100644 index 00000000..044801ab --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-grid-math.scss @@ -0,0 +1,67 @@ +// SVG Grid Math +// ============= + + + +// SVG Column Position +// ------------------- +/// Determine the proper horizontal position +/// for a column rectangle +/// +/// @access private +/// +/// @param {Integer} $column - +/// 1-indexed column location on the grid +/// @param {Map} $grid - +/// Normalized settings map representing the current grid +/// +/// @return {Length} - +/// Horizontal position of svg column rectangle, +/// as distance from the grid edge +@function _susy-svg-column-position( + $column, + $grid +) { + $x: $column - 1; + + @if ($x > 0) { + $x: susy-span(first $x wide, $grid); + } + + @return $x; +} + + + +// SVG Offset +// ---------- +/// Determine if a grid image needs to be offset, +/// to account for edge gutters. +/// +/// @access private +/// +/// @param {Map} $grid - +/// Normalized settings map representing the current grid +/// +/// @return {Length | null} - +/// Expected distance from container edge to first column, +/// based on spread values and gutter-widths +@function _susy-svg-offset( + $grid +) { + $columns: su-valid-columns(map-get($grid, 'columns')); + $gutters: su-valid-gutters(map-get($grid, 'gutters')); + $container: su-valid-spread(map-get($grid, 'container-spread')) + 1; + + @if ($container == 0) { + @return null; + } + + $gutter: su-call('su-gutter', $grid); + + @if (type-of($gutter) == 'string') { + @return 'calc(#{$container} * #{$gutter} / 2)'; + } + + @return $container * $gutter / 2; +} diff --git a/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-settings.scss b/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-settings.scss new file mode 100644 index 00000000..3fcc91fb --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-settings.scss @@ -0,0 +1,14 @@ +// SVG Settings +// ============ + + +// Susy SVG Defaults +// ================= +/// This plugin adds the `svg-grid-colors` property +/// and default value to `$_susy-defaults` — +/// you can override that value in `$susy` +/// or any other grid settings map. +/// @group plugin_svg-grid +$_susy-defaults: map-merge(( + 'svg-grid-colors': hsla(120, 50%, 50%, 0.5) hsla(120, 50%, 75%, 0.5), + ), $_susy-defaults); diff --git a/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-unprefix.scss b/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-unprefix.scss new file mode 100644 index 00000000..187157cf --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-unprefix.scss @@ -0,0 +1,18 @@ +// Unprefix Susy SVG Grid +// ====================== + + + +// SVG Grid +// -------- +/// Un-prefixed alias for `susy-svg-grid` +/// +/// @group plugin_svg-grid +/// @alias susy-svg-grid +@function svg-grid( + $grid: $susy, + $colors: susy-get('svg-grid-colors'), + $offset: null +) { + @return susy-svg-grid($grid, $colors, $offset); +} diff --git a/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-utilities.scss b/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-utilities.scss new file mode 100644 index 00000000..e4bf18ff --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-utilities.scss @@ -0,0 +1,133 @@ +// SVG Utilities +// ============= + + + +// SVG Validate Units +// ------------------ +/// Make sure a length is supported in svg +/// +/// @access private +/// +/// @param {Length} $length - +/// The length to validate +/// @param {String} $name [null] - +/// Optional name of length origin, +/// for error reporting +/// +/// @return {Length} - +/// An svg-validated length, or comparable valid length +@function _susy-svg-validate-units( + $length, + $name: null +) { + $_svg-units: ('em', 'ex', 'px', 'pt', 'pc', 'cm', 'mm', 'in', '%'); + $string: type-of($length) == 'string'; + + @if ($length == 0) or ($string) or index($_svg-units, unit($length)) { + @return $length; + } + + @return _susy-error( + '`#{unit($length)}` #{$name} units are not supported in SVG', + '_susy-svg-validate-units'); +} + + + +// SVG Rect +// -------- +/// Build a single svg rectangle +/// +/// @access private +/// +/// @param {Length} $x - +/// Horizontal position for the rectangle +/// @param {Length} $width - +/// Width of the rectangle +/// @param {Length} $offset [null] - +/// Offset the rectangle, to account for edge gutters +/// +/// @return {String} - +/// Escaped string representing one svg rectangle +@function _susy-svg-rect( + $x, + $width, + $offset: null +) { + $x: _susy-svg-validate-units($x); + $width: _susy-svg-validate-units($width); + $offset: if($offset == 0, null, $offset); + + @if (type-of($offset) == 'number') and (type-of($x) == 'number') { + @if comparable($x, $offset) { + $x: $x + $offset; + } @else { + $x: 'calc(#{$x} + #{$offset})'; + } + } @else if $offset and ($x != 0) { + $x: 'calc(#{$x} + #{$offset})'; + } @else if $offset { + $x: $offset; + } + + @return '%3Crect x="#{$x}" width="#{$width}" height="100%"/%3E'; +} + + + +// SVG Color +// --------- +/// Stringify colors, and escape hex symbol +/// +/// @access private +/// +/// @param {Color} $color - +/// Color to stringify and escape +/// +/// @return {String} - +/// Escaped string value of color +@function _susy-svg-color( + $color +) { + $color: inspect($color); // convert to string + + @if (str-index($color, '#') == 1) { + $color: '%23' + str-slice($color, 2); + } + + @return $color; +} + + + +// SVG Gradient +// ------------ +/// Create a multi-color svg gradient +/// +/// @access private +/// +/// @param {List} $colors - +/// List of colors to be equally spaced from `0%` to `100%` +/// in each column rectangle +/// +/// @return {String} - +/// Escaped string representing one svg gradient +/// (`id="susy-svg-gradient"`) +@function _susy-svg-gradient( + $colors +) { + $gradient: '%3Cdefs%3E%3ClinearGradient spreadMethod="pad"'; + $gradient: '#{$gradient} id="susy-svg-gradient"'; + $gradient: '#{$gradient} x1="0%" y1="0%" x2="100%" y2="0%"%3E'; + + @for $i from 1 through length($colors) { + $color: _susy-svg-color(nth($colors, $i)); + $offset: percentage(($i - 1) / (length($colors) - 1)); + $stop: '%3Cstop offset="#{$offset}" style="stop-color:#{$color};" /%3E'; + + $gradient: $gradient + $stop; + } + + @return $gradient + '%3C/linearGradient%3E%3C/defs%3E'; +} diff --git a/docs/_sass/minimal-mistakes/vendor/susy/susy/_api.scss b/docs/_sass/minimal-mistakes/vendor/susy/susy/_api.scss new file mode 100644 index 00000000..de8c9bdd --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/susy/_api.scss @@ -0,0 +1,318 @@ +/// Susy3 API Functions +/// =================== +/// These three functions form the core of Susy's +/// layout-building grid API. +/// +/// - Use `span()` and `gutter()` to return any grid-width, +/// and apply the results wherever you need them: +/// CSS `width`, `margin`, `padding`, `flex-basis`, `transform`, etc. +/// - For asymmetrical-fluid grids, +/// `slice()` can help manage your nesting context. +/// +/// All three functions come with an unprefixed alias by default, +/// using the `susy` import. +/// Import the `susy-prefix` partial instead, +/// if you only only want prefixed versions of the API. +/// +/// This is a thin syntax-sugar shell around +/// the "Su" core-math functions: `su-span`, `su-gutter`, and `su-slice`. +/// If you prefer the more constrained syntax of the math engine, +/// you are welcome to use those functions instead. +/// +/// @group b-api +/// @see susy-span +/// @see susy-gutter +/// @see susy-slice +/// @see su-span +/// @see su-gutter +/// @see su-slice + + + +/// ## Shorthand +/// +/// All functions draw on the same shorthand syntax in two parts, +/// seperated by the word `of`. +/// +/// ### Span Syntax: `` [`` ``] +/// The first part describes the +/// **span** width, location, and spread in any order. +/// Only the width is required: +/// +/// - `span(2)` will return the width of 2 columns. +/// - `span(3 wide)` will return 3-columns, with an additional gutter. +/// - location is only needed with asymmetrical grids, +/// where `span(3 at 2)` will return the width of +/// specific columns on the grid. +/// Since these are functions, they will not handle placement for you. +/// +/// ### Context Syntax: `[of ]` +/// The second half of Susy's shorthand +/// describes the grid-**context** – +/// available columns, container-spread, and optional gutter override – +/// in any order. +/// All of these settings have globally-defined defaults: +/// +/// - `span(2 of 6)` will set the context to +/// a slice of 6 columns from the global grid. +/// More details below. +/// - `span(2 of 12 wide)` changes the container-spread +/// as well as the column-context. +/// - `span(2 of 12 set-gutters 0.5em)` +/// will override the global gutters setting +/// for this one calculation. +/// +/// A single unitless number for `columns` +/// will be treated as a slice of the parent grid. +/// On a grid with `columns: susy-repeat(12, 120px)`, +/// the shorthand `of 4` will use the parent `120px` column-width. +/// You can also be more explicit, +/// and say `of susy-repeat(4, 100px)`. +/// If you are using asymmetrical grids, +/// like `columns: (1 1 2 3 5 8)`, +/// Susy can't slice it for you without knowing which columns you want. +/// The `slice` function accepts exactly the same syntax as `span`, +/// but returns a list of columns rather than a width. +/// Use it in your context like `of slice(first 3)`. +/// +/// @group b-api + + + +// Susy Span +// --------- +/// This is the primary function in Susy — +/// used to return the width of a span across one or more columns, +/// and any relevant gutters along the way. +/// With the default settings, +/// `span(3)` will return the width of 3 columns, +/// and the 2 intermediate gutters. +/// This can be used to set the `width` property of grid elements, +/// or `margin` and `padding` +/// to push, pull, and pad your elements. +/// +/// - This is a thin syntax-sugar shell around +/// the core-math `su-span()` function. +/// - The un-prefixed alias `span()` is available by default. +/// +/// @group b-api +/// @see su-span +/// @see $susy +/// +/// @param {list} $span - +/// Shorthand expression to define the width of the span, +/// optionally containing: +/// - a count, length, or column-list span. +/// - `at $n`, `first`, or `last` location on asymmetrical grids, +/// where `at 1 == first`, +/// and `last` will calculate the proper location +/// based on columns and span. +/// - `narrow`, `wide`, or `wider` for optionally spreading +/// across adjacent gutters. +/// - `of $n ` for available grid columns +/// and spread of the container. +/// Span counts like `of 6` are valid +/// in the context of symmetrical grids, +/// where Susy can safely infer a slice of the parent columns. +/// - and `set-gutters $n` to override global gutter settings. +/// +/// @param {map} $config [()] - +/// Optional map of Susy grid configuration settings. +/// See `$susy` documentation for details. +/// +/// @return {length} - +/// Calculated length value, using the units given, +/// or converting to `%` for fraction-based grids, +/// or a full `calc` function when units/fractions +/// are not comparable outside the browser. +/// +/// @example scss - span half the grid +/// .foo { +/// // the result is a bit under 50% to account for gutters +/// width: susy-span(6 of 12); +/// } +/// +/// @example scss - span a specific segment of asymmetrical grid +/// .foo { +/// width: susy-span(3 at 3 of (1 2 3 5 8)); +/// } +@function susy-span( + $span, + $config: () +) { + $output: susy-compile($span, $config); + + @if map-get($output, 'span') { + @return su-call('su-span', $output); + } + + $actual: '[#{type-of($span)}] `#{inspect($span)}`'; + @return _susy-error( + 'Unable to determine span value from #{$actual}.', + 'susy-span'); +} + + + +// Susy Gutter +// ----------- +/// The gutter function returns +/// the width of a single gutter on your grid, +/// to be applied where you see fit – +/// on `margins`, `padding`, `transform`, or element `width`. +/// +/// - This is a thin syntax-sugar shell around +/// the core-math `su-gutter()` function. +/// - The un-prefixed alias `gutter()` is available by default. +/// +/// @group b-api +/// @see su-gutter +/// @see $susy +/// +/// @param {list | number} $context [null] - +/// Optional context for nested gutters, +/// including shorthand for +/// `columns`, `gutters`, and `container-spread` +/// (additional shorthand will be ignored) +/// +/// @param {map} $config [()] - +/// Optional map of Susy grid configuration settings. +/// See `$susy` documentation for details. +/// +/// @return {length} - +/// Width of a gutter as `%` of current context, +/// or in the units defined by `column-width` when available +/// +/// @example scss - add gutters before or after an element +/// .floats { +/// float: left; +/// width: span(3 of 6); +/// margin-left: gutter(of 6); +/// } +/// +/// @example scss - add gutters to padding +/// .flexbox { +/// flex: 1 1 span(3 wide of 6 wide); +/// padding: gutter(of 6) / 2; +/// } +/// +@function susy-gutter( + $context: susy-get('columns'), + $config: () +) { + $context: susy-compile($context, $config, 'context-only'); + + @return su-call('su-gutter', $context); +} + + + +// Susy Slice +// ---------- +/// Working with asymmetrical grids (un-equal column widths) +/// can be challenging –  +/// expecially when they involve fluid/fractional elements. +/// Describing a context `of (15em 6em 6em 6em 15em)` is a lot +/// to put inside the span or gutter function shorthand. +/// This slice function returns a sub-slice of asymmetrical columns to use +/// for a nested context. +/// `slice(3 at 2)` will give you a subset of the global grid, +/// spanning 3 columns, starting with the second. +/// +/// - This is a thin syntax-sugar shell around +/// the core-math `su-slice()` function. +/// - The un-prefixed alias `slice()` is available by default. +/// +/// @group b-api +/// @see su-slice +/// @see $susy +/// +/// @param {list} $span - +/// Shorthand expression to define the subset span, optionally containing: +/// - `at $n`, `first`, or `last` location on asymmetrical grids; +/// - `of $n ` for available grid columns +/// and spread of the container +/// - Span-counts like `of 6` are only valid +/// in the context of symmetrical grids +/// - Valid spreads include `narrow`, `wide`, or `wider` +/// +/// @param {map} $config [()] - +/// Optional map of Susy grid configuration settings. +/// See `$susy` documentation for details. +/// +/// @return {list} - +/// Subset list of columns for use for a nested context +/// +/// @example scss - Return a nested segment of asymmetrical grid +/// $context: susy-slice(3 at 3 of (1 2 3 5 8)); +/// /* $context: #{$context}; */ +@function susy-slice( + $span, + $config: () +) { + $span: susy-compile($span, $config); + + @return su-call('su-slice', $span); +} + + + +/// ## Building Grids +/// The web has come a long way +/// since the days of double-margin-hacks +/// and inconsistent subpixel rounding. +/// In addition to floats and tables, +/// we can now use much more powerful tools, +/// like flexbox and CSS grid, +/// to build more interesting and responsive layouts. +/// +/// With Susy3, we hope you'll start moving in that direction. +/// You can still build classic 12-column Grid Systems, +/// and we'll help you get there, +/// but Susy3 is primarily designed for a grid-math-on-demand +/// approach to layout: +/// applying our functions only where you really need grid math. +/// Read the [intro article by OddBird][welcome] for more details. +/// +/// [welcome]: http://oddbird.net/2017/06/28/susy3/ +/// +/// @group b-api +/// @link http://oddbird.net/2017/06/28/susy3/ Article: Welcome to Susy3 +/// +/// @example scss - floats +/// .float { +/// width: span(3); +/// margin-right: gutter(); +/// } +/// +/// @example scss - flexbox +/// .flexbox { +/// flex: 1 1 span(3); +/// // half a gutter on either side… +/// padding: 0 gutter() / 2; +/// } +/// +/// @example scss - pushing and pulling +/// .push-3 { +/// margin-left: span(3 wide); +/// } +/// +/// .pull-3 { +/// margin-left: 0 - span(3 wide); +/// } +/// +/// @example scss - building an attribute system +/// // markup example:
+/// [data-span] { +/// float: left; +/// +/// &:not([data-span*='last']) { +/// margin-right: gutter(); +/// } +/// } +/// +/// @for $span from 1 through length(susy-get('columns')) { +/// [data-span*='#{$span}'] { +/// width: span($span); +/// } +/// } diff --git a/docs/_sass/minimal-mistakes/vendor/susy/susy/_normalize.scss b/docs/_sass/minimal-mistakes/vendor/susy/susy/_normalize.scss new file mode 100644 index 00000000..a988504c --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/susy/_normalize.scss @@ -0,0 +1,261 @@ +/// Syntax Normalization +/// ==================== +/// Susy is divided into two layers: +/// "Su" provides the core math functions with a stripped-down syntax, +/// while "Susy" adds global settings, shorthand syntax, +/// and other helpers. +/// Each setting (e.g. span, location, columns, spread, etc.) +/// has a single canonical syntax in Su. +/// +/// This normalization module helps translate between those layers, +/// transforming parsed Susy input into +/// values that Su will understand. +/// +/// @group x-normal +/// +/// @see susy-normalize +/// @see susy-normalize-span +/// @see susy-normalize-columns +/// @see susy-normalize-spread +/// @see susy-normalize-location + + + +// Susy Normalize +// -------------- +/// Normalize the values in a configuration map. +/// In addition to the global `$susy` properties, +/// this map can include local span-related imformation, +/// like `span` and `location`. +/// +/// Normalization does not check that values are valid, +/// which will happen in the Su math layer. +/// These functions merely look for known Susy syntax – +/// returning a map with those shorthand values +/// converted into low-level data for Su. +/// For example `span: all` and `location: first` +/// will be converted into specific numbers. +/// +/// @group x-normal +/// @see $susy +/// @see susy-parse +/// +/// @param {map} $config - +/// Map of Susy configuration settings to normalize. +/// See `$susy` and `susy-parse()` documentation for details. +/// @param {map | null} $context [null] - +/// Map of Susy configuration settings to use as global reference, +/// or `null` to use global settings. +/// +/// @return {map} - +/// Map of Susy configuration settings, +/// with all values normalized for Su math functions. +@function susy-normalize( + $config, + $context: null +) { + // Spread + @each $setting in ('spread', 'container-spread') { + $value: map-get($config, $setting); + + @if $value { + $value: susy-normalize-spread($value); + $config: map-merge($config, ($setting: $value)); + } + } + + // Columns + $columns: map-get($config, 'columns'); + + @if $columns { + $columns: susy-normalize-columns($columns, $context); + $config: map-merge($config, ('columns': $columns)); + } + + @if not $columns { + $map: type-of($context) == 'map'; + $columns: if($map, map-get($context, 'columns'), null); + $columns: $columns or susy-get('columns'); + } + + // Span + $span: map-get($config, 'span'); + + @if $span { + $span: susy-normalize-span($span, $columns); + $config: map-merge($config, ('span': $span)); + } + + // Location + $location: map-get($config, 'location'); + + @if $location { + $location: susy-normalize-location($span, $location, $columns); + $config: map-merge($config, ('location': $location)); + } + + @return $config; +} + + + +// Normalize Span +// -------------- +/// Normalize `span` shorthand for Su. +/// Su span syntax allows an explicit length (e.g. `3em`), +/// unitless column-span number (e.g. `3` columns), +/// or an explicit list of columns (e.g. `(3 5 8)`). +/// +/// Susy span syntax also allows the `all` keyword, +/// which will be converted to a slice of the context +/// in normalization. +/// +/// @group x-normal +/// +/// @param {number | list | 'all'} $span - +/// Span value to normalize. +/// @param {list} $columns - +/// Normalized list of columns in the grid +/// +/// @return {number | list} - +/// Number or list value for `$span` +@function susy-normalize-span( + $span, + $columns: susy-get('columns') +) { + @if ($span == 'all') { + @return length($columns); + } + + @return $span; +} + + + +// Normalize Columns +// ----------------- +/// Normalize `column` shorthand for Su. +/// Su column syntax only allows column lists (e.g. `120px 1 1 1 120px`). +/// +/// Susy span syntax also allows a unitless `slice` number (e.g `of 5`), +/// which will be converted to a slice of the context +/// in normalization. +/// +/// @group x-normal +/// +/// @param {list | integer} $columns - +/// List of available columns, +/// or unitless integer representing a slice of +/// the available context. +/// @param {map | null} $context [null] - +/// Map of Susy configuration settings to use as global reference, +/// or `null` to access global settings. +/// +/// @return {list} - +/// Columns list value, normalized for Su input. +/// +/// @throws +/// when attempting to access a slice of asymmetrical context +@function susy-normalize-columns( + $columns, + $context: null +) { + $context: $context or susy-settings(); + + @if type-of($columns) == 'list' { + @return _susy-flatten($columns); + } + + @if (type-of($columns) == 'number') and (unitless($columns)) { + $span: $columns; + $context: map-get($context, 'columns'); + $symmetrical: susy-repeat(length($context), nth($context, 1)); + + @if ($context == $symmetrical) { + @return susy-repeat($span, nth($context, 1)); + } @else { + $actual: 'of `#{$span}`'; + $columns: 'grid-columns `#{$context}`'; + @return _susy-error( + 'context-slice #{$actual} can not be determined based on #{$columns}.', + 'susy-normalize-columns'); + } + } + + @return $columns; +} + + + +// Normalize Spread +// ---------------- +/// Normalize `spread` shorthand for Su. +/// Su spread syntax only allows the numbers `-1`, `0`, or `1` – +/// representing the number of gutters covered +/// in relation to columns spanned. +/// +/// Susy spread syntax also allows keywords for each value – +/// `narrow` for `-1`, `wide` for `0`, or `wider` for `1` – +/// which will be converted to their respective integers +/// in normalization. +/// +/// @group x-normal +/// +/// @param {0 | 1 | -1 | 'narrow' | 'wide' | 'wider'} $spread - +/// Spread across adjacent gutters, relative to a column-count — +/// either `narrow` (-1), `wide` (0), or `wider` (1) +/// +/// @return {number} - +/// Numeric value for `$spread` +@function susy-normalize-spread( + $spread +) { + $normal-spread: ( + 'narrow': -1, + 'wide': 0, + 'wider': 1, + ); + + @return map-get($normal-spread, $spread) or $spread; +} + + + +// Normalize Location +// ------------------ +/// Normalize `location` shorthand for Su. +/// Su location syntax requires the (1-indexed) number for a column. +/// +/// Susy also allows the `first` and `last` keywords, +/// where `first` is always `1`, +/// and `last` is calculated based on span and column values. +/// Both keywords are normalized into an integer index +/// in normalization. +/// +/// @group x-normal +/// +/// @param {number} $span - +/// Number of grid-columns to be spanned +/// @param {integer | 'first' | 'last'} $location - +/// Starting (1-indexed) column position of a span, +/// or a named location keyword. +/// @param {list} $columns - +/// Already-normalized list of columns in the grid. +/// +/// @return {integer} - +/// Numeric value for `$location` +@function susy-normalize-location( + $span, + $location, + $columns +) { + $count: length($columns); + $normal-locations: ( + 'first': 1, + 'alpha': 1, + 'last': $count - $span + 1, + 'omega': $count - $span + 1, + ); + + @return map-get($normal-locations, $location) or $location; +} diff --git a/docs/_sass/minimal-mistakes/vendor/susy/susy/_parse.scss b/docs/_sass/minimal-mistakes/vendor/susy/susy/_parse.scss new file mode 100644 index 00000000..98aa40a9 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/susy/_parse.scss @@ -0,0 +1,163 @@ +/// Shorthand Syntax Parser +/// ======================= +/// The syntax parser converts [shorthand syntax][short] +/// into a map of settings that can be compared/merged with +/// other config maps and global setting. +/// +/// [short]: b-api.html +/// +/// @group x-parser + + + +// Parse +// ----- +/// The `parse` function provides all the syntax-sugar in Susy, +/// converting user shorthand +/// into a usable map of keys and values +/// that can be normalized and passed to Su. +/// +/// @group x-parser +/// @see $susy +/// +/// @param {list} $shorthand - +/// Shorthand expression to define the width of the span, +/// optionally containing: +/// - a count, length, or column-list span; +/// - `at $n`, `first`, or `last` location on asymmetrical grids; +/// - `narrow`, `wide`, or `wider` for optionally spreading +/// across adjacent gutters; +/// - `of $n ` for available grid columns +/// and spread of the container +/// (span counts like `of 6` are only valid +/// in the context of symmetrical grids); +/// - and `set-gutters $n` to override global gutter settings +/// @param {bool} $context-only [false] - +/// Allow the parser to ignore span and span-spread values, +/// only parsing context and container-spread. +/// This makes it possible to accept spanless values, +/// like the `gutters()` syntax. +/// When parsing context-only, +/// the `of` indicator is optional. +/// +/// @return {map} - +/// Map of span and grid settings +/// parsed from shorthand input – +/// including all the properties available globally – +/// `columns`, `gutters`, `spread`, `container-spread` – +/// along with the span-specific properties +/// `span`, and `location`. +/// +/// @throw +/// when a shorthand value is not recognized +@function susy-parse( + $shorthand, + $context-only: false +) { + $parse-error: 'Unknown shorthand property:'; + $options: ( + 'first': 'location', + 'last': 'location', + 'alpha': 'location', + 'omega': 'location', + 'narrow': 'spread', + 'wide': 'spread', + 'wider': 'spread', + ); + + $return: (); + $span: null; + $columns: null; + + $of: null; + $next: false; + + // Allow context-only shorthand, without span + @if ($context-only) and (not index($shorthand, 'of')) { + @if su-valid-columns($shorthand, 'fail-silent') { + $shorthand: 'of' $shorthand; + } @else { + $shorthand: join('of', $shorthand); + } + } + + // loop through the shorthand list + @for $i from 1 through length($shorthand) { + $item: nth($shorthand, $i); + $type: type-of($item); + $error: false; + $details: '[#{$type}] `#{$item}`'; + + // if we know what's supposed to be coming next… + @if $next { + + // Add to the return map + $return: map-merge($return, ($next: $item)); + + // Reset next to `false` + $next: false; + + } @else { // If we don't know what's supposed to be coming… + + // Keywords… + @if ($type == 'string') { + // Check the map for keywords… + @if map-has-key($options, $item) { + $setting: map-get($options, $item); + + // Spread could be on the span or the container… + @if ($setting == 'spread') and ($of) { + $return: map-merge($return, ('container-spread': $item)); + } @else { + $return: map-merge($return, ($setting: $item)); + } + + } @else if ($item == 'all') { + // `All` is a span shortcut + $span: 'all'; + } @else if ($item == 'at') { + // Some keywords setup what's next… + $next: 'location'; + } @else if ($item == 'set-gutters') { + $next: 'gutters'; + } @else if ($item == 'of') { + $of: true; + } @else { + $error: true; + } + + } @else if ($type == 'number') or ($type == 'list') { // Numbers & lists… + + @if not ($span or $of) { + // We don't have a span, and we're not expecting context… + $span: $item; + } @else if ($of) and (not $columns) { + // We are expecting context… + $columns: $item; + } @else { + $error: true; + } + + } @else { + $error: true; + } + } + + @if $error { + @return _susy-error('#{$parse-error} #{$details}', 'susy-parse'); + } + } + + // If we have span, merge it in + @if $span { + $return: map-merge($return, ('span': $span)); + } + + // If we have columns, merge them in + @if $columns { + $return: map-merge($return, ('columns': $columns)); + } + + // Return the map of settings… + @return $return; +} diff --git a/docs/_sass/minimal-mistakes/vendor/susy/susy/_settings.scss b/docs/_sass/minimal-mistakes/vendor/susy/susy/_settings.scss new file mode 100644 index 00000000..b824477c --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/susy/_settings.scss @@ -0,0 +1,329 @@ +/// Susy3 Configuration +/// =================== +/// Susy3 has 4 core settings, in a single settings map. +/// You'll notice a few differences from Susy2: +/// +/// **Columns** no longer accept a single number, like `12`, +/// but use a syntax more similar to the new +/// CSS [grid-template-columns][columns] – +/// a list of relative sizes for each column on the grid. +/// Unitless numbers in Susy act very similar to `fr` units in CSS, +/// and the `susy-repeat()` function (similar to the css `repeat()`) +/// helps quickly establish equal-width columns. +/// +/// [columns]: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns +/// +/// - `susy-repeat(12)` will create 12 fluid, equal-width columns +/// - `susy-repeat(6, 120px)` will create 6 equal `120px`-wide columns +/// - `120px susy-repeat(4) 120px` will create 6 columns, +/// the first and last are `120px`, +/// while the middle 4 are equal fractions of the remainder. +/// Susy will output `calc()` values in order to achieve this. +/// +/// **Gutters** haven't changed – +/// a single fraction or explicit width – +/// but the `calc()` output feature +/// means you can now use any combination of units and fractions +/// to create static-gutters on a fluid grid, etc. +/// +/// **Spread** existed in the Susy2 API as a span option, +/// and was otherwise handled behind the scenes. +/// Now we're giving you full control over all spread issues. +/// You can find a more [detailed explanation of spread on the blog][spread]. +/// +/// [spread]: http://oddbird.net/2017/06/13/susy-spread/ +/// +/// You can access your global settings at any time +/// with the `susy-settings()` function, +/// or grab a single setting from the global scope +/// with `susy-get('columns')`, `susy-get('gutters')` etc. +/// +/// @group a-config +/// @link http://oddbird.net/2017/06/13/susy-spread/ +/// Article: Understanding Spread in Susy3 +/// +/// @see $susy +/// @see susy-settings +/// @see susy-get + + + +// Susy +// ---- +/// The grid is defined in a single map variable, +/// with four initial properties: +/// `columns`, `gutters`, `spread` and `container-spread`. +/// Anything you put in the root `$susy` variable map +/// will be treated as a global project default. +/// You can create similar configuration maps +/// under different variable names, +/// to override the defaults as-needed. +/// +/// @group a-config +/// @type Map +/// +/// @see $_susy-defaults +/// @see {function} susy-repeat +/// @link +/// https://codepen.io/mirisuzanne/pen/EgmJJp?editors=1100 +/// Spread examples on CodePen +/// +/// @prop {list} columns - +/// Columns are described by a list of numbers, +/// representing the relative width of each column. +/// The syntax is a simplified version of CSS native +/// `grid-template-columns`, +/// expecting a list of grid-column widths. +/// Unitless numbers create fractional fluid columns +/// (similar to the CSS-native `fr` unit), +/// while length values (united numbers) +/// are used to define static columns. +/// You can mix-and match units and fractions, +/// to create a mixed grid. +/// Susy will generate `calc()` values when necessary, +/// to make all your units work together. +/// +/// Use the `susy-repeat($count, $value)` function +/// to more easily repetative columns, +/// similar to the CSS-native `repeat()`. +/// +/// - `susy-repeat(8)`: +/// an 8-column, symmetrical, fluid grid. +///
Identical to `(1 1 1 1 1 1 1 1)`. +/// - `susy-repeat(6, 8em)`: +/// a 6-column, symmetrical, em-based grid. +///
Identical to `(8em 8em 8em 8em 8em 8em)`. +/// - `(300px susy-repeat(4) 300px)`: +/// a 6-column, asymmetrical, mixed fluid/static grid +/// using `calc()` output. +///
Identical to `(300px 1 1 1 1 300px)`. +/// +/// **NOTE** that `12` is no longer a valid 12-column grid definition, +/// and you must list all the columns individually +/// (or by using the `susy-repeat()` function). +/// +/// @prop {number} gutters - +/// Gutters are defined as a single width, +/// or fluid ratio, similar to the native-CSS +/// `grid-column-gap` syntax. +/// Similar to columns, +/// gutters can use any valid CSS length unit, +/// or unitless numbers to define a relative fraction. +/// +/// - `0.5`: +/// a fluid gutter, half the size of a single-fraction column. +/// - `1em`: +/// a static gutter, `1em` wide. +/// +/// Mix static gutters with fluid columns, or vice versa, +/// and Susy will generate the required `calc()` to make it work. +/// +/// @prop {string} spread [narrow] - +/// Spread of an element across adjacent gutters: +/// either `narrow` (none), `wide` (one), or `wider` (two) +/// +/// - Both spread settings default to `narrow`, +/// the most common use-case. +/// A `narrow` spread only has gutters *between* columns +/// (one less gutter than columns). +/// This is how all css-native grids work, +/// and most margin-based grid systems. +/// - A `wide` spread includes the same number of gutters as columns, +/// spanning across a single side-gutter. +/// This is how most padding-based grid systems often work, +/// and is also useful for pushing and pulling elements into place. +/// - The rare `wider` spread includes gutters +/// on both sides of the column-span +/// (one more gutters than columns). +/// +/// @prop {string} container-spread [narrow] - +/// Spread of a container around adjacent gutters: +/// either `narrow` (none), `wide` (one), or `wider` (two). +/// See `spread` property for details. +/// +/// @since 3.0.0-beta.1 - +/// `columns` setting no longer accepts numbers +/// (e.g. `12`) for symmetrical fluid grids, +/// or the initial `12 x 120px` syntax for +/// symmetrical fixed-unit grids. +/// Use `susy-repeat(12)` or `susy-repeat(12, 120px)` instead. +/// +/// @example scss - default values +/// // 4 symmetrical, fluid columns +/// // gutters are 1/4 the size of a column +/// // elements span 1 less gutter than columns +/// // containers span 1 less gutter as well +/// $susy: ( +/// 'columns': susy-repeat(4), +/// 'gutters': 0.25, +/// 'spread': 'narrow', +/// 'container-spread': 'narrow', +/// ); +/// +/// @example scss - inside-static gutters +/// // 6 symmetrical, fluid columns… +/// // gutters are static, triggering calc()… +/// // elements span equal columns & gutters… +/// // containers span equal columns & gutters… +/// $susy: ( +/// 'columns': susy-repeat(6), +/// 'gutters': 0.5em, +/// 'spread': 'wide', +/// 'container-spread': 'wide', +/// ); +$susy: () !default; + + + +// Susy Repeat +// ----------- +/// Similar to the `repeat(, )` function +/// that is available in native CSS Grid templates, +/// the `susy-repeat()` function helps generate repetative layouts +/// by repeating any value a given number of times. +/// Where Susy previously allowed `8` as a column definition +/// for 8 equal columns, you should now use `susy-repeat(8)`. +/// +/// @group a-config +/// +/// @param {integer} $count - +/// The number of repetitions, e.g. `12` for a 12-column grid. +/// @param {*} $value [1] - +/// The value to be repeated. +/// Technically any value can be repeated here, +/// but the function exists to repeat column-width descriptions: +/// e.g. the default `1` for single-fraction fluid columns, +/// `5em` for a static column, +/// or even `5em 120px` if you are alternating column widths. +/// +/// @return {list} - +/// List of repeated values +/// +/// @example scss +/// // 12 column grid, with 5em columns +/// $susy: ( +/// columns: susy-repeat(12, 5em), +/// ); +/// +/// @example scss +/// // asymmetrical 5-column grid +/// $susy: ( +/// columns: 20px susy-repeat(3, 100px) 20px, +/// ); +/// +/// /* result: #{susy-get('columns')} */ +@function susy-repeat( + $count, + $value: 1 +) { + $return: (); + + @for $i from 1 through $count { + $return: join($return, $value); + } + + @return $return; +} + + + +// Susy Defaults +// ------------- +/// Configuration map of Susy factory defaults. +/// Do not override this map directly – +/// use `$susy` for user and project setting overrides. +/// +/// @access private +/// @type Map +/// +/// @see $susy +/// +/// @prop {number | list} columns [susy-repeat(4)] +/// @prop {number} gutters [0.25] +/// @prop {string} spread ['narrow'] +/// @prop {string} container-spread ['narrow'] +$_susy-defaults: ( + 'columns': susy-repeat(4), + 'gutters': 0.25, + 'spread': 'narrow', + 'container-spread': 'narrow', +); + + + +// Susy Settings +// ------------- +/// Return a combined map of Susy settings, +/// based on the factory defaults (`$_susy-defaults`), +/// user-defined project configuration (`$susy`), +/// and any local overrides required – +/// such as a configuration map passed into a function. +/// +/// @group a-config +/// +/// @param {maps} $overrides… - +/// Optional map override of global configuration settings. +/// See `$susy` above for properties. +/// +/// @return {map} - +/// Combined map of Susy configuration settings, +/// in order of specificity: +/// any `$overrides...`, +/// then `$susy` project settings, +/// and finally the `$_susy-defaults` +/// +/// @example scss - global settings +/// @each $key, $value in susy-settings() { +/// /* #{$key}: #{$value} */ +/// } +/// +/// @example scss - local settings +/// $local: ('columns': 1 2 3 5 8); +/// +/// @each $key, $value in susy-settings($local) { +/// /* #{$key}: #{$value} */ +/// } +@function susy-settings( + $overrides... +) { + $settings: map-merge($_susy-defaults, $susy); + + @each $config in $overrides { + $settings: map-merge($settings, $config); + } + + @return $settings; +} + + + +// Susy Get +// -------- +/// Return the current global value of any Susy setting +/// +/// @group a-config +/// +/// @param {string} $key - +/// Setting to retrieve from the configuration. +/// +/// @return {*} - +/// Value mapped to `$key` in the configuration maps, +/// in order of specificity: +/// `$susy`, then `$_susy-defaults` +/// +/// @example scss - +/// /* columns: #{susy-get('columns')} */ +/// /* gutters: #{susy-get('gutters')} */ +@function susy-get( + $key +) { + $settings: susy-settings(); + + @if not map-has-key($settings, $key) { + @return _susy-error( + 'There is no Susy setting called `#{$key}`', + 'susy-get'); + } + + @return map-get($settings, $key); +} diff --git a/docs/_sass/minimal-mistakes/vendor/susy/susy/_su-math.scss b/docs/_sass/minimal-mistakes/vendor/susy/susy/_su-math.scss new file mode 100644 index 00000000..1e885284 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/susy/_su-math.scss @@ -0,0 +1,441 @@ +/// Grid Math Engine +/// ================ +/// The `su` functions give you direct access to the math layer, +/// without any syntax-sugar like shorthand parsing, and normalization. +/// If you prefer named arguments, and stripped-down syntax, +/// you can use these functions directly in your code – +/// replacing `span`, `gutter`, and `slice`. +/// +/// These functions are also useful +/// for building mixins or other extensions to Susy. +/// Apply the Susy syntax to new mixins and functions, +/// using our "Plugin Helpers", +/// or write your own syntax and pass the normalized results along +/// to `su` for compilation. +/// +/// @group su-math +/// +/// @see su-span +/// @see su-gutter +/// @see su-slice +/// @ignore _su-sum +/// @ignore _su-calc-span +/// @ignore _su-calc-sum +/// @ignore _su-needs-calc-output + + + +// Su Span +// ------- +/// Calculates and returns a CSS-ready span width, +/// based on normalized span and context data – +/// a low-level version of `susy-span`, +/// with all of the logic and none of the syntax sugar. +/// +/// - Grids defined with unitless numbers will return `%` values. +/// - Grids defined with comparable units +/// will return a value in the units provided. +/// - Grids defined with a mix of units, +/// or a combination of untiless numbers and unit-lengths, +/// will return a `calc()` string. +/// +/// @group su-math +/// @see susy-span +/// +/// @param {number | list} $span - +/// Number or list of grid columns to span +/// @param {list} $columns - +/// List of columns available +/// @param {number} $gutters - +/// Width of a gutter in column-comparable units +/// @param {0 | 1 | -1} $spread - +/// Number of gutters spanned, +/// relative to `span` count +/// @param {0 | 1 | -1} $container-spread [$spread] - +/// Number of gutters spanned, +/// relative to `columns` count +/// @param {integer} $location [1] - +/// Optional position of sub-span among full set of columns +/// +/// @return {length} - +/// Relative or static length of a span on the grid +@function su-span( + $span, + $columns, + $gutters, + $spread, + $container-spread: $spread, + $location: 1 +) { + $span: su-valid-span($span); + $columns: su-valid-columns($columns); + $gutters: su-valid-gutters($gutters); + $spread: su-valid-spread($spread); + + @if (type-of($span) == 'number') { + @if (not unitless($span)) { + @return $span; + } + + $location: su-valid-location($span, $location, $columns); + $span: su-slice($span, $columns, $location, $validate: false); + } + + @if _su-needs-calc-output($span, $columns, $gutters, $spread, not 'validate') { + @return _su-calc-span($span, $columns, $gutters, $spread, $container-spread, not 'validate'); + } + + $span-width: _su-sum($span, $gutters, $spread, $validate: false); + + @if unitless($span-width) { + $container-spread: su-valid-spread($container-spread); + $container: _su-sum($columns, $gutters, $container-spread, $validate: false); + @return percentage($span-width / $container); + } + + @return $span-width; +} + + + +// Su Gutter +// --------- +/// Calculates and returns a CSS-ready gutter width, +/// based on normalized grid data – +/// a low-level version of `susy-gutter`, +/// with all of the logic and none of the syntax sugar. +/// +/// - Grids defined with unitless numbers will return `%` values. +/// - Grids defined with comparable units +/// will return a value in the units provided. +/// - Grids defined with a mix of units, +/// or a combination of untiless numbers and unit-lengths, +/// will return a `calc()` string. +/// +/// @group su-math +/// @see susy-gutter +/// +/// @param {list} $columns - +/// List of columns in the grid +/// @param {number} $gutters - +/// Width of a gutter in column-comparable units +/// @param {0 | 1 | -1} $container-spread - +/// Number of gutters spanned, +/// relative to `columns` count +/// +/// @return {length} - +/// Relative or static length of one gutter in a grid +@function su-gutter( + $columns, + $gutters, + $container-spread +) { + @if (type-of($gutters) == 'number') { + @if ($gutters == 0) or (not unitless($gutters)) { + @return $gutters; + } + } + + @if _su-needs-calc-output($gutters, $columns, $gutters, -1, not 'validate') { + @return _su-calc-span($gutters, $columns, $gutters, -1, $container-spread, not 'validate'); + } + + $container: _su-sum($columns, $gutters, $container-spread); + @return percentage($gutters / $container); +} + + + +// Su Slice +// -------- +/// Returns a list of columns +/// based on a given span/location slice of the grid – +/// a low-level version of `susy-slice`, +/// with all of the logic and none of the syntax sugar. +/// +/// @group su-math +/// @see susy-slice +/// +/// @param {number} $span - +/// Number of grid columns to span +/// @param {list} $columns - +/// List of columns in the grid +/// @param {number} $location [1] - +/// Starting index of a span in the list of columns +/// @param {bool} $validate [true] - +/// Check that arguments are valid before proceeding +/// +/// @return {list} - +/// Subset list of grid columns, based on span and location +@function su-slice( + $span, + $columns, + $location: 1, + $validate: true +) { + @if $validate { + $columns: su-valid-columns($columns); + $location: su-valid-location($span, $location, $columns); + } + + $floor: floor($span); + $sub-columns: (); + + @for $i from $location to ($location + $floor) { + $sub-columns: append($sub-columns, nth($columns, $i)); + } + + @if $floor != $span { + $remainder: $span - $floor; + $column: $location + $floor; + $sub-columns: append($sub-columns, nth($columns, $column) * $remainder); + } + + @return $sub-columns; +} + + + +// Su Sum +// ------ +/// Get the total sum of column-units in a layout. +/// +/// @group su-math +/// @access private +/// +/// @param {list} $columns - +/// List of columns in the grid +/// @param {number} $gutters - +/// Width of a gutter in column-comparable units +/// @param {0 | 1 | -1} $spread - +/// Number of gutters spanned, +/// relative to `columns` count +/// @param {bool} $validate [true] - +/// Check that arguments are valid before proceeding +/// +/// @return {number} - +/// Total sum of column-units in a grid +@function _su-sum( + $columns, + $gutters, + $spread, + $validate: true +) { + @if $validate { + $columns: su-valid-span($columns); + $gutters: su-valid-gutters($gutters); + $spread: su-valid-spread($spread); + } + + // Calculate column-sum + $column-sum: 0; + @each $column in $columns { + $column-sum: $column-sum + $column; + } + + $gutter-sum: (ceil(length($columns)) + $spread) * $gutters; + $total: if(($gutter-sum > 0), $column-sum + $gutter-sum, $column-sum); + + @return $total; +} + + + +// Su Calc +// ------- +/// Return a usable span width as a `calc()` function, +/// in order to create mixed-unit grids. +/// +/// @group su-math +/// @access private +/// +/// @param {number | list} $span - +/// Pre-sliced list of grid columns to span +/// @param {list} $columns - +/// List of columns available +/// @param {number} $gutters - +/// Width of a gutter in column-comparable units +/// @param {0 | 1 | -1} $spread - +/// Number of gutters spanned, +/// relative to `span` count +/// @param {0 | 1 | -1} $container-spread [$spread] - +/// Number of gutters spanned, +/// relative to `columns` count +/// @param {bool} $validate [true] - +/// Check that arguments are valid before proceeding +/// +/// @return {length} - +/// Relative or static length of a span on the grid +@function _su-calc-span( + $span, + $columns, + $gutters, + $spread, + $container-spread: $spread, + $validate: true +) { + @if $validate { + $span: su-valid-span($span); + $columns: su-valid-columns($columns); + $gutters: su-valid-gutters($gutters); + $spread: su-valid-spread($spread); + $container-spread: su-valid-spread($container-spread); + } + + // Span and context + $span: _su-calc-sum($span, $gutters, $spread, not 'validate'); + $context: _su-calc-sum($columns, $gutters, $container-spread, not 'validate'); + + // Fixed and fluid + $fixed-span: map-get($span, 'fixed'); + $fluid-span: map-get($span, 'fluid'); + $fixed-context: map-get($context, 'fixed'); + $fluid-context: map-get($context, 'fluid'); + + $calc: '#{$fixed-span}'; + $fluid-calc: '(100% - #{$fixed-context})'; + + // Fluid-values + @if (not $fluid-span) { + $fluid-calc: null; + } @else if ($fluid-span != $fluid-context) { + $fluid-span: '* #{$fluid-span}'; + $fluid-context: if($fluid-context, '/ #{$fluid-context}', ''); + $fluid-calc: '(#{$fluid-calc $fluid-context $fluid-span})'; + } + + @if $fluid-calc { + $calc: if(($calc != ''), '#{$calc} + ', ''); + $calc: '#{$calc + $fluid-calc}'; + } + + @return calc(#{unquote($calc)}); +} + + + +// Su Calc-Sum +// ----------- +/// Get the total sum of fixed and fluid column-units +/// for creating a mixed-unit layout with `calc()` values. +/// +/// @group su-math +/// @access private +/// +/// @param {list} $columns - +/// List of columns available +/// @param {number} $gutters - +/// Width of a gutter in column-comparable units +/// @param {0 | 1 | -1} $spread - +/// Number of gutters spanned, +/// relative to `span` count +/// @param {bool} $validate [true] - +/// Check that arguments are valid before proceeding +/// +/// @return {map} - +/// Map with `fixed` and `fluid` keys +/// containing the proper math as strings +@function _su-calc-sum( + $columns, + $gutters, + $spread, + $validate: true +) { + @if $validate { + $columns: su-valid-span($columns); + $gutters: su-valid-gutters($gutters); + $spread: su-valid-spread($spread); + } + + $fluid: 0; + $fixed: (); + $calc: null; + + // Gutters + $gutters: $gutters * (length($columns) + $spread); + + // Columns + @each $col in append($columns, $gutters) { + @if unitless($col) { + $fluid: $fluid + $col; + } @else { + $fixed: _su-map-add-units($fixed, $col); + } + } + + // Compile Fixed Units + @each $unit, $total in $fixed { + @if ($total != (0 * $total)) { + $calc: if($calc, '#{$calc} + #{$total}', '#{$total}'); + } + } + + // Calc null or string + @if $calc { + $calc: if(str-index($calc, '+'), '(#{$calc})', '#{$calc}'); + } + + // Fluid 0 => null + $fluid: if(($fluid == 0), null, $fluid); + + + // Return map + $return: ( + 'fixed': $calc, + 'fluid': $fluid, + ); + + @return $return; +} + + + +// Needs Calc +// ---------- +/// Check if `calc()` will be needed in defining a span, +/// if the necessary units in a grid are not comparable. +/// +/// @group su-math +/// @access private +/// +/// @param {list} $span - +/// Slice of columns to span +/// @param {list} $columns - +/// List of available columns in the grid +/// @param {number} $gutters - +/// Width of a gutter +/// @param {0 | 1 | -1} $spread - +/// Number of gutters spanned, +/// relative to `span` count +/// @param {bool} $validate [true] - +/// Check that arguments are valid before proceeding +/// +/// @return {bool} - +/// `True` when units do not match, and `calc()` will be required +@function _su-needs-calc-output( + $span, + $columns, + $gutters, + $spread, + $validate: true +) { + @if $validate { + $span: su-valid-span($span); + $columns: su-valid-columns($columns); + $gutters: su-valid-gutters($gutters); + } + + $has-gutter: if((length($span) > 1) or ($spread >= 0), true, false); + $check: if($has-gutter, append($span, $gutters), $span); + $safe-span: _su-is-comparable($check...); + + @if ($safe-span == 'static') { + @return false; + } @else if (not $safe-span) { + @return true; + } + + $safe-fluid: _su-is-comparable($gutters, $columns...); + + @return not $safe-fluid; +} diff --git a/docs/_sass/minimal-mistakes/vendor/susy/susy/_su-validate.scss b/docs/_sass/minimal-mistakes/vendor/susy/susy/_su-validate.scss new file mode 100644 index 00000000..5befad30 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/susy/_su-validate.scss @@ -0,0 +1,213 @@ +/// Validation +/// ========== +/// Each argument to Su has a single canonical syntax. +/// These validation functions check to ensure +/// that each argument is valid, +/// in order to provide useful errors +/// before attempting to calculate the results/ +/// +/// @group x-validation +/// +/// @see su-valid-columns +/// @see su-valid-gutters +/// @see su-valid-spread +/// @see su-valid-location + + + +// Valid Span +// ---------- +/// Check that the `span` argument +/// is a number, length, or column-list +/// +/// @group x-validation +/// +/// @param {number | list} $span - +/// Number of columns, or length of span +/// +/// @return {number | list} - +/// Validated `$span` number, length, or columns list +/// +/// @throw +/// when span value is not a number, or valid column list +@function su-valid-span( + $span +) { + $type: type-of($span); + @if ($type == 'number') { + @return $span; + } @else if ($type == 'list') and su-valid-columns($span, 'silent-failure') { + @return $span; + } + + $actual: '[#{type-of($span)}] `#{inspect($span)}`'; + @return _susy-error( + '#{$actual} is not a valid number, length, or column-list for $span.', + 'su-valid-span'); +} + + + +// Valid Columns +// ------------- +/// Check that the `columns` argument is a valid +/// list of column-lengths +/// +/// @group x-validation +/// +/// @param {list} $columns - +/// List of column-lengths +/// @param {bool} $silent-failure [true] - +/// Set false to return null on failure +/// +/// @return {list} - +/// Validated `$columns` list +/// +/// @throw +/// when column value is not a valid list of numbers +@function su-valid-columns( + $columns, + $silent-failure: false +) { + @if (type-of($columns) == 'list') { + $fail: false; + + @each $col in $columns { + @if (type-of($col) != 'number') { + $fail: true; + } + } + + @if not $fail { + @return $columns; + } + } + + // Silent Failure + @if $silent-failure { + @return null; + } + + // Error Message + $actual: '[#{type-of($columns)}] `#{inspect($columns)}`'; + + @return _susy-error( + '#{$actual} is not a valid list of numbers for $columns.', + 'su-valid-columns'); +} + + + +// Valid Gutters +// ------------- +/// Check that the `gutters` argument is a valid number +/// +/// @group x-validation +/// +/// @param {number} $gutters - +/// Width of a gutter +/// +/// @return {number} - +/// Validated `$gutters` number +/// +/// @throw +/// when gutter value is not a number +@function su-valid-gutters( + $gutters +) { + $type: type-of($gutters); + + @if ($type == 'number') { + @return $gutters; + } + + $actual: '[#{$type}] `#{inspect($gutters)}`'; + @return _susy-error( + '#{$actual} is not a number or length for $gutters.', + 'su-valid-gutters'); +} + + + +// Valid Spread +// ------------ +/// Check that the `spread` argument is a valid +/// intiger between `-1` and `1` +/// +/// @group x-validation +/// +/// @param {0 | 1 | -1} $spread - +/// Number of gutters to include in a span, +/// relative to the number columns +/// +/// @return {0 | 1 | -1} - +/// Validated `$spread` number +/// +/// @throw +/// when spread value is not a valid spread +@function su-valid-spread( + $spread +) { + @if index(0 1 -1, $spread) { + @return $spread; + } + + $actual: '[#{type-of($spread)}] `#{inspect($spread)}`'; + @return _susy-error( + '#{$actual} is not a normalized [0 | 1 | -1] value for `$spread`.', + 'su-valid-spread'); +} + + + +// Valid Location +// -------------- +/// Check that the `location` argument is a valid number, +/// within the scope of available columns +/// +/// @group x-validation +/// +/// @param {number} $span - +/// Number of grid-columns to be spanned +/// @param {integer | string} $location - +/// Starting (1-indexed) column-position of that span +/// @param {list} $columns - +/// List of available columns in the grid +/// +/// @return {integer} - +/// Validated `$location` intiger +/// +/// @throw +/// when location value is not a valid index, +/// given the context and span. +@function su-valid-location( + $span, + $location, + $columns +) { + $count: length($columns); + + @if $location { + @if (type-of($location) != 'number') or (not unitless($location)) { + $actual: '[#{type-of($location)}] `#{$location}`'; + @return _susy-error( + '#{$actual} is not a unitless number for $location.', + 'su-valid-location'); + } @else if (round($location) != $location) { + @return _susy-error( + 'Location (`#{$location}`) must be a 1-indexed intiger position.', + 'su-valid-location'); + } @else if ($location > $count) or ($location < 1) { + @return _susy-error( + 'Position `#{$location}` does not exist in grid `#{$columns}`.', + 'su-valid-location'); + } @else if ($location + $span - 1 > $count) { + $details: 'grid `#{$columns}` for span `#{$span}` at `#{$location}`'; + @return _susy-error( + 'There are not enough columns in #{$details}.', + 'su-valid-location'); + } + } + + @return $location; +} diff --git a/docs/_sass/minimal-mistakes/vendor/susy/susy/_syntax-helpers.scss b/docs/_sass/minimal-mistakes/vendor/susy/susy/_syntax-helpers.scss new file mode 100644 index 00000000..f6043eac --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/susy/_syntax-helpers.scss @@ -0,0 +1,191 @@ +/// Syntax Utilities for Extending Susy +/// =================================== +/// There are many steps involved +/// when translating between the Susy syntax layer, +/// and the Su core math. +/// That entire process can be condensed with these two functions. +/// For anyone that wants to access the full power of Susy, +/// and build their own plugins, functions, or mixins – +/// this is the primary API for compiling user input, +/// and accessing the core math. +/// +/// This is the same technique we use internally, +/// to keep our API layer simple and light-weight. +/// Every function accepts two arguments, +/// a "shorthand" description of the span or context, +/// and an optional settings-map to override global defaults. +/// +/// - Use `susy-compile()` to parse, merge, and normalize +/// all the user settings into a single map. +/// - Then use `su-call()` to call one of the core math functions, +/// with whatever data is needed for that function. +/// +/// @group plugin-utils +/// @see susy-compile +/// @see su-call +/// +/// @example scss - Susy API `gutter` function +/// @function susy-gutter( +/// $context: susy-get('columns'), +/// $config: () +/// ) { +/// // compile and normalize all user arguments and global settings +/// $context: susy-compile($context, $config, 'context-only'); +/// // call `su-gutter` with the appropriate data +/// @return su-call('su-gutter', $context); +/// } +/// +/// @example scss - Sample `span` mixin for floated grids +/// @mixin span( +/// $span, +/// $config: () +/// ) { +/// $context: susy-compile($span, $config); +/// width: su-call('su-span', $context); +/// +/// @if index($span, 'last') { +/// float: right; +/// } @else { +/// float: left; +/// margin-right: su-call('su-gutter', $context); +/// } +/// } + + + +// Compile +// ------- +/// Susy's syntax layer has various moving parts, +/// with syntax-parsing for the grid/span shorthand, +/// and normalization for each of the resulting values. +/// The compile function rolls this all together +/// in a single call – +/// for quick access from our internal API functions, +/// or any additional functions and mixins you add to your project. +/// Pass user input and configuration maps to the compiler, +/// and it will hand back a map of values ready for Su. +/// Combine this with the `su-call` function +/// to quickly parse, normalize, and process grid calculations. +/// +/// @group plugin-utils +/// @see su-call +/// +/// @param {list | map} $shorthand - +/// Shorthand expression to define the width of the span, +/// optionally containing: +/// - a count, length, or column-list span; +/// - `at $n`, `first`, or `last` location on asymmetrical grids; +/// - `narrow`, `wide`, or `wider` for optionally spreading +/// across adjacent gutters; +/// - `of $n ` for available grid columns +/// and spread of the container +/// (span counts like `of 6` are only valid +/// in the context of symmetrical grids); +/// - and `set-gutters $n` to override global gutter settings +/// @param {map} $config [null] - +/// Optional map of Susy grid configuration settings +/// @param {bool} $context-only [false] - +/// Allow the parser to ignore span and span-spread values, +/// only parsing context and container-spread +/// +/// @return {map} - +/// Parsed and normalized map of settings, +/// based on global and local configuration, +/// alongwith shorthad adjustments. +/// +/// @example scss - +/// $user-input: 3 wide of susy-repeat(6, 120px) set-gutters 10px; +/// $grid-data: susy-compile($user-input, $susy); +/// +/// @each $key, $value in $grid-data { +/// /* #{$key}: #{$value}, */ +/// } +@function susy-compile( + $short, + $config: null, + $context-only: false +) { + // Get and normalize config + $config: if($config, susy-settings($config), susy-settings()); + $normal-config: susy-normalize($config); + + // Parse and normalize shorthand + @if (type-of($short) != 'map') and (length($short) > 0) { + $short: susy-parse($short, $context-only); + } + + $normal-short: susy-normalize($short, $normal-config); + + // Merge and return + @return map-merge($normal-config, $normal-short); +} + + + +// Call +// ---- +/// The Susy parsing and normalization process +/// results in a map of configuration settings, +/// much like the global `$susy` settings map. +/// In order to pass that information along to Su math functions, +/// the proper values have to be picked out, +/// and converted to arguments. +/// +/// The `su-call` function streamlines that process, +/// weeding out the unnecessary data, +/// and passing the rest along to Su in the proper format. +/// Combine this with `susy-compile` to quickly parse, +/// normalize, and process grid calculations. +/// +/// @group plugin-utils +/// +/// @require su-span +/// @require su-gutter +/// @require su-slice +/// @see susy-compile +/// +/// @param {'su-span' | 'su-gutter' | 'su-slice'} $name - +/// Name of the Su math function to call. +/// @param {map} $config - +/// Parsed and normalized map of Susy configuration settings +/// to use for math-function arguments. +/// +/// @return {*} - +/// Results of the function being called. +/// +/// @example scss - +/// $user-input: 3 wide of susy-repeat(6, 120px) set-gutters 10px; +/// $grid-data: susy-compile($user-input, $susy); +/// +/// .su-span { +/// width: su-call('su-span', $grid-data); +/// } +@function su-call( + $name, + $config +) { + $grid-function-args: ( + 'su-span': ('span', 'columns', 'gutters', 'spread', 'container-spread', 'location'), + 'su-gutter': ('columns', 'gutters', 'container-spread'), + 'su-slice': ('span', 'columns', 'location'), + ); + + $args: map-get($grid-function-args, $name); + + @if not $args { + $options: 'Try one of these: #{map-keys($grid-function-args)}'; + @return _susy-error( + '#{$name} is not a public Su function. #{$options}', + 'su-call'); + } + + $call: if(function-exists('get-function'), get-function($name), $name); + $output: (); + + @each $arg in $args { + $value: map-get($config, $arg); + $output: if($value, map-merge($output, ($arg: $value)), $output); + } + + @return call($call, $output...); +} diff --git a/docs/_sass/minimal-mistakes/vendor/susy/susy/_unprefix.scss b/docs/_sass/minimal-mistakes/vendor/susy/susy/_unprefix.scss new file mode 100644 index 00000000..2cfd1b81 --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/susy/_unprefix.scss @@ -0,0 +1,56 @@ +// Unprefix Susy +// ============= + + +// Span +// ---- +/// Un-prefixed alias for `susy-span` +/// (available by default) +/// +/// @group api +/// @alias susy-span +/// +/// @param {list} $span +/// @param {map} $config [()] +@function span( + $span, + $config: () +) { + @return susy-span($span, $config); +} + + +// Gutter +// ------ +/// Un-prefixed alias for `susy-gutter` +/// (available by default) +/// +/// @group api +/// @alias susy-gutter +/// +/// @param {integer | list} $context [null] - +/// @param {map} $config [()] +@function gutter( + $context: susy-get('columns'), + $config: () +) { + @return susy-gutter($context, $config); +} + + +// Slice +// ----- +/// Un-prefixed alias for `susy-slice` +/// (available by default) +/// +/// @group api +/// @alias susy-slice +/// +/// @param {list} $span +/// @param {map} $config [()] +@function slice( + $span, + $config: () +) { + @return susy-slice($span, $config); +} diff --git a/docs/_sass/minimal-mistakes/vendor/susy/susy/_utilities.scss b/docs/_sass/minimal-mistakes/vendor/susy/susy/_utilities.scss new file mode 100644 index 00000000..3c62de2d --- /dev/null +++ b/docs/_sass/minimal-mistakes/vendor/susy/susy/_utilities.scss @@ -0,0 +1,167 @@ +// Sass Utilities +// ============== +// - Susy Error Output Override [variable] +// - Susy Error [function] + + + +// Susy Error Output Override +// -------------------------- +/// Turn off error output for testing +/// @group x-utility +/// @access private +$_susy-error-output-override: false !default; + + + +// Susy Error +// ---------- +/// Optionally return error messages without failing, +/// as a way to test error cases +/// +/// @group x-utility +/// @access private +/// +/// @param {string} $message - +/// A useful error message, explaining the problem +/// @param {string} $source - +/// The original source of the error for debugging +/// @param {bool} $override [$_susy-error-output-override] - +/// Optionally return the error rather than failing +/// @return {string} - +/// Combined error with source and message +/// @throws When `$override == true` +@function _susy-error( + $message, + $source, + $override: $_susy-error-output-override +) { + @if $override { + @return 'ERROR [#{$source}] #{$message}'; + } + + @error '[#{$source}] #{$message}'; +} + + +// Su Is Comparable +// ---------------- +/// Check that the units in a grid are comparable +/// +/// @group x-validation +/// @access private +/// +/// @param {numbers} $lengths… - +/// Arglist of all the number values to compare +/// (columns, gutters, span, etc) +/// +/// @return {'fluid' | 'static' | false} - +/// The type of span (fluid or static) when units match, +/// or `false` for mismatched units +@function _su-is-comparable( + $lengths... +) { + $first: nth($lengths, 1); + + @if (length($lengths) == 1) { + @return if(unitless($first), 'fluid', 'static'); + } + + @for $i from 2 through length($lengths) { + $comp: nth($lengths, $i); + + $fail: not comparable($first, $comp); + $fail: $fail or (unitless($first) and not unitless($comp)); + $fail: $fail or (unitless($comp) and not unitless($first)); + + @if $fail { + @return false; + } + } + + @return if(unitless($first), 'fluid', 'static'); +} + + +// Su Map Add Units +// ---------------- +/// The calc features use a map of units and values +/// to compile the proper algorythm. +/// This function adds a new value to any comparable existing unit/value, +/// or adds a new unit/value pair to the map +/// +/// @group x-utility +/// @access private +/// +/// @param {map} $map - +/// A map of unit/value pairs, e.g. ('px': 120px) +/// @param {length} $value - +/// A new length to be added to the map +/// @return {map} - +/// The updated map, with new value added +/// +/// @example scss - +/// $map: (0px: 120px); +/// $map: _su-map-add-units($map, 1in); // add a comparable unit +/// $map: _su-map-add-units($map, 3vw); // add a new unit +/// +/// @each $units, $value in $map { +/// /* #{$units}: #{$value} */ +/// } +@function _su-map-add-units( + $map, + $value +) { + $unit: $value * 0; + $has: map-get($map, $unit) or 0; + + @if ($has == 0) { + @each $try, $could in $map { + $match: comparable($try, $value); + $unit: if($match, $try, $unit); + $has: if($match, $could, $has); + } + } + + @return map-merge($map, ($unit: $has + $value)); +} + + +// Susy Flatten +// ------------ +/// Flatten a multidimensional list +/// +/// @group x-utility +/// @access private +/// +/// @param {list} $list - +/// The list to be flattened +/// @return {list} - +/// The flattened list +/// +/// @example scss - +/// $list: 120px (30em 30em) 120px; +/// /* #{_susy-flatten($list)} */ +@function _susy-flatten( + $list +) { + $flat: (); + + // Don't iterate over maps + @if (type-of($list) == 'map') { + @return $list; + } + + // Iterate over lists (or single items) + @each $item in $list { + @if (type-of($item) == 'list') { + $item: _susy-flatten($item); + $flat: join($flat, $item); + } @else { + $flat: append($flat, $item); + } + } + + // Return flattened list + @return $flat; +} diff --git a/docs/assets/css/main.scss b/docs/assets/css/main.scss new file mode 100644 index 00000000..23346e77 --- /dev/null +++ b/docs/assets/css/main.scss @@ -0,0 +1,8 @@ +--- +# Only the main Sass file needs front matter (the dashes are enough) +--- + +@charset "utf-8"; + +@import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin +@import "minimal-mistakes"; // main partials \ No newline at end of file diff --git a/docs/assets/js/_main.js b/docs/assets/js/_main.js new file mode 100644 index 00000000..31b1f7dc --- /dev/null +++ b/docs/assets/js/_main.js @@ -0,0 +1,106 @@ +/* ========================================================================== + jQuery plugin settings and other scripts + ========================================================================== */ + +$(document).ready(function() { + // Sticky footer + var bumpIt = function() { + $("body").css("margin-bottom", $(".page__footer").outerHeight(true)); + }, + didResize = false; + + bumpIt(); + + $(window).resize(function() { + didResize = true; + }); + setInterval(function() { + if (didResize) { + didResize = false; + bumpIt(); + } + }, 250); + + // FitVids init + $("#main").fitVids(); + + // Sticky sidebar + var stickySideBar = function() { + var show = + $(".author__urls-wrapper button").length === 0 + ? $(window).width() > 1024 // width should match $large Sass variable + : !$(".author__urls-wrapper button").is(":visible"); + if (show) { + // fix + $(".sidebar").addClass("sticky"); + } else { + // unfix + $(".sidebar").removeClass("sticky"); + } + }; + + stickySideBar(); + + $(window).resize(function() { + stickySideBar(); + }); + + // Follow menu drop down + $(".author__urls-wrapper button").on("click", function() { + $(".author__urls").toggleClass("is--visible"); + $(".author__urls-wrapper button").toggleClass("open"); + }); + + // Search toggle + $(".search__toggle").on("click", function() { + $(".search-content").toggleClass("is--visible"); + $(".initial-content").toggleClass("is--hidden"); + // set focus on input + setTimeout(function() { + $(".search-content input").focus(); + }, 400); + }); + + // init smooth scroll + $("a").smoothScroll({ offset: -20 }); + + // add lightbox class to all image links + $( + "a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif']" + ).addClass("image-popup"); + + // Magnific-Popup options + $(".image-popup").magnificPopup({ + // disableOn: function() { + // if( $(window).width() < 500 ) { + // return false; + // } + // return true; + // }, + type: "image", + tLoading: "Loading image #%curr%...", + gallery: { + enabled: true, + navigateByImgClick: true, + preload: [0, 1] // Will preload 0 - before current, and 1 after the current image + }, + image: { + tError: 'Image #%curr% could not be loaded.' + }, + removalDelay: 500, // Delay in milliseconds before popup is removed + // Class that is added to body when popup is open. + // make it unique to apply your CSS animations just to this exact popup + mainClass: "mfp-zoom-in", + callbacks: { + beforeOpen: function() { + // just a hack that adds mfp-anim class to markup + this.st.image.markup = this.st.image.markup.replace( + "mfp-figure", + "mfp-figure mfp-with-anim" + ); + } + }, + closeOnContentClick: true, + midClick: true // allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source. + }); +}); diff --git a/docs/assets/js/lunr/lunr-en.js b/docs/assets/js/lunr/lunr-en.js new file mode 100644 index 00000000..c0a7c0ed --- /dev/null +++ b/docs/assets/js/lunr/lunr-en.js @@ -0,0 +1,75 @@ +--- +layout: null +--- + +var idx = lunr(function () { + this.field('title') + this.field('excerpt') + this.field('categories') + this.field('tags') + this.ref('id') + + this.pipeline.remove(lunr.trimmer) + + for (var item in store) { + this.add({ + title: store[item].title, + excerpt: store[item].excerpt, + categories: store[item].categories, + tags: store[item].tags, + id: item + }) + } +}); + +console.log( jQuery.type(idx) ); + +$(document).ready(function() { + $('input#search').on('keyup', function () { + var resultdiv = $('#results'); + var query = $(this).val().toLowerCase(); + var result = + idx.query(function (q) { + query.split(lunr.tokenizer.separator).forEach(function (term) { + q.term(term, { boost: 100 }) + if(query.lastIndexOf(" ") != query.length-1){ + q.term(term, { usePipeline: false, wildcard: lunr.Query.wildcard.TRAILING, boost: 10 }) + } + if (term != ""){ + q.term(term, { usePipeline: false, editDistance: 1, boost: 1 }) + } + }) + }); + resultdiv.empty(); + resultdiv.prepend('

'+result.length+' {{ site.data.ui-text[site.locale].results_found | default: "Result(s) found" }}

'); + for (var item in result) { + var ref = result[item].ref; + if(store[ref].teaser){ + var searchitem = + '
'+ + '
'+ + '

'+ + ''+store[ref].title+''+ + '

'+ + '
'+ + ''+ + '
'+ + '

'+store[ref].excerpt.split(" ").splice(0,20).join(" ")+'...

'+ + '
'+ + '
'; + } + else{ + var searchitem = + '
'+ + '
'+ + '

'+ + ''+store[ref].title+''+ + '

'+ + '

'+store[ref].excerpt.split(" ").splice(0,20).join(" ")+'...

'+ + '
'+ + '
'; + } + resultdiv.append(searchitem); + } + }); +}); diff --git a/docs/assets/js/lunr/lunr-gr.js b/docs/assets/js/lunr/lunr-gr.js new file mode 100644 index 00000000..ef540cdb --- /dev/null +++ b/docs/assets/js/lunr/lunr-gr.js @@ -0,0 +1,528 @@ +--- +layout: null +--- + +step1list = new Array(); +step1list["ΦΑΓΙΑ"] = "ΦΑ"; +step1list["ΦΑΓΙΟΥ"] = "ΦΑ"; +step1list["ΦΑΓΙΩΝ"] = "ΦΑ"; +step1list["ΣΚΑΓΙΑ"] = "ΣΚΑ"; +step1list["ΣΚΑΓΙΟΥ"] = "ΣΚΑ"; +step1list["ΣΚΑΓΙΩΝ"] = "ΣΚΑ"; +step1list["ΟΛΟΓΙΟΥ"] = "ΟΛΟ"; +step1list["ΟΛΟΓΙΑ"] = "ΟΛΟ"; +step1list["ΟΛΟΓΙΩΝ"] = "ΟΛΟ"; +step1list["ΣΟΓΙΟΥ"] = "ΣΟ"; +step1list["ΣΟΓΙΑ"] = "ΣΟ"; +step1list["ΣΟΓΙΩΝ"] = "ΣΟ"; +step1list["ΤΑΤΟΓΙΑ"] = "ΤΑΤΟ"; +step1list["ΤΑΤΟΓΙΟΥ"] = "ΤΑΤΟ"; +step1list["ΤΑΤΟΓΙΩΝ"] = "ΤΑΤΟ"; +step1list["ΚΡΕΑΣ"] = "ΚΡΕ"; +step1list["ΚΡΕΑΤΟΣ"] = "ΚΡΕ"; +step1list["ΚΡΕΑΤΑ"] = "ΚΡΕ"; +step1list["ΚΡΕΑΤΩΝ"] = "ΚΡΕ"; +step1list["ΠΕΡΑΣ"] = "ΠΕΡ"; +step1list["ΠΕΡΑΤΟΣ"] = "ΠΕΡ"; +step1list["ΠΕΡΑΤΑ"] = "ΠΕΡ"; +step1list["ΠΕΡΑΤΩΝ"] = "ΠΕΡ"; +step1list["ΤΕΡΑΣ"] = "ΤΕΡ"; +step1list["ΤΕΡΑΤΟΣ"] = "ΤΕΡ"; +step1list["ΤΕΡΑΤΑ"] = "ΤΕΡ"; +step1list["ΤΕΡΑΤΩΝ"] = "ΤΕΡ"; +step1list["ΦΩΣ"] = "ΦΩ"; +step1list["ΦΩΤΟΣ"] = "ΦΩ"; +step1list["ΦΩΤΑ"] = "ΦΩ"; +step1list["ΦΩΤΩΝ"] = "ΦΩ"; +step1list["ΚΑΘΕΣΤΩΣ"] = "ΚΑΘΕΣΤ"; +step1list["ΚΑΘΕΣΤΩΤΟΣ"] = "ΚΑΘΕΣΤ"; +step1list["ΚΑΘΕΣΤΩΤΑ"] = "ΚΑΘΕΣΤ"; +step1list["ΚΑΘΕΣΤΩΤΩΝ"] = "ΚΑΘΕΣΤ"; +step1list["ΓΕΓΟΝΟΣ"] = "ΓΕΓΟΝ"; +step1list["ΓΕΓΟΝΟΤΟΣ"] = "ΓΕΓΟΝ"; +step1list["ΓΕΓΟΝΟΤΑ"] = "ΓΕΓΟΝ"; +step1list["ΓΕΓΟΝΟΤΩΝ"] = "ΓΕΓΟΝ"; + +v = "[ΑΕΗΙΟΥΩ]"; +v2 = "[ΑΕΗΙΟΩ]" + +function stemWord(w) { + var stem; + var suffix; + var firstch; + var origword = w; + test1 = new Boolean(true); + + if(w.length < 4) { + return w; + } + + var re; + var re2; + var re3; + var re4; + + re = /(.*)(ΦΑΓΙΑ|ΦΑΓΙΟΥ|ΦΑΓΙΩΝ|ΣΚΑΓΙΑ|ΣΚΑΓΙΟΥ|ΣΚΑΓΙΩΝ|ΟΛΟΓΙΟΥ|ΟΛΟΓΙΑ|ΟΛΟΓΙΩΝ|ΣΟΓΙΟΥ|ΣΟΓΙΑ|ΣΟΓΙΩΝ|ΤΑΤΟΓΙΑ|ΤΑΤΟΓΙΟΥ|ΤΑΤΟΓΙΩΝ|ΚΡΕΑΣ|ΚΡΕΑΤΟΣ|ΚΡΕΑΤΑ|ΚΡΕΑΤΩΝ|ΠΕΡΑΣ|ΠΕΡΑΤΟΣ|ΠΕΡΑΤΑ|ΠΕΡΑΤΩΝ|ΤΕΡΑΣ|ΤΕΡΑΤΟΣ|ΤΕΡΑΤΑ|ΤΕΡΑΤΩΝ|ΦΩΣ|ΦΩΤΟΣ|ΦΩΤΑ|ΦΩΤΩΝ|ΚΑΘΕΣΤΩΣ|ΚΑΘΕΣΤΩΤΟΣ|ΚΑΘΕΣΤΩΤΑ|ΚΑΘΕΣΤΩΤΩΝ|ΓΕΓΟΝΟΣ|ΓΕΓΟΝΟΤΟΣ|ΓΕΓΟΝΟΤΑ|ΓΕΓΟΝΟΤΩΝ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + w = stem + step1list[suffix]; + test1 = false; + } + + re = /^(.+?)(ΑΔΕΣ|ΑΔΩΝ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + + reg1 = /(ΟΚ|ΜΑΜ|ΜΑΝ|ΜΠΑΜΠ|ΠΑΤΕΡ|ΓΙΑΓΙ|ΝΤΑΝΤ|ΚΥΡ|ΘΕΙ|ΠΕΘΕΡ)$/; + + if(!(reg1.test(w))) { + w = w + "ΑΔ"; + } + } + + re2 = /^(.+?)(ΕΔΕΣ|ΕΔΩΝ)$/; + + if(re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + w = stem; + + exept2 = /(ΟΠ|ΙΠ|ΕΜΠ|ΥΠ|ΓΗΠ|ΔΑΠ|ΚΡΑΣΠ|ΜΙΛ)$/; + + if(exept2.test(w)) { + w = w + "ΕΔ"; + } + } + + re3 = /^(.+?)(ΟΥΔΕΣ|ΟΥΔΩΝ)$/; + + if(re3.test(w)) { + var fp = re3.exec(w); + stem = fp[1]; + w = stem; + + exept3 = /(ΑΡΚ|ΚΑΛΙΑΚ|ΠΕΤΑΛ|ΛΙΧ|ΠΛΕΞ|ΣΚ|Σ|ΦΛ|ΦΡ|ΒΕΛ|ΛΟΥΛ|ΧΝ|ΣΠ|ΤΡΑΓ|ΦΕ)$/; + + if(exept3.test(w)) { + w = w + "ΟΥΔ"; + } + } + + re4 = /^(.+?)(ΕΩΣ|ΕΩΝ)$/; + + if(re4.test(w)) { + var fp = re4.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept4 = /^(Θ|Δ|ΕΛ|ΓΑΛ|Ν|Π|ΙΔ|ΠΑΡ)$/; + + if(exept4.test(w)) { + w = w + "Ε"; + } + } + + re = /^(.+?)(ΙΑ|ΙΟΥ|ΙΩΝ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + re2 = new RegExp(v + "$"); + test1 = false; + + if(re2.test(w)) { + w = stem + "Ι"; + } + } + + re = /^(.+?)(ΙΚΑ|ΙΚΟ|ΙΚΟΥ|ΙΚΩΝ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + re2 = new RegExp(v + "$"); + exept5 = /^(ΑΛ|ΑΔ|ΕΝΔ|ΑΜΑΝ|ΑΜΜΟΧΑΛ|ΗΘ|ΑΝΗΘ|ΑΝΤΙΔ|ΦΥΣ|ΒΡΩΜ|ΓΕΡ|ΕΞΩΔ|ΚΑΛΠ|ΚΑΛΛΙΝ|ΚΑΤΑΔ|ΜΟΥΛ|ΜΠΑΝ|ΜΠΑΓΙΑΤ|ΜΠΟΛ|ΜΠΟΣ|ΝΙΤ|ΞΙΚ|ΣΥΝΟΜΗΛ|ΠΕΤΣ|ΠΙΤΣ|ΠΙΚΑΝΤ|ΠΛΙΑΤΣ|ΠΟΣΤΕΛΝ|ΠΡΩΤΟΔ|ΣΕΡΤ|ΣΥΝΑΔ|ΤΣΑΜ|ΥΠΟΔ|ΦΙΛΟΝ|ΦΥΛΟΔ|ΧΑΣ)$/; + + if((exept5.test(w)) || (re2.test(w))) { + w = w + "ΙΚ"; + } + } + + re = /^(.+?)(ΑΜΕ)$/; + re2 = /^(.+?)(ΑΓΑΜΕ|ΗΣΑΜΕ|ΟΥΣΑΜΕ|ΗΚΑΜΕ|ΗΘΗΚΑΜΕ)$/; + if(w == "ΑΓΑΜΕ") { + w = "ΑΓΑΜ"; + } + + if(re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + } + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept6 = /^(ΑΝΑΠ|ΑΠΟΘ|ΑΠΟΚ|ΑΠΟΣΤ|ΒΟΥΒ|ΞΕΘ|ΟΥΛ|ΠΕΘ|ΠΙΚΡ|ΠΟΤ|ΣΙΧ|Χ)$/; + + if(exept6.test(w)) { + w = w + "ΑΜ"; + } + } + + re2 = /^(.+?)(ΑΝΕ)$/; + re3 = /^(.+?)(ΑΓΑΝΕ|ΗΣΑΝΕ|ΟΥΣΑΝΕ|ΙΟΝΤΑΝΕ|ΙΟΤΑΝΕ|ΙΟΥΝΤΑΝΕ|ΟΝΤΑΝΕ|ΟΤΑΝΕ|ΟΥΝΤΑΝΕ|ΗΚΑΝΕ|ΗΘΗΚΑΝΕ)$/; + + if(re3.test(w)) { + var fp = re3.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + re3 = /^(ΤΡ|ΤΣ)$/; + + if(re3.test(w)) { + w = w + "ΑΓΑΝ"; + } + } + + if(re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + re2 = new RegExp(v2 + "$"); + exept7 = /^(ΒΕΤΕΡ|ΒΟΥΛΚ|ΒΡΑΧΜ|Γ|ΔΡΑΔΟΥΜ|Θ|ΚΑΛΠΟΥΖ|ΚΑΣΤΕΛ|ΚΟΡΜΟΡ|ΛΑΟΠΛ|ΜΩΑΜΕΘ|Μ|ΜΟΥΣΟΥΛΜ|Ν|ΟΥΛ|Π|ΠΕΛΕΚ|ΠΛ|ΠΟΛΙΣ|ΠΟΡΤΟΛ|ΣΑΡΑΚΑΤΣ|ΣΟΥΛΤ|ΤΣΑΡΛΑΤ|ΟΡΦ|ΤΣΙΓΓ|ΤΣΟΠ|ΦΩΤΟΣΤΕΦ|Χ|ΨΥΧΟΠΛ|ΑΓ|ΟΡΦ|ΓΑΛ|ΓΕΡ|ΔΕΚ|ΔΙΠΛ|ΑΜΕΡΙΚΑΝ|ΟΥΡ|ΠΙΘ|ΠΟΥΡΙΤ|Σ|ΖΩΝΤ|ΙΚ|ΚΑΣΤ|ΚΟΠ|ΛΙΧ|ΛΟΥΘΗΡ|ΜΑΙΝΤ|ΜΕΛ|ΣΙΓ|ΣΠ|ΣΤΕΓ|ΤΡΑΓ|ΤΣΑΓ|Φ|ΕΡ|ΑΔΑΠ|ΑΘΙΓΓ|ΑΜΗΧ|ΑΝΙΚ|ΑΝΟΡΓ|ΑΠΗΓ|ΑΠΙΘ|ΑΤΣΙΓΓ|ΒΑΣ|ΒΑΣΚ|ΒΑΘΥΓΑΛ|ΒΙΟΜΗΧ|ΒΡΑΧΥΚ|ΔΙΑΤ|ΔΙΑΦ|ΕΝΟΡΓ|ΘΥΣ|ΚΑΠΝΟΒΙΟΜΗΧ|ΚΑΤΑΓΑΛ|ΚΛΙΒ|ΚΟΙΛΑΡΦ|ΛΙΒ|ΜΕΓΛΟΒΙΟΜΗΧ|ΜΙΚΡΟΒΙΟΜΗΧ|ΝΤΑΒ|ΞΗΡΟΚΛΙΒ|ΟΛΙΓΟΔΑΜ|ΟΛΟΓΑΛ|ΠΕΝΤΑΡΦ|ΠΕΡΗΦ|ΠΕΡΙΤΡ|ΠΛΑΤ|ΠΟΛΥΔΑΠ|ΠΟΛΥΜΗΧ|ΣΤΕΦ|ΤΑΒ|ΤΕΤ|ΥΠΕΡΗΦ|ΥΠΟΚΟΠ|ΧΑΜΗΛΟΔΑΠ|ΨΗΛΟΤΑΒ)$/; + + if((re2.test(w)) || (exept7.test(w))) { + w = w + "ΑΝ"; + } + } + + re3 = /^(.+?)(ΕΤΕ)$/; + re4 = /^(.+?)(ΗΣΕΤΕ)$/; + + if(re4.test(w)) { + var fp = re4.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + } + + if(re3.test(w)) { + var fp = re3.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + re3 = new RegExp(v2 + "$"); + exept8 = /(ΟΔ|ΑΙΡ|ΦΟΡ|ΤΑΘ|ΔΙΑΘ|ΣΧ|ΕΝΔ|ΕΥΡ|ΤΙΘ|ΥΠΕΡΘ|ΡΑΘ|ΕΝΘ|ΡΟΘ|ΣΘ|ΠΥΡ|ΑΙΝ|ΣΥΝΔ|ΣΥΝ|ΣΥΝΘ|ΧΩΡ|ΠΟΝ|ΒΡ|ΚΑΘ|ΕΥΘ|ΕΚΘ|ΝΕΤ|ΡΟΝ|ΑΡΚ|ΒΑΡ|ΒΟΛ|ΩΦΕΛ)$/; + exept9 = /^(ΑΒΑΡ|ΒΕΝ|ΕΝΑΡ|ΑΒΡ|ΑΔ|ΑΘ|ΑΝ|ΑΠΛ|ΒΑΡΟΝ|ΝΤΡ|ΣΚ|ΚΟΠ|ΜΠΟΡ|ΝΙΦ|ΠΑΓ|ΠΑΡΑΚΑΛ|ΣΕΡΠ|ΣΚΕΛ|ΣΥΡΦ|ΤΟΚ|Υ|Δ|ΕΜ|ΘΑΡΡ|Θ)$/; + + if((re3.test(w)) || (exept8.test(w)) || (exept9.test(w))) { + w = w + "ΕΤ"; + } + } + + re = /^(.+?)(ΟΝΤΑΣ|ΩΝΤΑΣ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept10 = /^(ΑΡΧ)$/; + exept11 = /(ΚΡΕ)$/; + if(exept10.test(w)) { + w = w + "ΟΝΤ"; + } + if(exept11.test(w)) { + w = w + "ΩΝΤ"; + } + } + + re = /^(.+?)(ΟΜΑΣΤΕ|ΙΟΜΑΣΤΕ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept11 = /^(ΟΝ)$/; + + if(exept11.test(w)) { + w = w + "ΟΜΑΣΤ"; + } + } + + re = /^(.+?)(ΕΣΤΕ)$/; + re2 = /^(.+?)(ΙΕΣΤΕ)$/; + + if(re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + re2 = /^(Π|ΑΠ|ΣΥΜΠ|ΑΣΥΜΠ|ΑΚΑΤΑΠ|ΑΜΕΤΑΜΦ)$/; + + if(re2.test(w)) { + w = w + "ΙΕΣΤ"; + } + } + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept12 = /^(ΑΛ|ΑΡ|ΕΚΤΕΛ|Ζ|Μ|Ξ|ΠΑΡΑΚΑΛ|ΑΡ|ΠΡΟ|ΝΙΣ)$/; + + if(exept12.test(w)) { + w = w + "ΕΣΤ"; + } + } + + re = /^(.+?)(ΗΚΑ|ΗΚΕΣ|ΗΚΕ)$/; + re2 = /^(.+?)(ΗΘΗΚΑ|ΗΘΗΚΕΣ|ΗΘΗΚΕ)$/; + + if(re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + } + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept13 = /(ΣΚΩΛ|ΣΚΟΥΛ|ΝΑΡΘ|ΣΦ|ΟΘ|ΠΙΘ)$/; + exept14 = /^(ΔΙΑΘ|Θ|ΠΑΡΑΚΑΤΑΘ|ΠΡΟΣΘ|ΣΥΝΘ|)$/; + + if((exept13.test(w)) || (exept14.test(w))) { + w = w + "ΗΚ"; + } + } + + re = /^(.+?)(ΟΥΣΑ|ΟΥΣΕΣ|ΟΥΣΕ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept15 = /^(ΦΑΡΜΑΚ|ΧΑΔ|ΑΓΚ|ΑΝΑΡΡ|ΒΡΟΜ|ΕΚΛΙΠ|ΛΑΜΠΙΔ|ΛΕΧ|Μ|ΠΑΤ|Ρ|Λ|ΜΕΔ|ΜΕΣΑΖ|ΥΠΟΤΕΙΝ|ΑΜ|ΑΙΘ|ΑΝΗΚ|ΔΕΣΠΟΖ|ΕΝΔΙΑΦΕΡ|ΔΕ|ΔΕΥΤΕΡΕΥ|ΚΑΘΑΡΕΥ|ΠΛΕ|ΤΣΑ)$/; + exept16 = /(ΠΟΔΑΡ|ΒΛΕΠ|ΠΑΝΤΑΧ|ΦΡΥΔ|ΜΑΝΤΙΛ|ΜΑΛΛ|ΚΥΜΑΤ|ΛΑΧ|ΛΗΓ|ΦΑΓ|ΟΜ|ΠΡΩΤ)$/; + + if((exept15.test(w)) || (exept16.test(w))) { + w = w + "ΟΥΣ"; + } + } + + re = /^(.+?)(ΑΓΑ|ΑΓΕΣ|ΑΓΕ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept17 = /^(ΨΟΦ|ΝΑΥΛΟΧ)$/; + exept20 = /(ΚΟΛΛ)$/; + exept18 = /^(ΑΒΑΣΤ|ΠΟΛΥΦ|ΑΔΗΦ|ΠΑΜΦ|Ρ|ΑΣΠ|ΑΦ|ΑΜΑΛ|ΑΜΑΛΛΙ|ΑΝΥΣΤ|ΑΠΕΡ|ΑΣΠΑΡ|ΑΧΑΡ|ΔΕΡΒΕΝ|ΔΡΟΣΟΠ|ΞΕΦ|ΝΕΟΠ|ΝΟΜΟΤ|ΟΛΟΠ|ΟΜΟΤ|ΠΡΟΣΤ|ΠΡΟΣΩΠΟΠ|ΣΥΜΠ|ΣΥΝΤ|Τ|ΥΠΟΤ|ΧΑΡ|ΑΕΙΠ|ΑΙΜΟΣΤ|ΑΝΥΠ|ΑΠΟΤ|ΑΡΤΙΠ|ΔΙΑΤ|ΕΝ|ΕΠΙΤ|ΚΡΟΚΑΛΟΠ|ΣΙΔΗΡΟΠ|Λ|ΝΑΥ|ΟΥΛΑΜ|ΟΥΡ|Π|ΤΡ|Μ)$/; + exept19 = /(ΟΦ|ΠΕΛ|ΧΟΡΤ|ΛΛ|ΣΦ|ΡΠ|ΦΡ|ΠΡ|ΛΟΧ|ΣΜΗΝ)$/; + + if(((exept18.test(w)) || (exept19.test(w))) && !((exept17.test(w)) || (exept20.test(w)))) { + w = w + "ΑΓ"; + } + } + + re = /^(.+?)(ΗΣΕ|ΗΣΟΥ|ΗΣΑ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept21 = /^(Ν|ΧΕΡΣΟΝ|ΔΩΔΕΚΑΝ|ΕΡΗΜΟΝ|ΜΕΓΑΛΟΝ|ΕΠΤΑΝ)$/; + + if(exept21.test(w)) { + w = w + "ΗΣ"; + } + } + + re = /^(.+?)(ΗΣΤΕ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept22 = /^(ΑΣΒ|ΣΒ|ΑΧΡ|ΧΡ|ΑΠΛ|ΑΕΙΜΝ|ΔΥΣΧΡ|ΕΥΧΡ|ΚΟΙΝΟΧΡ|ΠΑΛΙΜΨ)$/; + + if(exept22.test(w)) { + w = w + "ΗΣΤ"; + } + } + + re = /^(.+?)(ΟΥΝΕ|ΗΣΟΥΝΕ|ΗΘΟΥΝΕ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept23 = /^(Ν|Ρ|ΣΠΙ|ΣΤΡΑΒΟΜΟΥΤΣ|ΚΑΚΟΜΟΥΤΣ|ΕΞΩΝ)$/; + + if(exept23.test(w)) { + w = w + "ΟΥΝ"; + } + } + + re = /^(.+?)(ΟΥΜΕ|ΗΣΟΥΜΕ|ΗΘΟΥΜΕ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept24 = /^(ΠΑΡΑΣΟΥΣ|Φ|Χ|ΩΡΙΟΠΛ|ΑΖ|ΑΛΛΟΣΟΥΣ|ΑΣΟΥΣ)$/; + + if(exept24.test(w)) { + w = w + "ΟΥΜ"; + } + } + + re = /^(.+?)(ΜΑΤΑ|ΜΑΤΩΝ|ΜΑΤΟΣ)$/; + re2 = /^(.+?)(Α|ΑΓΑΤΕ|ΑΓΑΝ|ΑΕΙ|ΑΜΑΙ|ΑΝ|ΑΣ|ΑΣΑΙ|ΑΤΑΙ|ΑΩ|Ε|ΕΙ|ΕΙΣ|ΕΙΤΕ|ΕΣΑΙ|ΕΣ|ΕΤΑΙ|Ι|ΙΕΜΑΙ|ΙΕΜΑΣΤΕ|ΙΕΤΑΙ|ΙΕΣΑΙ|ΙΕΣΑΣΤΕ|ΙΟΜΑΣΤΑΝ|ΙΟΜΟΥΝ|ΙΟΜΟΥΝΑ|ΙΟΝΤΑΝ|ΙΟΝΤΟΥΣΑΝ|ΙΟΣΑΣΤΑΝ|ΙΟΣΑΣΤΕ|ΙΟΣΟΥΝ|ΙΟΣΟΥΝΑ|ΙΟΤΑΝ|ΙΟΥΜΑ|ΙΟΥΜΑΣΤΕ|ΙΟΥΝΤΑΙ|ΙΟΥΝΤΑΝ|Η|ΗΔΕΣ|ΗΔΩΝ|ΗΘΕΙ|ΗΘΕΙΣ|ΗΘΕΙΤΕ|ΗΘΗΚΑΤΕ|ΗΘΗΚΑΝ|ΗΘΟΥΝ|ΗΘΩ|ΗΚΑΤΕ|ΗΚΑΝ|ΗΣ|ΗΣΑΝ|ΗΣΑΤΕ|ΗΣΕΙ|ΗΣΕΣ|ΗΣΟΥΝ|ΗΣΩ|Ο|ΟΙ|ΟΜΑΙ|ΟΜΑΣΤΑΝ|ΟΜΟΥΝ|ΟΜΟΥΝΑ|ΟΝΤΑΙ|ΟΝΤΑΝ|ΟΝΤΟΥΣΑΝ|ΟΣ|ΟΣΑΣΤΑΝ|ΟΣΑΣΤΕ|ΟΣΟΥΝ|ΟΣΟΥΝΑ|ΟΤΑΝ|ΟΥ|ΟΥΜΑΙ|ΟΥΜΑΣΤΕ|ΟΥΝ|ΟΥΝΤΑΙ|ΟΥΝΤΑΝ|ΟΥΣ|ΟΥΣΑΝ|ΟΥΣΑΤΕ|Υ|ΥΣ|Ω|ΩΝ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem + "ΜΑ"; + } + + if((re2.test(w)) && (test1)) { + var fp = re2.exec(w); + stem = fp[1]; + w = stem; + + } + + re = /^(.+?)(ΕΣΤΕΡ|ΕΣΤΑΤ|ΟΤΕΡ|ΟΤΑΤ|ΥΤΕΡ|ΥΤΑΤ|ΩΤΕΡ|ΩΤΑΤ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + } + + return w; +}; + +var greekStemmer = function (token) { + return token.update(function (word) { + return stemWord(word); + }) +} + +var idx = lunr(function () { + this.field('title') + this.field('excerpt') + this.field('categories') + this.field('tags') + this.ref('id') + + this.pipeline.remove(lunr.trimmer) + this.pipeline.add(greekStemmer) + this.pipeline.remove(lunr.stemmer) + + for (var item in store) { + this.add({ + title: store[item].title, + excerpt: store[item].excerpt, + categories: store[item].categories, + tags: store[item].tags, + id: item + }) + } +}); + +console.log( jQuery.type(idx) ); + +$(document).ready(function() { + $('input#search').on('keyup', function () { + var resultdiv = $('#results'); + var query = $(this).val().toLowerCase(); + var result = + idx.query(function (q) { + query.split(lunr.tokenizer.separator).forEach(function (term) { + q.term(term, { boost: 100 }) + if(query.lastIndexOf(" ") != query.length-1){ + q.term(term, { usePipeline: false, wildcard: lunr.Query.wildcard.TRAILING, boost: 10 }) + } + if (term != ""){ + q.term(term, { usePipeline: false, editDistance: 1, boost: 1 }) + } + }) + }); + resultdiv.empty(); + resultdiv.prepend('

'+result.length+' {{ site.data.ui-text[site.locale].results_found | default: "Result(s) found" }}

'); + for (var item in result) { + var ref = result[item].ref; + if(store[ref].teaser){ + var searchitem = + '
'+ + '
'+ + '

'+ + ''+store[ref].title+''+ + '

'+ + '
'+ + ''+ + '
'+ + '

'+store[ref].excerpt.split(" ").splice(0,20).join(" ")+'...

'+ + '
'+ + '
'; + } + else{ + var searchitem = + '
'+ + '
'+ + '

'+ + ''+store[ref].title+''+ + '

'+ + '

'+store[ref].excerpt.split(" ").splice(0,20).join(" ")+'...

'+ + '
'+ + '
'; + } + resultdiv.append(searchitem); + } + }); +}); diff --git a/docs/assets/js/lunr/lunr-store.js b/docs/assets/js/lunr/lunr-store.js new file mode 100644 index 00000000..434b5997 --- /dev/null +++ b/docs/assets/js/lunr/lunr-store.js @@ -0,0 +1,52 @@ +--- +layout: null +--- + +var store = [ + {%- for c in site.collections -%} + {%- if forloop.last -%} + {%- assign l = true -%} + {%- endif -%} + {%- assign docs = c.docs | where_exp:'doc','doc.search != false' -%} + {%- for doc in docs -%} + {%- if doc.header.teaser -%} + {%- capture teaser -%}{{ doc.header.teaser }}{%- endcapture -%} + {%- else -%} + {%- assign teaser = site.teaser -%} + {%- endif -%} + { + "title": {{ doc.title | jsonify }}, + "excerpt": + {%- if site.search_full_content == true -%} + {{ doc.content | + replace:"

", " " | + replace:"", " " | + replace:"", " " | + replace:"", " " | + replace:"", " " | + replace:"", " " | + replace:"", " "| + strip_html | strip_newlines | jsonify }}, + {%- else -%} + {{ doc.content | + replace:"

", " " | + replace:"", " " | + replace:"", " " | + replace:"", " " | + replace:"", " " | + replace:"", " " | + replace:"", " "| + strip_html | strip_newlines | truncatewords: 50 | jsonify }}, + {%- endif -%} + "categories": {{ doc.categories | jsonify }}, + "tags": {{ doc.tags | jsonify }}, + "url": {{ doc.url | absolute_url | jsonify }}, + "teaser": + {%- if teaser contains "://" -%} + {{ teaser | jsonify }} + {%- else -%} + {{ teaser | absolute_url | jsonify }} + {%- endif -%} + }{%- unless forloop.last and l -%},{%- endunless -%} + {%- endfor -%} + {%- endfor -%}] diff --git a/docs/assets/js/lunr/lunr.js b/docs/assets/js/lunr/lunr.js new file mode 100644 index 00000000..f208eba5 --- /dev/null +++ b/docs/assets/js/lunr/lunr.js @@ -0,0 +1,2977 @@ +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.1.5 + * Copyright (C) 2017 Oliver Nightingale + * @license MIT + */ + +;(function(){ + +/** + * A convenience function for configuring and constructing + * a new lunr Index. + * + * A lunr.Builder instance is created and the pipeline setup + * with a trimmer, stop word filter and stemmer. + * + * This builder object is yielded to the configuration function + * that is passed as a parameter, allowing the list of fields + * and other builder parameters to be customised. + * + * All documents _must_ be added within the passed config function. + * + * @example + * var idx = lunr(function () { + * this.field('title') + * this.field('body') + * this.ref('id') + * + * documents.forEach(function (doc) { + * this.add(doc) + * }, this) + * }) + * + * @see {@link lunr.Builder} + * @see {@link lunr.Pipeline} + * @see {@link lunr.trimmer} + * @see {@link lunr.stopWordFilter} + * @see {@link lunr.stemmer} + * @namespace {function} lunr + */ +var lunr = function (config) { + var builder = new lunr.Builder + + builder.pipeline.add( + lunr.trimmer, + lunr.stopWordFilter, + lunr.stemmer + ) + + builder.searchPipeline.add( + lunr.stemmer + ) + + config.call(builder, builder) + return builder.build() +} + +lunr.version = "2.1.5" +/*! + * lunr.utils + * Copyright (C) 2017 Oliver Nightingale + */ + +/** + * A namespace containing utils for the rest of the lunr library + */ +lunr.utils = {} + +/** + * Print a warning message to the console. + * + * @param {String} message The message to be printed. + * @memberOf Utils + */ +lunr.utils.warn = (function (global) { + /* eslint-disable no-console */ + return function (message) { + if (global.console && console.warn) { + console.warn(message) + } + } + /* eslint-enable no-console */ +})(this) + +/** + * Convert an object to a string. + * + * In the case of `null` and `undefined` the function returns + * the empty string, in all other cases the result of calling + * `toString` on the passed object is returned. + * + * @param {Any} obj The object to convert to a string. + * @return {String} string representation of the passed object. + * @memberOf Utils + */ +lunr.utils.asString = function (obj) { + if (obj === void 0 || obj === null) { + return "" + } else { + return obj.toString() + } +} +lunr.FieldRef = function (docRef, fieldName, stringValue) { + this.docRef = docRef + this.fieldName = fieldName + this._stringValue = stringValue +} + +lunr.FieldRef.joiner = "/" + +lunr.FieldRef.fromString = function (s) { + var n = s.indexOf(lunr.FieldRef.joiner) + + if (n === -1) { + throw "malformed field ref string" + } + + var fieldRef = s.slice(0, n), + docRef = s.slice(n + 1) + + return new lunr.FieldRef (docRef, fieldRef, s) +} + +lunr.FieldRef.prototype.toString = function () { + if (this._stringValue == undefined) { + this._stringValue = this.fieldName + lunr.FieldRef.joiner + this.docRef + } + + return this._stringValue +} +/** + * A function to calculate the inverse document frequency for + * a posting. This is shared between the builder and the index + * + * @private + * @param {object} posting - The posting for a given term + * @param {number} documentCount - The total number of documents. + */ +lunr.idf = function (posting, documentCount) { + var documentsWithTerm = 0 + + for (var fieldName in posting) { + if (fieldName == '_index') continue // Ignore the term index, its not a field + documentsWithTerm += Object.keys(posting[fieldName]).length + } + + var x = (documentCount - documentsWithTerm + 0.5) / (documentsWithTerm + 0.5) + + return Math.log(1 + Math.abs(x)) +} + +/** + * A token wraps a string representation of a token + * as it is passed through the text processing pipeline. + * + * @constructor + * @param {string} [str=''] - The string token being wrapped. + * @param {object} [metadata={}] - Metadata associated with this token. + */ +lunr.Token = function (str, metadata) { + this.str = str || "" + this.metadata = metadata || {} +} + +/** + * Returns the token string that is being wrapped by this object. + * + * @returns {string} + */ +lunr.Token.prototype.toString = function () { + return this.str +} + +/** + * A token update function is used when updating or optionally + * when cloning a token. + * + * @callback lunr.Token~updateFunction + * @param {string} str - The string representation of the token. + * @param {Object} metadata - All metadata associated with this token. + */ + +/** + * Applies the given function to the wrapped string token. + * + * @example + * token.update(function (str, metadata) { + * return str.toUpperCase() + * }) + * + * @param {lunr.Token~updateFunction} fn - A function to apply to the token string. + * @returns {lunr.Token} + */ +lunr.Token.prototype.update = function (fn) { + this.str = fn(this.str, this.metadata) + return this +} + +/** + * Creates a clone of this token. Optionally a function can be + * applied to the cloned token. + * + * @param {lunr.Token~updateFunction} [fn] - An optional function to apply to the cloned token. + * @returns {lunr.Token} + */ +lunr.Token.prototype.clone = function (fn) { + fn = fn || function (s) { return s } + return new lunr.Token (fn(this.str, this.metadata), this.metadata) +} +/*! + * lunr.tokenizer + * Copyright (C) 2017 Oliver Nightingale + */ + +/** + * A function for splitting a string into tokens ready to be inserted into + * the search index. Uses `lunr.tokenizer.separator` to split strings, change + * the value of this property to change how strings are split into tokens. + * + * This tokenizer will convert its parameter to a string by calling `toString` and + * then will split this string on the character in `lunr.tokenizer.separator`. + * Arrays will have their elements converted to strings and wrapped in a lunr.Token. + * + * @static + * @param {?(string|object|object[])} obj - The object to convert into tokens + * @returns {lunr.Token[]} + */ +lunr.tokenizer = function (obj) { + if (obj == null || obj == undefined) { + return [] + } + + if (Array.isArray(obj)) { + return obj.map(function (t) { + return new lunr.Token(lunr.utils.asString(t).toLowerCase()) + }) + } + + var str = obj.toString().trim().toLowerCase(), + len = str.length, + tokens = [] + + for (var sliceEnd = 0, sliceStart = 0; sliceEnd <= len; sliceEnd++) { + var char = str.charAt(sliceEnd), + sliceLength = sliceEnd - sliceStart + + if ((char.match(lunr.tokenizer.separator) || sliceEnd == len)) { + + if (sliceLength > 0) { + tokens.push( + new lunr.Token (str.slice(sliceStart, sliceEnd), { + position: [sliceStart, sliceLength], + index: tokens.length + }) + ) + } + + sliceStart = sliceEnd + 1 + } + + } + + return tokens +} + +/** + * The separator used to split a string into tokens. Override this property to change the behaviour of + * `lunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens. + * + * @static + * @see lunr.tokenizer + */ +lunr.tokenizer.separator = /[\s\-]+/ +/*! + * lunr.Pipeline + * Copyright (C) 2017 Oliver Nightingale + */ + +/** + * lunr.Pipelines maintain an ordered list of functions to be applied to all + * tokens in documents entering the search index and queries being ran against + * the index. + * + * An instance of lunr.Index created with the lunr shortcut will contain a + * pipeline with a stop word filter and an English language stemmer. Extra + * functions can be added before or after either of these functions or these + * default functions can be removed. + * + * When run the pipeline will call each function in turn, passing a token, the + * index of that token in the original list of all tokens and finally a list of + * all the original tokens. + * + * The output of functions in the pipeline will be passed to the next function + * in the pipeline. To exclude a token from entering the index the function + * should return undefined, the rest of the pipeline will not be called with + * this token. + * + * For serialisation of pipelines to work, all functions used in an instance of + * a pipeline should be registered with lunr.Pipeline. Registered functions can + * then be loaded. If trying to load a serialised pipeline that uses functions + * that are not registered an error will be thrown. + * + * If not planning on serialising the pipeline then registering pipeline functions + * is not necessary. + * + * @constructor + */ +lunr.Pipeline = function () { + this._stack = [] +} + +lunr.Pipeline.registeredFunctions = Object.create(null) + +/** + * A pipeline function maps lunr.Token to lunr.Token. A lunr.Token contains the token + * string as well as all known metadata. A pipeline function can mutate the token string + * or mutate (or add) metadata for a given token. + * + * A pipeline function can indicate that the passed token should be discarded by returning + * null. This token will not be passed to any downstream pipeline functions and will not be + * added to the index. + * + * Multiple tokens can be returned by returning an array of tokens. Each token will be passed + * to any downstream pipeline functions and all will returned tokens will be added to the index. + * + * Any number of pipeline functions may be chained together using a lunr.Pipeline. + * + * @interface lunr.PipelineFunction + * @param {lunr.Token} token - A token from the document being processed. + * @param {number} i - The index of this token in the complete list of tokens for this document/field. + * @param {lunr.Token[]} tokens - All tokens for this document/field. + * @returns {(?lunr.Token|lunr.Token[])} + */ + +/** + * Register a function with the pipeline. + * + * Functions that are used in the pipeline should be registered if the pipeline + * needs to be serialised, or a serialised pipeline needs to be loaded. + * + * Registering a function does not add it to a pipeline, functions must still be + * added to instances of the pipeline for them to be used when running a pipeline. + * + * @param {lunr.PipelineFunction} fn - The function to check for. + * @param {String} label - The label to register this function with + */ +lunr.Pipeline.registerFunction = function (fn, label) { + if (label in this.registeredFunctions) { + lunr.utils.warn('Overwriting existing registered function: ' + label) + } + + fn.label = label + lunr.Pipeline.registeredFunctions[fn.label] = fn +} + +/** + * Warns if the function is not registered as a Pipeline function. + * + * @param {lunr.PipelineFunction} fn - The function to check for. + * @private + */ +lunr.Pipeline.warnIfFunctionNotRegistered = function (fn) { + var isRegistered = fn.label && (fn.label in this.registeredFunctions) + + if (!isRegistered) { + lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\n', fn) + } +} + +/** + * Loads a previously serialised pipeline. + * + * All functions to be loaded must already be registered with lunr.Pipeline. + * If any function from the serialised data has not been registered then an + * error will be thrown. + * + * @param {Object} serialised - The serialised pipeline to load. + * @returns {lunr.Pipeline} + */ +lunr.Pipeline.load = function (serialised) { + var pipeline = new lunr.Pipeline + + serialised.forEach(function (fnName) { + var fn = lunr.Pipeline.registeredFunctions[fnName] + + if (fn) { + pipeline.add(fn) + } else { + throw new Error('Cannot load unregistered function: ' + fnName) + } + }) + + return pipeline +} + +/** + * Adds new functions to the end of the pipeline. + * + * Logs a warning if the function has not been registered. + * + * @param {lunr.PipelineFunction[]} functions - Any number of functions to add to the pipeline. + */ +lunr.Pipeline.prototype.add = function () { + var fns = Array.prototype.slice.call(arguments) + + fns.forEach(function (fn) { + lunr.Pipeline.warnIfFunctionNotRegistered(fn) + this._stack.push(fn) + }, this) +} + +/** + * Adds a single function after a function that already exists in the + * pipeline. + * + * Logs a warning if the function has not been registered. + * + * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline. + * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline. + */ +lunr.Pipeline.prototype.after = function (existingFn, newFn) { + lunr.Pipeline.warnIfFunctionNotRegistered(newFn) + + var pos = this._stack.indexOf(existingFn) + if (pos == -1) { + throw new Error('Cannot find existingFn') + } + + pos = pos + 1 + this._stack.splice(pos, 0, newFn) +} + +/** + * Adds a single function before a function that already exists in the + * pipeline. + * + * Logs a warning if the function has not been registered. + * + * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline. + * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline. + */ +lunr.Pipeline.prototype.before = function (existingFn, newFn) { + lunr.Pipeline.warnIfFunctionNotRegistered(newFn) + + var pos = this._stack.indexOf(existingFn) + if (pos == -1) { + throw new Error('Cannot find existingFn') + } + + this._stack.splice(pos, 0, newFn) +} + +/** + * Removes a function from the pipeline. + * + * @param {lunr.PipelineFunction} fn The function to remove from the pipeline. + */ +lunr.Pipeline.prototype.remove = function (fn) { + var pos = this._stack.indexOf(fn) + if (pos == -1) { + return + } + + this._stack.splice(pos, 1) +} + +/** + * Runs the current list of functions that make up the pipeline against the + * passed tokens. + * + * @param {Array} tokens The tokens to run through the pipeline. + * @returns {Array} + */ +lunr.Pipeline.prototype.run = function (tokens) { + var stackLength = this._stack.length + + for (var i = 0; i < stackLength; i++) { + var fn = this._stack[i] + + tokens = tokens.reduce(function (memo, token, j) { + var result = fn(token, j, tokens) + + if (result === void 0 || result === '') return memo + + return memo.concat(result) + }, []) + } + + return tokens +} + +/** + * Convenience method for passing a string through a pipeline and getting + * strings out. This method takes care of wrapping the passed string in a + * token and mapping the resulting tokens back to strings. + * + * @param {string} str - The string to pass through the pipeline. + * @returns {string[]} + */ +lunr.Pipeline.prototype.runString = function (str) { + var token = new lunr.Token (str) + + return this.run([token]).map(function (t) { + return t.toString() + }) +} + +/** + * Resets the pipeline by removing any existing processors. + * + */ +lunr.Pipeline.prototype.reset = function () { + this._stack = [] +} + +/** + * Returns a representation of the pipeline ready for serialisation. + * + * Logs a warning if the function has not been registered. + * + * @returns {Array} + */ +lunr.Pipeline.prototype.toJSON = function () { + return this._stack.map(function (fn) { + lunr.Pipeline.warnIfFunctionNotRegistered(fn) + + return fn.label + }) +} +/*! + * lunr.Vector + * Copyright (C) 2017 Oliver Nightingale + */ + +/** + * A vector is used to construct the vector space of documents and queries. These + * vectors support operations to determine the similarity between two documents or + * a document and a query. + * + * Normally no parameters are required for initializing a vector, but in the case of + * loading a previously dumped vector the raw elements can be provided to the constructor. + * + * For performance reasons vectors are implemented with a flat array, where an elements + * index is immediately followed by its value. E.g. [index, value, index, value]. This + * allows the underlying array to be as sparse as possible and still offer decent + * performance when being used for vector calculations. + * + * @constructor + * @param {Number[]} [elements] - The flat list of element index and element value pairs. + */ +lunr.Vector = function (elements) { + this._magnitude = 0 + this.elements = elements || [] +} + + +/** + * Calculates the position within the vector to insert a given index. + * + * This is used internally by insert and upsert. If there are duplicate indexes then + * the position is returned as if the value for that index were to be updated, but it + * is the callers responsibility to check whether there is a duplicate at that index + * + * @param {Number} insertIdx - The index at which the element should be inserted. + * @returns {Number} + */ +lunr.Vector.prototype.positionForIndex = function (index) { + // For an empty vector the tuple can be inserted at the beginning + if (this.elements.length == 0) { + return 0 + } + + var start = 0, + end = this.elements.length / 2, + sliceLength = end - start, + pivotPoint = Math.floor(sliceLength / 2), + pivotIndex = this.elements[pivotPoint * 2] + + while (sliceLength > 1) { + if (pivotIndex < index) { + start = pivotPoint + } + + if (pivotIndex > index) { + end = pivotPoint + } + + if (pivotIndex == index) { + break + } + + sliceLength = end - start + pivotPoint = start + Math.floor(sliceLength / 2) + pivotIndex = this.elements[pivotPoint * 2] + } + + if (pivotIndex == index) { + return pivotPoint * 2 + } + + if (pivotIndex > index) { + return pivotPoint * 2 + } + + if (pivotIndex < index) { + return (pivotPoint + 1) * 2 + } +} + +/** + * Inserts an element at an index within the vector. + * + * Does not allow duplicates, will throw an error if there is already an entry + * for this index. + * + * @param {Number} insertIdx - The index at which the element should be inserted. + * @param {Number} val - The value to be inserted into the vector. + */ +lunr.Vector.prototype.insert = function (insertIdx, val) { + this.upsert(insertIdx, val, function () { + throw "duplicate index" + }) +} + +/** + * Inserts or updates an existing index within the vector. + * + * @param {Number} insertIdx - The index at which the element should be inserted. + * @param {Number} val - The value to be inserted into the vector. + * @param {function} fn - A function that is called for updates, the existing value and the + * requested value are passed as arguments + */ +lunr.Vector.prototype.upsert = function (insertIdx, val, fn) { + this._magnitude = 0 + var position = this.positionForIndex(insertIdx) + + if (this.elements[position] == insertIdx) { + this.elements[position + 1] = fn(this.elements[position + 1], val) + } else { + this.elements.splice(position, 0, insertIdx, val) + } +} + +/** + * Calculates the magnitude of this vector. + * + * @returns {Number} + */ +lunr.Vector.prototype.magnitude = function () { + if (this._magnitude) return this._magnitude + + var sumOfSquares = 0, + elementsLength = this.elements.length + + for (var i = 1; i < elementsLength; i += 2) { + var val = this.elements[i] + sumOfSquares += val * val + } + + return this._magnitude = Math.sqrt(sumOfSquares) +} + +/** + * Calculates the dot product of this vector and another vector. + * + * @param {lunr.Vector} otherVector - The vector to compute the dot product with. + * @returns {Number} + */ +lunr.Vector.prototype.dot = function (otherVector) { + var dotProduct = 0, + a = this.elements, b = otherVector.elements, + aLen = a.length, bLen = b.length, + aVal = 0, bVal = 0, + i = 0, j = 0 + + while (i < aLen && j < bLen) { + aVal = a[i], bVal = b[j] + if (aVal < bVal) { + i += 2 + } else if (aVal > bVal) { + j += 2 + } else if (aVal == bVal) { + dotProduct += a[i + 1] * b[j + 1] + i += 2 + j += 2 + } + } + + return dotProduct +} + +/** + * Calculates the cosine similarity between this vector and another + * vector. + * + * @param {lunr.Vector} otherVector - The other vector to calculate the + * similarity with. + * @returns {Number} + */ +lunr.Vector.prototype.similarity = function (otherVector) { + return this.dot(otherVector) / (this.magnitude() * otherVector.magnitude()) +} + +/** + * Converts the vector to an array of the elements within the vector. + * + * @returns {Number[]} + */ +lunr.Vector.prototype.toArray = function () { + var output = new Array (this.elements.length / 2) + + for (var i = 1, j = 0; i < this.elements.length; i += 2, j++) { + output[j] = this.elements[i] + } + + return output +} + +/** + * A JSON serializable representation of the vector. + * + * @returns {Number[]} + */ +lunr.Vector.prototype.toJSON = function () { + return this.elements +} +/* eslint-disable */ +/*! + * lunr.stemmer + * Copyright (C) 2017 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + */ + +/** + * lunr.stemmer is an english language stemmer, this is a JavaScript + * implementation of the PorterStemmer taken from http://tartarus.org/~martin + * + * @static + * @implements {lunr.PipelineFunction} + * @param {lunr.Token} token - The string to stem + * @returns {lunr.Token} + * @see {@link lunr.Pipeline} + */ +lunr.stemmer = (function(){ + var step2list = { + "ational" : "ate", + "tional" : "tion", + "enci" : "ence", + "anci" : "ance", + "izer" : "ize", + "bli" : "ble", + "alli" : "al", + "entli" : "ent", + "eli" : "e", + "ousli" : "ous", + "ization" : "ize", + "ation" : "ate", + "ator" : "ate", + "alism" : "al", + "iveness" : "ive", + "fulness" : "ful", + "ousness" : "ous", + "aliti" : "al", + "iviti" : "ive", + "biliti" : "ble", + "logi" : "log" + }, + + step3list = { + "icate" : "ic", + "ative" : "", + "alize" : "al", + "iciti" : "ic", + "ical" : "ic", + "ful" : "", + "ness" : "" + }, + + c = "[^aeiou]", // consonant + v = "[aeiouy]", // vowel + C = c + "[^aeiouy]*", // consonant sequence + V = v + "[aeiou]*", // vowel sequence + + mgr0 = "^(" + C + ")?" + V + C, // [C]VC... is m>0 + meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$", // [C]VC[V] is m=1 + mgr1 = "^(" + C + ")?" + V + C + V + C, // [C]VCVC... is m>1 + s_v = "^(" + C + ")?" + v; // vowel in stem + + var re_mgr0 = new RegExp(mgr0); + var re_mgr1 = new RegExp(mgr1); + var re_meq1 = new RegExp(meq1); + var re_s_v = new RegExp(s_v); + + var re_1a = /^(.+?)(ss|i)es$/; + var re2_1a = /^(.+?)([^s])s$/; + var re_1b = /^(.+?)eed$/; + var re2_1b = /^(.+?)(ed|ing)$/; + var re_1b_2 = /.$/; + var re2_1b_2 = /(at|bl|iz)$/; + var re3_1b_2 = new RegExp("([^aeiouylsz])\\1$"); + var re4_1b_2 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + + var re_1c = /^(.+?[^aeiou])y$/; + var re_2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + + var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + + var re_4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + var re2_4 = /^(.+?)(s|t)(ion)$/; + + var re_5 = /^(.+?)e$/; + var re_5_1 = /ll$/; + var re3_5 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + + var porterStemmer = function porterStemmer(w) { + var stem, + suffix, + firstch, + re, + re2, + re3, + re4; + + if (w.length < 3) { return w; } + + firstch = w.substr(0,1); + if (firstch == "y") { + w = firstch.toUpperCase() + w.substr(1); + } + + // Step 1a + re = re_1a + re2 = re2_1a; + + if (re.test(w)) { w = w.replace(re,"$1$2"); } + else if (re2.test(w)) { w = w.replace(re2,"$1$2"); } + + // Step 1b + re = re_1b; + re2 = re2_1b; + if (re.test(w)) { + var fp = re.exec(w); + re = re_mgr0; + if (re.test(fp[1])) { + re = re_1b_2; + w = w.replace(re,""); + } + } else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = re_s_v; + if (re2.test(stem)) { + w = stem; + re2 = re2_1b_2; + re3 = re3_1b_2; + re4 = re4_1b_2; + if (re2.test(w)) { w = w + "e"; } + else if (re3.test(w)) { re = re_1b_2; w = w.replace(re,""); } + else if (re4.test(w)) { w = w + "e"; } + } + } + + // Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say) + re = re_1c; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem + "i"; + } + + // Step 2 + re = re_2; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = re_mgr0; + if (re.test(stem)) { + w = stem + step2list[suffix]; + } + } + + // Step 3 + re = re_3; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = re_mgr0; + if (re.test(stem)) { + w = stem + step3list[suffix]; + } + } + + // Step 4 + re = re_4; + re2 = re2_4; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = re_mgr1; + if (re.test(stem)) { + w = stem; + } + } else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = re_mgr1; + if (re2.test(stem)) { + w = stem; + } + } + + // Step 5 + re = re_5; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = re_mgr1; + re2 = re_meq1; + re3 = re3_5; + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) { + w = stem; + } + } + + re = re_5_1; + re2 = re_mgr1; + if (re.test(w) && re2.test(w)) { + re = re_1b_2; + w = w.replace(re,""); + } + + // and turn initial Y back to y + + if (firstch == "y") { + w = firstch.toLowerCase() + w.substr(1); + } + + return w; + }; + + return function (token) { + return token.update(porterStemmer); + } +})(); + +lunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer') +/*! + * lunr.stopWordFilter + * Copyright (C) 2017 Oliver Nightingale + */ + +/** + * lunr.generateStopWordFilter builds a stopWordFilter function from the provided + * list of stop words. + * + * The built in lunr.stopWordFilter is built using this generator and can be used + * to generate custom stopWordFilters for applications or non English languages. + * + * @param {Array} token The token to pass through the filter + * @returns {lunr.PipelineFunction} + * @see lunr.Pipeline + * @see lunr.stopWordFilter + */ +lunr.generateStopWordFilter = function (stopWords) { + var words = stopWords.reduce(function (memo, stopWord) { + memo[stopWord] = stopWord + return memo + }, {}) + + return function (token) { + if (token && words[token.toString()] !== token.toString()) return token + } +} + +/** + * lunr.stopWordFilter is an English language stop word list filter, any words + * contained in the list will not be passed through the filter. + * + * This is intended to be used in the Pipeline. If the token does not pass the + * filter then undefined will be returned. + * + * @implements {lunr.PipelineFunction} + * @params {lunr.Token} token - A token to check for being a stop word. + * @returns {lunr.Token} + * @see {@link lunr.Pipeline} + */ +lunr.stopWordFilter = lunr.generateStopWordFilter([ + 'a', + 'able', + 'about', + 'across', + 'after', + 'all', + 'almost', + 'also', + 'am', + 'among', + 'an', + 'and', + 'any', + 'are', + 'as', + 'at', + 'be', + 'because', + 'been', + 'but', + 'by', + 'can', + 'cannot', + 'could', + 'dear', + 'did', + 'do', + 'does', + 'either', + 'else', + 'ever', + 'every', + 'for', + 'from', + 'get', + 'got', + 'had', + 'has', + 'have', + 'he', + 'her', + 'hers', + 'him', + 'his', + 'how', + 'however', + 'i', + 'if', + 'in', + 'into', + 'is', + 'it', + 'its', + 'just', + 'least', + 'let', + 'like', + 'likely', + 'may', + 'me', + 'might', + 'most', + 'must', + 'my', + 'neither', + 'no', + 'nor', + 'not', + 'of', + 'off', + 'often', + 'on', + 'only', + 'or', + 'other', + 'our', + 'own', + 'rather', + 'said', + 'say', + 'says', + 'she', + 'should', + 'since', + 'so', + 'some', + 'than', + 'that', + 'the', + 'their', + 'them', + 'then', + 'there', + 'these', + 'they', + 'this', + 'tis', + 'to', + 'too', + 'twas', + 'us', + 'wants', + 'was', + 'we', + 'were', + 'what', + 'when', + 'where', + 'which', + 'while', + 'who', + 'whom', + 'why', + 'will', + 'with', + 'would', + 'yet', + 'you', + 'your' +]) + +lunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter') +/*! + * lunr.trimmer + * Copyright (C) 2017 Oliver Nightingale + */ + +/** + * lunr.trimmer is a pipeline function for trimming non word + * characters from the beginning and end of tokens before they + * enter the index. + * + * This implementation may not work correctly for non latin + * characters and should either be removed or adapted for use + * with languages with non-latin characters. + * + * @static + * @implements {lunr.PipelineFunction} + * @param {lunr.Token} token The token to pass through the filter + * @returns {lunr.Token} + * @see lunr.Pipeline + */ +lunr.trimmer = function (token) { + return token.update(function (s) { + return s.replace(/^\W+/, '').replace(/\W+$/, '') + }) +} + +lunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer') +/*! + * lunr.TokenSet + * Copyright (C) 2017 Oliver Nightingale + */ + +/** + * A token set is used to store the unique list of all tokens + * within an index. Token sets are also used to represent an + * incoming query to the index, this query token set and index + * token set are then intersected to find which tokens to look + * up in the inverted index. + * + * A token set can hold multiple tokens, as in the case of the + * index token set, or it can hold a single token as in the + * case of a simple query token set. + * + * Additionally token sets are used to perform wildcard matching. + * Leading, contained and trailing wildcards are supported, and + * from this edit distance matching can also be provided. + * + * Token sets are implemented as a minimal finite state automata, + * where both common prefixes and suffixes are shared between tokens. + * This helps to reduce the space used for storing the token set. + * + * @constructor + */ +lunr.TokenSet = function () { + this.final = false + this.edges = {} + this.id = lunr.TokenSet._nextId + lunr.TokenSet._nextId += 1 +} + +/** + * Keeps track of the next, auto increment, identifier to assign + * to a new tokenSet. + * + * TokenSets require a unique identifier to be correctly minimised. + * + * @private + */ +lunr.TokenSet._nextId = 1 + +/** + * Creates a TokenSet instance from the given sorted array of words. + * + * @param {String[]} arr - A sorted array of strings to create the set from. + * @returns {lunr.TokenSet} + * @throws Will throw an error if the input array is not sorted. + */ +lunr.TokenSet.fromArray = function (arr) { + var builder = new lunr.TokenSet.Builder + + for (var i = 0, len = arr.length; i < len; i++) { + builder.insert(arr[i]) + } + + builder.finish() + return builder.root +} + +/** + * Creates a token set from a query clause. + * + * @private + * @param {Object} clause - A single clause from lunr.Query. + * @param {string} clause.term - The query clause term. + * @param {number} [clause.editDistance] - The optional edit distance for the term. + * @returns {lunr.TokenSet} + */ +lunr.TokenSet.fromClause = function (clause) { + if ('editDistance' in clause) { + return lunr.TokenSet.fromFuzzyString(clause.term, clause.editDistance) + } else { + return lunr.TokenSet.fromString(clause.term) + } +} + +/** + * Creates a token set representing a single string with a specified + * edit distance. + * + * Insertions, deletions, substitutions and transpositions are each + * treated as an edit distance of 1. + * + * Increasing the allowed edit distance will have a dramatic impact + * on the performance of both creating and intersecting these TokenSets. + * It is advised to keep the edit distance less than 3. + * + * @param {string} str - The string to create the token set from. + * @param {number} editDistance - The allowed edit distance to match. + * @returns {lunr.Vector} + */ +lunr.TokenSet.fromFuzzyString = function (str, editDistance) { + var root = new lunr.TokenSet + + var stack = [{ + node: root, + editsRemaining: editDistance, + str: str + }] + + while (stack.length) { + var frame = stack.pop() + + // no edit + if (frame.str.length > 0) { + var char = frame.str.charAt(0), + noEditNode + + if (char in frame.node.edges) { + noEditNode = frame.node.edges[char] + } else { + noEditNode = new lunr.TokenSet + frame.node.edges[char] = noEditNode + } + + if (frame.str.length == 1) { + noEditNode.final = true + } else { + stack.push({ + node: noEditNode, + editsRemaining: frame.editsRemaining, + str: frame.str.slice(1) + }) + } + } + + // deletion + // can only do a deletion if we have enough edits remaining + // and if there are characters left to delete in the string + if (frame.editsRemaining > 0 && frame.str.length > 1) { + var char = frame.str.charAt(1), + deletionNode + + if (char in frame.node.edges) { + deletionNode = frame.node.edges[char] + } else { + deletionNode = new lunr.TokenSet + frame.node.edges[char] = deletionNode + } + + if (frame.str.length <= 2) { + deletionNode.final = true + } else { + stack.push({ + node: deletionNode, + editsRemaining: frame.editsRemaining - 1, + str: frame.str.slice(2) + }) + } + } + + // deletion + // just removing the last character from the str + if (frame.editsRemaining > 0 && frame.str.length == 1) { + frame.node.final = true + } + + // substitution + // can only do a substitution if we have enough edits remaining + // and if there are characters left to substitute + if (frame.editsRemaining > 0 && frame.str.length >= 1) { + if ("*" in frame.node.edges) { + var substitutionNode = frame.node.edges["*"] + } else { + var substitutionNode = new lunr.TokenSet + frame.node.edges["*"] = substitutionNode + } + + if (frame.str.length == 1) { + substitutionNode.final = true + } else { + stack.push({ + node: substitutionNode, + editsRemaining: frame.editsRemaining - 1, + str: frame.str.slice(1) + }) + } + } + + // insertion + // can only do insertion if there are edits remaining + if (frame.editsRemaining > 0) { + if ("*" in frame.node.edges) { + var insertionNode = frame.node.edges["*"] + } else { + var insertionNode = new lunr.TokenSet + frame.node.edges["*"] = insertionNode + } + + if (frame.str.length == 0) { + insertionNode.final = true + } else { + stack.push({ + node: insertionNode, + editsRemaining: frame.editsRemaining - 1, + str: frame.str + }) + } + } + + // transposition + // can only do a transposition if there are edits remaining + // and there are enough characters to transpose + if (frame.editsRemaining > 0 && frame.str.length > 1) { + var charA = frame.str.charAt(0), + charB = frame.str.charAt(1), + transposeNode + + if (charB in frame.node.edges) { + transposeNode = frame.node.edges[charB] + } else { + transposeNode = new lunr.TokenSet + frame.node.edges[charB] = transposeNode + } + + if (frame.str.length == 1) { + transposeNode.final = true + } else { + stack.push({ + node: transposeNode, + editsRemaining: frame.editsRemaining - 1, + str: charA + frame.str.slice(2) + }) + } + } + } + + return root +} + +/** + * Creates a TokenSet from a string. + * + * The string may contain one or more wildcard characters (*) + * that will allow wildcard matching when intersecting with + * another TokenSet. + * + * @param {string} str - The string to create a TokenSet from. + * @returns {lunr.TokenSet} + */ +lunr.TokenSet.fromString = function (str) { + var node = new lunr.TokenSet, + root = node, + wildcardFound = false + + /* + * Iterates through all characters within the passed string + * appending a node for each character. + * + * As soon as a wildcard character is found then a self + * referencing edge is introduced to continually match + * any number of any characters. + */ + for (var i = 0, len = str.length; i < len; i++) { + var char = str[i], + final = (i == len - 1) + + if (char == "*") { + wildcardFound = true + node.edges[char] = node + node.final = final + + } else { + var next = new lunr.TokenSet + next.final = final + + node.edges[char] = next + node = next + + // TODO: is this needed anymore? + if (wildcardFound) { + node.edges["*"] = root + } + } + } + + return root +} + +/** + * Converts this TokenSet into an array of strings + * contained within the TokenSet. + * + * @returns {string[]} + */ +lunr.TokenSet.prototype.toArray = function () { + var words = [] + + var stack = [{ + prefix: "", + node: this + }] + + while (stack.length) { + var frame = stack.pop(), + edges = Object.keys(frame.node.edges), + len = edges.length + + if (frame.node.final) { + words.push(frame.prefix) + } + + for (var i = 0; i < len; i++) { + var edge = edges[i] + + stack.push({ + prefix: frame.prefix.concat(edge), + node: frame.node.edges[edge] + }) + } + } + + return words +} + +/** + * Generates a string representation of a TokenSet. + * + * This is intended to allow TokenSets to be used as keys + * in objects, largely to aid the construction and minimisation + * of a TokenSet. As such it is not designed to be a human + * friendly representation of the TokenSet. + * + * @returns {string} + */ +lunr.TokenSet.prototype.toString = function () { + // NOTE: Using Object.keys here as this.edges is very likely + // to enter 'hash-mode' with many keys being added + // + // avoiding a for-in loop here as it leads to the function + // being de-optimised (at least in V8). From some simple + // benchmarks the performance is comparable, but allowing + // V8 to optimize may mean easy performance wins in the future. + + if (this._str) { + return this._str + } + + var str = this.final ? '1' : '0', + labels = Object.keys(this.edges).sort(), + len = labels.length + + for (var i = 0; i < len; i++) { + var label = labels[i], + node = this.edges[label] + + str = str + label + node.id + } + + return str +} + +/** + * Returns a new TokenSet that is the intersection of + * this TokenSet and the passed TokenSet. + * + * This intersection will take into account any wildcards + * contained within the TokenSet. + * + * @param {lunr.TokenSet} b - An other TokenSet to intersect with. + * @returns {lunr.TokenSet} + */ +lunr.TokenSet.prototype.intersect = function (b) { + var output = new lunr.TokenSet, + frame = undefined + + var stack = [{ + qNode: b, + output: output, + node: this + }] + + while (stack.length) { + frame = stack.pop() + + // NOTE: As with the #toString method, we are using + // Object.keys and a for loop instead of a for-in loop + // as both of these objects enter 'hash' mode, causing + // the function to be de-optimised in V8 + var qEdges = Object.keys(frame.qNode.edges), + qLen = qEdges.length, + nEdges = Object.keys(frame.node.edges), + nLen = nEdges.length + + for (var q = 0; q < qLen; q++) { + var qEdge = qEdges[q] + + for (var n = 0; n < nLen; n++) { + var nEdge = nEdges[n] + + if (nEdge == qEdge || qEdge == '*') { + var node = frame.node.edges[nEdge], + qNode = frame.qNode.edges[qEdge], + final = node.final && qNode.final, + next = undefined + + if (nEdge in frame.output.edges) { + // an edge already exists for this character + // no need to create a new node, just set the finality + // bit unless this node is already final + next = frame.output.edges[nEdge] + next.final = next.final || final + + } else { + // no edge exists yet, must create one + // set the finality bit and insert it + // into the output + next = new lunr.TokenSet + next.final = final + frame.output.edges[nEdge] = next + } + + stack.push({ + qNode: qNode, + output: next, + node: node + }) + } + } + } + } + + return output +} +lunr.TokenSet.Builder = function () { + this.previousWord = "" + this.root = new lunr.TokenSet + this.uncheckedNodes = [] + this.minimizedNodes = {} +} + +lunr.TokenSet.Builder.prototype.insert = function (word) { + var node, + commonPrefix = 0 + + if (word < this.previousWord) { + throw new Error ("Out of order word insertion") + } + + for (var i = 0; i < word.length && i < this.previousWord.length; i++) { + if (word[i] != this.previousWord[i]) break + commonPrefix++ + } + + this.minimize(commonPrefix) + + if (this.uncheckedNodes.length == 0) { + node = this.root + } else { + node = this.uncheckedNodes[this.uncheckedNodes.length - 1].child + } + + for (var i = commonPrefix; i < word.length; i++) { + var nextNode = new lunr.TokenSet, + char = word[i] + + node.edges[char] = nextNode + + this.uncheckedNodes.push({ + parent: node, + char: char, + child: nextNode + }) + + node = nextNode + } + + node.final = true + this.previousWord = word +} + +lunr.TokenSet.Builder.prototype.finish = function () { + this.minimize(0) +} + +lunr.TokenSet.Builder.prototype.minimize = function (downTo) { + for (var i = this.uncheckedNodes.length - 1; i >= downTo; i--) { + var node = this.uncheckedNodes[i], + childKey = node.child.toString() + + if (childKey in this.minimizedNodes) { + node.parent.edges[node.char] = this.minimizedNodes[childKey] + } else { + // Cache the key for this node since + // we know it can't change anymore + node.child._str = childKey + + this.minimizedNodes[childKey] = node.child + } + + this.uncheckedNodes.pop() + } +} +/*! + * lunr.Index + * Copyright (C) 2017 Oliver Nightingale + */ + +/** + * An index contains the built index of all documents and provides a query interface + * to the index. + * + * Usually instances of lunr.Index will not be created using this constructor, instead + * lunr.Builder should be used to construct new indexes, or lunr.Index.load should be + * used to load previously built and serialized indexes. + * + * @constructor + * @param {Object} attrs - The attributes of the built search index. + * @param {Object} attrs.invertedIndex - An index of term/field to document reference. + * @param {Object} attrs.documentVectors - Document vectors keyed by document reference. + * @param {lunr.TokenSet} attrs.tokenSet - An set of all corpus tokens. + * @param {string[]} attrs.fields - The names of indexed document fields. + * @param {lunr.Pipeline} attrs.pipeline - The pipeline to use for search terms. + */ +lunr.Index = function (attrs) { + this.invertedIndex = attrs.invertedIndex + this.fieldVectors = attrs.fieldVectors + this.tokenSet = attrs.tokenSet + this.fields = attrs.fields + this.pipeline = attrs.pipeline +} + +/** + * A result contains details of a document matching a search query. + * @typedef {Object} lunr.Index~Result + * @property {string} ref - The reference of the document this result represents. + * @property {number} score - A number between 0 and 1 representing how similar this document is to the query. + * @property {lunr.MatchData} matchData - Contains metadata about this match including which term(s) caused the match. + */ + +/** + * Although lunr provides the ability to create queries using lunr.Query, it also provides a simple + * query language which itself is parsed into an instance of lunr.Query. + * + * For programmatically building queries it is advised to directly use lunr.Query, the query language + * is best used for human entered text rather than program generated text. + * + * At its simplest queries can just be a single term, e.g. `hello`, multiple terms are also supported + * and will be combined with OR, e.g `hello world` will match documents that contain either 'hello' + * or 'world', though those that contain both will rank higher in the results. + * + * Wildcards can be included in terms to match one or more unspecified characters, these wildcards can + * be inserted anywhere within the term, and more than one wildcard can exist in a single term. Adding + * wildcards will increase the number of documents that will be found but can also have a negative + * impact on query performance, especially with wildcards at the beginning of a term. + * + * Terms can be restricted to specific fields, e.g. `title:hello`, only documents with the term + * hello in the title field will match this query. Using a field not present in the index will lead + * to an error being thrown. + * + * Modifiers can also be added to terms, lunr supports edit distance and boost modifiers on terms. A term + * boost will make documents matching that term score higher, e.g. `foo^5`. Edit distance is also supported + * to provide fuzzy matching, e.g. 'hello~2' will match documents with hello with an edit distance of 2. + * Avoid large values for edit distance to improve query performance. + * + * To escape special characters the backslash character '\' can be used, this allows searches to include + * characters that would normally be considered modifiers, e.g. `foo\~2` will search for a term "foo~2" instead + * of attempting to apply a boost of 2 to the search term "foo". + * + * @typedef {string} lunr.Index~QueryString + * @example Simple single term query + * hello + * @example Multiple term query + * hello world + * @example term scoped to a field + * title:hello + * @example term with a boost of 10 + * hello^10 + * @example term with an edit distance of 2 + * hello~2 + */ + +/** + * Performs a search against the index using lunr query syntax. + * + * Results will be returned sorted by their score, the most relevant results + * will be returned first. + * + * For more programmatic querying use lunr.Index#query. + * + * @param {lunr.Index~QueryString} queryString - A string containing a lunr query. + * @throws {lunr.QueryParseError} If the passed query string cannot be parsed. + * @returns {lunr.Index~Result[]} + */ +lunr.Index.prototype.search = function (queryString) { + return this.query(function (query) { + var parser = new lunr.QueryParser(queryString, query) + parser.parse() + }) +} + +/** + * A query builder callback provides a query object to be used to express + * the query to perform on the index. + * + * @callback lunr.Index~queryBuilder + * @param {lunr.Query} query - The query object to build up. + * @this lunr.Query + */ + +/** + * Performs a query against the index using the yielded lunr.Query object. + * + * If performing programmatic queries against the index, this method is preferred + * over lunr.Index#search so as to avoid the additional query parsing overhead. + * + * A query object is yielded to the supplied function which should be used to + * express the query to be run against the index. + * + * Note that although this function takes a callback parameter it is _not_ an + * asynchronous operation, the callback is just yielded a query object to be + * customized. + * + * @param {lunr.Index~queryBuilder} fn - A function that is used to build the query. + * @returns {lunr.Index~Result[]} + */ +lunr.Index.prototype.query = function (fn) { + // for each query clause + // * process terms + // * expand terms from token set + // * find matching documents and metadata + // * get document vectors + // * score documents + + var query = new lunr.Query(this.fields), + matchingFields = Object.create(null), + queryVectors = Object.create(null), + termFieldCache = Object.create(null) + + fn.call(query, query) + + for (var i = 0; i < query.clauses.length; i++) { + /* + * Unless the pipeline has been disabled for this term, which is + * the case for terms with wildcards, we need to pass the clause + * term through the search pipeline. A pipeline returns an array + * of processed terms. Pipeline functions may expand the passed + * term, which means we may end up performing multiple index lookups + * for a single query term. + */ + var clause = query.clauses[i], + terms = null + + if (clause.usePipeline) { + terms = this.pipeline.runString(clause.term) + } else { + terms = [clause.term] + } + + for (var m = 0; m < terms.length; m++) { + var term = terms[m] + + /* + * Each term returned from the pipeline needs to use the same query + * clause object, e.g. the same boost and or edit distance. The + * simplest way to do this is to re-use the clause object but mutate + * its term property. + */ + clause.term = term + + /* + * From the term in the clause we create a token set which will then + * be used to intersect the indexes token set to get a list of terms + * to lookup in the inverted index + */ + var termTokenSet = lunr.TokenSet.fromClause(clause), + expandedTerms = this.tokenSet.intersect(termTokenSet).toArray() + + for (var j = 0; j < expandedTerms.length; j++) { + /* + * For each term get the posting and termIndex, this is required for + * building the query vector. + */ + var expandedTerm = expandedTerms[j], + posting = this.invertedIndex[expandedTerm], + termIndex = posting._index + + for (var k = 0; k < clause.fields.length; k++) { + /* + * For each field that this query term is scoped by (by default + * all fields are in scope) we need to get all the document refs + * that have this term in that field. + * + * The posting is the entry in the invertedIndex for the matching + * term from above. + */ + var field = clause.fields[k], + fieldPosting = posting[field], + matchingDocumentRefs = Object.keys(fieldPosting), + termField = expandedTerm + "/" + field + + /* + * To support field level boosts a query vector is created per + * field. This vector is populated using the termIndex found for + * the term and a unit value with the appropriate boost applied. + * + * If the query vector for this field does not exist yet it needs + * to be created. + */ + if (queryVectors[field] === undefined) { + queryVectors[field] = new lunr.Vector + } + + /* + * Using upsert because there could already be an entry in the vector + * for the term we are working with. In that case we just add the scores + * together. + */ + queryVectors[field].upsert(termIndex, 1 * clause.boost, function (a, b) { return a + b }) + + /** + * If we've already seen this term, field combo then we've already collected + * the matching documents and metadata, no need to go through all that again + */ + if (termFieldCache[termField]) { + continue + } + + for (var l = 0; l < matchingDocumentRefs.length; l++) { + /* + * All metadata for this term/field/document triple + * are then extracted and collected into an instance + * of lunr.MatchData ready to be returned in the query + * results + */ + var matchingDocumentRef = matchingDocumentRefs[l], + matchingFieldRef = new lunr.FieldRef (matchingDocumentRef, field), + metadata = fieldPosting[matchingDocumentRef], + fieldMatch + + if ((fieldMatch = matchingFields[matchingFieldRef]) === undefined) { + matchingFields[matchingFieldRef] = new lunr.MatchData (expandedTerm, field, metadata) + } else { + fieldMatch.add(expandedTerm, field, metadata) + } + + } + + termFieldCache[termField] = true + } + } + } + } + + var matchingFieldRefs = Object.keys(matchingFields), + results = [], + matches = Object.create(null) + + for (var i = 0; i < matchingFieldRefs.length; i++) { + /* + * Currently we have document fields that match the query, but we + * need to return documents. The matchData and scores are combined + * from multiple fields belonging to the same document. + * + * Scores are calculated by field, using the query vectors created + * above, and combined into a final document score using addition. + */ + var fieldRef = lunr.FieldRef.fromString(matchingFieldRefs[i]), + docRef = fieldRef.docRef, + fieldVector = this.fieldVectors[fieldRef], + score = queryVectors[fieldRef.fieldName].similarity(fieldVector), + docMatch + + if ((docMatch = matches[docRef]) !== undefined) { + docMatch.score += score + docMatch.matchData.combine(matchingFields[fieldRef]) + } else { + var match = { + ref: docRef, + score: score, + matchData: matchingFields[fieldRef] + } + matches[docRef] = match + results.push(match) + } + } + + /* + * Sort the results objects by score, highest first. + */ + return results.sort(function (a, b) { + return b.score - a.score + }) +} + +/** + * Prepares the index for JSON serialization. + * + * The schema for this JSON blob will be described in a + * separate JSON schema file. + * + * @returns {Object} + */ +lunr.Index.prototype.toJSON = function () { + var invertedIndex = Object.keys(this.invertedIndex) + .sort() + .map(function (term) { + return [term, this.invertedIndex[term]] + }, this) + + var fieldVectors = Object.keys(this.fieldVectors) + .map(function (ref) { + return [ref, this.fieldVectors[ref].toJSON()] + }, this) + + return { + version: lunr.version, + fields: this.fields, + fieldVectors: fieldVectors, + invertedIndex: invertedIndex, + pipeline: this.pipeline.toJSON() + } +} + +/** + * Loads a previously serialized lunr.Index + * + * @param {Object} serializedIndex - A previously serialized lunr.Index + * @returns {lunr.Index} + */ +lunr.Index.load = function (serializedIndex) { + var attrs = {}, + fieldVectors = {}, + serializedVectors = serializedIndex.fieldVectors, + invertedIndex = {}, + serializedInvertedIndex = serializedIndex.invertedIndex, + tokenSetBuilder = new lunr.TokenSet.Builder, + pipeline = lunr.Pipeline.load(serializedIndex.pipeline) + + if (serializedIndex.version != lunr.version) { + lunr.utils.warn("Version mismatch when loading serialised index. Current version of lunr '" + lunr.version + "' does not match serialized index '" + serializedIndex.version + "'") + } + + for (var i = 0; i < serializedVectors.length; i++) { + var tuple = serializedVectors[i], + ref = tuple[0], + elements = tuple[1] + + fieldVectors[ref] = new lunr.Vector(elements) + } + + for (var i = 0; i < serializedInvertedIndex.length; i++) { + var tuple = serializedInvertedIndex[i], + term = tuple[0], + posting = tuple[1] + + tokenSetBuilder.insert(term) + invertedIndex[term] = posting + } + + tokenSetBuilder.finish() + + attrs.fields = serializedIndex.fields + + attrs.fieldVectors = fieldVectors + attrs.invertedIndex = invertedIndex + attrs.tokenSet = tokenSetBuilder.root + attrs.pipeline = pipeline + + return new lunr.Index(attrs) +} +/*! + * lunr.Builder + * Copyright (C) 2017 Oliver Nightingale + */ + +/** + * lunr.Builder performs indexing on a set of documents and + * returns instances of lunr.Index ready for querying. + * + * All configuration of the index is done via the builder, the + * fields to index, the document reference, the text processing + * pipeline and document scoring parameters are all set on the + * builder before indexing. + * + * @constructor + * @property {string} _ref - Internal reference to the document reference field. + * @property {string[]} _fields - Internal reference to the document fields to index. + * @property {object} invertedIndex - The inverted index maps terms to document fields. + * @property {object} documentTermFrequencies - Keeps track of document term frequencies. + * @property {object} documentLengths - Keeps track of the length of documents added to the index. + * @property {lunr.tokenizer} tokenizer - Function for splitting strings into tokens for indexing. + * @property {lunr.Pipeline} pipeline - The pipeline performs text processing on tokens before indexing. + * @property {lunr.Pipeline} searchPipeline - A pipeline for processing search terms before querying the index. + * @property {number} documentCount - Keeps track of the total number of documents indexed. + * @property {number} _b - A parameter to control field length normalization, setting this to 0 disabled normalization, 1 fully normalizes field lengths, the default value is 0.75. + * @property {number} _k1 - A parameter to control how quickly an increase in term frequency results in term frequency saturation, the default value is 1.2. + * @property {number} termIndex - A counter incremented for each unique term, used to identify a terms position in the vector space. + * @property {array} metadataWhitelist - A list of metadata keys that have been whitelisted for entry in the index. + */ +lunr.Builder = function () { + this._ref = "id" + this._fields = [] + this.invertedIndex = Object.create(null) + this.fieldTermFrequencies = {} + this.fieldLengths = {} + this.tokenizer = lunr.tokenizer + this.pipeline = new lunr.Pipeline + this.searchPipeline = new lunr.Pipeline + this.documentCount = 0 + this._b = 0.75 + this._k1 = 1.2 + this.termIndex = 0 + this.metadataWhitelist = [] +} + +/** + * Sets the document field used as the document reference. Every document must have this field. + * The type of this field in the document should be a string, if it is not a string it will be + * coerced into a string by calling toString. + * + * The default ref is 'id'. + * + * The ref should _not_ be changed during indexing, it should be set before any documents are + * added to the index. Changing it during indexing can lead to inconsistent results. + * + * @param {string} ref - The name of the reference field in the document. + */ +lunr.Builder.prototype.ref = function (ref) { + this._ref = ref +} + +/** + * Adds a field to the list of document fields that will be indexed. Every document being + * indexed should have this field. Null values for this field in indexed documents will + * not cause errors but will limit the chance of that document being retrieved by searches. + * + * All fields should be added before adding documents to the index. Adding fields after + * a document has been indexed will have no effect on already indexed documents. + * + * @param {string} field - The name of a field to index in all documents. + */ +lunr.Builder.prototype.field = function (field) { + this._fields.push(field) +} + +/** + * A parameter to tune the amount of field length normalisation that is applied when + * calculating relevance scores. A value of 0 will completely disable any normalisation + * and a value of 1 will fully normalise field lengths. The default is 0.75. Values of b + * will be clamped to the range 0 - 1. + * + * @param {number} number - The value to set for this tuning parameter. + */ +lunr.Builder.prototype.b = function (number) { + if (number < 0) { + this._b = 0 + } else if (number > 1) { + this._b = 1 + } else { + this._b = number + } +} + +/** + * A parameter that controls the speed at which a rise in term frequency results in term + * frequency saturation. The default value is 1.2. Setting this to a higher value will give + * slower saturation levels, a lower value will result in quicker saturation. + * + * @param {number} number - The value to set for this tuning parameter. + */ +lunr.Builder.prototype.k1 = function (number) { + this._k1 = number +} + +/** + * Adds a document to the index. + * + * Before adding fields to the index the index should have been fully setup, with the document + * ref and all fields to index already having been specified. + * + * The document must have a field name as specified by the ref (by default this is 'id') and + * it should have all fields defined for indexing, though null or undefined values will not + * cause errors. + * + * @param {object} doc - The document to add to the index. + */ +lunr.Builder.prototype.add = function (doc) { + var docRef = doc[this._ref] + + this.documentCount += 1 + + for (var i = 0; i < this._fields.length; i++) { + var fieldName = this._fields[i], + field = doc[fieldName], + tokens = this.tokenizer(field), + terms = this.pipeline.run(tokens), + fieldRef = new lunr.FieldRef (docRef, fieldName), + fieldTerms = Object.create(null) + + this.fieldTermFrequencies[fieldRef] = fieldTerms + this.fieldLengths[fieldRef] = 0 + + // store the length of this field for this document + this.fieldLengths[fieldRef] += terms.length + + // calculate term frequencies for this field + for (var j = 0; j < terms.length; j++) { + var term = terms[j] + + if (fieldTerms[term] == undefined) { + fieldTerms[term] = 0 + } + + fieldTerms[term] += 1 + + // add to inverted index + // create an initial posting if one doesn't exist + if (this.invertedIndex[term] == undefined) { + var posting = Object.create(null) + posting["_index"] = this.termIndex + this.termIndex += 1 + + for (var k = 0; k < this._fields.length; k++) { + posting[this._fields[k]] = Object.create(null) + } + + this.invertedIndex[term] = posting + } + + // add an entry for this term/fieldName/docRef to the invertedIndex + if (this.invertedIndex[term][fieldName][docRef] == undefined) { + this.invertedIndex[term][fieldName][docRef] = Object.create(null) + } + + // store all whitelisted metadata about this token in the + // inverted index + for (var l = 0; l < this.metadataWhitelist.length; l++) { + var metadataKey = this.metadataWhitelist[l], + metadata = term.metadata[metadataKey] + + if (this.invertedIndex[term][fieldName][docRef][metadataKey] == undefined) { + this.invertedIndex[term][fieldName][docRef][metadataKey] = [] + } + + this.invertedIndex[term][fieldName][docRef][metadataKey].push(metadata) + } + } + + } +} + +/** + * Calculates the average document length for this index + * + * @private + */ +lunr.Builder.prototype.calculateAverageFieldLengths = function () { + + var fieldRefs = Object.keys(this.fieldLengths), + numberOfFields = fieldRefs.length, + accumulator = {}, + documentsWithField = {} + + for (var i = 0; i < numberOfFields; i++) { + var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]), + field = fieldRef.fieldName + + documentsWithField[field] || (documentsWithField[field] = 0) + documentsWithField[field] += 1 + + accumulator[field] || (accumulator[field] = 0) + accumulator[field] += this.fieldLengths[fieldRef] + } + + for (var i = 0; i < this._fields.length; i++) { + var field = this._fields[i] + accumulator[field] = accumulator[field] / documentsWithField[field] + } + + this.averageFieldLength = accumulator +} + +/** + * Builds a vector space model of every document using lunr.Vector + * + * @private + */ +lunr.Builder.prototype.createFieldVectors = function () { + var fieldVectors = {}, + fieldRefs = Object.keys(this.fieldTermFrequencies), + fieldRefsLength = fieldRefs.length, + termIdfCache = Object.create(null) + + for (var i = 0; i < fieldRefsLength; i++) { + var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]), + field = fieldRef.fieldName, + fieldLength = this.fieldLengths[fieldRef], + fieldVector = new lunr.Vector, + termFrequencies = this.fieldTermFrequencies[fieldRef], + terms = Object.keys(termFrequencies), + termsLength = terms.length + + for (var j = 0; j < termsLength; j++) { + var term = terms[j], + tf = termFrequencies[term], + termIndex = this.invertedIndex[term]._index, + idf, score, scoreWithPrecision + + if (termIdfCache[term] === undefined) { + idf = lunr.idf(this.invertedIndex[term], this.documentCount) + termIdfCache[term] = idf + } else { + idf = termIdfCache[term] + } + + score = idf * ((this._k1 + 1) * tf) / (this._k1 * (1 - this._b + this._b * (fieldLength / this.averageFieldLength[field])) + tf) + scoreWithPrecision = Math.round(score * 1000) / 1000 + // Converts 1.23456789 to 1.234. + // Reducing the precision so that the vectors take up less + // space when serialised. Doing it now so that they behave + // the same before and after serialisation. Also, this is + // the fastest approach to reducing a number's precision in + // JavaScript. + + fieldVector.insert(termIndex, scoreWithPrecision) + } + + fieldVectors[fieldRef] = fieldVector + } + + this.fieldVectors = fieldVectors +} + +/** + * Creates a token set of all tokens in the index using lunr.TokenSet + * + * @private + */ +lunr.Builder.prototype.createTokenSet = function () { + this.tokenSet = lunr.TokenSet.fromArray( + Object.keys(this.invertedIndex).sort() + ) +} + +/** + * Builds the index, creating an instance of lunr.Index. + * + * This completes the indexing process and should only be called + * once all documents have been added to the index. + * + * @returns {lunr.Index} + */ +lunr.Builder.prototype.build = function () { + this.calculateAverageFieldLengths() + this.createFieldVectors() + this.createTokenSet() + + return new lunr.Index({ + invertedIndex: this.invertedIndex, + fieldVectors: this.fieldVectors, + tokenSet: this.tokenSet, + fields: this._fields, + pipeline: this.searchPipeline + }) +} + +/** + * Applies a plugin to the index builder. + * + * A plugin is a function that is called with the index builder as its context. + * Plugins can be used to customise or extend the behaviour of the index + * in some way. A plugin is just a function, that encapsulated the custom + * behaviour that should be applied when building the index. + * + * The plugin function will be called with the index builder as its argument, additional + * arguments can also be passed when calling use. The function will be called + * with the index builder as its context. + * + * @param {Function} plugin The plugin to apply. + */ +lunr.Builder.prototype.use = function (fn) { + var args = Array.prototype.slice.call(arguments, 1) + args.unshift(this) + fn.apply(this, args) +} +/** + * Contains and collects metadata about a matching document. + * A single instance of lunr.MatchData is returned as part of every + * lunr.Index~Result. + * + * @constructor + * @param {string} term - The term this match data is associated with + * @param {string} field - The field in which the term was found + * @param {object} metadata - The metadata recorded about this term in this field + * @property {object} metadata - A cloned collection of metadata associated with this document. + * @see {@link lunr.Index~Result} + */ +lunr.MatchData = function (term, field, metadata) { + var clonedMetadata = Object.create(null), + metadataKeys = Object.keys(metadata) + + // Cloning the metadata to prevent the original + // being mutated during match data combination. + // Metadata is kept in an array within the inverted + // index so cloning the data can be done with + // Array#slice + for (var i = 0; i < metadataKeys.length; i++) { + var key = metadataKeys[i] + clonedMetadata[key] = metadata[key].slice() + } + + this.metadata = Object.create(null) + this.metadata[term] = Object.create(null) + this.metadata[term][field] = clonedMetadata +} + +/** + * An instance of lunr.MatchData will be created for every term that matches a + * document. However only one instance is required in a lunr.Index~Result. This + * method combines metadata from another instance of lunr.MatchData with this + * objects metadata. + * + * @param {lunr.MatchData} otherMatchData - Another instance of match data to merge with this one. + * @see {@link lunr.Index~Result} + */ +lunr.MatchData.prototype.combine = function (otherMatchData) { + var terms = Object.keys(otherMatchData.metadata) + + for (var i = 0; i < terms.length; i++) { + var term = terms[i], + fields = Object.keys(otherMatchData.metadata[term]) + + if (this.metadata[term] == undefined) { + this.metadata[term] = Object.create(null) + } + + for (var j = 0; j < fields.length; j++) { + var field = fields[j], + keys = Object.keys(otherMatchData.metadata[term][field]) + + if (this.metadata[term][field] == undefined) { + this.metadata[term][field] = Object.create(null) + } + + for (var k = 0; k < keys.length; k++) { + var key = keys[k] + + if (this.metadata[term][field][key] == undefined) { + this.metadata[term][field][key] = otherMatchData.metadata[term][field][key] + } else { + this.metadata[term][field][key] = this.metadata[term][field][key].concat(otherMatchData.metadata[term][field][key]) + } + + } + } + } +} + +/** + * Add metadata for a term/field pair to this instance of match data. + * + * @param {string} term - The term this match data is associated with + * @param {string} field - The field in which the term was found + * @param {object} metadata - The metadata recorded about this term in this field + */ +lunr.MatchData.prototype.add = function (term, field, metadata) { + if (!(term in this.metadata)) { + this.metadata[term] = Object.create(null) + this.metadata[term][field] = metadata + return + } + + if (!(field in this.metadata[term])) { + this.metadata[term][field] = metadata + return + } + + var metadataKeys = Object.keys(metadata) + + for (var i = 0; i < metadataKeys.length; i++) { + var key = metadataKeys[i] + + if (key in this.metadata[term][field]) { + this.metadata[term][field][key] = this.metadata[term][field][key].concat(metadata[key]) + } else { + this.metadata[term][field][key] = metadata[key] + } + } +} +/** + * A lunr.Query provides a programmatic way of defining queries to be performed + * against a {@link lunr.Index}. + * + * Prefer constructing a lunr.Query using the {@link lunr.Index#query} method + * so the query object is pre-initialized with the right index fields. + * + * @constructor + * @property {lunr.Query~Clause[]} clauses - An array of query clauses. + * @property {string[]} allFields - An array of all available fields in a lunr.Index. + */ +lunr.Query = function (allFields) { + this.clauses = [] + this.allFields = allFields +} + +/** + * Constants for indicating what kind of automatic wildcard insertion will be used when constructing a query clause. + * + * This allows wildcards to be added to the beginning and end of a term without having to manually do any string + * concatenation. + * + * The wildcard constants can be bitwise combined to select both leading and trailing wildcards. + * + * @constant + * @default + * @property {number} wildcard.NONE - The term will have no wildcards inserted, this is the default behaviour + * @property {number} wildcard.LEADING - Prepend the term with a wildcard, unless a leading wildcard already exists + * @property {number} wildcard.TRAILING - Append a wildcard to the term, unless a trailing wildcard already exists + * @see lunr.Query~Clause + * @see lunr.Query#clause + * @see lunr.Query#term + * @example query term with trailing wildcard + * query.term('foo', { wildcard: lunr.Query.wildcard.TRAILING }) + * @example query term with leading and trailing wildcard + * query.term('foo', { + * wildcard: lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING + * }) + */ +lunr.Query.wildcard = new String ("*") +lunr.Query.wildcard.NONE = 0 +lunr.Query.wildcard.LEADING = 1 +lunr.Query.wildcard.TRAILING = 2 + +/** + * A single clause in a {@link lunr.Query} contains a term and details on how to + * match that term against a {@link lunr.Index}. + * + * @typedef {Object} lunr.Query~Clause + * @property {string[]} fields - The fields in an index this clause should be matched against. + * @property {number} [boost=1] - Any boost that should be applied when matching this clause. + * @property {number} [editDistance] - Whether the term should have fuzzy matching applied, and how fuzzy the match should be. + * @property {boolean} [usePipeline] - Whether the term should be passed through the search pipeline. + * @property {number} [wildcard=0] - Whether the term should have wildcards appended or prepended. + */ + +/** + * Adds a {@link lunr.Query~Clause} to this query. + * + * Unless the clause contains the fields to be matched all fields will be matched. In addition + * a default boost of 1 is applied to the clause. + * + * @param {lunr.Query~Clause} clause - The clause to add to this query. + * @see lunr.Query~Clause + * @returns {lunr.Query} + */ +lunr.Query.prototype.clause = function (clause) { + if (!('fields' in clause)) { + clause.fields = this.allFields + } + + if (!('boost' in clause)) { + clause.boost = 1 + } + + if (!('usePipeline' in clause)) { + clause.usePipeline = true + } + + if (!('wildcard' in clause)) { + clause.wildcard = lunr.Query.wildcard.NONE + } + + if ((clause.wildcard & lunr.Query.wildcard.LEADING) && (clause.term.charAt(0) != lunr.Query.wildcard)) { + clause.term = "*" + clause.term + } + + if ((clause.wildcard & lunr.Query.wildcard.TRAILING) && (clause.term.slice(-1) != lunr.Query.wildcard)) { + clause.term = "" + clause.term + "*" + } + + this.clauses.push(clause) + + return this +} + +/** + * Adds a term to the current query, under the covers this will create a {@link lunr.Query~Clause} + * to the list of clauses that make up this query. + * + * @param {string} term - The term to add to the query. + * @param {Object} [options] - Any additional properties to add to the query clause. + * @returns {lunr.Query} + * @see lunr.Query#clause + * @see lunr.Query~Clause + * @example adding a single term to a query + * query.term("foo") + * @example adding a single term to a query and specifying search fields, term boost and automatic trailing wildcard + * query.term("foo", { + * fields: ["title"], + * boost: 10, + * wildcard: lunr.Query.wildcard.TRAILING + * }) + */ +lunr.Query.prototype.term = function (term, options) { + var clause = options || {} + clause.term = term + + this.clause(clause) + + return this +} +lunr.QueryParseError = function (message, start, end) { + this.name = "QueryParseError" + this.message = message + this.start = start + this.end = end +} + +lunr.QueryParseError.prototype = new Error +lunr.QueryLexer = function (str) { + this.lexemes = [] + this.str = str + this.length = str.length + this.pos = 0 + this.start = 0 + this.escapeCharPositions = [] +} + +lunr.QueryLexer.prototype.run = function () { + var state = lunr.QueryLexer.lexText + + while (state) { + state = state(this) + } +} + +lunr.QueryLexer.prototype.sliceString = function () { + var subSlices = [], + sliceStart = this.start, + sliceEnd = this.pos + + for (var i = 0; i < this.escapeCharPositions.length; i++) { + sliceEnd = this.escapeCharPositions[i] + subSlices.push(this.str.slice(sliceStart, sliceEnd)) + sliceStart = sliceEnd + 1 + } + + subSlices.push(this.str.slice(sliceStart, this.pos)) + this.escapeCharPositions.length = 0 + + return subSlices.join('') +} + +lunr.QueryLexer.prototype.emit = function (type) { + this.lexemes.push({ + type: type, + str: this.sliceString(), + start: this.start, + end: this.pos + }) + + this.start = this.pos +} + +lunr.QueryLexer.prototype.escapeCharacter = function () { + this.escapeCharPositions.push(this.pos - 1) + this.pos += 1 +} + +lunr.QueryLexer.prototype.next = function () { + if (this.pos >= this.length) { + return lunr.QueryLexer.EOS + } + + var char = this.str.charAt(this.pos) + this.pos += 1 + return char +} + +lunr.QueryLexer.prototype.width = function () { + return this.pos - this.start +} + +lunr.QueryLexer.prototype.ignore = function () { + if (this.start == this.pos) { + this.pos += 1 + } + + this.start = this.pos +} + +lunr.QueryLexer.prototype.backup = function () { + this.pos -= 1 +} + +lunr.QueryLexer.prototype.acceptDigitRun = function () { + var char, charCode + + do { + char = this.next() + charCode = char.charCodeAt(0) + } while (charCode > 47 && charCode < 58) + + if (char != lunr.QueryLexer.EOS) { + this.backup() + } +} + +lunr.QueryLexer.prototype.more = function () { + return this.pos < this.length +} + +lunr.QueryLexer.EOS = 'EOS' +lunr.QueryLexer.FIELD = 'FIELD' +lunr.QueryLexer.TERM = 'TERM' +lunr.QueryLexer.EDIT_DISTANCE = 'EDIT_DISTANCE' +lunr.QueryLexer.BOOST = 'BOOST' + +lunr.QueryLexer.lexField = function (lexer) { + lexer.backup() + lexer.emit(lunr.QueryLexer.FIELD) + lexer.ignore() + return lunr.QueryLexer.lexText +} + +lunr.QueryLexer.lexTerm = function (lexer) { + if (lexer.width() > 1) { + lexer.backup() + lexer.emit(lunr.QueryLexer.TERM) + } + + lexer.ignore() + + if (lexer.more()) { + return lunr.QueryLexer.lexText + } +} + +lunr.QueryLexer.lexEditDistance = function (lexer) { + lexer.ignore() + lexer.acceptDigitRun() + lexer.emit(lunr.QueryLexer.EDIT_DISTANCE) + return lunr.QueryLexer.lexText +} + +lunr.QueryLexer.lexBoost = function (lexer) { + lexer.ignore() + lexer.acceptDigitRun() + lexer.emit(lunr.QueryLexer.BOOST) + return lunr.QueryLexer.lexText +} + +lunr.QueryLexer.lexEOS = function (lexer) { + if (lexer.width() > 0) { + lexer.emit(lunr.QueryLexer.TERM) + } +} + +// This matches the separator used when tokenising fields +// within a document. These should match otherwise it is +// not possible to search for some tokens within a document. +// +// It is possible for the user to change the separator on the +// tokenizer so it _might_ clash with any other of the special +// characters already used within the search string, e.g. :. +// +// This means that it is possible to change the separator in +// such a way that makes some words unsearchable using a search +// string. +lunr.QueryLexer.termSeparator = lunr.tokenizer.separator + +lunr.QueryLexer.lexText = function (lexer) { + while (true) { + var char = lexer.next() + + if (char == lunr.QueryLexer.EOS) { + return lunr.QueryLexer.lexEOS + } + + // Escape character is '\' + if (char.charCodeAt(0) == 92) { + lexer.escapeCharacter() + continue + } + + if (char == ":") { + return lunr.QueryLexer.lexField + } + + if (char == "~") { + lexer.backup() + if (lexer.width() > 0) { + lexer.emit(lunr.QueryLexer.TERM) + } + return lunr.QueryLexer.lexEditDistance + } + + if (char == "^") { + lexer.backup() + if (lexer.width() > 0) { + lexer.emit(lunr.QueryLexer.TERM) + } + return lunr.QueryLexer.lexBoost + } + + if (char.match(lunr.QueryLexer.termSeparator)) { + return lunr.QueryLexer.lexTerm + } + } +} + +lunr.QueryParser = function (str, query) { + this.lexer = new lunr.QueryLexer (str) + this.query = query + this.currentClause = {} + this.lexemeIdx = 0 +} + +lunr.QueryParser.prototype.parse = function () { + this.lexer.run() + this.lexemes = this.lexer.lexemes + + var state = lunr.QueryParser.parseFieldOrTerm + + while (state) { + state = state(this) + } + + return this.query +} + +lunr.QueryParser.prototype.peekLexeme = function () { + return this.lexemes[this.lexemeIdx] +} + +lunr.QueryParser.prototype.consumeLexeme = function () { + var lexeme = this.peekLexeme() + this.lexemeIdx += 1 + return lexeme +} + +lunr.QueryParser.prototype.nextClause = function () { + var completedClause = this.currentClause + this.query.clause(completedClause) + this.currentClause = {} +} + +lunr.QueryParser.parseFieldOrTerm = function (parser) { + var lexeme = parser.peekLexeme() + + if (lexeme == undefined) { + return + } + + switch (lexeme.type) { + case lunr.QueryLexer.FIELD: + return lunr.QueryParser.parseField + case lunr.QueryLexer.TERM: + return lunr.QueryParser.parseTerm + default: + var errorMessage = "expected either a field or a term, found " + lexeme.type + + if (lexeme.str.length >= 1) { + errorMessage += " with value '" + lexeme.str + "'" + } + + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } +} + +lunr.QueryParser.parseField = function (parser) { + var lexeme = parser.consumeLexeme() + + if (lexeme == undefined) { + return + } + + if (parser.query.allFields.indexOf(lexeme.str) == -1) { + var possibleFields = parser.query.allFields.map(function (f) { return "'" + f + "'" }).join(', '), + errorMessage = "unrecognised field '" + lexeme.str + "', possible fields: " + possibleFields + + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + parser.currentClause.fields = [lexeme.str] + + var nextLexeme = parser.peekLexeme() + + if (nextLexeme == undefined) { + var errorMessage = "expecting term, found nothing" + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + switch (nextLexeme.type) { + case lunr.QueryLexer.TERM: + return lunr.QueryParser.parseTerm + default: + var errorMessage = "expecting term, found '" + nextLexeme.type + "'" + throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end) + } +} + +lunr.QueryParser.parseTerm = function (parser) { + var lexeme = parser.consumeLexeme() + + if (lexeme == undefined) { + return + } + + parser.currentClause.term = lexeme.str.toLowerCase() + + if (lexeme.str.indexOf("*") != -1) { + parser.currentClause.usePipeline = false + } + + var nextLexeme = parser.peekLexeme() + + if (nextLexeme == undefined) { + parser.nextClause() + return + } + + switch (nextLexeme.type) { + case lunr.QueryLexer.TERM: + parser.nextClause() + return lunr.QueryParser.parseTerm + case lunr.QueryLexer.FIELD: + parser.nextClause() + return lunr.QueryParser.parseField + case lunr.QueryLexer.EDIT_DISTANCE: + return lunr.QueryParser.parseEditDistance + case lunr.QueryLexer.BOOST: + return lunr.QueryParser.parseBoost + default: + var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'" + throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end) + } +} + +lunr.QueryParser.parseEditDistance = function (parser) { + var lexeme = parser.consumeLexeme() + + if (lexeme == undefined) { + return + } + + var editDistance = parseInt(lexeme.str, 10) + + if (isNaN(editDistance)) { + var errorMessage = "edit distance must be numeric" + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + parser.currentClause.editDistance = editDistance + + var nextLexeme = parser.peekLexeme() + + if (nextLexeme == undefined) { + parser.nextClause() + return + } + + switch (nextLexeme.type) { + case lunr.QueryLexer.TERM: + parser.nextClause() + return lunr.QueryParser.parseTerm + case lunr.QueryLexer.FIELD: + parser.nextClause() + return lunr.QueryParser.parseField + case lunr.QueryLexer.EDIT_DISTANCE: + return lunr.QueryParser.parseEditDistance + case lunr.QueryLexer.BOOST: + return lunr.QueryParser.parseBoost + default: + var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'" + throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end) + } +} + +lunr.QueryParser.parseBoost = function (parser) { + var lexeme = parser.consumeLexeme() + + if (lexeme == undefined) { + return + } + + var boost = parseInt(lexeme.str, 10) + + if (isNaN(boost)) { + var errorMessage = "boost must be numeric" + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + parser.currentClause.boost = boost + + var nextLexeme = parser.peekLexeme() + + if (nextLexeme == undefined) { + parser.nextClause() + return + } + + switch (nextLexeme.type) { + case lunr.QueryLexer.TERM: + parser.nextClause() + return lunr.QueryParser.parseTerm + case lunr.QueryLexer.FIELD: + parser.nextClause() + return lunr.QueryParser.parseField + case lunr.QueryLexer.EDIT_DISTANCE: + return lunr.QueryParser.parseEditDistance + case lunr.QueryLexer.BOOST: + return lunr.QueryParser.parseBoost + default: + var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'" + throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end) + } +} + + /** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ + ;(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like enviroments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + root.lunr = factory() + } + }(this, function () { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return lunr + })) +})(); diff --git a/docs/assets/js/lunr/lunr.min.js b/docs/assets/js/lunr/lunr.min.js new file mode 100644 index 00000000..75f6a2b7 --- /dev/null +++ b/docs/assets/js/lunr/lunr.min.js @@ -0,0 +1,6 @@ +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.1.5 + * Copyright (C) 2017 Oliver Nightingale + * @license MIT + */ +!function(){var e=function(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};e.version="2.1.5",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},e.FieldRef=function(e,t,r){this.docRef=e,this.fieldName=t,this._stringValue=r},e.FieldRef.joiner="/",e.FieldRef.fromString=function(t){var r=t.indexOf(e.FieldRef.joiner);if(-1===r)throw"malformed field ref string";var i=t.slice(0,r),n=t.slice(r+1);return new e.FieldRef(n,i,t)},e.FieldRef.prototype.toString=function(){return void 0==this._stringValue&&(this._stringValue=this.fieldName+e.FieldRef.joiner+this.docRef),this._stringValue},e.idf=function(e,t){var r=0;for(var i in e)"_index"!=i&&(r+=Object.keys(e[i]).length);var n=(t-r+.5)/(r+.5);return Math.log(1+Math.abs(n))},e.Token=function(e,t){this.str=e||"",this.metadata=t||{}},e.Token.prototype.toString=function(){return this.str},e.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},e.Token.prototype.clone=function(t){return t=t||function(e){return e},new e.Token(t(this.str,this.metadata),this.metadata)},e.tokenizer=function(t){if(null==t||void 0==t)return[];if(Array.isArray(t))return t.map(function(t){return new e.Token(e.utils.asString(t).toLowerCase())});for(var r=t.toString().trim().toLowerCase(),i=r.length,n=[],s=0,o=0;i>=s;s++){var a=r.charAt(s),u=s-o;(a.match(e.tokenizer.separator)||s==i)&&(u>0&&n.push(new e.Token(r.slice(o,s),{position:[o,u],index:n.length})),o=s+1)}return n},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(-1==i)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(-1==i)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;t>r;r++){var i=this._stack[r];e=e.reduce(function(t,r,n){var s=i(r,n,e);return void 0===s||""===s?t:t.concat(s)},[])}return e},e.Pipeline.prototype.runString=function(t){var r=new e.Token(t);return this.run([r]).map(function(e){return e.toString()})},e.Pipeline.prototype.reset=function(){this._stack=[]},e.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return e.Pipeline.warnIfFunctionNotRegistered(t),t.label})},e.Vector=function(e){this._magnitude=0,this.elements=e||[]},e.Vector.prototype.positionForIndex=function(e){if(0==this.elements.length)return 0;for(var t=0,r=this.elements.length/2,i=r-t,n=Math.floor(i/2),s=this.elements[2*n];i>1&&(e>s&&(t=n),s>e&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:e>s?2*(n+1):void 0},e.Vector.prototype.insert=function(e,t){this.upsert(e,t,function(){throw"duplicate index"})},e.Vector.prototype.upsert=function(e,t,r){this._magnitude=0;var i=this.positionForIndex(e);this.elements[i]==e?this.elements[i+1]=r(this.elements[i+1],t):this.elements.splice(i,0,e,t)},e.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,t=this.elements.length,r=1;t>r;r+=2){var i=this.elements[r];e+=i*i}return this._magnitude=Math.sqrt(e)},e.Vector.prototype.dot=function(e){for(var t=0,r=this.elements,i=e.elements,n=r.length,s=i.length,o=0,a=0,u=0,l=0;n>u&&s>l;)o=r[u],a=i[l],a>o?u+=2:o>a?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/(this.magnitude()*e.magnitude())},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;ti;i++)r.insert(t[i]);return r.finish(),r.root},e.TokenSet.fromClause=function(t){return"editDistance"in t?e.TokenSet.fromFuzzyString(t.term,t.editDistance):e.TokenSet.fromString(t.term)},e.TokenSet.fromFuzzyString=function(t,r){for(var i=new e.TokenSet,n=[{node:i,editsRemaining:r,str:t}];n.length;){var s=n.pop();if(s.str.length>0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length?o["final"]=!0:n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining>0&&s.str.length>1){var u,a=s.str.charAt(1);a in s.node.edges?u=s.node.edges[a]:(u=new e.TokenSet,s.node.edges[a]=u),s.str.length<=2?u["final"]=!0:n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(2)})}if(s.editsRemaining>0&&1==s.str.length&&(s.node["final"]=!0),s.editsRemaining>0&&s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length?l["final"]=!0:n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.editsRemaining>0){if("*"in s.node.edges)var d=s.node.edges["*"];else{var d=new e.TokenSet;s.node.edges["*"]=d}0==s.str.length?d["final"]=!0:n.push({node:d,editsRemaining:s.editsRemaining-1,str:s.str})}if(s.editsRemaining>0&&s.str.length>1){var h,c=s.str.charAt(0),f=s.str.charAt(1);f in s.node.edges?h=s.node.edges[f]:(h=new e.TokenSet,s.node.edges[f]=h),1==s.str.length?h["final"]=!0:n.push({node:h,editsRemaining:s.editsRemaining-1,str:c+s.str.slice(2)})}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=!1,s=0,o=t.length;o>s;s++){var a=t[s],u=s==o-1;if("*"==a)n=!0,r.edges[a]=r,r["final"]=u;else{var l=new e.TokenSet;l["final"]=u,r.edges[a]=l,r=l,n&&(r.edges["*"]=i)}}return i},e.TokenSet.prototype.toArray=function(){for(var e=[],t=[{prefix:"",node:this}];t.length;){var r=t.pop(),i=Object.keys(r.node.edges),n=i.length;r.node["final"]&&e.push(r.prefix);for(var s=0;n>s;s++){var o=i[s];t.push({prefix:r.prefix.concat(o),node:r.node.edges[o]})}}return e},e.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this["final"]?"1":"0",t=Object.keys(this.edges).sort(),r=t.length,i=0;r>i;i++){var n=t[i],s=this.edges[n];e=e+n+s.id}return e},e.TokenSet.prototype.intersect=function(t){for(var r=new e.TokenSet,i=void 0,n=[{qNode:t,output:r,node:this}];n.length;){i=n.pop();for(var s=Object.keys(i.qNode.edges),o=s.length,a=Object.keys(i.node.edges),u=a.length,l=0;o>l;l++)for(var d=s[l],h=0;u>h;h++){var c=a[h];if(c==d||"*"==d){var f=i.node.edges[c],p=i.qNode.edges[d],y=f["final"]&&p["final"],m=void 0;c in i.output.edges?(m=i.output.edges[c],m["final"]=m["final"]||y):(m=new e.TokenSet,m["final"]=y,i.output.edges[c]=m),n.push({qNode:p,output:m,node:f})}}}return r},e.TokenSet.Builder=function(){this.previousWord="",this.root=new e.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},e.TokenSet.Builder.prototype.insert=function(t){var r,i=0;if(t=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null);t.call(r,r);for(var o=0;oe?this._b=0:e>1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t){var r=t[this._ref];this.documentCount+=1;for(var i=0;is;s++){var o=e.FieldRef.fromString(t[s]),a=o.fieldName;n[a]||(n[a]=0),n[a]+=1,i[a]||(i[a]=0),i[a]+=this.fieldLengths[o]}for(var s=0;ss;s++){for(var o=e.FieldRef.fromString(r[s]),a=o.fieldName,u=this.fieldLengths[o],l=new e.Vector,d=this.fieldTermFrequencies[o],h=Object.keys(d),c=h.length,f=0;c>f;f++){var p,y,m,v=h[f],g=d[v],x=this.invertedIndex[v]._index;void 0===n[v]?(p=e.idf(this.invertedIndex[v],this.documentCount),n[v]=p):p=n[v],y=p*((this._k1+1)*g)/(this._k1*(1-this._b+this._b*(u/this.averageFieldLength[a]))+g),m=Math.round(1e3*y)/1e3,l.insert(x,m)}t[o]=l}this.fieldVectors=t},e.Builder.prototype.createTokenSet=function(){this.tokenSet=e.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},e.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new e.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:this._fields,pipeline:this.searchPipeline})},e.Builder.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},e.MatchData=function(e,t,r){for(var i=Object.create(null),n=Object.keys(r),s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&58>r);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more()?e.QueryLexer.lexText:void 0},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseFieldOrTerm;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseFieldOrTerm=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(-1==t.query.allFields.indexOf(r.str)){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),-1!=r.str.indexOf("*")&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); \ No newline at end of file diff --git a/docs/assets/js/main.min.js b/docs/assets/js/main.min.js new file mode 100644 index 00000000..46fd77f1 --- /dev/null +++ b/docs/assets/js/main.min.js @@ -0,0 +1,9 @@ +/*! + * Minimal Mistakes Jekyll Theme 4.11.2 by Michael Rose + * Copyright 2013-2018 Michael Rose - mademistakes.com | @mmistakes + * Licensed under MIT + */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t,n){var r,i=(t=t||ae).createElement("script");if(i.text=e,n)for(r in be)n[r]&&(i[r]=n[r]);t.head.appendChild(i).parentNode.removeChild(i)}function r(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?de[pe.call(e)]||"object":typeof e}function i(e){var t=!!e&&"length"in e&&e.length,n=r(e);return!ye(e)&&!xe(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function o(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function a(e,t,n){return ye(t)?we.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?we.grep(e,function(e){return e===t!==n}):"string"!=typeof t?we.grep(e,function(e){return fe.call(t,e)>-1!==n}):we.filter(t,e,n)}function s(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function l(e){var t={};return we.each(e.match(Le)||[],function(e,n){t[n]=!0}),t}function u(e){return e}function c(e){throw e}function f(e,t,n,r){var i;try{e&&ye(i=e.promise)?i.call(e).done(t).fail(n):e&&ye(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function d(){ae.removeEventListener("DOMContentLoaded",d),e.removeEventListener("load",d),we.ready()}function p(e,t){return t.toUpperCase()}function h(e){return e.replace(He,"ms-").replace(Me,p)}function m(){this.expando=we.expando+m.uid++}function g(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Fe.test(e)?JSON.parse(e):e)}function v(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ze,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=g(n)}catch(e){}$e.set(e,t,n)}else n=void 0;return n}function y(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return we.css(e,t,"")},l=s(),u=n&&n[3]||(we.cssNumber[t]?"":"px"),c=(we.cssNumber[t]||"px"!==u&&+l)&&We.exec(we.css(e,t));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)we.style(e,t,c+u),(1-o)*(1-(o=s()/l||.5))<=0&&(a=0),c/=o;c*=2,we.style(e,t,c+u),n=n||[]}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}function x(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ye[r];return i||(t=n.body.appendChild(n.createElement(r)),i=we.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ye[r]=i,i)}function b(e,t){for(var n,r,i=[],o=0,a=e.length;a>o;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=Be.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&Xe(r)&&(i[o]=x(r))):"none"!==n&&(i[o]="none",Be.set(r,"display",n)));for(o=0;a>o;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function w(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&o(e,t)?we.merge([e],n):n}function C(e,t){for(var n=0,r=e.length;r>n;n++)Be.set(e[n],"globalEval",!t||Be.get(t[n],"globalEval"))}function T(e,t,n,i,o){for(var a,s,l,u,c,f,d=t.createDocumentFragment(),p=[],h=0,m=e.length;m>h;h++)if((a=e[h])||0===a)if("object"===r(a))we.merge(p,a.nodeType?[a]:a);else if(Je.test(a)){for(s=s||d.appendChild(t.createElement("div")),l=(Ze.exec(a)||["",""])[1].toLowerCase(),u=Qe[l]||Qe._default,s.innerHTML=u[1]+we.htmlPrefilter(a)+u[2],f=u[0];f--;)s=s.lastChild;we.merge(p,s.childNodes),(s=d.firstChild).textContent=""}else p.push(t.createTextNode(a));for(d.textContent="",h=0;a=p[h++];)if(i&&we.inArray(a,i)>-1)o&&o.push(a);else if(c=we.contains(a.ownerDocument,a),s=w(d.appendChild(a),"script"),c&&C(s),n)for(f=0;a=s[f++];)Ke.test(a.type||"")&&n.push(a);return d}function k(){return!0}function S(){return!1}function E(){try{return ae.activeElement}catch(e){}}function j(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)j(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=S;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return we().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=we.guid++)),e.each(function(){we.event.add(this,t,i,r,n)})}function N(e,t){return o(e,"table")&&o(11!==t.nodeType?t:t.firstChild,"tr")?we(e).children("tbody")[0]||e:e}function A(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function D(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function I(e,t){var n,r,i,o,a,s,l,u;if(1===t.nodeType){if(Be.hasData(e)&&(o=Be.access(e),a=Be.set(t,o),u=o.events)){delete a.handle,a.events={};for(i in u)for(n=0,r=u[i].length;r>n;n++)we.event.add(t,i,u[i][n])}$e.hasData(e)&&(s=$e.access(e),l=we.extend({},s),$e.set(t,l))}}function L(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ge.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function O(e,t,r,i){t=ue.apply([],t);var o,a,s,l,u,c,f=0,d=e.length,p=d-1,h=t[0],m=ye(h);if(m||d>1&&"string"==typeof h&&!ve.checkClone&&at.test(h))return e.each(function(n){var o=e.eq(n);m&&(t[0]=h.call(this,n,o.html())),O(o,t,r,i)});if(d&&(o=T(t,e[0].ownerDocument,!1,e,i),a=o.firstChild,1===o.childNodes.length&&(o=a),a||i)){for(l=(s=we.map(w(o,"script"),A)).length;d>f;f++)u=o,f!==p&&(u=we.clone(u,!0,!0),l&&we.merge(s,w(u,"script"))),r.call(e[f],u,f);if(l)for(c=s[s.length-1].ownerDocument,we.map(s,D),f=0;l>f;f++)u=s[f],Ke.test(u.type||"")&&!Be.access(u,"globalEval")&&we.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?we._evalUrl&&we._evalUrl(u.src):n(u.textContent.replace(st,""),c,u))}return e}function P(e,t,n){for(var r,i=t?we.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||we.cleanData(w(r)),r.parentNode&&(n&&we.contains(r.ownerDocument,r)&&C(w(r,"script")),r.parentNode.removeChild(r));return e}function q(e,t,n){var r,i,o,a,s=e.style;return(n=n||ut(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||we.contains(e.ownerDocument,e)||(a=we.style(e,t)),!ve.pixelBoxStyles()&<.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function H(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function M(e){if(e in gt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=mt.length;n--;)if((e=mt[n]+t)in gt)return e}function _(e){var t=we.cssProps[e];return t||(t=we.cssProps[e]=M(e)||e),t}function B(e,t,n){var r=We.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function $(e,t,n,r,i,o){var a="width"===t?1:0,s=0,l=0;if(n===(r?"border":"content"))return 0;for(;4>a;a+=2)"margin"===n&&(l+=we.css(e,n+Ue[a],!0,i)),r?("content"===n&&(l-=we.css(e,"padding"+Ue[a],!0,i)),"margin"!==n&&(l-=we.css(e,"border"+Ue[a]+"Width",!0,i))):(l+=we.css(e,"padding"+Ue[a],!0,i),"padding"!==n?l+=we.css(e,"border"+Ue[a]+"Width",!0,i):s+=we.css(e,"border"+Ue[a]+"Width",!0,i));return!r&&o>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-s-.5))),l}function F(e,t,n){var r=ut(e),i=q(e,t,r),o="border-box"===we.css(e,"boxSizing",!1,r),a=o;if(lt.test(i)){if(!n)return i;i="auto"}return a=a&&(ve.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===we.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+$(e,t,n||(o?"border":"content"),a,r,i)+"px"}function z(e,t,n,r,i){return new z.prototype.init(e,t,n,r,i)}function R(){yt&&(!1===ae.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(R):e.setTimeout(R,we.fx.interval),we.fx.tick())}function W(){return e.setTimeout(function(){vt=void 0}),vt=Date.now()}function U(e,t){var n,r=0,i={height:e};for(t=t?1:0;4>r;r+=2-t)i["margin"+(n=Ue[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function X(e,t,n){for(var r,i=(G.tweeners[t]||[]).concat(G.tweeners["*"]),o=0,a=i.length;a>o;o++)if(r=i[o].call(n,t,e))return r}function V(e,t,n){var r,i,o,a,s,l,u,c,f="width"in t||"height"in t,d=this,p={},h=e.style,m=e.nodeType&&Xe(e),g=Be.get(e,"fxshow");n.queue||(null==(a=we._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,we.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],xt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;m=!0}p[r]=g&&g[r]||we.style(e,r)}if((l=!we.isEmptyObject(t))||!we.isEmptyObject(p)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(u=g&&g.display)&&(u=Be.get(e,"display")),"none"===(c=we.css(e,"display"))&&(u?c=u:(b([e],!0),u=e.style.display||u,c=we.css(e,"display"),b([e]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===we.css(e,"float")&&(l||(d.done(function(){h.display=u}),null==u&&(c=h.display,u="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),l=!1;for(r in p)l||(g?"hidden"in g&&(m=g.hidden):g=Be.access(e,"fxshow",{display:u}),o&&(g.hidden=!m),m&&b([e],!0),d.done(function(){m||b([e]),Be.remove(e,"fxshow");for(r in p)we.style(e,r,p[r])})),l=X(m?g[r]:0,r,d),r in g||(g[r]=l.start,m&&(l.end=l.start,l.start=0))}}function Y(e,t){var n,r,i,o,a;for(n in e)if(r=h(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=we.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function G(e,t,n){var r,i,o=0,a=G.prefilters.length,s=we.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;for(var t=vt||W(),n=Math.max(0,u.startTime+u.duration-t),r=1-(n/u.duration||0),o=0,a=u.tweens.length;a>o;o++)u.tweens[o].run(r);return s.notifyWith(e,[u,r,n]),1>r&&a?n:(a||s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:we.extend({},t),opts:we.extend(!0,{specialEasing:{},easing:we.easing._default},n),originalProperties:t,originalOptions:n,startTime:vt||W(),duration:n.duration,tweens:[],createTween:function(t,n){var r=we.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),c=u.props;for(Y(c,u.opts.specialEasing);a>o;o++)if(r=G.prefilters[o].call(u,e,c,u.opts))return ye(r.stop)&&(we._queueHooks(u.elem,u.opts.queue).stop=r.stop.bind(r)),r;return we.map(c,X,u),ye(u.opts.start)&&u.opts.start.call(e,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),we.fx.timer(we.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u}function Z(e){return(e.match(Le)||[]).join(" ")}function K(e){return e.getAttribute&&e.getAttribute("class")||""}function Q(e){return Array.isArray(e)?e:"string"==typeof e?e.match(Le)||[]:[]}function J(e,t,n,i){var o;if(Array.isArray(t))we.each(t,function(t,r){n||It.test(e)?i(e,r):J(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==r(t))i(e,t);else for(o in t)J(e+"["+o+"]",t[o],n,i)}function ee(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(Le)||[];if(ye(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function te(e,t,n,r){function i(s){var l;return o[s]=!0,we.each(e[s]||[],function(e,s){var u=s(t,n,r);return"string"!=typeof u||a||o[u]?a?!(l=u):void 0:(t.dataTypes.unshift(u),i(u),!1)}),l}var o={},a=e===Rt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function ne(e,t){var n,r,i=we.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&we.extend(!0,e,r),e}function re(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function ie(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(i in u)if((s=i.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}var oe=[],ae=e.document,se=Object.getPrototypeOf,le=oe.slice,ue=oe.concat,ce=oe.push,fe=oe.indexOf,de={},pe=de.toString,he=de.hasOwnProperty,me=he.toString,ge=me.call(Object),ve={},ye=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},xe=function(e){return null!=e&&e===e.window},be={type:!0,src:!0,noModule:!0},we=function(e,t){return new we.fn.init(e,t)},Ce=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;we.fn=we.prototype={jquery:"3.3.1",constructor:we,length:0,toArray:function(){return le.call(this)},get:function(e){return null==e?le.call(this):0>e?this[e+this.length]:this[e]},pushStack:function(e){var t=we.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return we.each(this,e)},map:function(e){return this.pushStack(we.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(le.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ce,sort:oe.sort,splice:oe.splice},we.extend=we.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||ye(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(u&&r&&(we.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&we.isPlainObject(n)?n:{},a[t]=we.extend(u,o,r)):void 0!==r&&(a[t]=r));return a},we.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==pe.call(e)||(t=se(e))&&("function"!=typeof(n=he.call(t,"constructor")&&t.constructor)||me.call(n)!==ge))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){n(e)},each:function(e,t){var n,r=0;if(i(e))for(n=e.length;n>r&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(Ce,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?we.merge(n,"string"==typeof e?[e]:e):ce.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:fe.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;n>r;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;a>o;o++)(r=!t(e[o],o))!==s&&i.push(e[o]);return i},map:function(e,t,n){var r,o,a=0,s=[];if(i(e))for(r=e.length;r>a;a++)null!=(o=t(e[a],a,n))&&s.push(o);else for(a in e)null!=(o=t(e[a],a,n))&&s.push(o);return ue.apply([],s)},guid:1,support:ve}),"function"==typeof Symbol&&(we.fn[Symbol.iterator]=oe[Symbol.iterator]),we.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){de["[object "+t+"]"]=t.toLowerCase()});var Te=function(e){function t(e,t,n,r){var i,o,a,s,l,u,c,d=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:F)!==O&&L(t),t=t||O,q)){if(11!==h&&(l=ve.exec(e)))if(i=l[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(d&&(a=d.getElementById(i))&&B(t,a)&&a.id===i)return n.push(a),n}else{if(l[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&C.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(C.qsa&&!X[e+" "]&&(!H||!H.test(e))){if(1!==h)d=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(we,Ce):t.setAttribute("id",s=$),o=(u=E(e)).length;o--;)u[o]="#"+s+" "+p(u[o]);c=u.join(","),d=ye.test(e)&&f(t.parentNode)||t}if(c)try{return Q.apply(n,d.querySelectorAll(c)),n}catch(e){}finally{s===$&&t.removeAttribute("id")}}}return N(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>T.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[$]=!0,e}function i(e){var t=O.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ke(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function f(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function p(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=R++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,l){var u,c,f,d=[z,s];if(l){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(f=t[$]||(t[$]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((u=c[o])&&u[0]===z&&u[1]===s)return d[2]=u[2];if(c[o]=d,d[2]=e(t,n,l))return!0}return!1}}function m(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;o>i;i++)t(e,n[i],r);return r}function v(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;l>s;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),u&&t.push(s)));return a}function y(e,t,n,i,o,a){return i&&!i[$]&&(i=y(i)),o&&!o[$]&&(o=y(o,a)),r(function(r,a,s,l){var u,c,f,d=[],p=[],h=a.length,m=r||g(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?m:v(m,d,e,s,l),x=n?o||(r?e:h||i)?[]:a:y;if(n&&n(y,x,s,l),i)for(u=v(x,p),i(u,[],s,l),c=u.length;c--;)(f=u[c])&&(x[p[c]]=!(y[p[c]]=f));if(r){if(o||e){if(o){for(u=[],c=x.length;c--;)(f=x[c])&&u.push(y[c]=f);o(null,x=[],u,l)}for(c=x.length;c--;)(f=x[c])&&(u=o?ee(r,f):d[c])>-1&&(r[u]=!(a[u]=f))}}else x=v(x===a?x.splice(h,x.length):x),o?o(null,a,x,l):Q.apply(a,x)})}function x(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),u=h(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?l(e,n,r):u(e,n,r));return t=null,i}];i>s;s++)if(n=T.relative[e[s].type])c=[h(m(c),n)];else{if((n=T.filter[e[s].type].apply(null,e[s].matches))[$]){for(r=++s;i>r&&!T.relative[e[r].type];r++);return y(s>1&&m(c),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,r>s&&x(e.slice(s,r)),i>r&&x(e=e.slice(r)),i>r&&p(e))}c.push(n)}return m(c)}function b(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,l,u){var c,f,d,p=0,h="0",m=r&&[],g=[],y=A,x=r||o&&T.find.TAG("*",u),b=z+=null==y?1:Math.random()||.1,w=x.length;for(u&&(A=a===O||a||u);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===O||(L(c),s=!q);d=e[f++];)if(d(c,a||O,s)){l.push(c);break}u&&(z=b)}i&&((c=!d&&c)&&p--,r&&m.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(m,g,a,s);if(r){if(p>0)for(;h--;)m[h]||g[h]||(g[h]=Z.call(l));g=v(g)}Q.apply(l,g),u&&!r&&g.length>0&&p+n.length>1&&t.uniqueSort(l)}return u&&(z=b,A=y),m};return i?r(a):a}var w,C,T,k,S,E,j,N,A,D,I,L,O,P,q,H,M,_,B,$="sizzle"+1*new Date,F=e.document,z=0,R=0,W=n(),U=n(),X=n(),V=function(e,t){return e===t&&(I=!0),0},Y={}.hasOwnProperty,G=[],Z=G.pop,K=G.push,Q=G.push,J=G.slice,ee=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\x00-\\xa0])+",ie="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",oe=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ue=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),be=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Ce=function(e,t){return t?"\x00"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Te=function(){L()},ke=h(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Q.apply(G=J.call(F.childNodes),F.childNodes),G[F.childNodes.length].nodeType}catch(e){Q={apply:G.length?function(e,t){K.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}C=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:F;return r!==O&&9===r.nodeType&&r.documentElement?(O=r,P=O.documentElement,q=!S(O),F!==O&&(n=O.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),C.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),C.getElementsByTagName=i(function(e){return e.appendChild(O.createComment("")),!e.getElementsByTagName("*").length}),C.getElementsByClassName=ge.test(O.getElementsByClassName),C.getById=i(function(e){return P.appendChild(e).id=$,!O.getElementsByName||!O.getElementsByName($).length}),C.getById?(T.filter.ID=function(e){var t=e.replace(xe,be);return function(e){return e.getAttribute("id")===t}},T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&q){var n=t.getElementById(e);return n?[n]:[]}}):(T.filter.ID=function(e){var t=e.replace(xe,be);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&q){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),T.find.TAG=C.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):C.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=C.getElementsByClassName&&function(e,t){return"undefined"!=typeof t.getElementsByClassName&&q?t.getElementsByClassName(e):void 0},M=[],H=[],(C.qsa=ge.test(O.querySelectorAll))&&(i(function(e){P.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&H.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||H.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+$+"-]").length||H.push("~="),e.querySelectorAll(":checked").length||H.push(":checked"),e.querySelectorAll("a#"+$+"+*").length||H.push(".#.+[+~]")}),i(function(e){e.innerHTML="";var t=O.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&H.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&H.push(":enabled",":disabled"),P.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&H.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),H.push(",.*:")})),(C.matchesSelector=ge.test(_=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&i(function(e){C.disconnectedMatch=_.call(e,"*"),_.call(e,"[s!='']:x"),M.push("!=",oe)}),H=H.length&&new RegExp(H.join("|")),M=M.length&&new RegExp(M.join("|")),t=ge.test(P.compareDocumentPosition),B=t||ge.test(P.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return I=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!C.sortDetached&&t.compareDocumentPosition(e)===n?e===O||e.ownerDocument===F&&B(F,e)?-1:t===O||t.ownerDocument===F&&B(F,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return I=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],l=[t];if(!i||!o)return e===O?-1:t===O?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[r]===l[r];)r++;return r?a(s[r],l[r]):s[r]===F?-1:l[r]===F?1:0},O):O},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==O&&L(e),n=n.replace(ce,"='$1']"),C.matchesSelector&&q&&!X[n+" "]&&(!M||!M.test(n))&&(!H||!H.test(n)))try{var r=_.call(e,n);if(r||C.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,O,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==O&&L(e),B(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==O&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!q):void 0;return void 0!==r?r:C.attributes||!q?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(we,Ce)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(I=!C.detectDuplicates,D=!C.sortStable&&e.slice(0),e.sort(V),I){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},k=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=k(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=k(t);return n},(T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,be),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=E(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,f,d,p,h,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,x=!1;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&y){for(x=(p=(u=(c=(f=(d=g)[$]||(d[$]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===z&&u[1])&&u[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[z,p,x];break}}else if(y&&(x=p=(u=(c=(f=(d=t)[$]||(d[$]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===z&&u[1]),!1===x)for(;(d=++p&&d&&d[m]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++x||(y&&((c=(f=d[$]||(d[$]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]=[z,x]),d!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[$]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)e[r=ee(e,i[a])]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=j(e.replace(se,"$1"));return i[$]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(xe,be),function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,be).toLowerCase(),function(t){var n;do if(n=q?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===P},focus:function(e){return e===O.activeElement&&(!O.hasFocus||O.hasFocus())&&!!(e.type||e.href||~e.tabIndex); +},enabled:u(!1),disabled:u(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++r2&&"ID"===(a=o[0]).type&&9===t.nodeType&&q&&T.relative[o[1].type]){if(!(t=(T.find.ID(a.matches[0].replace(xe,be),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((l=T.find[s])&&(r=l(a.matches[0].replace(xe,be),ye.test(o[0].type)&&f(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&p(o)))return Q.apply(n,r),n;break}}return(u||j(e,c))(r,t,!q,n,!t||ye.test(e)&&f(t.parentNode)||t),n},C.sortStable=$.split("").sort(V).join("")===$,C.detectDuplicates=!!I,L(),C.sortDetached=i(function(e){return 1&e.compareDocumentPosition(O.createElement("fieldset"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),C.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;return n?void 0:!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);we.find=Te,we.expr=Te.selectors,we.expr[":"]=we.expr.pseudos,we.uniqueSort=we.unique=Te.uniqueSort,we.text=Te.getText,we.isXMLDoc=Te.isXML,we.contains=Te.contains,we.escapeSelector=Te.escape;var ke=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&we(e).is(n))break;r.push(e)}return r},Se=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Ee=we.expr.match.needsContext,je=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;we.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?we.find.matchesSelector(r,e)?[r]:[]:we.find.matches(e,we.grep(t,function(e){return 1===e.nodeType}))},we.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(we(e).filter(function(){for(t=0;r>t;t++)if(we.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;r>t;t++)we.find(e,i[t],n);return r>1?we.uniqueSort(n):n},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&Ee.test(e)?we(e):e||[],!1).length}});var Ne,Ae=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(we.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ne,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Ae.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof we?t[0]:t,we.merge(this,we.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:ae,!0)),je.test(r[1])&&we.isPlainObject(t))for(r in t)ye(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=ae.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):ye(e)?void 0!==n.ready?n.ready(e):e(we):we.makeArray(e,this)}).prototype=we.fn,Ne=we(ae);var De=/^(?:parents|prev(?:Until|All))/,Ie={children:!0,contents:!0,next:!0,prev:!0};we.fn.extend({has:function(e){var t=we(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(we.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&we(e);if(!Ee.test(e))for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&we.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?we.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?fe.call(we(e),this[0]):fe.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(we.uniqueSort(we.merge(this.get(),we(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),we.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ke(e,"parentNode")},parentsUntil:function(e,t,n){return ke(e,"parentNode",n)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return ke(e,"nextSibling")},prevAll:function(e){return ke(e,"previousSibling")},nextUntil:function(e,t,n){return ke(e,"nextSibling",n)},prevUntil:function(e,t,n){return ke(e,"previousSibling",n)},siblings:function(e){return Se((e.parentNode||{}).firstChild,e)},children:function(e){return Se(e.firstChild)},contents:function(e){return o(e,"iframe")?e.contentDocument:(o(e,"template")&&(e=e.content||e),we.merge([],e.childNodes))}},function(e,t){we.fn[e]=function(n,r){var i=we.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=we.filter(r,i)),this.length>1&&(Ie[e]||we.uniqueSort(i),De.test(e)&&i.reverse()),this.pushStack(i)}});var Le=/[^\x20\t\r\n\f]+/g;we.Callbacks=function(e){e="string"==typeof e?l(e):we.extend({},e);var t,n,i,o,a=[],s=[],u=-1,c=function(){for(o=o||e.once,i=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),u>=n&&u--}),this},has:function(e){return e?we.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return o=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return o=s=[],n||t||(a=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!i}};return f},we.extend({Deferred:function(t){var n=[["notify","progress",we.Callbacks("memory"),we.Callbacks("memory"),2],["resolve","done",we.Callbacks("once memory"),we.Callbacks("once memory"),0,"resolved"],["reject","fail",we.Callbacks("once memory"),we.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return we.Deferred(function(t){we.each(n,function(n,r){var i=ye(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&ye(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){function o(t,n,r,i){return function(){var s=this,l=arguments,f=function(){var e,f;if(!(a>t)){if((e=r.apply(s,l))===n.promise())throw new TypeError("Thenable self-resolution");f=e&&("object"==typeof e||"function"==typeof e)&&e.then,ye(f)?i?f.call(e,o(a,n,u,i),o(a,n,c,i)):(a++,f.call(e,o(a,n,u,i),o(a,n,c,i),o(a,n,u,n.notifyWith))):(r!==u&&(s=void 0,l=[e]),(i||n.resolveWith)(s,l))}},d=i?f:function(){try{f()}catch(e){we.Deferred.exceptionHook&&we.Deferred.exceptionHook(e,d.stackTrace),t+1>=a&&(r!==c&&(s=void 0,l=[e]),n.rejectWith(s,l))}};t?d():(we.Deferred.getStackHook&&(d.stackTrace=we.Deferred.getStackHook()),e.setTimeout(d))}}var a=0;return we.Deferred(function(e){n[0][3].add(o(0,e,ye(i)?i:u,e.notifyWith)),n[1][3].add(o(0,e,ye(t)?t:u)),n[2][3].add(o(0,e,ye(r)?r:c))}).promise()},promise:function(e){return null!=e?we.extend(e,i):i}},o={};return we.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=le.call(arguments),o=we.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?le.call(arguments):n,--t||o.resolveWith(r,i)}};if(1>=t&&(f(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||ye(i[n]&&i[n].then)))return o.then();for(;n--;)f(i[n],a(n),o.reject);return o.promise()}});var Oe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;we.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Oe.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},we.readyException=function(t){e.setTimeout(function(){throw t})};var Pe=we.Deferred();we.fn.ready=function(e){return Pe.then(e)["catch"](function(e){we.readyException(e)}),this},we.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--we.readyWait:we.isReady)||(we.isReady=!0,!0!==e&&--we.readyWait>0||Pe.resolveWith(ae,[we]))}}),we.ready.then=Pe.then,"complete"===ae.readyState||"loading"!==ae.readyState&&!ae.documentElement.doScroll?e.setTimeout(we.ready):(ae.addEventListener("DOMContentLoaded",d),e.addEventListener("load",d));var qe=function(e,t,n,i,o,a,s){var l=0,u=e.length,c=null==n;if("object"===r(n)){o=!0;for(l in n)qe(e,t,l,n[l],!0,a,s)}else if(void 0!==i&&(o=!0,ye(i)||(s=!0),c&&(s?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(we(e),n)})),t))for(;u>l;l++)t(e[l],n,s?i:i.call(e[l],l,t(e[l],n)));return o?e:c?t.call(e):u?t(e[0],n):a},He=/^-ms-/,Me=/-([a-z])/g,_e=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};m.uid=1,m.prototype={cache:function(e){var t=e[this.expando];return t||(t={},_e(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[h(t)]=n;else for(r in t)i[h(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][h(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(h):(t=h(t))in r?[t]:t.match(Le)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||we.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!we.isEmptyObject(t)}};var Be=new m,$e=new m,Fe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ze=/[A-Z]/g;we.extend({hasData:function(e){return $e.hasData(e)||Be.hasData(e)},data:function(e,t,n){return $e.access(e,t,n)},removeData:function(e,t){$e.remove(e,t)},_data:function(e,t,n){return Be.access(e,t,n)},_removeData:function(e,t){Be.remove(e,t)}}),we.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=$e.get(o),1===o.nodeType&&!Be.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=h(r.slice(5)),v(o,r,i[r]));Be.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){$e.set(this,e)}):qe(this,function(t){var n;if(o&&void 0===t){if(void 0!==(n=$e.get(o,e)))return n;if(void 0!==(n=v(o,e)))return n}else this.each(function(){$e.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){$e.remove(this,e)})}}),we.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=Be.get(e,t),n&&(!r||Array.isArray(n)?r=Be.access(e,t,we.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=we.queue(e,t),r=n.length,i=n.shift(),o=we._queueHooks(e,t),a=function(){we.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Be.get(e,n)||Be.access(e,n,{empty:we.Callbacks("once memory").add(function(){Be.remove(e,[t+"queue",n])})})}}),we.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Ke=/^$|^module$|\/(?:java|ecma)script/i,Qe={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Qe.optgroup=Qe.option,Qe.tbody=Qe.tfoot=Qe.colgroup=Qe.caption=Qe.thead,Qe.th=Qe.td;var Je=/<|&#?\w+;/;!function(){var e=ae.createDocumentFragment().appendChild(ae.createElement("div")),t=ae.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),ve.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",ve.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var et=ae.documentElement,tt=/^key/,nt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rt=/^([^.]*)(?:\.(.+)|)/;we.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,f,d,p,h,m,g=Be.get(e);if(g)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&we.find.matchesSelector(et,i),n.guid||(n.guid=we.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(t){return"undefined"!=typeof we&&we.event.triggered!==t.type?we.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(Le)||[""]).length;u--;)p=m=(s=rt.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),p&&(f=we.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=we.event.special[p]||{},c=we.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&we.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=l[p])||((d=l[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),we.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,u,c,f,d,p,h,m,g=Be.hasData(e)&&Be.get(e);if(g&&(l=g.events)){for(u=(t=(t||"").match(Le)||[""]).length;u--;)if(s=rt.exec(t[u])||[],p=m=s[1],h=(s[2]||"").split(".").sort(),p){for(f=we.event.special[p]||{},d=l[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,g.handle)||we.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)we.event.remove(e,p+t[u],n,r,!0);we.isEmptyObject(l)&&Be.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=we.event.fix(e),l=new Array(arguments.length),u=(Be.get(this,"events")||{})[s.type]||[],c=we.event.special[s.type]||{};for(l[0]=s,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],a={},n=0;l>n;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?we(i,this).index(u)>-1:we.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,ot=/\s*$/g;we.extend({htmlPrefilter:function(e){return e.replace(it,"<$1>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),l=we.contains(e.ownerDocument,e);if(!(ve.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||we.isXMLDoc(e)))for(a=w(s),r=0,i=(o=w(e)).length;i>r;r++)L(o[r],a[r]);if(t)if(n)for(o=o||w(e),a=a||w(s),r=0,i=o.length;i>r;r++)I(o[r],a[r]);else I(e,s);return(a=w(s,"script")).length>0&&C(a,!l&&w(e,"script")),s},cleanData:function(e){for(var t,n,r,i=we.event.special,o=0;void 0!==(n=e[o]);o++)if(_e(n)){if(t=n[Be.expando]){if(t.events)for(r in t.events)i[r]?we.event.remove(n,r):we.removeEvent(n,r,t.handle);n[Be.expando]=void 0}n[$e.expando]&&(n[$e.expando]=void 0)}}}),we.fn.extend({detach:function(e){return P(this,e,!0)},remove:function(e){return P(this,e)},text:function(e){return qe(this,function(e){return void 0===e?we.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return O(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||N(this,e).appendChild(e)})},prepend:function(){return O(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=N(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return O(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return O(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(we.cleanData(w(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return we.clone(this,e,t)})},html:function(e){return qe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ot.test(e)&&!Qe[(Ze.exec(e)||["",""])[1].toLowerCase()]){e=we.htmlPrefilter(e);try{for(;r>n;n++)1===(t=this[n]||{}).nodeType&&(we.cleanData(w(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return O(this,arguments,function(t){var n=this.parentNode;we.inArray(this,e)<0&&(we.cleanData(w(this)),n&&n.replaceChild(t,this))},e)}}),we.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){we.fn[e]=function(e){for(var n,r=[],i=we(e),o=i.length-1,a=0;o>=a;a++)n=a===o?this:this.clone(!0),we(i[a])[t](n),ce.apply(r,n.get());return this.pushStack(r)}});var lt=new RegExp("^("+Re+")(?!px)[a-z%]+$","i"),ut=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},ct=new RegExp(Ue.join("|"),"i");!function(){function t(){if(u){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",et.appendChild(l).appendChild(u);var t=e.getComputedStyle(u);r="1%"!==t.top,s=12===n(t.marginLeft),u.style.right="60%",a=36===n(t.right),i=36===n(t.width),u.style.position="absolute",o=36===u.offsetWidth||"absolute",et.removeChild(l),u=null}}function n(e){return Math.round(parseFloat(e))}var r,i,o,a,s,l=ae.createElement("div"),u=ae.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",ve.clearCloneStyle="content-box"===u.style.backgroundClip,we.extend(ve,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),s},scrollboxSize:function(){return t(),o}}))}();var ft=/^(none|table(?!-c[ea]).+)/,dt=/^--/,pt={position:"absolute",visibility:"hidden",display:"block"},ht={letterSpacing:"0",fontWeight:"400"},mt=["Webkit","Moz","ms"],gt=ae.createElement("div").style;we.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=q(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=h(t),l=dt.test(t),u=e.style;if(l||(t=_(s)),a=we.cssHooks[t]||we.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];"string"==(o=typeof n)&&(i=We.exec(n))&&i[1]&&(n=y(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(we.cssNumber[s]?"":"px")),ve.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var i,o,a,s=h(t);return dt.test(t)||(t=_(s)),(a=we.cssHooks[t]||we.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=q(e,t,r)),"normal"===i&&t in ht&&(i=ht[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),we.each(["height","width"],function(e,t){we.cssHooks[t]={get:function(e,n,r){return n?!ft.test(we.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?F(e,t,r):Ve(e,pt,function(){return F(e,t,r)}):void 0},set:function(e,n,r){var i,o=ut(e),a="border-box"===we.css(e,"boxSizing",!1,o),s=r&&$(e,t,r,a,o);return a&&ve.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-$(e,t,"border",!1,o)-.5)),s&&(i=We.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=we.css(e,t)),B(e,n,s)}}}),we.cssHooks.marginLeft=H(ve.reliableMarginLeft,function(e,t){return t?(parseFloat(q(e,"marginLeft"))||e.getBoundingClientRect().left-Ve(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px":void 0}),we.each({margin:"",padding:"",border:"Width"},function(e,t){we.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+Ue[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(we.cssHooks[e+t].set=B)}),we.fn.extend({css:function(e,t){return qe(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=ut(e),i=t.length;i>a;a++)o[t[a]]=we.css(e,t[a],!1,r);return o}return void 0!==n?we.style(e,t,n):we.css(e,t)},e,t,arguments.length>1)}}),we.Tween=z,z.prototype={constructor:z,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||we.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(we.cssNumber[n]?"":"px")},cur:function(){var e=z.propHooks[this.prop];return e&&e.get?e.get(this):z.propHooks._default.get(this)},run:function(e){var t,n=z.propHooks[this.prop];return this.options.duration?this.pos=t=we.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):z.propHooks._default.set(this),this}},z.prototype.init.prototype=z.prototype,z.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=we.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){we.fx.step[e.prop]?we.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[we.cssProps[e.prop]]&&!we.cssHooks[e.prop]?e.elem[e.prop]=e.now:we.style(e.elem,e.prop,e.now+e.unit)}}},z.propHooks.scrollTop=z.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},we.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},we.fx=z.prototype.init,we.fx.step={};var vt,yt,xt=/^(?:toggle|show|hide)$/,bt=/queueHooks$/;we.Animation=we.extend(G,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return y(n.elem,e,We.exec(t),n),n}]},tweener:function(e,t){ye(e)?(t=e,e=["*"]):e=e.match(Le);for(var n,r=0,i=e.length;i>r;r++)n=e[r],G.tweeners[n]=G.tweeners[n]||[],G.tweeners[n].unshift(t)},prefilters:[V],prefilter:function(e,t){t?G.prefilters.unshift(e):G.prefilters.push(e)}}),we.speed=function(e,t,n){var r=e&&"object"==typeof e?we.extend({},e):{complete:n||!n&&t||ye(e)&&e,duration:e,easing:n&&t||t&&!ye(t)&&t};return we.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in we.fx.speeds?r.duration=we.fx.speeds[r.duration]:r.duration=we.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){ye(r.old)&&r.old.call(this),r.queue&&we.dequeue(this,r.queue)},r},we.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Xe).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=we.isEmptyObject(e),o=we.speed(t,n,r),a=function(){var t=G(this,we.extend({},e),o);(i||Be.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=we.timers,a=Be.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&bt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||we.dequeue(this,e); +})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Be.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=we.timers,a=r?r.length:0;for(n.finish=!0,we.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),we.each(["toggle","show","hide"],function(e,t){var n=we.fn[t];we.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(U(t,!0),e,r,i)}}),we.each({slideDown:U("show"),slideUp:U("hide"),slideToggle:U("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){we.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),we.timers=[],we.fx.tick=function(){var e,t=0,n=we.timers;for(vt=Date.now();t1)},removeAttr:function(e){return this.each(function(){we.removeAttr(this,e)})}}),we.extend({attr:function(e,t,n){var r,i,o=e.nodeType;return 3!==o&&8!==o&&2!==o?"undefined"==typeof e.getAttribute?we.prop(e,t,n):(1===o&&we.isXMLDoc(e)||(i=we.attrHooks[t.toLowerCase()]||(we.expr.match.bool.test(t)?wt:void 0)),void 0!==n?null===n?void we.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=we.find.attr(e,t))?void 0:r):void 0},attrHooks:{type:{set:function(e,t){if(!ve.radioValue&&"radio"===t&&o(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Le);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),wt={set:function(e,t,n){return!1===t?we.removeAttr(e,n):e.setAttribute(n,n),n}},we.each(we.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Ct[t]||we.find.attr;Ct[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=Ct[a],Ct[a]=i,i=null!=n(e,t,r)?a:null,Ct[a]=o),i}});var Tt=/^(?:input|select|textarea|button)$/i,kt=/^(?:a|area)$/i;we.fn.extend({prop:function(e,t){return qe(this,we.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[we.propFix[e]||e]})}}),we.extend({prop:function(e,t,n){var r,i,o=e.nodeType;return 3!==o&&8!==o&&2!==o?(1===o&&we.isXMLDoc(e)||(t=we.propFix[t]||t,i=we.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]):void 0},propHooks:{tabIndex:{get:function(e){var t=we.find.attr(e,"tabindex");return t?parseInt(t,10):Tt.test(e.nodeName)||kt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),ve.optSelected||(we.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),we.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){we.propFix[this.toLowerCase()]=this}),we.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,l=0;if(ye(e))return this.each(function(t){we(this).addClass(e.call(this,t,K(this)))});if((t=Q(e)).length)for(;n=this[l++];)if(i=K(n),r=1===n.nodeType&&" "+Z(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=Z(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,l=0;if(ye(e))return this.each(function(t){we(this).removeClass(e.call(this,t,K(this)))});if(!arguments.length)return this.attr("class","");if((t=Q(e)).length)for(;n=this[l++];)if(i=K(n),r=1===n.nodeType&&" "+Z(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=Z(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):ye(e)?this.each(function(n){we(this).toggleClass(e.call(this,n,K(this),t),t)}):this.each(function(){var t,i,o,a;if(r)for(i=0,o=we(this),a=Q(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=K(this))&&Be.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Be.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+Z(K(n))+" ").indexOf(t)>-1)return!0;return!1}});var St=/\r/g;we.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=ye(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,we(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=we.map(i,function(e){return null==e?"":e+""})),(t=we.valHooks[this.type]||we.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=we.valHooks[i.type]||we.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(St,""):null==n?"":n:void 0}}),we.extend({valHooks:{option:{get:function(e){var t=we.find.attr(e,"value");return null!=t?t:Z(we.text(e))}},select:{get:function(e){var t,n,r,i=e.options,a=e.selectedIndex,s="select-one"===e.type,l=s?null:[],u=s?a+1:i.length;for(r=0>a?u:s?a:0;u>r;r++)if(((n=i[r]).selected||r===a)&&!n.disabled&&(!n.parentNode.disabled||!o(n.parentNode,"optgroup"))){if(t=we(n).val(),s)return t;l.push(t)}return l},set:function(e,t){for(var n,r,i=e.options,o=we.makeArray(t),a=i.length;a--;)((r=i[a]).selected=we.inArray(we.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),we.each(["radio","checkbox"],function(){we.valHooks[this]={set:function(e,t){return Array.isArray(t)?e.checked=we.inArray(we(e).val(),t)>-1:void 0}},ve.checkOn||(we.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),ve.focusin="onfocusin"in e;var Et=/^(?:focusinfocus|focusoutblur)$/,jt=function(e){e.stopPropagation()};we.extend(we.event,{trigger:function(t,n,r,i){var o,a,s,l,u,c,f,d,p=[r||ae],h=he.call(t,"type")?t.type:t,m=he.call(t,"namespace")?t.namespace.split("."):[];if(a=d=s=r=r||ae,3!==r.nodeType&&8!==r.nodeType&&!Et.test(h+we.event.triggered)&&(h.indexOf(".")>-1&&(h=(m=h.split(".")).shift(),m.sort()),u=h.indexOf(":")<0&&"on"+h,t=t[we.expando]?t:new we.Event(h,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:we.makeArray(n,[t]),f=we.event.special[h]||{},i||!f.trigger||!1!==f.trigger.apply(r,n))){if(!i&&!f.noBubble&&!xe(r)){for(l=f.delegateType||h,Et.test(l+h)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(r.ownerDocument||ae)&&p.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=p[o++])&&!t.isPropagationStopped();)d=a,t.type=o>1?l:f.bindType||h,(c=(Be.get(a,"events")||{})[t.type]&&Be.get(a,"handle"))&&c.apply(a,n),(c=u&&a[u])&&c.apply&&_e(a)&&(t.result=c.apply(a,n),!1===t.result&&t.preventDefault());return t.type=h,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(p.pop(),n)||!_e(r)||u&&ye(r[h])&&!xe(r)&&((s=r[u])&&(r[u]=null),we.event.triggered=h,t.isPropagationStopped()&&d.addEventListener(h,jt),r[h](),t.isPropagationStopped()&&d.removeEventListener(h,jt),we.event.triggered=void 0,s&&(r[u]=s)),t.result}},simulate:function(e,t,n){var r=we.extend(new we.Event,n,{type:e,isSimulated:!0});we.event.trigger(r,null,t)}}),we.fn.extend({trigger:function(e,t){return this.each(function(){we.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?we.event.trigger(e,t,n,!0):void 0}}),ve.focusin||we.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){we.event.simulate(t,e.target,we.event.fix(e))};we.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Be.access(r,t);i||r.addEventListener(e,n,!0),Be.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Be.access(r,t)-1;i?Be.access(r,t,i):(r.removeEventListener(e,n,!0),Be.remove(r,t))}}});var Nt=e.location,At=Date.now(),Dt=/\?/;we.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(n){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||we.error("Invalid XML: "+e),t};var It=/\[\]$/,Lt=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,Pt=/^(?:input|select|textarea|keygen)/i;we.param=function(e,t){var n,r=[],i=function(e,t){var n=ye(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!we.isPlainObject(e))we.each(e,function(){i(this.name,this.value)});else for(n in e)J(n,e[n],t,i);return r.join("&")},we.fn.extend({serialize:function(){return we.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=we.prop(this,"elements");return e?we.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!we(this).is(":disabled")&&Pt.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!Ge.test(e))}).map(function(e,t){var n=we(this).val();return null==n?null:Array.isArray(n)?we.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}});var qt=/%20/g,Ht=/#.*$/,Mt=/([?&])_=[^&]*/,_t=/^(.*?):[ \t]*([^\r\n]*)$/gm,Bt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,$t=/^(?:GET|HEAD)$/,Ft=/^\/\//,zt={},Rt={},Wt="*/".concat("*"),Ut=ae.createElement("a");Ut.href=Nt.href,we.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Nt.href,type:"GET",isLocal:Bt.test(Nt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":we.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ne(ne(e,we.ajaxSettings),t):ne(we.ajaxSettings,e)},ajaxPrefilter:ee(zt),ajaxTransport:ee(Rt),ajax:function(e,t){function n(e,t,n,a){var l,f,d,x,b,w=t;u||(u=!0,s&&T.clearTimeout(s),r=void 0,o=a||"",C.readyState=e>0?4:0,l=e>=200&&300>e||304===e,n&&(x=re(p,C,n)),x=ie(p,x,C,l),l?(p.ifModified&&((b=C.getResponseHeader("Last-Modified"))&&(we.lastModified[i]=b),(b=C.getResponseHeader("etag"))&&(we.etag[i]=b)),204===e||"HEAD"===p.type?w="nocontent":304===e?w="notmodified":(w=x.state,f=x.data,l=!(d=x.error))):(d=w,!e&&w||(w="error",0>e&&(e=0))),C.status=e,C.statusText=(t||w)+"",l?g.resolveWith(h,[f,w,C]):g.rejectWith(h,[C,w,d]),C.statusCode(y),y=void 0,c&&m.trigger(l?"ajaxSuccess":"ajaxError",[C,p,l?f:d]),v.fireWith(h,[C,w]),c&&(m.trigger("ajaxComplete",[C,p]),--we.active||we.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,a,s,l,u,c,f,d,p=we.ajaxSetup({},t),h=p.context||p,m=p.context&&(h.nodeType||h.jquery)?we(h):we.event,g=we.Deferred(),v=we.Callbacks("once memory"),y=p.statusCode||{},x={},b={},w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=_t.exec(o);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(e,t){return null==u&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==u&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)C.always(e[C.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||w;return r&&r.abort(t),n(0,t),this}};if(g.promise(C),p.url=((e||p.url||Nt.href)+"").replace(Ft,Nt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(Le)||[""],null==p.crossDomain){l=ae.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Ut.protocol+"//"+Ut.host!=l.protocol+"//"+l.host}catch(T){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=we.param(p.data,p.traditional)),te(zt,p,t,C),u)return C;(c=we.event&&p.global)&&0==we.active++&&we.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!$t.test(p.type),i=p.url.replace(Ht,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(qt,"+")):(d=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Dt.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(Mt,"$1"),d=(Dt.test(i)?"&":"?")+"_="+At++ +d),p.url=i+d),p.ifModified&&(we.lastModified[i]&&C.setRequestHeader("If-Modified-Since",we.lastModified[i]),we.etag[i]&&C.setRequestHeader("If-None-Match",we.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Wt+"; q=0.01":""):p.accepts["*"]);for(f in p.headers)C.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(!1===p.beforeSend.call(h,C,p)||u))return C.abort();if(w="abort",v.add(p.complete),C.done(p.success),C.fail(p.error),r=te(Rt,p,t,C)){if(C.readyState=1,c&&m.trigger("ajaxSend",[C,p]),u)return C;p.async&&p.timeout>0&&(s=T.setTimeout(function(){C.abort("timeout")},p.timeout));try{u=!1,r.send(x,n)}catch(T){if(u)throw T;n(-1,T)}}else n(-1,"No Transport");return C},getJSON:function(e,t,n){return we.get(e,t,n,"json")},getScript:function(e,t){return we.get(e,void 0,t,"script")}}),we.each(["get","post"],function(e,t){we[t]=function(e,n,r,i){return ye(n)&&(i=i||r,r=n,n=void 0),we.ajax(we.extend({url:e,type:t,dataType:i,data:n,success:r},we.isPlainObject(e)&&e))}}),we._evalUrl=function(e){return we.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},we.fn.extend({wrapAll:function(e){var t;return this[0]&&(ye(e)&&(e=e.call(this[0])),t=we(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return ye(e)?this.each(function(t){we(this).wrapInner(e.call(this,t))}):this.each(function(){var t=we(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ye(e);return this.each(function(n){we(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){we(this).replaceWith(this.childNodes)}),this}}),we.expr.pseudos.hidden=function(e){return!we.expr.pseudos.visible(e)},we.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},we.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Xt={0:200,1223:204},Vt=we.ajaxSettings.xhr();ve.cors=!!Vt&&"withCredentials"in Vt,ve.ajax=Vt=!!Vt,we.ajaxTransport(function(e){var t,n;return ve.cors||Vt&&!e.crossDomain?{send:function(r,i){var o,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)a[o]=e.xhrFields[o];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)a.setRequestHeader(o,r[o]);t=function(e){return function(){t&&(t=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?i(0,"error"):i(a.status,a.statusText):i(Xt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),n=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&s.setTimeout(function(){t&&n()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(s){if(t)throw s}},abort:function(){t&&t()}}:void 0}),we.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),we.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return we.globalEval(e),e}}}),we.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),we.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=we("