Skip to content

Commit

Permalink
Merge pull request #6 from iiasa/notsure
Browse files Browse the repository at this point in the history
add indicators load
  • Loading branch information
byersiiasa authored Feb 24, 2024
2 parents 64f1255 + 104e9cb commit f7383ae
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
6 changes: 6 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: rime
channels:
- defaults
- conda-forge
dependencies:
- python
4 changes: 2 additions & 2 deletions rime/process_tabledata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
@author: byers
"""
if __name__ == "__main__":
from process_config import *
from rime_functions import *
from rime.process_config import *
from rime.rime_functions import *

# from alive_progress import alive_bar
import dask.dataframe as dd
Expand Down
15 changes: 15 additions & 0 deletions rime/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import numpy as np
import pandas as pd
import pyam
import yaml


def fix_duplicate_temps(df, years):
Expand Down Expand Up @@ -153,3 +154,17 @@ def check_ds_dims(ds):
raise ValueError(
"The dataset does not contain 'lat' and 'lon' or 'x' and 'y' dimensions."
)

def load_indicator_params():
"""
Function to load the indicator parameters to facilitate reading in climate impacts data from Climate Solutions Explorer (Werning et al. 2023 - DOI: https://zenodo.org/doi/10.5281/zenodo.7971429 )
Returns
-------
params : dict
"""
with open("rime.rime.indicator_params.yml", "r") as f:
params = yaml.full_load(f)

return params

0 comments on commit f7383ae

Please sign in to comment.