Skip to content

Conversation

k-okosun
Copy link
Collaborator

@k-okosun k-okosun commented Oct 3, 2025

No description provided.

@k-okosun k-okosun linked an issue Oct 3, 2025 that may be closed by this pull request
@k-okosun k-okosun changed the title update test and example and documentation for CSP #118 update test and example and documentation for CSP Oct 3, 2025
@phil-fzj phil-fzj self-requested a review October 16, 2025 08:01
Comment on lines 395 to 399
assert (
self.sim_data["HeattoHTF_W"].mean(axis=0)
/ self.placements.capacity_sf_W_th
self.sim_data["HeattoHTF_W"].mean(axis=0)[0]
/ self.placements.capacity_sf_W_th.values
) < 1

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is self.sim_data["HeattoHTF_W"] one-dimensional?
If yes, can we do this more cleanly?

Copy link
Collaborator

@phil-fzj phil-fzj Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use the if clause (not visible in snippet, but distinguishes between placements with len=1 and len>1) in the first place. we can just remove it and as this part works for both cases:

            assert (
                (
                    self.sim_data["HeattoHTF_W"].mean(axis=0)
                    / self.placements.capacity_sf_W_th
                )
                < 1
            ).all()

Comment on lines 164 to +209
Args:
placements ([type]): [description]
era5_path ([type]): [description]
output_netcdf_path ([type], optional): [description]. Defaults to None.
output_variables ([type], optional): [description]. Defaults to None.
return_self (bool, optional): [description]. Defaults to True.
placements (pd.DataFrame):
DataFrame containing locations for simulation.
Required columns: longitude, latitude, and one area column ("area_m2", "area", "aperture_area_m2", or "land_area_m2").
era5_path (str or rk_weather.NCSource):
Path to ERA5 weather data or an NCSource object.
Must provide columns: "direct_horizontal_irradiance", "surface_wind_speed", "surface_air_temperature".
global_solar_atlas_dni_path (str, float, np.ndarray):
- str: Path to raster file with DNI data from Global Solar Atlas.
- float: Constant DNI value for all placements.
- np.ndarray: Array of DNI values, shape must match (placements,) or (time, placements).
datasetname (str, optional):
Name of the CSP technology dataset (e.g., "Heliosol", "SolarSalt").
Defaults to "Validation 10". See csp/data/CSP_database.xlsx for options.
elev_path (str or list, optional):
- str: Path to raster file with elevation data.
- list: Elevation values for each placement.
output_netcdf_path (str, optional):
If provided, writes the resulting XArray dataset to this path.
Defaults to None.
output_variables (List[str], optional):
List of variable names to include in the output dataset.
If None, includes all suitable variables from placements, workflow parameters, simulation data, and time index.
Only numeric or string variables are supported due to NetCDF4 limitations.
return_self (bool, optional):
If True, returns the workflow manager object.
If False, returns the output as an XArray dataset.
Defaults to True.
JITaccelerate (bool, optional):
If True, enables JIT acceleration for some calculations.
Defaults to False.
verbose (bool, optional):
If True, prints progress information.
Defaults to False.
debug_vars (bool, optional):
If True, retains intermediate variables for debugging.
Defaults to False.
onlynightuse (bool, optional):
If True, optimizes plant size for night use only.
Defaults to True.
fullvariation (bool, optional):
If True, applies full variation in calculations.
Defaults to False.
_validation (bool, optional):
If True, runs in validation mode (some input data may be replaced).
Defaults to False.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are using a different docstring format than the rest of reskit.
We use the NumPy documentation style but you seem to use the google-style.
Please adapt this so we have consistent docstring styles across reskit

Comment on lines 276 to +278
if global_solar_atlas_dni_path == "default_cluster":
global_solar_atlas_dni_path = r"/storage/internal/data/gears/geography/irradiance/global_solar_atlas_v2.5/World_DNI_GISdata_LTAy_AvgDailyTotals_GlobalSolarAtlas-v2_GEOTIFF/DNI.tif"
global_solar_atlas_dni_path = r"/fast/central/shared_data/2023_gears/geography/irradiance/global_solar_atlas_v2.5/World_DNI_GISdata_LTAy_AvgDailyTotals_GlobalSolarAtlas-v2_GEOTIFF/DNI.tif"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we cant have hardcoded paths in here.
No one without access can use this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would suggest to just remove this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update test and example and documentation for CSP

2 participants