Skip to content

Commit 29b38c2

Browse files
Miguel JimenezMikejmnez
andauthored
New year changes (#300)
* update history file * complete * api with llcrearrange * unpin xesmf * unpin binder env * unpin python * add description to module * improve funcs definitions * improve definitions to appear in api * formatting * improve documentation on the transformation api * formatting * formatting * improve description arctic_crown * api * move description to arctic_crown * clarify discontinuity at 180 degrees East * formatting * grammar * add reference * add reference from xarray * documentation * fix spacing * improve docs * improve notes * improve docs * improve text * improve text * include p= `str` as argument - other option from pos_viewer * pass tests now * this is now default * fix failing test * remove unused * create grid to inter lat/lons * remove unnecessary code - prescribed vars * interp angles with non-periodic grid * add rot metrics to mates * correct import * rotate cosine angle * not cos but sine * reverse sign arct face2 * rotate angles * sine correction * rotate angles * flip angles in facets * split if * remove sign change * flip sign sine * apply sign change * rotate arc face 7 sign angle * do not flip sign on cos * remove sign change * rotate vector fields with angles * reverse orientation of vector * fix bug * fix more * fix typo * fix bug * point to right var * again fix var * only apply to multi-dim datavars * use the mate var * keep original assert attrs * use dict for attrs * removed fn, now in llc_rearrange * always drop * make sure proper grid locations * formatting * update docs Co-authored-by: Miguel Jimenez <[email protected]>
1 parent 5663338 commit 29b38c2

File tree

11 files changed

+288
-182
lines changed

11 files changed

+288
-182
lines changed

HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
History
55
=======
66

7+
v0.3.1 (2022-12-14)
8+
-------------------
9+
Fix tarball and wheel for new release (PR 295 by `Filipe Fernandes`_).
10+
711
v0.3.0 (2022-12-12)
812
-------------------
913
Migrated master to main (PR 239 by `Mattia Almansi`_). Allow oceandataset to have dict-style access to
@@ -27,4 +31,5 @@ Initial release published in the `Journal of Open Source Software`_.
2731
.. _`Ali Siddiqui`: https://github.com/asiddi24
2832
.. _`Miguel Jimenez Urias`: https://github.com/Mikejmnez
2933
.. _`Wenrui Jiang`: https://github.com/MaceKuailv
34+
.. _`Filipe Fernandes`: https://github.com/ocefpaf
3035
.. _`Journal of Open Source Software`: https://joss.theoj.org

binder/environment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: rise-environment
22
channels:
33
- conda-forge
44
dependencies:
5-
- python < 3.10
5+
- python
66
- numpy
77
- matplotlib
88
- pandas
@@ -12,7 +12,7 @@ dependencies:
1212
- distributed
1313
- bottleneck
1414
- netCDF4
15-
- xarray < 2022.6
15+
- xarray
1616
- cartopy < 0.20
1717
- esmpy
1818
- intake-xarray

ci/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
- intake-xarray
1212
- geopy
1313
- xesmf
14-
- esmf < 8.4
14+
- esmf
1515
- xgcm < 0.7
1616
- Ipython
1717
- tqdm

docs/.DS_Store

2 KB
Binary file not shown.

docs/api.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,25 @@ Functions
217217
utils.densjmd95
218218
utils.densmdjwf
219219
utils.Coriolis_parameter
220+
221+
LLC-transformation
222+
==================
223+
.. autosummary::
224+
:toctree: generated/
225+
226+
llc_rearrange
227+
228+
229+
Class
230+
---------
231+
.. autosummary::
232+
:toctree: generated/
233+
234+
llc_rearrange.LLCtransformation
235+
236+
.. Classmethod
237+
.. ---------
238+
.. .. autosummary::
239+
.. :toctree: generated/
240+
241+
.. llc_rearrange.LLCtransformation.arctic_crown

oceanspy/compute.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
geographical_aligned_velocities=["U_zonal", "V_merid"],
9090
survey_aligned_velocities=["rot_ang_Vel", "tan_Vel", "ort_Vel"],
9191
missing_horizontal_spacing=["dxF", "dxV", "dyF", "dyU"],
92-
missing_cs_sn=["CS", "SN"],
9392
)
9493

9594

@@ -2834,36 +2833,6 @@ def salt_budget(od):
28342833
return _ospy.OceanDataset(ds).dataset
28352834

28362835

2837-
def missing_cs_sn(od):
2838-
"""
2839-
Compute missing grid orientaioon.
2840-
2841-
Parameters
2842-
----------
2843-
od: OceanDataset
2844-
oceandataset used to compute
2845-
2846-
Returns
2847-
-------
2848-
od: OceanDataset
2849-
| CS: cosine of the orientation angle
2850-
| SN: sine of the orientation angle
2851-
"""
2852-
xc = _np.deg2rad(_np.array(od._ds.XC))
2853-
yc = _np.deg2rad(_np.array(od._ds.YC))
2854-
cs = _np.zeros_like(xc)
2855-
sn = _np.zeros_like(xc)
2856-
cs[0], sn[0] = _utils.find_cs_sn(yc[0], xc[0], yc[1], xc[1])
2857-
cs[-1], sn[-1] = _utils.find_cs_sn(yc[-2], xc[-2], yc[-1], xc[-1])
2858-
cs[1:-1], sn[1:-1] = _utils.find_cs_sn(yc[:-2], xc[:-2], yc[2:], xc[2:])
2859-
od._ds["CS"] = od._ds["XC"]
2860-
od._ds["CS"].values = cs
2861-
2862-
od._ds["SN"] = od._ds["XC"]
2863-
od._ds["SN"].values = sn
2864-
return od
2865-
2866-
28672836
def missing_horizontal_spacing(od):
28682837
"""
28692838
Compute missing horizontal spacing.

0 commit comments

Comments
 (0)