You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Type of Work
- [x] Patch: X.Y.**Z+1**. **NEGLIGIBLE** visible changes, does not change input or output - OR changes behaviour. Use chore:, refactor: etc
- [ ] Minor: X.**Y+1**.Z. Minor changes, might ADD new input (YAML), or other **backwards-compatible** changes. Use feat:, fix:
- [ ] Major: **X+1**.Y.Z. Major and most likely **BREAKING** changes, wo. backwards compatibility, or removing temporary backwards compatibility functionality. Use ! or BREAKING:.
## Have you remembered and considered?
- [ ] IF FEAT: I have remembered to update documentation
- [ ] IF FIX OR FEAT: I have remembered to update manual changelog (`docs/drafts/next.draft.md`)
- [ ] IF BREAKING: I have remembered to update migration guide (`docs/docs/migration_guides/`)
- [ ] IF BREAKING: I have committed with `BREAKING:` in footer or `!` in header
- [ ] I have added tests (if not, comment why)
- [x] I have used conventional commits syntax (if you squash, make sure that conventional commit is used)
- [ ] I have included the Github issue nr in the footer!
## What is this PR all about?
* Updated Docusaurus from `3.9.2` to `3.10.0` ([release notes here](https://docusaurus.io/blog/releases/3.10))
* Since Docusaurus is moving away from proprietary syntax, heading ids had to be changed ([link](https://docusaurus.io/blog/releases/3.10#strict-heading-ids)). So I ran the command `npx docusaurus write-heading-ids --syntax mdx-comment --migrate` to update all heading ids:
```mdx
-## My Heading {#my-id}
+## My Heading {/* #my-id */}
```
This changed the old ids' syntax, but also created heading ids for all headings. But I think that is a good thing?
* Overriding a couple of transitive dependencies to fix high and moderate vulnerabilities
* `serialize-javascript` version `7.0.5` to fix https://github.com/equinor/ecalc/security/dependabot/59 (overriding the peer dependency is safe [link](facebook/docusaurus#11801 (comment)))
* `lodash-es` version `4.18.1`to fix https://github.com/equinor/ecalc/security/dependabot/62 and https://github.com/equinor/ecalc/security/dependabot/63
## What else did you consider?
We should rename all our `.md` files to `.mdx`, [see documentation here](https://docusaurus.io/blog/releases/3.10#strict-mdx), but this should be done in another PR
## Between the lines?
*`selftest`: Test that eCalc has been successfully...
31
31
*`show`: Command to show information in the model...
32
32
33
-
## `ecalc run`
33
+
## `ecalc run` {/* #ecalc-run */}
34
34
35
35
**Usage**:
36
36
@@ -56,7 +56,7 @@ $ ecalc run [OPTIONS] MODEL_FILE
56
56
*`--date-format-option [0|1|2]`: Date format option. 0: "YYYY-MM-DD HH:MM:SS" (Accepted variant of ISO8601), 1: "YYYYMMDD HH:MM:SS" (ISO8601), 2: "DD.MM.YYYY HH:MM:SS". Default 0 (ISO 8601) [default: 0]
57
57
*`--help`: Show this message and exit.
58
58
59
-
## `ecalc selftest`
59
+
## `ecalc selftest` {/* #ecalc-selftest */}
60
60
61
61
Test that eCalc has been successfully installed
62
62
@@ -70,7 +70,7 @@ $ ecalc selftest [OPTIONS]
70
70
71
71
*`--help`: Show this message and exit.
72
72
73
-
## `ecalc show`
73
+
## `ecalc show` {/* #ecalc-show */}
74
74
75
75
Command to show information in the model or results.
76
76
@@ -89,7 +89,7 @@ $ ecalc show [OPTIONS] COMMAND [ARGS]...
89
89
*`results`: Show results.
90
90
*`yaml`: Show yaml model.
91
91
92
-
### `ecalc show results`
92
+
### `ecalc show results` {/* #ecalc-show-results */}
93
93
94
94
Show results. You need to run eCalc™ before this will be available.
95
95
@@ -110,7 +110,7 @@ $ ecalc show results [OPTIONS]
110
110
*`-f, --output-frequency [NONE|YEAR|MONTH|DAY]`: Frequency of output. Options are DAY, MONTH, YEAR. If not specified, it will give time steps equal to the union of all input given with INFLUENCE_TIME_VECTOR set to True. Down-sampling the result may lead to loss of data, and rates such as MW may not add up to cumulative values [default: NONE]
111
111
*`--help`: Show this message and exit.
112
112
113
-
### `ecalc show yaml`
113
+
### `ecalc show yaml` {/* #ecalc-show-yaml */}
114
114
115
115
Show yaml model. This will show the yaml after processing !include.
Copy file name to clipboardExpand all lines: docs/docs/about/getting_started/cli/faq.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@ description: eCalc FAQ
6
6
While running eCalc as a Unix command-line tool, you may come across seemingly incomprehensible error messages.
7
7
This page tries to explain some common error messages and proposes how to fix them.
8
8
9
-
## Indentation errors
9
+
## Indentation errors {/* #indentation-errors */}
10
10
In YAML, the indentation is very important and specifies the level in the hierarchy for the input.
11
11
If you have the wrong indentation somewhere, you may get both YAML read errors and/or eCalc setup errors.
12
12
13
-
### Error messages due to YAML read problems
13
+
### Error messages due to YAML read problems {/* #error-messages-due-to-yaml-read-problems */}
14
14
The following error messages are common when you have formatting issues in your YAML file:
15
15
16
16
~~~~~~~~text
@@ -27,7 +27,7 @@ while parsing a block mapping in <setupfile>, line <n>, column <m>
27
27
expected <block end>, but found '<block mapping start>'
28
28
~~~~~~~~
29
29
30
-
### Error messages due to invalid eCalc configuration
30
+
### Error messages due to invalid eCalc configuration {/* #error-messages-due-to-invalid-ecalc-configuration */}
31
31
The configuration expects a sub-hierarchy of data. After reading YAML, this data sub-hierarchy would be of object type
32
32
dictionary (dict) and in some cases contain lists or other objects. If invalid data is input, the error message would
33
33
indicate that the type is wrong because it is not a 'dict'/'list' or other type
@@ -40,10 +40,10 @@ None should be instance of 'dict'
40
40
None should be instance of 'list'
41
41
~~~~~~~~
42
42
43
-
### Proposed solution
43
+
### Proposed solution {/* #proposed-solution */}
44
44
Check your YAML setup file for correct indentation and correct format of values for each eCalc key.
45
45
46
-
## Special characters in Unicode
46
+
## Special characters in Unicode {/* #special-characters-in-unicode */}
47
47
eCalc uses [ruamel.yaml](https://pypi.org/project/ruamel.yaml/) to read the YAML setup files. Some (text) files have an encoding not supported and will thus result in an error message.
48
48
49
49
One example of this is an unrecognized "[BOM](https://en.wikipedia.org/wiki/Byte_order_mark)" character in "[UTF-8 Unicode](https://nl.wikipedia.org/wiki/UTF-8)".
@@ -55,7 +55,7 @@ while scanning a simple key in "<setupfile.yml>", line <n>, column 1
Copy file name to clipboardExpand all lines: docs/docs/about/index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ description: Introduction to eCalc documentation
9
9
10
10
The eCalc™ technology is being developed by Equinor within the Technology, Digital and Innovation (TDI) business area.
11
11
12
-
## What is eCalc™?
12
+
## What is eCalc™? {/* #what-is-ecalc */}
13
13
eCalc™ is a software tool for calculation of energy demand and greenhouse gas emissions from oil and gas production and processing. It enables the cross-disciplinary collaboration required to achieve high-quality and transparent energy and GHG emission prognosis and decision support.
14
14
15
15
eCalc™ performs energy and emission calculations by integrating data, knowledge and future plans from different disciplines. This could be production and injection profiles from the reservoir engineer, characteristics of energy consuming equipment units such as gas turbines, compressors and pumps from the facility engineer, and emission factors for different fuels from the sustainability engineer. The main idea is using physical or data-driven models to relate production rates and pressures to the required processing energy and resulting emissions. Integrated bookkeeping for all emission sources is offered.
@@ -19,10 +19,10 @@ eCalc™ uses a bottom-up approach to give high-quality installation and portfol
19
19

20
20
21
21
22
-
### Why should I use eCalc™?
22
+
### Why should I use eCalc™? {/* #why-should-i-use-ecalc */}
23
23
By using eCalc™ you will be able to forecast your energy consumption and emissions with consistency and transparency. You will also be enabled to study the effect on energy demand and emissions of your investment opportunities as well as studying emission reduction measures.
24
24
25
-
### How to use eCalc™?
25
+
### How to use eCalc™? {/* #how-to-use-ecalc */}
26
26
To use eCalc™ you need to create a model setup of your asset.
27
27
This is described in the [Modelling](/about/modelling/index.md) section.
- If you have been using `GENERIC_FROM_INPUT` in a `SIMPLIFIED_COMPRESSOR_TRAIN` either directly or indirectly (e.g. through `COMPRESSOR_WITH_TURBINE`), you
#### Migrate ADJUSTMENT section for FACILITY_INPUTS
11
+
#### Migrate ADJUSTMENT section for FACILITY_INPUTS {/* #migrate-adjustment-section-for-facility_inputs */}
12
12
13
13
If you have been using [ADJUSTMENT](../references/ADJUSTMENT) section for `FACILITY_INPUTS`, you will need to adjust your input data accordingly, as this section has been removed in v13.0).
This doc guides you through migrating an existing eCalc™ model from version v7 to v8.
19
19
20
20
We try to make this as easy as possible, and provide a step-by-step migration guide.
21
21
22
-
### Main differences
22
+
### Main differences {/* #main-differences */}
23
23
1. All component names must be unique to avoid ambiguity in reporting
24
24
2. UNITS are required when setting up compressor and pump charts
25
25
3. Restrict allowed characters in component names and emission names
26
26
4. NAME no longer used for LTP reporting, use CATEGORY instead
27
27
5. Not possible to use custom category names, pre-defined categories must be uppercase with hyphen as separator (i.e. FUEL-GAS)
28
28
29
-
#### 1. All component names must be unique
29
+
#### 1. All component names must be unique {/*#1-all-component-names-must-be-unique */}
30
30
31
31
All component names must be unique in order to avoid ambiguity in reporting. Components include asset/ecalc-model, installation,
32
32
generator sets, electricity consumers, fuel consumers and direct emitters.
@@ -141,7 +141,7 @@ CATEGORY:
141
141
See [Power from shore](../modelling/setup/installations/generator_sets_in_calculations.md#power-from-shore) for more information.
142
142
:::
143
143
144
-
#### 2. UNITS for pump and compressor charts
144
+
#### 2. UNITS for pump and compressor charts {/* #2-units-for-pump-and-compressor-charts */}
145
145
146
146
Compressor and pump charts has previously had implicit units, without requiring the operator to specify what
147
147
units are actually being used. This increases the risk of wrong specification, and makes it more difficult to hand
@@ -210,14 +210,14 @@ and [PUMP CHART](../modelling/setup/facility_inputs/pump_modelling/pump_charts)
210
210
for more details about the relevant keywords.
211
211
212
212
213
-
#### 3. Restrict allowed characters in component names and emission names
213
+
#### 3. Restrict allowed characters in component names and emission names {/* #3-restrict-allowed-characters-in-component-names-and-emission-names */}
214
214
215
215
Component names can now only consist of letters (a-z, upper and lower case), numbers (0-9), underscore (`_`), hyphen (`-`) and space (` `).
216
216
217
217
Emission names can now only consist of letters (a-z, upper and lower case), numbers (0-9) and underscore (`_`).
218
218
219
219
220
-
#### 4. NAME no longer used for LTP reporting, use CATEGORY instead
220
+
#### 4. NAME no longer used for LTP reporting, use CATEGORY instead {/* #4-name-no-longer-used-for-ltp-reporting-use-category-instead */}
221
221
222
222
We have categories for FLARE and COLD-VENTING-FUGITIVE, and have introduced categories for LOADING and STORAGE. These should now be used instead of NAME.
223
223
@@ -275,12 +275,12 @@ INSTALLATIONS:
275
275
```
276
276
277
277
278
-
#### 5. Not possible to use custom category names, pre-defined categories must be uppercase with hyphen as separator (i.e. FUEL-GAS)
278
+
#### 5. Not possible to use custom category names, pre-defined categories must be uppercase with hyphen as separator (i.e. FUEL-GAS) {/* #5-not-possible-to-use-custom-category-names-pre-defined-categories-must-be-uppercase-with-hyphen-as-separator-ie-fuel-gas */}
279
279
280
280
Only a limited pre-defined set of categories is valid input to the CATEGORY-keyword, it is no longer possible to use custom names.
281
281
The input is case-sensitive and must match exactly with the pre-defined names. See [CLI Docs](../references/CATEGORY) for full documentation.
282
282
283
-
## CLI migration
283
+
## CLI migration {/* #cli-migration */}
284
284
285
285
This version includes some changes to how the CLI is invoked and changes to default behavior.
286
286
@@ -291,7 +291,7 @@ This version includes some changes to how the CLI is invoked and changes to defa
291
291
5. Argument for LTP export has changed from: `--centuries-ltp-export`to `--ltp-export`
292
292
6. Simple results are now default for json
293
293
294
-
#### 1. Invoking eCalc™ directly is no longer supported, use `ecalc run` instead.
294
+
#### 1. Invoking eCalc™ directly is no longer supported, use `ecalc run` instead. {/* #1-invoking-ecalc-directly-is-no-longer-supported-use-ecalc-run-instead */}
295
295
296
296
To make it possible to add `ecalc show` we added the `ecalc run` command. In v8 it is required to specify `run` when calculating a model.
297
297
@@ -307,7 +307,7 @@ you should now use
307
307
$ ecalc run ./my-model.yaml
308
308
~~~~~~~~
309
309
310
-
#### 2. Log level should be specified as the first argument + log to file
310
+
#### 2. Log level should be specified as the first argument + log to file {/* #2-log-level-should-be-specified-as-the-first-argument--log-to-file */}
311
311
312
312
Previously you could specify the `--log` argument after `run`, this is no longer possible.
See the [CLI Docs](../getting_started/cli/cli_reference) or run `ecalc --help` for the full documentation.
339
339
340
-
#### 4. Extrapolation correction is no longer optional
340
+
#### 4. Extrapolation correction is no longer optional {/* #4-extrapolation-correction-is-no-longer-optional */}
341
341
342
342
We have removed the extrapolation correction argument. eCalc™ will now always "extrapolate" values.
343
343
The main reason for making this change was that the feature was in general always used, in addition to being a confusing term.
344
344
Let us know if you have a use-case where this was needed.
345
345
346
-
#### 5. Argument for LTP export has changed from: `--centuries-ltp-export` to `--ltp-export`
346
+
#### 5. Argument for LTP export has changed from: `--centuries-ltp-export` to `--ltp-export` {/* #5-argument-for-ltp-export-has-changed-from---centuries-ltp-export-to---ltp-export */}
347
347
348
348
To prepare for Open Source and to make the LTP export more agnostic (even though the column names are heavily
349
349
affected by Centuries), we simplify the argument to get LTP results. See [CLI Docs](../getting_started/cli/cli_reference) for
350
350
full documentation.
351
351
352
-
#### 6. Simple results are now default for json
352
+
#### 6. Simple results are now default for json {/* #6-simple-results-are-now-default-for-json */}
353
353
Detailed output (or any json) should mainly be used for QA and advanced users, and is no longer shown by default. To keep old behavior, the user now
354
354
needs to use the --detailed-output option when running the CLI. See [CLI reference docs](../getting_started/cli/cli_reference#ecalc-run)
This doc guides you through migrating an existing eCalc™ model from version v8 to v8.1.
18
18
19
19
We try to make this as easy as possible, and provide a step-by-step migration guide.
20
20
21
-
### 1. Changes to TIME_SERIES
21
+
### 1. Changes to TIME_SERIES {/*#1-changes-to-time_series */}
22
22
-`RATE_INTERPOLATION_TYPE` is renamed to [`INTERPOLATION_TYPE`](../references/INTERPOLATION_TYPE)
23
23
- New time series type: `DEFAULT` with default `RIGHT` interpolation
24
24
-`RESERVOIR` type is removed
@@ -83,7 +83,7 @@ somebody that can help you out to make this right. The consequences of doing it
83
83
easily offset by 1 year.
84
84
:::
85
85
86
-
### 2. Not possible to have different interpolation types for vectors within one file
86
+
### 2. Not possible to have different interpolation types for vectors within one file {/* #2-not-possible-to-have-different-interpolation-types-for-vectors-within-one-file */}
87
87
88
88
Previously eCalc™ tried to recognize vectors as rates- or non-rates for time series.
89
89
Hence, rate-vectors were set to use `LEFT` interpolation type, or if the type was
@@ -98,13 +98,13 @@ rate vectors. If different vectors (e.g. pressures and rates) should be interpol
98
98
to be in separate files.
99
99
:::
100
100
101
-
### 3. Empty data in time series columns no longer allowed
101
+
### 3. Empty data in time series columns no longer allowed {/* #3-empty-data-in-time-series-columns-no-longer-allowed */}
102
102
103
103
Each column in a time series resource should have data for all time steps, eCalc™ will now show an error if this is not the case.
104
104
The reason behind this is that it can be ambiguous to know whether missing data should be interpolated or considered as 0. Now
105
105
users will have to be explicit, and this will lead to fewer ambiguities and errors.
106
106
107
-
### 4. New LTP Category: STEAM-TURBINE-GENERATOR
107
+
### 4. New LTP Category: STEAM-TURBINE-GENERATOR {/* #4--new-ltp-category-steam-turbine-generator */}
108
108
109
109
A new LTP requirement to report steam turbine generator consumption/generation. This affects the total generator production
110
110
negatively (reduced load), as some energy is provided through this steam turbine generator. It is therefore modelled as a consumer
0 commit comments