-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Labels
help wantedpriority: mediumtype: bugtype: infoIssues containing information which will probably be helpful in the future again.Issues containing information which will probably be helpful in the future again.
Description
Version Checks (indicate both or one)
-
I have confirmed this bug exists on the lastest release of Atlite.
-
I have confirmed this bug exists on the current
masterbranch of Atlite.
Issue Description
Depending on how you call csp capacity factors might be wrong
per_unit = True works as intended
capacity_factor=True has issues.
Reproducible Example
import geopandas as gpd
import atlite
import cartopy.io.shapereader as shpreader
import pandas as pd
shp = shpreader.Reader(
shpreader.natural_earth(
resolution="10m", category="cultural", name="admin_1_states_provinces"
)
)
prt_records = list(
filter(lambda r: r.attributes["iso_3166_2"].startswith("PT"), shp.records())
)
portugal_1 = (
gpd.GeoDataFrame([{**r.attributes, "geometry": r.geometry} for r in prt_records])
.rename(columns={"iso_3166_2": "state"})
.set_index("state")
.set_crs(4236)
)
portugal_1 = portugal_1.cx[portugal.bounds.minx:,:]
portugal_1.plot()
cutout = atlite.Cutout(
path="csp-cf-series/test/cutout_csp.nc", # previous file I had, from the Portugal example
)
csp = cutout.csp( # I work!
installation="SAM_solar_tower",
per_unit=True,
shapes=portugal_1
)
mean = csp.mean("time").to_series()
portugal_1.plot(column=mean, legend=True)
csp = cutout.csp( # I don't :(
installation="SAM_solar_tower",
capacity_factor=True,
shapes=portugal_1
)
mean = csp.mean("time").to_series()
portugal_1.plot(column=mean, legend=True)Expected Behavior
CFs should be correct regardless of how you call for them (although... why are there two calls for the same thing? That's how this type of issue happens...)
Installed Versions
Details
atlite = 0.2.13
Metadata
Metadata
Assignees
Labels
help wantedpriority: mediumtype: bugtype: infoIssues containing information which will probably be helpful in the future again.Issues containing information which will probably be helpful in the future again.
Type
Projects
Status
Quick wins

