-
Notifications
You must be signed in to change notification settings - Fork 20
update test and example and documentation for CSP #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
…flow needs more work
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 | ||
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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()
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. |
There was a problem hiding this comment.
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
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" | ||
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
No description provided.