Initial commit of xgran - refactor in progress #64
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.
This is a first attempt at bringing the granularity resampling to the evaluation project. We copy
xgranin a vendored sense into spinup-evaluation. In future it could be packaged separately and introduced as a dependency depending on whether there is interest.The problem
A common use case is illustrated in #54.
We need to compute metrics as defined in
metrics.pyat different temporal resolutions. Based on the arguments (temperature, ssh, velocity, salinity, UNUSED(salinity)) to these metric functions (temperature_500m_30NS_metric,temperature_BWbox_metric,temperature_DWbox_metric,ACC_Drake_metric_2) we can determine an intelligent resampling strategy to allow us to compute metrics even when variables at a certain temporal granularity is not available to us. We can only do downsamping by averaging from finer temporal granularity to coarser (up sampling is not allowed).When averaging we use the finest available data (this needs to be tested).
Features of xgran
analysis) that can be passed around.compute.pyfile implements a single pass resampling.get_datais the core function that resamples data.MEmonth end vsMSmonth start. #59.materialize.pyapproach forces this to behave in a two step process.Resampling
Nemo files are center stamped. Whereas xarray resample at edges. See issue #59.
TODO
Closes #54, #59