Skip to content

Commit

Permalink
Merge pull request #10 from VACUMM/develop
Browse files Browse the repository at this point in the history
Version 0.3.0
  • Loading branch information
stefraynaud committed May 12, 2021
2 parents ebfd616 + 224058b commit d71b04c
Show file tree
Hide file tree
Showing 26 changed files with 1,314 additions and 360 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ before_install:
- conda update -q conda
- conda info -a
- conda config --add channels conda-forge
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION appdirs cmocean configobj matplotlib-base netcdf4 numba pytest setuptools scipy xarray xesmf
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION appdirs cmocean configobj matplotlib-base netcdf4 numba pytest setuptools scipy xarray

install:
- source activate test-environment
Expand Down
58 changes: 56 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
Release notes
=============
What's new
##########


Current (unreleased)
=====================

New features
------------

Documentation
-------------

Deprecations
------------

Breaking changes
----------------

Bug fixes
---------


v0.3.0
======

New features
------------

- Add the :func:`xoa.plot.plot_flow` function [:pull:`9`].
- Improve :func:`xoa.coords.get_depth` so that it can compute
depth from sigma coordinates or layer thinknesses [:pull:`8`].
- Add the :func:`xoa.dyn.flow2d` function [:pull:`7`].
- Add the :func:`xoa.regrid.extrap1d` function.
- Add the :func:`xoa.filter.erode_coast` function which is specialized version
of the :func:`xoa.filter.erode_mask` for horizontal data.
- Add the :func:`xoa.coords.get_xdim`, :func:`~xoa.coords.get_ydim`,
:func:`~xoa.coords.get_zdim`, :func:`~xoa.coords.get_tdim` and
:func:`~xoa.coords.get_fdim` for quickly finding standard dimensions.

Documentation
-------------

Deprecations
------------

Breaking changes
----------------

Bug fixes
---------

- Fix u and v CF config [:pull:`6`]


0.2.0
=====
6 changes: 5 additions & 1 deletion doc/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
background: #28B934; /*hue 125 */
}

.wy-side-nav-search input[type="text"] {
/*border-color: #2472a4;*/
border-color: #24A42E; /*hue 125 */
}

.rst-content dl:not(.docutils) dt {
html.writer-html4 .rst-content dl:not(.docutils) > dt, html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) > dt {
/*background: #e7f2fa;
color: #2980B9;
border-top: solid 3px #6ab0de;*/
Expand Down
2 changes: 2 additions & 0 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ API Reference
xoa.cli
xoa.color
xoa.coords
xoa.dyn
xoa.filter
xoa.geo
xoa.grid
xoa.interp
xoa.misc
xoa.plot
xoa.regrid
xoa.sigma
13 changes: 11 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,24 @@
napoleon_use_admonition_for_references = False
napoleon_use_rtype = False

# %% genoptions
# %% Genoptions
genoptions_table = 'genoptions/table.txt'
genoptions_declarations = 'genoptions/declarations.txt'

# %% cfgm
# %% Cfgm
import xoa.cf
cfgm_get_cfgm_func = xoa.cf._get_cfgm_
cfgm_rst_file = "cf.txt"

# %% Extlinks
extlinks = {
"issue": ("https://github.com/pydata/xarray/issues/%s", "GH"),
"pull": ("https://github.com/pydata/xarray/pull/%s", "PR"),
}

# %% Nbsphinx
nbsphinx_timeout = 120 # in seconds

# %% User directives

def setup(app):
Expand Down
4 changes: 2 additions & 2 deletions env/environment.rtd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ dependencies:
- ipykernel
- jupyter_client
- matplotlib-base
- netCDF4
- numba
- pip
- python>=3
- python>=3.7
- xarray
- xesmf
- pip:
- configobj
- nbsphinx
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[tool.black]
line-length = 100
target-version = ['py38']
skip-string-normalization = true
5 changes: 1 addition & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
appdirs
cmocean
configobj
matplotlib-base
numba
numpy
pandas
python>=3
setuptools
scipy
xarray
xesmf


2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ install_requires =
configobj
netCDF4
numba
pytest
setuptools >= 40.4 # For pkg_resources
scipy
xarray
xesmf >= 0.4
setup_requires =
setuptools >= 40.4
setuptools_scm
Expand Down
6 changes: 5 additions & 1 deletion xoa/accessors.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ def data_vars(self):
self._data_vars = _DataVarAccessor__(self._dsa, self._cfspecs)
return self._data_vars

def get_depth(self):
"""Get the depth"""
from .coords import get_depth
return get_depth(self._dsa)


class _CoordAccessor_(_CFAccessor_):
_search_category = 'coords'
Expand Down Expand Up @@ -213,7 +218,6 @@ def ds(self):

class CFDataArrayAccessor(_CoordAccessor_):


@property
def da(self):
return self._dsa
Expand Down
8 changes: 4 additions & 4 deletions xoa/cf.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,16 @@ name=generic
alt_names = uz,u3d
cmap = cmo.delta:piv0
[[[attrs]]]
standard_name = sea_water_x_velocity
long_name = Sea water velocity along X
standard_name = sea_water_x_velocity,eastward_sea_water_velocity
long_name = Sea water velocity along X,Eastward velocity
units = m s-1

[[v]]
alt_names = vz,v3d
cmap = cmo.delta:piv0
[[[attrs]]]
standard_name = sea_water_y_velocity
long_name = Sea water velocity along Y
standard_name = sea_water_y_velocity,northward_sea_water_velocity
long_name = Sea water velocity along Y,Northward velocity
units = m s-1

[[w]]
Expand Down
Loading

0 comments on commit d71b04c

Please sign in to comment.