-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement regridding for Dataset.load() (#9)
* Add regridding as part of the `load` method. * Correct convention type, add convention Path option * Updated example recipe (based on demo comments) * Test hatch-conda on CI * Specify ci shells for run * Debug with "micromamba info" * Better xarray regrid w/ flox. Make ESMF optional. * Fix CI errors * Correct regrid docstring * Add regrid method to dataset.load * Typing modifications for 3.8, 3.9 compat. * Ignore import errors in Pytest's doctest * Update demo notebook * Add note on rechunking
- Loading branch information
1 parent
7199edf
commit 54439a0
Showing
11 changed files
with
775 additions
and
411 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Micromamba | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
||
build: | ||
name: Micromamba test on (${{ matrix.python-version }}, ${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ['ubuntu-latest'] | ||
python-version: ['3.10'] | ||
env: | ||
MPLBACKEND: Agg # https://github.com/orgs/community/discussions/26434 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: environment.yml | ||
cache-environment: true | ||
init-shell: bash | ||
- name: Micromamba info | ||
shell: bash -el {0} | ||
run: | | ||
micromamba info | ||
- name: Install dev dependencies | ||
run: pip install .[dev] | ||
shell: bash -el {0} | ||
- name: Run pytest | ||
run: pytest | ||
shell: micromamba-shell {0} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: zampy | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python==3.10 | ||
- xESMF | ||
- requests | ||
- netcdf4 | ||
- numpy | ||
- pandas | ||
- matplotlib | ||
- xarray | ||
- rioxarray # required for TIFF files | ||
- tqdm | ||
- dask[diagnostics] | ||
- pint | ||
- cf_xarray # required to auto-pint CF compliant datasets | ||
- pint-xarray | ||
- flox |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
"""zampy.""" | ||
from . import datasets | ||
from zampy import datasets | ||
from zampy import utils | ||
|
||
|
||
__author__ = "Bart Schilperoort" | ||
__email__ = "[email protected]" | ||
__version__ = "0.1.0" | ||
|
||
|
||
__all__ = ["datasets"] | ||
__all__ = ["datasets", "utils"] |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.