Repository navigation
L2_correlations: explicit common_time alignment, ERSSTv6, CI fixes - #100
Merged
Merged
Conversation
Pyleoclim now emits a FutureWarning when correlation() silently puts two series with different time axes onto a common one; this will raise a ValueError in Pyleoclim 2.0.0 (LinkedEarth/Pyleoclim_util#697). Pass common_time_kwargs={} to the six correlation() calls, which keeps the current behavior (interpolation) and works on Pyleoclim 1.3.1 too, and explain the choice where it first appears. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ubuntu-latest runner images no longer bundle Miniconda, which setup-miniconda relies on unless told to install one. Add miniforge-version: latest to both workflows (and move sync_jupyterbook from v2 to v3). Replace the defaults channel with nodefaults: Anaconda's defaults now require ToS acceptance in CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add a markdown cell after the first correlation() call explaining, in
plain English, why the records must share a time axis, what
common_time_kwargs={} does, what common_time() does with its default
settings, and how to choose another method. Links to the docs.
Replaces the shorter note added before the call.
- Use NOAA ERSSTv6 instead of v5 (URL, variable names, labels, text),
citing Huang et al. (2025), doi:10.1175/JCLI-D-23-0707.1. Same grid
and coordinate order as v5; the record starts in 1850 instead of 1854.
- In the THREDDS cell, add a commented-out fallback to a local copy of
the data for when the NOAA server is unavailable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Saves the region and period L2_correlations uses to data/ersstv6_tropical_pacific.nc, so the notebook can fall back on it when the NOAA THREDDS server is rate-limited or down. The data file itself is not included yet: run the script once the server is up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fresh outputs from a clean run against Pyleoclim master (with #711 and the #712 AR(1) fit fix merged). Update the p-values and FDR percentages quoted in the text to match ERSSTv6, and add a pointer to Hu et al. (2017) on when the FDR correction matters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
The notebook asked for a kernel named "pyleo", which exists only on the machine it was last run on, so CI (nbmake) and other users could not find it. Without a kernelspec, Jupyter uses the default Python kernel of whatever environment runs the notebook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copying all global attributes from the THREDDS dataset included '_NCProperties', which netCDF reserves, so to_netcdf() failed with "NetCDF: String match to name in use". Copy only attributes whose names do not start with an underscore. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated with data/make_ersstv6_subset.py from NOAA PSL THREDDS on 2026-11-16: monthly SST, 15N-15S, 140E-280E, 1850-01 to 2026-10 (6 MB). The notebook can load it when the THREDDS server is down. *.nc files are gitignored, so add an explicit exception for this one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A notebook saved from a custom kernel (e.g. "pyleo") records that name, which no other machine has, so nbmake and readers' Jupyter fail to start it. The new workflow runs .github/scripts/check_kernelspec.py on PRs and pushes that touch notebooks: it fails, with a file annotation, on any kernelspec whose name is not "python3" (none at all is fine: Jupyter then uses the default python3 kernel). Run the script with --fix to repair notebooks locally; it edits only the kernelspec block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
khider
approved these changes
Nov 16, 2026
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.
In response to LinkedEarth/Pyleoclim_util#711, which deprecates the implicit
common_time()alignment in pairwise methods (correlation(),causality(),wavelet_coherence()). When two series have different time axes, those methods now emit aFutureWarning, and Pyleoclim 2.0.0 will raise aValueErrorinstead.L2_correlations.ipynbcorrelation()calls on records with different time axes now passcommon_time_kwargs={}. This keeps the previous behavior (interpolation) without the warning, and also works on Pyleoclim 1.3.1.common_time_kwargs={}means;common_time()does with its default settings: it keeps the period both records cover, builds an evenly spaced axis with the average spacing, and fills it by linear interpolation;The re-run also uses the fix for LinkedEarth/Pyleoclim_util#712, whose statsmodels
ConvergenceWarnings used to flood the output of the field correlation.Other changes
data/ersstv6_tropical_pacific.nc(6 MB) is the tropical Pacific subset the notebook falls back on, generated bydata/make_ersstv6_subset.py.*.ncis gitignored, so.gitignoregets an explicit exception for this one file.check-kernelspec.ymlfails any PR in which a notebook declares a kernel other thanpython3, because a custom name such aspyleobreaksnbmakeand readers' Jupyter. Notebooks with no kernelspec pass. Runpython .github/scripts/check_kernelspec.py --fixto repair a notebook locally.ubuntu-latestrunners no longer bundle Miniconda, so both conda workflows now setminiforge-version: latest, andsync_jupyterbook.ymlmoves fromsetup-miniconda@v2to v3.environment.ymlreplacesdefaultswithnodefaults, because Anaconda's channels now require accepting their terms of service in CI.Notes for reviewers
pyleo, which CI doesn't have), so it runs on the default Python kernel of whatever environment opens it.L2_wavelet_analysiswas checked and needs no change: itswavelet_coherence()call usesmethod='wwz', which does no alignment.🤖 Generated with Claude Code