Skip to content

Commit 9e3c8a5

Browse files
authored
Merge pull request #14 from ClimateImpactLab/bugfix/ypc
fix pyc-ypc typo in io.py
2 parents c72f1e4 + a991957 commit 9e3c8a5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pyCIAM/io.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ def prep_sliiders(
3939
expand_exposure=True,
4040
storage_options={},
4141
):
42-
"""Import the SLIIDERS dataset (or a different dataset formatted analogously),
43-
format, and calculate derived variables so that it can be used by the functions that
44-
implement pyCIAM.
42+
"""Import the SLIIDERS dataset (or a different dataset formatted analogously).
43+
44+
Input, format, and calculate derived variables so that it can be used by the
45+
functions that implement pyCIAM.
4546
4647
Parameters
4748
----------
@@ -140,7 +141,7 @@ def prep_sliiders(
140141
if "dfact" not in inputs.data_vars and "npv_start" in inputs.data_vars:
141142
inputs["dfact"] = (1 / (1 + inputs.dr)) ** (inputs.year - inputs.npv_start)
142143

143-
if "landrent" or "ypc" not in inputs.data_vars:
144+
if "landrent" not in inputs.data_vars or "ypc" not in inputs.data_vars:
144145
area = inputs.landarea
145146
if calc_popdens_with_wetland_area:
146147
area = area + inputs.wetland
@@ -161,7 +162,7 @@ def prep_sliiders(
161162

162163
if (
163164
"ypc" not in inputs.data_vars
164-
and "min_pyc_scale" in inputs.data_vars
165+
and "min_ypc_scale" in inputs.data_vars
165166
and "ypc_scale_denom" in inputs.data_vars
166167
and "ypc_scale_elast" in inputs.data_vars
167168
):

0 commit comments

Comments
 (0)