-
Notifications
You must be signed in to change notification settings - Fork 0
Updates to handle large Monte Carlo runs #18
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: main
Are you sure you want to change the base?
Conversation
…dd other selectors to prep_sliiders, allow other name options for dims of input stores, improve performance of create_template_dataarray, drop now unnecessary save_to_zarr_region wrapper
…k for surge lookup completeness to save time, allow chunking along other dims than seg, use as_completed instead of client.gather, add some print stmts for model status, fix use of scen_mc_filter in execute_pyciam, remove erroneously left testing return in execute_pyciam, allow for unique spec of quantile to use for refA, drop custom save_to_zarr_region func
…max of slr data; improve dtypes of template zarrs;
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.
Pull request overview
This PR updates pyCIAM to handle large Monte Carlo ensembles of sea level rise projections, addressing several bugs and performance issues that arose when running in this probabilistic context.
Key changes:
- Enhanced flexibility for handling variable base years, dimension names, and subset selections across SLR and economic input data
- Improved error resilience and memory efficiency in surge lookup table creation
- Migration from custom
save_to_zarr_regionto xarray's nativeregion="auto"parameter
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| pyCIAM/utils.py | Added support for variable base years in spatial data, made seg_var and mc_dim parameters configurable, added documentation for refA |
| pyCIAM/surge/lookup.py | Enhanced surge lookup creation with configurable dimension names, improved dtype handling for Zarr 3 compatibility, added workflow completion checks |
| pyCIAM/run.py | Major refactoring to support flexible chunking, improved workflow tracking with as_completed, enhanced parameter handling for large ensembles |
| pyCIAM/io.py | Refactored SLR data loading to handle quantile computation on-the-fly, improved memory efficiency, updated selector handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Thus far, pyCIAM has only been run on a couple quantiles of sea level rise per segment. In theory, it can be run on large ensembles of monte carlo SLR projections, as needed for probabilistic estimates of global damages (as used for SC-GHG calculations).
The last time that pyCIAM was run in this context was prior to the full development of the package, and the package is not fully set up to handle this context. This PR contains a number of updates enabling the execution in this large ensemble context (as well as some others)
scen_mc_filterto specify only running certain sceanrios and monte carlo samples