# What recommended format of input parameters/options of a large hydrological model compiled as a Julia Package?

**URL:** https://discourse.julialang.org/t/what-recommended-format-of-input-parameters-options-of-a-large-hydrological-model-compiled-as-a-julia-package/60561
**Category:** Modelling & Simulations
**Tags:** question, input-output
**Created:** [May 5, 2021, 4:12am UTC](https://discourse.julialang.org/t/what-recommended-format-of-input-parameters-options-of-a-large-hydrological-model-compiled-as-a-julia-package/60561 "2021-05-05T04:12:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![JosephPollacco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josephpollacco/32/51404_2.png) [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)
#### Post date: [May 5, 2021, 4:12am UTC](https://discourse.julialang.org/t/what-recommended-format-of-input-parameters-options-of-a-large-hydrological-model-compiled-as-a-julia-package/60561/1 "2021-05-05T04:12:31Z")

</div>

The question is what **format** (e.g. _.csv, .txt_ etc…) would you recommend to read Inputs options/ parameters values of a large model [https://github.com/manaakiwhenua/SoilWater\_ToolBox.git](https://SoilWater-ToolBox) ?

I was informed in [Discourse](https://discourse.julialang.org/t/how-to-make-standard-julia-package-with-input-options-parameters-in-non-compiled-julia-files/60549/3) that when you compile a package you cannot read as an input Julia input files (therefore my method is wrong).

In my current code (below) I would need to convert the _Options_ into a `structure` and read the parameters from a separate input file.

**Current way of reading input files which I need to find an alternative**

```julia
module option
           const HydroModel = :Kosugi # <:Kosugi>*; <:Vangenuchten>; <:BrooksCorey>; <:ClappHornberger>; <:VangenuchtenJules>
           const θrOpt = :Opt # <:Opt> optimises; <:ParamPsd> derive from PSD and uses α1 and α1 from parameters in Param.jl; <:σ_2_θr>	
		   const σ_2_Ψm = :Constrained # <:Constrained> Ψm physical feasible range is computed from σ <:UniqueRelationship> Ψm is computed from σ; <:No> optimisation of σ & Ψm with no constraints
end

```

**The question is what format of input _parameters/options_ will you recommend, which will also inform the user of the different available options e.g. which hydrological model to use `# <:Kosugi>*; <:Vangenuchten>; <:BrooksCorey>; <:ClappHornberger>; <:VangenuchtenJules>`?**

Thanks for sharing your tips,  
Joseph

---

<div class="post-metadata">

### Author: ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)
#### Post date: [May 5, 2021, 5:55am UTC](https://discourse.julialang.org/t/what-recommended-format-of-input-parameters-options-of-a-large-hydrological-model-compiled-as-a-julia-package/60561/2 "2021-05-05T05:55:17Z")

</div>

I’d probably use TOML with [TOML.jl](https://julialang.github.io/TOML.jl/dev/). That is the same format used by Pkg.

---

<div class="post-metadata">

### Author: ![JosephPollacco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josephpollacco/32/51404_2.png) [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)
#### Post date: [May 16, 2021, 10:59pm UTC](https://discourse.julialang.org/t/what-recommended-format-of-input-parameters-options-of-a-large-hydrological-model-compiled-as-a-julia-package/60561/3 "2021-05-16T22:59:55Z")

</div>

As a follow up I posted the following post:  
[How to convert struct 2 TOML?](https://discourse.julialang.org/t/converting-structure-to-toml-back-to-structure/61265)

> [@How to convert TOML file into a Structure and vice versa?](https://discourse.julialang.org/t/converting-structure-to-toml-back-to-structure/61265):
>
> Hi I have a large SoilWater-ToolBox model and I have got all the input , [Parameters](https://github.com/manaakiwhenua/SoilWater_ToolBox/blob/master/src/Param.jl), as a mutable struct. In order to create a package I will need to read the parameters outside the model as recommended in previous post as a TOML. So the question is how to convert the structure into TOML? Then how to read TOML file into a structure? I will be delighted if one can provide me guidance how to perform this task by using the proposed simple structure: mutable struct OPTION transpiration …

Many thanks for any help you may provide
