-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add scripts to generate profiles for HIFLD grid #227
Comments
Using some work-in-progress branches, I've got a workflow that appears to be working at least for the generation of wind profiles:
mkdir $(pipenv --venv)/src/powersimdata/powersimdata/network/hifld/data
cp -r test_csvs/. $(pipenv --venv)/src/powersimdata/powersimdata/network/hifld/data/
from datetime import datetime
from powersimdata import Grid
from prereise.gather.winddata.hrrr.hrrr import retrieve_data
from prereise.gather.winddata.hrrr.calculations import calculate_pout
start_dt = datetime.fromisoformat("2020-01-01")
end_dt = datetime.fromisoformat("2021-01-01")
directory = "./"
grid = Grid("USA", "hifld")
wind_farms = grid.plant.query("type == 'wind' or type == 'wind_offshore'").copy()
wind_farms["state_abv"] = wind_farms.zone_id.map(grid.model_immutables.zones["id2abv"])
retrieve_data(start_dt=start_dt, end_dt=end_dt, directory=directory)
df = calculate_pout(wind_farms=wind_farms, start_dt=start_dt, end_dt=end_dt, directory=directory)
df.to_csv("wind.csv") Downloading the wind data will take several hours, I'll update this post once it's done and I can confirm whether the method worked all the way through. EDIT: using the |
Getting solar data can follow a similar pattern. Repeat steps 1 and 2 from wind data procedure above, make sure you have the SAM binaries installed, then: from powersimdata import Grid
from prereise.gather.solardata.nsrdb import sam
from prereise.gather.solardata.helpers import to_reise
grid = Grid("USA", "hifld")
solar_plant = grid.plant.query("type == 'solar'").copy()
solar_plant.index.name = "plant_id"
data = sam.retrieve_data(YOUR_EMAIL_HERE, YOUR_NREL_API_KEY_HERE, solar_plant=solar_plant, grid_model="hifld", year=2020) Note that the call signature for |
Don't forget to update the notebook! |
Looking at the wind and solar code, there seem to be two different 'levels' of making new profiles for the HIFLD grid:
|
Now that #247 decouples solar profile generation from the Grid object, we could generate plant-specific profiles as part of the top-level grid-CSV-creation step, while we still have all the 'extra' data columns that are required to associate the main Form 860 records with the 'ancillary' table for solar-specific data. Once #249 is integrated, we could do the same for wind profiles. See #242 (comment) for more context. |
Now that I'm coming back to this, I'm realizing that we still need scripts for the creation of demand profiles. If our demand zones match the hourly data available from the EIA (https://www.eia.gov/opendata/qb.php?category=2122628), then we can either download and clean their data, or download pre-cleaned data from https://zenodo.org/record/4116342. If our demand zones don't match the EIA, then we will need another step of processing to re-align them. |
🚀
Describe the workflow you want to enable
Similar to what was done for the TAMU Grid, we want scripts that can ingest data from external sources and produce profiles formatted for intake by PowerSimData/REISE.jl.
The text was updated successfully, but these errors were encountered: