Conversation
* update duration with handling spatial dims, remove compute, fix sparse lead time dim generation * update name on metric in tests * add docstring for time res arg
* move function out of run, move cache mkdir to init * add tests for new func * ruff * update parallel_config passthrough and tests
* implements a new Forecast object that can wrap existing xarray datasets * Revise per copilot review
* update docstrings and var namings * rename vars, add test * ruff
…305) * update naming * default preprocess for applied_tc * ruff * ruff
* remove cases top level of yaml and fix code to handle this * remove old load events yaml function * update validation precommit and formatting
* dependencies and generate store file started * in-flight, added and cleaned filter funcs * add icechunk + obstore and cira icechunk generation script * remove cira gen script no longer used * code cleanup * add icechunk datatree forecast class object * uv lock * add documentation, group helper func, and add repository kwargs passthrough * remove icechunk forecast object * typo * ruff
Upgrade `scores`
* update all references to IndividualCaseCollection and convert dicts/ "cases": keys to lists * update template * make questions bold * add whitespace * remove indent error and typo from evaluate_cli * make load_individual_cases include passthrough for existing dataclasses * ruff * add comment for clarification on list comp * ruff (again) * remove all references to collection, replace with list * ruff * rename collection -> list * ruff
* update these docstrings * remove docstring changes markdown * update docstrings * update other docstrings * remove individualcasecollection reference, update based on develop changes
* more explicit naming, add func and model names var * add test coverage, ruff, linting * update readme for new cira approach * move cira func and model ref to inputs * update docs * module wasnt called for moved func * update tests for moving func and var * ruff * fix mock typos
* move cache dir creation to init, rename funcs, add parallel/serial check function, update test names * update naming * add run method for backwards compatibility * update tests * add tests and cover if serial and parallel_config is not None * feat: redesign public API with hierarchical namespace submodules - Add ewb.evaluation() as main entry point (alias for ExtremeWeatherBench) - Create namespace submodules: ewb.targets, ewb.forecasts, ewb.metrics, ewb.derived, ewb.regions, ewb.cases, ewb.defaults - Expose all classes at top level for convenience (ewb.ERA5, etc.) - Add ewb.load_cases() convenience alias - Update all example files to use new import pattern - Update usage.md documentation - Maintain backward compatibility with existing imports * ruff/linting. add utils to init * add test coverage for module loading patterns * ruff * Cleanup docstrings in repo (#318) * update these docstrings * remove docstring changes markdown * update docstrings * update other docstrings * remove individualcasecollection reference, update based on develop changes * add explanation for dim reqs (#320) * Update `defaults` and `inputs` to include new CIRA icechunk store (#319) * more explicit naming, add func and model names var * add test coverage, ruff, linting * update readme for new cira approach * move cira func and model ref to inputs * update docs * module wasnt called for moved func * update tests for moving func and var * ruff * fix mock typos * update defaults var refs
* first pass for gt test infra + yaml * use shapefile for severe convection and catch latitude swap * add ignore for golden test when running pytest by default * ruff * move pytest addopts and markers to pyproject.toml * Remove `IndividualCaseCollection` (#317) * update all references to IndividualCaseCollection and convert dicts/ "cases": keys to lists * update template * make questions bold * add whitespace * remove indent error and typo from evaluate_cli * make load_individual_cases include passthrough for existing dataclasses * ruff * add comment for clarification on list comp * ruff (again) * remove all references to collection, replace with list * ruff * rename collection -> list * ruff * Cleanup docstrings in repo (#318) * update these docstrings * remove docstring changes markdown * update docstrings * update other docstrings * remove individualcasecollection reference, update based on develop changes * add explanation for dim reqs (#320) * Update `defaults` and `inputs` to include new CIRA icechunk store (#319) * more explicit naming, add func and model names var * add test coverage, ruff, linting * update readme for new cira approach * move cira func and model ref to inputs * update docs * module wasnt called for moved func * update tests for moving func and var * ruff * fix mock typos * Bump version from 0.2.0 to 0.3.0 (#324) * Updated API (#321) * move cache dir creation to init, rename funcs, add parallel/serial check function, update test names * update naming * add run method for backwards compatibility * update tests * add tests and cover if serial and parallel_config is not None * feat: redesign public API with hierarchical namespace submodules - Add ewb.evaluation() as main entry point (alias for ExtremeWeatherBench) - Create namespace submodules: ewb.targets, ewb.forecasts, ewb.metrics, ewb.derived, ewb.regions, ewb.cases, ewb.defaults - Expose all classes at top level for convenience (ewb.ERA5, etc.) - Add ewb.load_cases() convenience alias - Update all example files to use new import pattern - Update usage.md documentation - Maintain backward compatibility with existing imports * ruff/linting. add utils to init * add test coverage for module loading patterns * ruff * Cleanup docstrings in repo (#318) * update these docstrings * remove docstring changes markdown * update docstrings * update other docstrings * remove individualcasecollection reference, update based on develop changes * add explanation for dim reqs (#320) * Update `defaults` and `inputs` to include new CIRA icechunk store (#319) * more explicit naming, add func and model names var * add test coverage, ruff, linting * update readme for new cira approach * move cira func and model ref to inputs * update docs * module wasnt called for moved func * update tests for moving func and var * ruff * fix mock typos * update defaults var refs * remove to_csv
* update build-system and project * update workflows, publish, and pyproject * add justfile and twine * update publish yaml * change to python 3.10 as minimum requirement * kerchunk needs 3.11, swapping pyproject and tests to remove 3.10 * change workflows to use version matrix * align workflows * Cleanup docstrings in repo (#318) * update these docstrings * remove docstring changes markdown * update docstrings * update other docstrings * remove individualcasecollection reference, update based on develop changes * add explanation for dim reqs (#320) * Update `defaults` and `inputs` to include new CIRA icechunk store (#319) * more explicit naming, add func and model names var * add test coverage, ruff, linting * update readme for new cira approach * move cira func and model ref to inputs * update docs * module wasnt called for moved func * update tests for moving func and var * ruff * fix mock typos * Bump version from 0.2.0 to 0.3.0 (#324) * Updated API (#321) * move cache dir creation to init, rename funcs, add parallel/serial check function, update test names * update naming * add run method for backwards compatibility * update tests * add tests and cover if serial and parallel_config is not None * feat: redesign public API with hierarchical namespace submodules - Add ewb.evaluation() as main entry point (alias for ExtremeWeatherBench) - Create namespace submodules: ewb.targets, ewb.forecasts, ewb.metrics, ewb.derived, ewb.regions, ewb.cases, ewb.defaults - Expose all classes at top level for convenience (ewb.ERA5, etc.) - Add ewb.load_cases() convenience alias - Update all example files to use new import pattern - Update usage.md documentation - Maintain backward compatibility with existing imports * ruff/linting. add utils to init * add test coverage for module loading patterns * ruff * Cleanup docstrings in repo (#318) * update these docstrings * remove docstring changes markdown * update docstrings * update other docstrings * remove individualcasecollection reference, update based on develop changes * add explanation for dim reqs (#320) * Update `defaults` and `inputs` to include new CIRA icechunk store (#319) * more explicit naming, add func and model names var * add test coverage, ruff, linting * update readme for new cira approach * move cira func and model ref to inputs * update docs * module wasnt called for moved func * update tests for moving func and var * ruff * fix mock typos * update defaults var refs * Golden tests (#323) * first pass for gt test infra + yaml * use shapefile for severe convection and catch latitude swap * add ignore for golden test when running pytest by default * ruff * move pytest addopts and markers to pyproject.toml * Remove `IndividualCaseCollection` (#317) * update all references to IndividualCaseCollection and convert dicts/ "cases": keys to lists * update template * make questions bold * add whitespace * remove indent error and typo from evaluate_cli * make load_individual_cases include passthrough for existing dataclasses * ruff * add comment for clarification on list comp * ruff (again) * remove all references to collection, replace with list * ruff * rename collection -> list * ruff * Cleanup docstrings in repo (#318) * update these docstrings * remove docstring changes markdown * update docstrings * update other docstrings * remove individualcasecollection reference, update based on develop changes * add explanation for dim reqs (#320) * Update `defaults` and `inputs` to include new CIRA icechunk store (#319) * more explicit naming, add func and model names var * add test coverage, ruff, linting * update readme for new cira approach * move cira func and model ref to inputs * update docs * module wasnt called for moved func * update tests for moving func and var * ruff * fix mock typos * Bump version from 0.2.0 to 0.3.0 (#324) * Updated API (#321) * move cache dir creation to init, rename funcs, add parallel/serial check function, update test names * update naming * add run method for backwards compatibility * update tests * add tests and cover if serial and parallel_config is not None * feat: redesign public API with hierarchical namespace submodules - Add ewb.evaluation() as main entry point (alias for ExtremeWeatherBench) - Create namespace submodules: ewb.targets, ewb.forecasts, ewb.metrics, ewb.derived, ewb.regions, ewb.cases, ewb.defaults - Expose all classes at top level for convenience (ewb.ERA5, etc.) - Add ewb.load_cases() convenience alias - Update all example files to use new import pattern - Update usage.md documentation - Maintain backward compatibility with existing imports * ruff/linting. add utils to init * add test coverage for module loading patterns * ruff * Cleanup docstrings in repo (#318) * update these docstrings * remove docstring changes markdown * update docstrings * update other docstrings * remove individualcasecollection reference, update based on develop changes * add explanation for dim reqs (#320) * Update `defaults` and `inputs` to include new CIRA icechunk store (#319) * more explicit naming, add func and model names var * add test coverage, ruff, linting * update readme for new cira approach * move cira func and model ref to inputs * update docs * module wasnt called for moved func * update tests for moving func and var * ruff * fix mock typos * update defaults var refs * remove to_csv * swap pyproject tools to hatch; add if and packages-dir to publish
* chore: remove duplicate function and fixtures - Remove duplicate _parallel_serial_config_check function from evaluate.py (was defined twice at lines 189 and 982 with identical implementation) - Remove duplicate runner fixture from test_evaluate_cli.py (already defined in conftest.py) - Remove duplicate temp_config_dir fixture from test_evaluate_cli.py (already defined in conftest.py) - Remove unused tempfile import from test_evaluate_cli.py * ruff
* update ar calcs with improved parallelization * ruff formatting * update attr name * remove diagnostic logging; ruff formatting; update ar bounds code to work, add zarr 3 warning catch, add optional time dimension str arg * more ar_bounds work to get it moving, looks good here * mypy * mypy * update time to valid_time to follow ewb conventions
* add scripts * rename script, combine into one * ruff
* update heat and cold bounds, update docstrings and methodology. add base_temp_events.yaml for reproducibility * add defaults; remove top python line * add lat min and max args * ruff + mypy * add restriction criteria and method * add animation code * simplify to include climatology bound(s), fix func names * update animate * ruff * remove animate script * rename * update with rename
* first pass bounds updates * second pass to expand bounds
* add new duration method * update duration logic with consecutive pair logic * adjust test to match new duration logic
* add some parallelism and stricter event criteria * smaller batching * update default batch * update event bounds; case shift issue * rename * ruff
…nts for p15-p85 cases without antarctica
* modify criteria slightly * make event_type heat_wave in marginal temp events * update tracker to fill in-between lead time points for a valid track * update defaults * update return next landfall logic to metric * add neighborhood max wind func and add track gap filler * update stitching criteria and tests * add extra column allowance * add a bunch of landfall methods * add empty init time array method * update landfall metrics methods and add metadata inclusion (small data increase. lots of value) * ruff * add landfall filter to within window of valid landfall * cleanup
* add > 15 degree filter for ARs * ruff
…364) * refactor: consolidate temp data_prep scripts into temperature_events.py Merges heat_cold_bounds_case.py, plot_temperature_events.py, and temperature_bounds_global.py into a single temperature_events.py with three subcommands (plot / case / global). Preserves develop behavior exactly: original _wrap_periodically formula, no ndimage landmass isolation, numpy-based detect_events / expand_event_bounds / include_temps_with_events, and no --event-quantiles flag. Made-with: Cursor * ruff * cleanup unused funcs and args * consistent operators * ruff
#367) np.random.normal(500, 200) for orographic heights occasionally draws extreme negative values (e.g. -320 m below sea level), which push the barometric-formula surface pressure above the test's 105 000 Pa bound. The failure was latent but surfaced on Python 3.13 due to a different RNG initialisation state. Replace all np.random.* calls in the fixture with a local seeded np.random.default_rng(42) instance so generated data is bit-reproducible across Python versions and the pressure range assertion holds reliably.
* fix: correct three CIN bugs in mixed-layer CAPE/CIN computation Three bugs in _cape.py caused CIN to be unreliable (sign wrong, magnitude wrong, and false-LFC suppression). Discovered by benchmarking against xcape and atmos on 6,400 ERA5 profiles. Bug 1 — Sign convention: compute_buoyancy_energy_inline returns negative values below the LFC; the raw accumulation was returned without negation, producing negative CIN where callers expect a positive inhibition energy (matching MetPy and xcape conventions). Fixed by negating cin at both return sites. Bug 2 — Integration scope: the LFC branch accumulated all buoyancy energy unconditionally (including positively-buoyant layers between surface and LFC), reducing CIN when a parcel had brief near-surface positive buoyancy before encountering a cap. Added `if energy < 0` guard to match the no-LFC branch and the behaviour of reference implementations. Bug 3 — Spurious LCL buoyancy (critical): insert_lcl_level set the inserted level's environment temperature to t_lcl (the parcel's saturation temperature) instead of interpolating the actual atmospheric temperature in log-pressure. This made env_tv ≈ parcel_tv at the LCL, injecting a +1-2 K buoyancy spike that was detected as an LFC, hiding the real capping inversion above and driving CIN to near-zero for profiles with low LCLs and strong cap inversions. Adds TestCINSignConvention, TestCINIntegrationScope, and TestLCLTemperatureInterpolation test classes with profiles that specifically exercise each bug path and will catch regressions. * fix: address Bugbot review comments on CIN convention consistency - Document CIN sign convention in compute_ml_cape_cin_from_profile docstring: returned as a non-negative inhibition magnitude matching MetPy/xcape. - Negate MetPy's negative-signed CIN in the reference data generator so stored cin_reference values match the implementation's positive convention; update both era5_reference.npz and pathological_profiles.npz accordingly. - Rename expected_cin_range to expected_cin_magnitude_range in TestKnownProfile to make the positive convention explicit at the call site. - Strengthen TestCINIntegrationScope: replace the weak cin >= 0 assertion with a quantitative lower bound (>50 J/kg) that would catch the original bug where positive near-surface buoyancy cancelled cap-layer CIN. * fix: remove pytest.mark.flaky (pytest-rerunfailures not in deps)
* add data and update mkdocs * add /site to gitignore * updated pages and case format * updated event types and descriptions * severe days -> severe convection, move cases to top, ERA-5 -> ERA5 * add full examples, fix heatwave -> heat wave * tweak to severe docs' references to spc * data prep module * general issue fixing and updates * update case studies language; change file case style * modify descriptions * some more small edits * add colab code and examples * remove notebooks from repo * update colab links * update tc's * zensical * rtd fix * remove colab, swap case number. update tc count. zensical warnings
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.
Adds the updated documentation to
mainand create a post-release to include it in pypi.