Egs Test#739
Draft
hdanielskoch wants to merge 11 commits into
Draft
Conversation
store seismic risk in zenodo
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
hdanielskoch
commented
Apr 9, 2026
| threads: 1 | ||
| resources: | ||
| mem_mb=lambda wildcards, input, attempt: (input.size // 100000) * attempt * 2, | ||
| mem_mb=lambda wildcards, input, attempt: (input.size // 100000) * attempt * 10, |
hdanielskoch
commented
Apr 9, 2026
| threads: 1 | ||
| resources: | ||
| mem_mb=4000, | ||
| mem_mb=20000, |
hdanielskoch
commented
Apr 9, 2026
| threads: 1 | ||
| resources: | ||
| mem_mb=7000, | ||
| mem_mb=14000, |
hdanielskoch
commented
Apr 9, 2026
| threads: 1 | ||
| resources: | ||
| mem_mb=5000, | ||
| mem_mb=20000, |
hdanielskoch
commented
Apr 9, 2026
Collaborator
Author
hdanielskoch
left a comment
There was a problem hiding this comment.
logging for new stuff
Comment on lines
+55
to
+57
| * attempt | ||
| * 150 | ||
| * 0.5, |
Comment on lines
-290
to
+340
| cbuses = n.df(c)[column][lambda ds: ds.isin(buses)].rename("Bus") | ||
| df = n.df(c) | ||
| # For components with both bus0 and bus1, require both to be in buses | ||
| if "bus0" in df.columns and "bus1" in df.columns: | ||
| mask = df["bus0"].isin(buses) & df["bus1"].isin(buses) | ||
| cbuses = df.loc[mask, column].rename("Bus") | ||
| else: | ||
| cbuses = df[column][lambda ds: ds.isin(buses)].rename("Bus") |
Collaborator
Author
There was a problem hiding this comment.
Changed!!! Why??
Comment on lines
+710
to
+713
| # bus2sub stores sub_id as float strings (e.g. "39763.0") while the | ||
| # EGS profile stores sub_id as integer strings (e.g. "39763"). | ||
| # Normalize to integer strings so the merge key matches. | ||
| bus2sub["sub_id"] = bus2sub["sub_id"].apply(lambda x: str(int(float(x)))) |
| missing_i = list(colors.index[colors.isna()]) | ||
| logger.warning(f"tech_colors for carriers {missing_i} not defined in config.") | ||
| # Fill missing colors with a default gray color | ||
| colors = colors.fillna("#808080") |
Comment on lines
+3
to
+7
| # snakemake --cluster "sbatch -A {cluster.account} --mail-type ALL --mail-user {cluster.email} -p {cluster.partition} -o {cluster.output} -e {cluster.error} -c {threads} --mem {resources.mem_mb} --time {cluster.walltime}" --cluster-config config/260128_config/config.cluster.yaml --jobs 20 --latency-wait 60 --rerun-incomplete --configfile config/260128_config/config.egs_conus_z134_nz2050_perfect.yaml | ||
|
|
||
|
|
||
| # snakemake resources/egs_conus_z134_nz2050_perfect/usa/profile_solar.nc \ | ||
| # --cluster "sbatch -A {cluster.account} --mail-type ALL --mail-user {cluster.email} -p {cluster.partition} -o {cluster.output} -e {cluster.error} -c {threads} --mem {resources.mem_mb} --time {cluster.walltime}" \ |
Comment on lines
+3
to
+18
| #SBATCH -p service | ||
| #SBATCH --job-name=smk-driver | ||
| #SBATCH --time=01-23:59:00 | ||
| #SBATCH --cpus-per-task=1 | ||
| #SBATCH --mem=1G | ||
| #SBATCH -o logs/run_slurm/smk-driver-%j.out | ||
| #SBATCH -e logs/run_slurm/smk-driver-%j.err | ||
| #SBATCH --mail-type=FAIL | ||
| #SBATCH --mail-user=hdaniels@stanford.edu | ||
|
|
||
| set -euo pipefail | ||
| cd /oak/stanford/groups/iazevedo/henry/pypsa-usa/workflow | ||
|
|
||
| export GRB_LICENSE_FILE=/share/software/user/restricted/gurobi/11.0.2/licenses/gurobi.lic | ||
|
|
||
| /home/groups/iazevedo/henry/miniforge3/bin/mamba run -n pypsa-usa bash run_slurm.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes # (if applicable).
Changes proposed in this Pull Request
Not a real PR! Just using to compare code on sherlock
Checklist
envs/environment.yaml.config.default.yaml.doc/configtables/*.csv.