From ec8ec42f12e344becc73429c5f2302a89dfabe90 Mon Sep 17 00:00:00 2001 From: Peter Shin Date: Sun, 8 Sep 2024 00:40:03 +1000 Subject: [PATCH 1/2] Editorial changes to step2 Setting files --- docs/src/user_guide/step2_settings_file.md | 147 ++++++++++----------- 1 file changed, 72 insertions(+), 75 deletions(-) diff --git a/docs/src/user_guide/step2_settings_file.md b/docs/src/user_guide/step2_settings_file.md index 490679524..97bdb891a 100644 --- a/docs/src/user_guide/step2_settings_file.md +++ b/docs/src/user_guide/step2_settings_file.md @@ -1,17 +1,17 @@ # [Step 2: Preparing the settings file](@id config_toml) -A settings file is essential for wflow, as it contains information on the model +A settings file is essential for wflow, as it contains information about the model configuration, simulation period, input files, and parameters. The settings are provided in a TOML file. The settings file is structured in several sections, which are explained below. -The filepaths that are provided in this file are relative to the location of the TOML file, -or to `dir_input` and `dir_output` if they are given. +The file paths provided in this file are relative to the location of the TOML file, +or to `dir_input` and `dir_output` if they are specified. ## General time info -Time information is optional. When left out, for each timestamp in the forcing netCDF wflow -will do computations, except for the first forcing timestamp that is considered equal to the +Time information is optional. When omitted, wflow +will perform computations for each timestamp in the forcing netCDF file, except for the first forcing timestamp, which is considered equal to the initial conditions of the wflow model (state time). If you wish to calculate a subset of this time range, or a different timestep, you can specify a `starttime`, `endtime` and -`timestepsecs` yourself. The `starttime` is defined as the model state time. In the TOML -file settings below the `starttime` is 2000-01-01T00:00:00 (state time) and the first update +`timestepsecs`. The `starttime` is defined as the model state time. In the TOML +file settings below, the `starttime` is 2000-01-01T00:00:00 (state time) and the first update (and output) of the wflow model is at 2000-01-02T00:00:00. The `time_units` optional information is used by the `writer` of the model, for model output in netCDF format. The `calendar` option allows you to calculate in one of the different [CF conventions @@ -21,19 +21,19 @@ is useful if you want to calculate climate scenarios which are sometimes provide alternative calendars. ```toml -calendar = "standard" # optional, this is default value +calendar = "standard" # optional, this is the default value starttime = 2000-01-01T00:00:00 # optional, default from forcing netCDF endtime = 2000-02-01T00:00:00 # optional, default from forcing netCDF -time_units = "days since 1900-01-01 00:00:00" # optional, this is default value +time_units = "days since 1900-01-01 00:00:00" # optional, this is the default value timestepsecs = 86400 # optional, default from forcing netCDF dir_input = "data/input" # optional, default is the path of the TOML dir_output = "data/output" # optional, default is the path of the TOML ``` ## [Logging](@id logging_toml) -Wflow emits logging messages at various levels such as debug, info, and error. These get -sent to both the terminal as well as a log file. Note that logging to a file is only part of -the `Wflow.run(tomlpath::AbstractString)` method. If you want to debug an issue it can be +Wflow prints logging messages at various levels such as debug, info, and error. These messages are +sent to both the terminal and a log file. Note that logging to a file is only part of +the `Wflow.run(tomlpath::AbstractString)` method. If you want to debug an issue, it can be helpful to set `loglevel = "debug"` in the TOML. To avoid flooding the screen, debug messages are only sent to the log file. The following settings will affect the logging: @@ -44,15 +44,15 @@ path_log = "log.txt" # optional, default is "log.txt" fews_run = false # optional, default value is false ``` -`silent` avoids logging to the terminal, and only writes the log file. `loglevel` controls -which levels are filtered out, so the default setting `"info"` does not show any debug level -messages. Note that for finer control, you can also pass an integer log level, see Julia's +`silent` avoids logging to the terminal, and only writes to the log file. `loglevel` controls +which levels are filtered out; for instance, the default setting `"info"` does not print any debug-level +messages. Note that for finer control, you can also pass an integer log level. For details, see Julia's [Logging](https://docs.julialang.org/en/v1/stdlib/Logging/#Log-event-structure) documentation. `path_log` sets the desired output path for the log file. For information -regarding `fews_run`, see [Run from Delft-FEWS](@ref run_fews). +on `fews_run`, see [Run from Delft-FEWS](@ref run_fews). ## Model section -Model specific settings can be included in the model section of the TOML file. +Model-specific settings can be included in the model section of the TOML file. ```toml [model] @@ -62,7 +62,7 @@ snow = false # include snow modelling, default is false reinit = true # cold (reinit = true) or warm state (reinit = false), default is true reservoirs = false # include reservoir modelling, default is false kin_wave_iteration = false # enable kinematic wave iterations in the model, default is false -thicknesslayers = [100, 300, 800] # specific SBM setting: for each soil layer a thickness [mm] is specified +thicknesslayers = [100, 300, 800] # specific SBM setting: for each soil layer, a thickness [mm] is specified min_streamorder_river = 5 # minimum stream order to delineate subbasins for river domain, default is 6 (for multi-threading computing purposes) min_streamorder_land = 4 # minimum stream order to delineate subbasins for land domain, default is 5 (for multi-threading computing purposes) @@ -70,7 +70,7 @@ min_streamorder_land = 4 # minimum stream order to delineate subbasin ## State options The `state` section in the TOML file provides information about the location of input and -output states of the model. This section is mostly relevant if the model needs to be started +output states of the model. This section is mostly relevant if the model needs to start with a "warm" state (i.e. based on the results of a previous simulation). The example below shows how to save the output states of the current simulation, so it can be used to initialize another model in the future. Details on the settings required to start a model @@ -110,16 +110,16 @@ h_av = "h_av_land" ## Input section The `input` section of the TOML file contains information about the input forcing and model -parameters files (netCDF format). Forcing is applied to the vertical component of the model, +parameters files (in netCDF format). Forcing is applied to the vertical component of the model, and needs to be mapped to the external netCDF variable name. `forcing` lists the internal model forcing parameters, and these are mapped to the external netCDF variables listed under the section `[input.vertical]`. It is possible to provide cyclic parameters to the model -(minimum time step of 1 day). In the example below this is done for the internal -`vertical.leaf_area_index` model parameter, that is linked to the external netCDF variable -"LAI" variable. Cyclic time inputs of parameters can be different (for example daily and +(minimum time step of 1 day). In the example below, the internal +`vertical.leaf_area_index` model parameter is mapped to the external netCDF variable +"LAI" variable. Cyclic time inputs of parameters can be different (e.g., daily or monthly). The `time` dimension name of these cylic input parameters in the model parameter netCDF file should start with "time". If a model parameter is not mapped, a default value -will be used if available. +will be used, if available. ```toml [input] @@ -143,7 +143,7 @@ forcing = [ cyclic = ["vertical.leaf_area_index"] -[input.vertical] # Map internal model variable/parameter names to names of the variables in the netCDF files +[input.vertical] # Map internal model variable/parameter names to variable names in the netCDF files altitude = "wflow_dem" c = "c" cf_soil = "cf_soil" @@ -192,23 +192,22 @@ slope = "Slope" ## Output netCDF section ### Grid data -This optional section of the TOML file contains the output netCDF file for writing gridded -model output, including a mapping between internal model parameter components and external +This optional section of the TOML file specifies the output netCDF file for writing gridded +model output. It includes a mapping between internal model parameter components and external netCDF variables. -To limit the size of the resulting netCDF file, file compression can be enabled. This causes -an increase in computational time, but can significantly reduce the file size of the netCDF -file. This can be enabled by setting the `compressionlevel` variable to any value between -`0` and `9`. A setting of `0` indicates that compression is not enabled, and values between -1 and 9 indicate different levels of compression (1: least compression, smallest impact on -run time, 9: highest compression level, biggest impact on run times). If file size becomes -an issue, we recommend using a value of `1`, as higher compression levels generally have -only a limited effect on the file size. +To limit the size of the resulting netCDF file, file compression can be enabled. Compression +increases computational time but can significantly reduce the size of the netCDF +file. Set the `compressionlevel` variable to a value between +`0` and `9`. A setting of `0` means no compression, while values between +1 and 9 indicate increasing levels of compression (1: least compression, minimal run-time impact, 9: highest compression, maximum run-time impact). If file size is a concern, +we recommend using a value of `1`, as higher compression levels generally have +a limited effect on file size. ```toml [output] path = "output_moselle.nc" # Location of the output file -compressionlevel = 1 # Amount of compression (default 0) +compressionlevel = 1 # Compression level (default 0) [output.vertical] # Mapping of names between internal model components and external netCDF variables satwaterdepth = "satwaterdepth" @@ -234,36 +233,35 @@ h = "h_land" ``` ### Scalar data -Besides gridded data, it is also possible to write scalar data to a netCDF file. Below is an -example that writes scalar data to the file "output\_scalar\_moselle.nc". For each netCDF -variable a `name` (external variable name) and `parameter` (internal model parameter) is -required. A `reducer` can be specified to apply to the model output, see for more -information the following section [Output CSV section](@ref). When a `map` is provided to -extract data for certain locations (e.g. `gauges`) or areas (e.g. `subcatchment`), the +In addition to gridded data, scalar data can also be written to a netCDF file. Below is an +example that shows how to write scalar data to the file "output\_scalar\_moselle.nc". For each netCDF +variable, a `name` (external variable name) and a `parameter` (internal model parameter) are +required. A `reducer` can be specified to apply to the model output. See more details in +the [Output CSV section](@ref) section. If a `map` is provided to +extract data for specific locations (e.g. `gauges`) or areas (e.g. `subcatchment`), the netCDF location names are extracted from these maps. For a specific location (grid cell) a `location` is required. For layered model parameters and variables that have an extra -dimension `layer` and are part of the vertical `sbm` concept it is possible to specify an -internal layer index (see also example below). For model parameters and variables that have -an extra dimension `classes` and are part of the vertical `FLEXTopo` concept it is possible -to specify the class name. If multiple layers or classes are desired, this can be specified -in separate `[[netcdf.variable]]` entries. Note that the specification of the extra -dimension is not optional when wflow is integrated with Delft-FEWS, for netCDF scalar data +`layer` dimension and are part of the vertical `sbm` concept, an +internal layer index can be specified (an example is provided below). Similarly, for model parameters and variables that have +an extra dimension `classes` and are part of the vertical `FLEXTopo` concept, the class name can be specified. If multiple layers or classes are desired, this can be specified +in separate `[[netcdf.variable]]` entries. Note that the additional +dimension should be specified when wflow is integrated with Delft-FEWS, for netCDF scalar data an extra dimension is not allowed by the `importNetcdfActivity` of the Delft-FEWS General Adapter. In the section [Output CSV section](@ref), similar functionality is available for -CSV. For integration with Delft-FEWS, see also [Run from Delft-FEWS](@ref run_fews), it is -recommended to write scalar data to netCDF format since the General Adapter of Delft-FEWS -can ingest this data format directly. +CSV. For integration with Delft-FEWS, it is +recommended to write scalar data to netCDF format, as the General Adapter of Delft-FEWS +can directly ingest data from netCDF files. For more information, see [Run from Delft-FEWS](@ref run_fews). ```toml [netcdf] path = "output_scalar_moselle.nc" # Location of the results -[[netcdf.variable]] # Extract the values of lateral.river.q using the gauges map, and assigning it with the name 'Q' as variable to the netCDF +[[netcdf.variable]] # Extract the values of lateral.river.q using the gauges map, and assign it with the name 'Q' as a variable in the netCDF file name = "Q" map = "gauges" parameter = "lateral.river.q" -[[netcdf.variable]] # Using coordinates to extract the temperature +[[netcdf.variable]] # Using coordinates to extract temperature coordinate.x = 6.255 coordinate.y = 50.012 name = "vwc_layer2_bycoord" @@ -271,7 +269,7 @@ location = "vwc_bycoord" parameter = "vertical.vwc" layer = 2 -[[netcdf.variable]] # Using indices to extract the temperature +[[netcdf.variable]] # Using indices to extract temperature location = "temp_byindex" name = "temp_index" index.x = 100 @@ -280,9 +278,9 @@ parameter = "vertical.temperature" ``` ## Output CSV section -Model output can also be written to CSV output. Below is an example that writes model output -to the file "output_moselle.csv". For each CSV column a `header` and `parameter` (internal -model parameter) is required. A `reducer` can be specified to apply to the model output, +Model output can also be written to a CSV file. Below is an example that writes model output +to the file "output_moselle.csv". For each CSV column, a `header` and `parameter` (internal +model parameter) are required. A `reducer` can be specified to apply to the model output, with the following available reducers: + maximum @@ -296,18 +294,18 @@ with the following available reducers: with `only` as the default. To extract data for a specific location (grid cell), the `index` of the vector, the coordinates `coordinate.x` and `coordinate.y`, or the x and y indices of -the 2D array (`index.x` and `index.y`) can be provided. Finally a `map` can be provided to +the 2D array (`index.x` and `index.y`) can be provided. Additionally, a `map` can be provided to extract data for certain locations (e.g. `gauges`) or areas (e.g. `subcatchment`). In this -case a single entry can lead to multiple columns in the CSV file, which will be of the form +case, a single entry can lead to multiple columns in the CSV file, which will be of the form `header_id`, e.g. `Q_20`, for a gauge with integer ID 20. For layered model parameters and variables that have an extra dimension `layer` and are part of the vertical `sbm` concept an internal layer index (see also example below) should be specified. For model parameters and variables that have an extra dimension `classes` and are part of the vertical `FLEXTopo` -concept it is possible to specify the class name. If multiple layers or classes are desired, +concept, it is possible to specify the class name. If multiple layers or classes are desired, this can be specified in separate `[[csv.column]]` entries. -The double brackets in `[[csv.column]]` is TOML syntax to indicate that it is part of a -list. You may specify as many entries as you wish. +The double brackets in `[[csv.column]]` follow TOML syntax, indicating that it is part of a +list. You can specify as many entries as you want. ```toml [csv] @@ -358,11 +356,11 @@ reducer = "mean" It is possible to modify model parameters and forcing through the TOML file. Two options to modify input parameters are available: -- Set an input parameter (static) to an uniform value. -- Modify an input parameter (cyclic and static) or forcing variable through the use of a +- Set an input parameter (static) to a uniform value. +- Modify an input parameter (cyclic and static) or forcing variable using a `scale` factor and `offset`. -To set for example the input parameter `cfmax` to an uniform value of 2.5: +For example, to set the input parameter `cfmax` to an uniform value of 2.5: ```toml [input.vertical] @@ -371,9 +369,9 @@ waterfrac = "WaterFrac" cfmax.value = 2.5 ``` -For input parameters with an extra dimension (e.g. `layer` or `classes`) one uniform value -can be provided or a list of values that should be equal to the length of the extra -dimension. For example, for input parameter `c`, a list of values can be provided as +For input parameters with an extra dimension (e.g. `layer` or `classes`), one uniform value +can be provided or a list of values that matches the length of the additional +dimension. For example, a list of values can be provided for input parameter `c` as follows: ```toml @@ -383,7 +381,7 @@ waterfrac = "WaterFrac" c.value = [10.5, 11.25, 9.5, 7.0] ``` -To change for example the forcing variable `precipitation` with a `scale` factor of 1.5 and +To change the forcing variable `precipitation` with a `scale` factor of 1.5 and an `offset` of 0.5: ```toml @@ -393,8 +391,8 @@ scale = 1.5 offset = 0.5 ``` -For input parameters with an extra dimension it is also possible to modify multiple indices -at once with different `scale` and `offset` values. In the example below the external +For input parameters with an extra dimension, it is also possible to modify multiple indices +simultaneously with different `scale` and `offset` values. In the example below, the external netCDF variable `c` is modified at `layer` index 1 and 2, with a `scale` factor of 2.0 and 1.5 respectively, and an `offset` of 0.0 for both indices: @@ -407,8 +405,7 @@ layer = [1, 2] ``` ## Fixed forcing values -It is possible to set fixed values for forcing parameters through the TOML file. To set for -example `temperature` to a fixed value of 10 ``\degree``C, the complete `forcing` list is +It is possible to set fixed values for forcing parameters through the TOML file. For example, to set `temperature` to a fixed value of 10 ``\degree``C, the complete `forcing` list is required: ```toml @@ -422,8 +419,8 @@ forcing = [ value = 10 ``` -Note that the mapping to the external netCDF variable listed under the section -`[input.vertical]` needs to be removed or commented out: +Note that the mapping to the external netCDF variable listed under the +`[input.vertical]` section needs to be removed or commented out: ```toml [input.vertical] From 1a0b461a83bf5ad3723e51f28c8e335120867344 Mon Sep 17 00:00:00 2001 From: Willem van Verseveld Date: Thu, 12 Sep 2024 08:33:13 +0200 Subject: [PATCH 2/2] Rewrap text --- docs/src/user_guide/step2_settings_file.md | 172 +++++++++++---------- 1 file changed, 87 insertions(+), 85 deletions(-) diff --git a/docs/src/user_guide/step2_settings_file.md b/docs/src/user_guide/step2_settings_file.md index 97bdb891a..158f3ada1 100644 --- a/docs/src/user_guide/step2_settings_file.md +++ b/docs/src/user_guide/step2_settings_file.md @@ -2,23 +2,23 @@ A settings file is essential for wflow, as it contains information about the model configuration, simulation period, input files, and parameters. The settings are provided in a TOML file. The settings file is structured in several sections, which are explained below. -The file paths provided in this file are relative to the location of the TOML file, -or to `dir_input` and `dir_output` if they are specified. +The file paths provided in this file are relative to the location of the TOML file, or to +`dir_input` and `dir_output` if they are specified. ## General time info -Time information is optional. When omitted, wflow -will perform computations for each timestamp in the forcing netCDF file, except for the first forcing timestamp, which is considered equal to the -initial conditions of the wflow model (state time). If you wish to calculate a subset of -this time range, or a different timestep, you can specify a `starttime`, `endtime` and -`timestepsecs`. The `starttime` is defined as the model state time. In the TOML -file settings below, the `starttime` is 2000-01-01T00:00:00 (state time) and the first update -(and output) of the wflow model is at 2000-01-02T00:00:00. The `time_units` optional -information is used by the `writer` of the model, for model output in netCDF format. The -`calendar` option allows you to calculate in one of the different [CF conventions -calendars](http://cfconventions.org/cf-conventions/cf-conventions.html#calendar) provided by -the [CFTime.jl package](https://juliageo.org/CFTime.jl/latest/), such as `"360_day"`. This -is useful if you want to calculate climate scenarios which are sometimes provided in these -alternative calendars. +Time information is optional. When omitted, wflow will perform computations for each +timestamp in the forcing netCDF file, except for the first forcing timestamp, which is +considered equal to the initial conditions of the wflow model (state time). If you wish to +calculate a subset of this time range, or a different timestep, you can specify a +`starttime`, `endtime` and `timestepsecs`. The `starttime` is defined as the model state +time. In the TOML file settings below, the `starttime` is 2000-01-01T00:00:00 (state time) +and the first update (and output) of the wflow model is at 2000-01-02T00:00:00. The +`time_units` optional information is used by the `writer` of the model, for model output in +netCDF format. The `calendar` option allows you to calculate in one of the different [CF +conventions calendars](http://cfconventions.org/cf-conventions/cf-conventions.html#calendar) +provided by the [CFTime.jl package](https://juliageo.org/CFTime.jl/latest/), such as +`"360_day"`. This is useful if you want to calculate climate scenarios which are sometimes +provided in these alternative calendars. ```toml calendar = "standard" # optional, this is the default value @@ -31,10 +31,10 @@ dir_output = "data/output" # optional, default is the path ``` ## [Logging](@id logging_toml) -Wflow prints logging messages at various levels such as debug, info, and error. These messages are -sent to both the terminal and a log file. Note that logging to a file is only part of -the `Wflow.run(tomlpath::AbstractString)` method. If you want to debug an issue, it can be -helpful to set `loglevel = "debug"` in the TOML. To avoid flooding the screen, debug +Wflow prints logging messages at various levels such as debug, info, and error. These +messages are sent to both the terminal and a log file. Note that logging to a file is only +part of the `Wflow.run(tomlpath::AbstractString)` method. If you want to debug an issue, it +can be helpful to set `loglevel = "debug"` in the TOML. To avoid flooding the screen, debug messages are only sent to the log file. The following settings will affect the logging: ```toml @@ -44,12 +44,13 @@ path_log = "log.txt" # optional, default is "log.txt" fews_run = false # optional, default value is false ``` -`silent` avoids logging to the terminal, and only writes to the log file. `loglevel` controls -which levels are filtered out; for instance, the default setting `"info"` does not print any debug-level -messages. Note that for finer control, you can also pass an integer log level. For details, see Julia's +`silent` avoids logging to the terminal, and only writes to the log file. `loglevel` +controls which levels are filtered out; for instance, the default setting `"info"` does not +print any debug-level messages. Note that for finer control, you can also pass an integer +log level. For details, see Julia's [Logging](https://docs.julialang.org/en/v1/stdlib/Logging/#Log-event-structure) -documentation. `path_log` sets the desired output path for the log file. For information -on `fews_run`, see [Run from Delft-FEWS](@ref run_fews). +documentation. `path_log` sets the desired output path for the log file. For information on +`fews_run`, see [Run from Delft-FEWS](@ref run_fews). ## Model section Model-specific settings can be included in the model section of the TOML file. @@ -70,13 +71,12 @@ min_streamorder_land = 4 # minimum stream order to delineate subbasin ## State options The `state` section in the TOML file provides information about the location of input and -output states of the model. This section is mostly relevant if the model needs to start -with a "warm" state (i.e. based on the results of a previous simulation). The example below -shows how to save the output states of the current simulation, so it can be used to -initialize another model in the future. Details on the settings required to start a model -with a warm state can be found in the [additional model options](@ref reinit). If it is not -required to store the outstates of the current simulation, the entire `state` section can be -removed. +output states of the model. This section is mostly relevant if the model needs to start with +a "warm" state (i.e. based on the results of a previous simulation). The example below shows +how to save the output states of the current simulation, so it can be used to initialize +another model in the future. Details on the settings required to start a model with a warm +state can be found in the [additional model options](@ref reinit). If it is not required to +store the outstates of the current simulation, the entire `state` section can be removed. ```toml [state] @@ -110,16 +110,16 @@ h_av = "h_av_land" ## Input section The `input` section of the TOML file contains information about the input forcing and model -parameters files (in netCDF format). Forcing is applied to the vertical component of the model, -and needs to be mapped to the external netCDF variable name. `forcing` lists the internal -model forcing parameters, and these are mapped to the external netCDF variables listed under -the section `[input.vertical]`. It is possible to provide cyclic parameters to the model -(minimum time step of 1 day). In the example below, the internal -`vertical.leaf_area_index` model parameter is mapped to the external netCDF variable -"LAI" variable. Cyclic time inputs of parameters can be different (e.g., daily or -monthly). The `time` dimension name of these cylic input parameters in the model parameter -netCDF file should start with "time". If a model parameter is not mapped, a default value -will be used, if available. +parameters files (in netCDF format). Forcing is applied to the vertical component of the +model, and needs to be mapped to the external netCDF variable name. `forcing` lists the +internal model forcing parameters, and these are mapped to the external netCDF variables +listed under the section `[input.vertical]`. It is possible to provide cyclic parameters to +the model (minimum time step of 1 day). In the example below, the internal +`vertical.leaf_area_index` model parameter is mapped to the external netCDF variable "LAI" +variable. Cyclic time inputs of parameters can be different (e.g., daily or monthly). The +`time` dimension name of these cylic input parameters in the model parameter netCDF file +should start with "time". If a model parameter is not mapped, a default value will be used, +if available. ```toml [input] @@ -197,12 +197,12 @@ model output. It includes a mapping between internal model parameter components netCDF variables. To limit the size of the resulting netCDF file, file compression can be enabled. Compression -increases computational time but can significantly reduce the size of the netCDF -file. Set the `compressionlevel` variable to a value between -`0` and `9`. A setting of `0` means no compression, while values between -1 and 9 indicate increasing levels of compression (1: least compression, minimal run-time impact, 9: highest compression, maximum run-time impact). If file size is a concern, -we recommend using a value of `1`, as higher compression levels generally have -a limited effect on file size. +increases computational time but can significantly reduce the size of the netCDF file. Set +the `compressionlevel` variable to a value between `0` and `9`. A setting of `0` means no +compression, while values between 1 and 9 indicate increasing levels of compression (1: +least compression, minimal run-time impact, 9: highest compression, maximum run-time +impact). If file size is a concern, we recommend using a value of `1`, as higher compression +levels generally have a limited effect on file size. ```toml [output] @@ -234,23 +234,24 @@ h = "h_land" ### Scalar data In addition to gridded data, scalar data can also be written to a netCDF file. Below is an -example that shows how to write scalar data to the file "output\_scalar\_moselle.nc". For each netCDF -variable, a `name` (external variable name) and a `parameter` (internal model parameter) are -required. A `reducer` can be specified to apply to the model output. See more details in -the [Output CSV section](@ref) section. If a `map` is provided to -extract data for specific locations (e.g. `gauges`) or areas (e.g. `subcatchment`), the -netCDF location names are extracted from these maps. For a specific location (grid cell) a -`location` is required. For layered model parameters and variables that have an extra -`layer` dimension and are part of the vertical `sbm` concept, an -internal layer index can be specified (an example is provided below). Similarly, for model parameters and variables that have -an extra dimension `classes` and are part of the vertical `FLEXTopo` concept, the class name can be specified. If multiple layers or classes are desired, this can be specified -in separate `[[netcdf.variable]]` entries. Note that the additional -dimension should be specified when wflow is integrated with Delft-FEWS, for netCDF scalar data -an extra dimension is not allowed by the `importNetcdfActivity` of the Delft-FEWS General -Adapter. In the section [Output CSV section](@ref), similar functionality is available for -CSV. For integration with Delft-FEWS, it is -recommended to write scalar data to netCDF format, as the General Adapter of Delft-FEWS -can directly ingest data from netCDF files. For more information, see [Run from Delft-FEWS](@ref run_fews). +example that shows how to write scalar data to the file "output\_scalar\_moselle.nc". For +each netCDF variable, a `name` (external variable name) and a `parameter` (internal model +parameter) are required. A `reducer` can be specified to apply to the model output. See more +details in the [Output CSV section](@ref) section. If a `map` is provided to extract data +for specific locations (e.g. `gauges`) or areas (e.g. `subcatchment`), the netCDF location +names are extracted from these maps. For a specific location (grid cell) a `location` is +required. For layered model parameters and variables that have an extra `layer` dimension +and are part of the vertical `sbm` concept, an internal layer index can be specified (an +example is provided below). Similarly, for model parameters and variables that have an extra +dimension `classes` and are part of the vertical `FLEXTopo` concept, the class name can be +specified. If multiple layers or classes are desired, this can be specified in separate +`[[netcdf.variable]]` entries. Note that the additional dimension should be specified when +wflow is integrated with Delft-FEWS, for netCDF scalar data an extra dimension is not +allowed by the `importNetcdfActivity` of the Delft-FEWS General Adapter. In the section +[Output CSV section](@ref), similar functionality is available for CSV. For integration with +Delft-FEWS, it is recommended to write scalar data to netCDF format, as the General Adapter +of Delft-FEWS can directly ingest data from netCDF files. For more information, see [Run +from Delft-FEWS](@ref run_fews). ```toml [netcdf] @@ -294,15 +295,16 @@ with the following available reducers: with `only` as the default. To extract data for a specific location (grid cell), the `index` of the vector, the coordinates `coordinate.x` and `coordinate.y`, or the x and y indices of -the 2D array (`index.x` and `index.y`) can be provided. Additionally, a `map` can be provided to -extract data for certain locations (e.g. `gauges`) or areas (e.g. `subcatchment`). In this -case, a single entry can lead to multiple columns in the CSV file, which will be of the form -`header_id`, e.g. `Q_20`, for a gauge with integer ID 20. For layered model parameters and -variables that have an extra dimension `layer` and are part of the vertical `sbm` concept an -internal layer index (see also example below) should be specified. For model parameters and -variables that have an extra dimension `classes` and are part of the vertical `FLEXTopo` -concept, it is possible to specify the class name. If multiple layers or classes are desired, -this can be specified in separate `[[csv.column]]` entries. +the 2D array (`index.x` and `index.y`) can be provided. Additionally, a `map` can be +provided to extract data for certain locations (e.g. `gauges`) or areas (e.g. +`subcatchment`). In this case, a single entry can lead to multiple columns in the CSV file, +which will be of the form `header_id`, e.g. `Q_20`, for a gauge with integer ID 20. For +layered model parameters and variables that have an extra dimension `layer` and are part of +the vertical `sbm` concept an internal layer index (see also example below) should be +specified. For model parameters and variables that have an extra dimension `classes` and are +part of the vertical `FLEXTopo` concept, it is possible to specify the class name. If +multiple layers or classes are desired, this can be specified in separate `[[csv.column]]` +entries. The double brackets in `[[csv.column]]` follow TOML syntax, indicating that it is part of a list. You can specify as many entries as you want. @@ -357,8 +359,8 @@ It is possible to modify model parameters and forcing through the TOML file. Two modify input parameters are available: - Set an input parameter (static) to a uniform value. -- Modify an input parameter (cyclic and static) or forcing variable using a - `scale` factor and `offset`. +- Modify an input parameter (cyclic and static) or forcing variable using a `scale` factor + and `offset`. For example, to set the input parameter `cfmax` to an uniform value of 2.5: @@ -370,9 +372,8 @@ cfmax.value = 2.5 ``` For input parameters with an extra dimension (e.g. `layer` or `classes`), one uniform value -can be provided or a list of values that matches the length of the additional -dimension. For example, a list of values can be provided for input parameter `c` as -follows: +can be provided or a list of values that matches the length of the additional dimension. For +example, a list of values can be provided for input parameter `c` as follows: ```toml [input.vertical] @@ -392,9 +393,9 @@ offset = 0.5 ``` For input parameters with an extra dimension, it is also possible to modify multiple indices -simultaneously with different `scale` and `offset` values. In the example below, the external -netCDF variable `c` is modified at `layer` index 1 and 2, with a `scale` factor of 2.0 and -1.5 respectively, and an `offset` of 0.0 for both indices: +simultaneously with different `scale` and `offset` values. In the example below, the +external netCDF variable `c` is modified at `layer` index 1 and 2, with a `scale` factor of +2.0 and 1.5 respectively, and an `offset` of 0.0 for both indices: ```toml [input.vertical.c] @@ -405,8 +406,9 @@ layer = [1, 2] ``` ## Fixed forcing values -It is possible to set fixed values for forcing parameters through the TOML file. For example, to set `temperature` to a fixed value of 10 ``\degree``C, the complete `forcing` list is -required: +It is possible to set fixed values for forcing parameters through the TOML file. For +example, to set `temperature` to a fixed value of 10 ``\degree``C, the complete `forcing` +list is required: ```toml forcing = [ @@ -419,8 +421,8 @@ forcing = [ value = 10 ``` -Note that the mapping to the external netCDF variable listed under the -`[input.vertical]` section needs to be removed or commented out: +Note that the mapping to the external netCDF variable listed under the `[input.vertical]` +section needs to be removed or commented out: ```toml [input.vertical]