-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from KatharinaBuelow/newindex
newindex
- Loading branch information
Showing
7 changed files
with
116 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.. highlight:: shell | ||
|
||
========= | ||
New index | ||
========= | ||
|
||
The index calculation is based on xclim_. Index calculator only calculated indices, which are available in xclim. If you need an index, which is not included in xclim, please integrate it in xclim not here. | ||
|
||
First, you need a new index you need to edit two files: | ||
|
||
.. code-block:: console | ||
$ cd index_calculator/tables | ||
$ input_vars.json | ||
$ metadata.json | ||
Second: | ||
|
||
.. code-block:: console | ||
$ cd index_calculator/_indices.py | ||
$ _indices.py | ||
The easiest way is to copy an exsiting index which is similar to your new one and adjust it to your needs. The naming conventions can de found in xclim_ under indicators (not indices). | ||
|
||
At last you need to perform a test: | ||
|
||
.. code-block:: console | ||
$ pip install pytest | ||
Please edit test_indices.py and execute | ||
|
||
.. code-block:: console | ||
$ cd tests | ||
$ test_indices.py (edit) | ||
$ pytest (run) | ||
.. _xclim: https://github.com/Ouranosinc/xclim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.. highlight:: shell | ||
|
||
=========== | ||
New project | ||
=========== | ||
|
||
For adding your own project you need to change three files. | ||
|
||
|
||
.. code-block:: console | ||
$ cd index_calculator/tables | ||
$ cf_conversion.json | ||
$ projects.json | ||
$ xcalc.json | ||
The easiest way is to copy an exsiting project like e.g. EOBS and edit it according to your needs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters