Skip to content

Commit

Permalink
Merge 3d50654 into 9f70801
Browse files Browse the repository at this point in the history
  • Loading branch information
Loisel committed Sep 26, 2022
2 parents 9f70801 + 3d50654 commit 3b875ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions premise/data_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def __init__(

data = self.__get_iam_data(
key=key,
filepath=filepath_iam_files,
filedir=filepath_iam_files,
variables=new_vars,
)

Expand Down Expand Up @@ -394,7 +394,7 @@ def __get_iam_variable_labels(
return dict_vars

def __get_iam_data(
self, key: bytes, filepath: Path, variables: List
self, key: bytes, filedir: Path, variables: List
) -> xr.DataArray:
"""
Read the IAM result file and return an `xarray` with dimensions:
Expand All @@ -411,7 +411,7 @@ def __get_iam_data(
"""

file_ext = self.model + "_" + self.pathway + ".csv"
filepath = Path(filepath) / file_ext
filepath = Path(filedir) / file_ext

if key is None:
# Uses a non-encrypted file
Expand All @@ -421,7 +421,7 @@ def __get_iam_data(
encrypted_data = file.read()
except FileNotFoundError:
file_ext = self.model + "_" + self.pathway + ".mif"
filepath = Path(filepath) / file_ext
filepath = Path(filedir) / file_ext
with open(filepath, "rb") as file:
# read the encrypted data
encrypted_data = file.read()
Expand Down

0 comments on commit 3b875ed

Please sign in to comment.