Conversation
…using cdo remapbil,r20x20 /net/atmos/data/cmip6-ng/pr/mon/g025/pr_mon_IPSL-CM6A-LR_historical_r1i1p1f1_g025.nc /home/scsarah/mesmer/tests/test-data/calibrate-coarse-grid/cmip6-ng/pr/mon/g025/pr_mon_IPSL-CM6A-LR_historical_r1i1p1f1_g025.nc
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…ation process for emulations
for more information, see https://pre-commit.ci
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #837 +/- ##
==========================================
- Coverage 99.49% 90.78% -8.72%
==========================================
Files 30 35 +5
Lines 1995 2257 +262
==========================================
+ Hits 1985 2049 +64
- Misses 10 208 +198
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
You were not in the office therefore I ask here:
-
What is the difference between the example_mesmer_mtp and example_mesmer_mtp_precipitation notebooks? I see that the first one does not load pr, but doesn't the "p" in "mtp" stand for precipitation?
-
There seems to be two ways to calculate a PCA:
- the
fit_principal_componentsfunction (which applies aStandardScalerand then thePCA); used in the example_mesmer_mtp notebook. - the
XarrayPipeline, where you explicitely pass aStandardScalerandPCAassteps; used in the example_mesmer_mtp_precipitation notebook
Are these two ways equal? Do we need to keep both? Or which one can we remove?
- the
| "std_scale": (X.dims[1], std.scale_), | ||
| "std_mean": (X.dims[1], std.mean_), | ||
| "std_var": (X.dims[1], std.var_), |
There was a problem hiding this comment.
I find it not very obvious that these belong to the StandardScaler.
| T = _transform_principal_component_decomposition_xr(X=X, params=params) | ||
|
|
||
| return T | ||
|
|
||
|
|
||
| def _transform_principal_component_decomposition_xr( |
There was a problem hiding this comment.
(there is not much point to having a wrapper function here)
mesmer/stats/_regularized_glm.py
Outdated
| from mesmer._core.utils import _ignore_warnings | ||
|
|
||
|
|
||
| # haven't properly commented this yet - WIP |
There was a problem hiding this comment.
| # haven't properly commented this yet - WIP |
mesmer/stats/_regularized_glm.py
Outdated
| n_years = tas.sizes["year"] | ||
| n_closest = closest_locations.sizes["closest_gridcells"] | ||
| n_cov = 1 + 2 * n_closest |
There was a problem hiding this comment.
I have not looked at this in details but this is very use case specific - check if we could move this out of the function somehow.
mesmer/stats/_xarray_pipelines.py
Outdated
| return param | ||
|
|
||
|
|
||
| # class XarrayPipeline: |
There was a problem hiding this comment.
can we delete this commented block?
|
Related to your initial questions:
|
for more information, see https://pre-commit.ci
… implementation is still missing tests
for more information, see https://pre-commit.ci
|
Rewrote parts of the code related to the precipitation emulations:
The variability routine has not been changed yet. |
for more information, see https://pre-commit.ci
| def __init__( | ||
| self, | ||
| design_rule, | ||
| alpha_grid, |
There was a problem hiding this comment.
Can alpha_grid be an argument to fit? Then you don't need to "dummy initialize" it on L236.
There was a problem hiding this comment.
But it's a argument to __init__ in GammaRegressor so for consistency we could also keep it...
There was a problem hiding this comment.
Mh... I suppose either way would be fine.
There was a problem hiding this comment.
ok let's keep the current approach the 'ugly' part is only internal
CHANGELOG.rst