Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
finam
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FINAM
finam
Commits
fccdd6c4
Commit
fccdd6c4
authored
2 years ago
by
Martin Lange
Browse files
Options
Downloads
Patches
Plain Diff
add content on units and memory
parent
cc24838f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!241
Performance chapter
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/source/finam-book/development/performance.rst
+27
-2
27 additions, 2 deletions
docs/source/finam-book/development/performance.rst
with
27 additions
and
2 deletions
docs/source/finam-book/development/performance.rst
+
27
−
2
View file @
fccdd6c4
...
...
@@ -16,6 +16,18 @@ Optimizing performance
Units
^^^^^
Avoid unit conversions
""""""""""""""""""""""
FINAM does automatic units conversion in :class:`.Input` objects.
This comes at the cost of computation time.
Conversion of a 1000x1000 grid requires about 1 ms, while a push and pull without a conversion requires about 0.05 ms.
For details, see the `benchmarks <https://git.ufz.de/FINAM/finam/-/tree/main/benchmarks>`_.
Where possible, use the same units in linked components.
Equivalent units have no calculation overhead (e.g. ``mm`` and ``L/m^2``).
Use ``Quantity``
""""""""""""""""
...
...
@@ -112,8 +124,21 @@ Both properties can also be set for individual :class:`.Output` and :class:`.Ada
Reduce time step difference
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aggregate data in components
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Time steps of the same order of magnitude for linked components reduces the requirement for storing large numbers of data arrays.
In many cases, this is most effective when combined with `Aggregating data in components`_.
Aggregating data in components
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Components are not required to push data after every step.
This allows for components that use a sub-step to pull data and aggregate it internally.
This is particularly useful for components with a large time step where inputs are expected
to be an aggregate of many small time steps, like the annual sum of a daily value.
Instead of (or in addition to) using a
:class:`SumOverTime <.adapters.SumOverTime>` or :class:`AvgOverTime <.adapters.AvgOverTime>` adapter,
a component can do the aggregation internally with a daily sub-step.
Benchmarking and profiling
--------------------------
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment