.. _wind-and-solar-label: ============== Wind and Solar ============== .. .. manim-slides:: MySlide .. :hide_source: .. :config_options: slide_number=true controls=true .. from manim import * .. from manim_slides import Slide .. class MySlide(Slide): .. def construct(self): .. text = Text("Hello") .. self.wipe([], text) .. self.next_slide() .. self.play(text.animate.scale(2)) .. self.next_slide() .. self.zoom(text) .. .. manim-slides:: BasicExample .. :hide_source: .. :config_options: slide_number=true controls=true .. class BasicExample(Slide): .. def construct(self): .. circle = Circle(radius=3, color=BLUE) .. dot = Dot() .. self.play(GrowFromCenter(circle)) .. self.next_slide() # Waits user to press continue to go to the next slide .. self.next_slide(loop=True) # Start loop .. self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear) .. self.next_slide() # This will start a new non-looping slide .. self.play(dot.animate.move_to(ORIGIN)) .. .. manim-slides:: CreateCircle .. :hide_source: .. :config_options: slide_number=true controls=true .. class CreateCircle(Slide): .. def construct(self): .. circle = Circle() # create a circle .. circle.set_fill(PINK, opacity=0.5) # set the color and transparency .. self.play(Create(circle)) # show the circle on screen .. self.next_slide() Wind and Solar power are semantically different, but for LTM those are identical. For the LTM API project they are distinct types and will be treated as such, but shares a common base. .. contents:: :depth: 3 .. mermaid:: flowchart TD inext(External timeseries input) inth5(Internal HDF5 file) resh5(Internal HDF5 results file) outext(External timeseries output) inext --> model --api--> inth5 --> LTM --> resh5 resh5 --api--> outext Two main methods of providing data. * One-dimensional timeseries spanning the whole historical period, using the historical timestamp as key. * Two-dimensional matrix with scenarios per historical year, using the data period timestamp as key. Two input modes, 1D or 2D, slightly different data capture and conversion based on the type of input data. For 1D input data, scenarios/historical years uses a sliding window, while 2D-input data uses all available data defined. For 2D data, the time series timestamp is "stuck" to the first scenario. IE, all data is defined for 2024->2027. While for 1D data, there is a continuous series, IE, 1931->1981. Example JSON with ``wind`` and ``solar``: .. code-block:: json { "model": { "wind": [ { "#comment": "Gruppe 18 1D", "name": "NORDSJO_1D", "capacity": { "external_reference": { "type": "hdf5", "filename": "wind_series.h5", "path": "/wind/geitgalgjartind_1d" } } }, { "#comment": "Gruppe 18 2D", "name": "NORDSJO_2D", "capacity": { "external_reference": { "type": "hdf5", "filename": "wind_series.h5", "path": "/wind/geitgalgjartind_2d" } } } ], "solar": [ { "#comment": "Gruppe 18 1D", "name": "DANMARK_1D", "capacity": { "external_reference": { "type": "hdf5", "filename": "wind_series.h5", "path": "/solar/sahara_1d" } } }, { "#comment": "Gruppe 18 2D", "name": "DANMARK_2D", "capacity": { "external_reference": { "type": "hdf5", "filename": "wind_series.h5", "path": "/solar/sahara_2d" } } } ] } } Example of a 2D matrix with data: ================================= By using a 2D matrix as input for wind and solar series ensure complete control over the data. Example matrix: +------------------+------------+------------+-----+-------------+ | Timestamp | Scenario 1 | Scenario 2 | ... | Scenario 50 | +==================+============+============+=====+=============+ | 2024.01.01T00:00 | 0.0 | 1.0 | ... | 3.0 | +------------------+------------+------------+-----+-------------+ | 2024.01.01T01:00 | 4.0 | 5.0 | ... | 7.0 | +------------------+------------+------------+-----+-------------+ | 2024.01.01T02:00 | 8.0 | 9.0 | ... | 9.5 | +------------------+------------+------------+-----+-------------+ | ... | ... | ... | ... | ... | +------------------+------------+------------+-----+-------------+ | 2026.12.27T23:00 | 10.0 | 12.0 | ... | 16.0 | +------------------+------------+------------+-----+-------------+ For 3 years of data and 50 scenarios/historical years, the dimensions are 50 x 26208 (3 years * 52 weeks * 168 hours in week) This period is derived from ``calc_water_value_flag`` key in ``global_settings``. .. code-block:: json "calc_water_value_flag": { "timestamps": [ "2024-01-01T00:00:00Z", "2026-12-28T00:00:00Z" ], "scenarios": [ [ 1, 0 ] ] } Example of a 1D vector with data: ================================= By using a 1D continous series, some data will be repeated. +------------------+-------+ | Timestamp | Value | +==================+=======+ | 1931.01.01T00:00 | 0.0 | +------------------+-------+ | 1931.01.01T01:00 | 4.0 | +------------------+-------+ | 1931.01.01T02:00 | 8.0 | +------------------+-------+ | ... | ... | +------------------+-------+ | 1980.12.31T23:00 | 10.0 | +------------------+-------+ For 50 scenarios/historical years of hourly resolution, the dimension is 1x436800 (50 years * 52 weeks * 168 hours in week) This corresponds to ``historical_period`` in ``global_settings``. .. code-block:: json "historical_period": { "timestamps": [ "1931-01-01T00:00:00Z", "1981-01-01T00:00:00Z" ], "scenarios": [ [ 1, 0 ] ] } .. .. image:: wind-1d-vs-2d.png .. :alt: 1D vs 2D input data Synthetic solar and wind series: ================================ This script creates 1D and 2D series for LTM-API consumption. .. literalinclude:: ../../../tests/create_solar_wind_series.py :language: python