This tool is considered experimental. This means the tool design and functionality is not considered final and may change in a future release without provision for backwards compatibility. Creates a TUFLOW FV project based on the selected template. Templates and defaults can be customised and extended.

### Basic Usage

1. Set the model name
2. Set the model output directory
3. Select a CRS
4. Select a preset
5. Run the tool

### Tool Outputs

1. TUFLOW FV model folder structure
2. Template control files
3. Empty GIS files
4. QGIS project and settings

### Overwrite Existing

If this option is checked on, the tool will overwrite existing control files in the output directory with new template files. That is, the tool will re-copy templates files and any existing files will be overwritten if there is a conflict. If this option is not checked on, existing template files will not be modified and take precedence if there is a conflict.

### Save Settings Globally

If this option is checked on, the settings generated by this tool will be saved globally for all QGIS instances to use. That is, if a QGIS workspace does not have any local project TUFLOW FV settings, the global settings saved by this project will be available.

### Modifying the Presets

The presets can be modified by editing the Value column. Any edits to the preset will be highlighted orange.

#### Variables

The variables section contains common variables such as Hardware, Time Settings, and Roughness Settings. Variables dynamically replace the various settings in the template control files at the tool's run time. Variables can be added to this section by right-clicking "variables" and selecting "+ Add key". However, variables will only affect the output if they are a global variables (like a time setting) or the relevant feature is included. E.g. The variable `initial_sal` (initial salinity) will only be written to the output control files if the "salinity" feature is included. That is, adding a variable does not mean it will be added to the template control file, it is simply overwriting the defaults (found in the "Advanced parameters" section) which may or may not be included in a given preset output.

#### Features

The features section is a list of additional features the will be added to the project. Each feature will have a name variable which is the name of the feature. For example, "outputnc" is the name of the feature that adds an "Output == netcdf" output block. The variables after name are feature specific. If there are no specific variables, only the feature name will appear. New features can be added by right clicking features and selecting add feature....

### Advanced Parameters -> FV Defaults

The FV defaults is a list of all the defaults used by the tool. Not every default is used each time a project template is created, they are only used when a feature that uses them is added. For example, variables related to the 3D module settings (e.g. vertical_mixing_model) are only used with the 3D feature is added. The defaults can also be edited.

### Permanently Modifying the Defaults and Preset Settings

The defaults and presets can be permanently changed to suit the user's taste and preferences. Under the hood this tool is using pytuflow-project. This is tool hightly customisable and the linked documentation goes into detail on how to do this (no Python knowledge required to customise). The buttons offer shortcuts to the relevant folder to where the cached settings are stored. These settings can be freely modified by the user.

- Open defaults folder: Opens the location of the `defaults.json` and `fv_defaults.json` files
- Open features folder: Opens the folder where the cached feature settings are located
- Open presets folder: Opens the folder where the preset settings are located (called "recipes" in pytuflow-project)
- Reload all folders: Click this button once any changes to the cached settings have been made and the dialog will be refreshed with any changes made to the cached files
- Reset defaults: Resets the FV defaults back to the cached settings (removes any modifications made by the user in the dialog)
- Reset active preset: Resets the active preset back to cached settings (removes any modification made by the user in the dialog
- Re-initialise templates: Recopies the settings from PyTUFLOW into the cache folder. This can override any changes made by the user. This may also be required if updates to PyTUFLOW have been made with new settings