Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
VEZY committed Aug 3, 2022
1 parent 2a0846d commit a4edfc3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@ For more examples, please read the documentation.
- [x] Replace component models by MutableNamedTuples ? It could alleviate the need to implement a different component model when needing a new model as it allows as many fields as we want. A call to a function would need to include the type of the model though ? *e.g.* `energy_balance!(mtnt.energy_balance, mtnt, meteo, constant)`, or we do that in the low-level functions so the use only pass the mtnt. -> solution was to make the call to the low-level functions generic for the models (no constraint on the type), but dispatch on the type of the first argument instead that is the model type for this function. This changes nothing to the high-level functions but make the possibility to provide other things than component models.
- [x] Move the definitions of the abstract models near their processes: e.g. the definition of `AbstractAModel` should be in the `photosynthesis.jl` file.
- [x] Change the way we store parameters, models and status:
- [ ] Add a new struct for the list of models, with two fields: models and status.
- [ ] Models can be a struct, Namedtuple or whatever struct that can be called with `models.process`.
- [ ] The status field must be part of the struct in input of the high-level functions for easy construction, but be passed as an argument to the low-level functions so we avoid the copy(object, object[i]) in the high-level calls.
- [x] Add a new struct for the list of models, with two fields: models and status.
- [x] The status field must be part of the struct in input of the high-level functions for easy construction, but be passed as an argument to the low-level functions so we avoid the copy(object, object[i]) in the high-level calls.
- [x] Make a custom type for status so they are indexable? Maybe use [StaticArrays.jl](https://github.com/JuliaArrays/StaticArrays.jl) instead ? Not sure, `status[i].A = 12` does not modify the array, only `status.A[i] = 12` does, and we will provide status[i] as input to the low-level function so... Or else we get the output of the low level function, and re-assign it to the status: `status[i] = output_status`, but this is not the best solution. Use a dataframe with a view instead for several time steps ? Make a microbenchmark, dataframes should be fast.
- [x] Make sure all functions currently applied to the status are still needed, and if so check if they work.
- [ ] Add a check on the combination of models + status to see if the initialisation is complete, but make it optional (arg `check=true` by default).
- [ ] Add a check on the combination of models + status to see if the initialization is complete, but make it optional (arg `check=true` by default).
- [ ] Make a new `submodels` function for each model that list all models that are used by a model. It can be nothing, an abstract model (e.g. `AbstractAModel`), a concrete model (e.g. `Fvcb`) or any combinations of models (e.g. photosynthesis + stomatal conductance).
- [ ] Make a function to build a tree of models based on the `submodels` outputs.
- [ ] Remove checks on the models when calling the processes functions, and move it to the construction of the group of models and/or to the user with a check function.
Expand Down

2 comments on commit a4edfc3

@VEZY
Copy link
Owner Author

@VEZY VEZY commented on a4edfc3 Aug 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/65603

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.0 -m "<description of version>" a4edfc3751816bd0d7f010ebe644cf7c0c462555
git push origin v0.4.0

Please sign in to comment.