Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New year changes #300

Merged
merged 71 commits into from
Dec 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
108ebdf
update history file
Mikejmnez Dec 15, 2022
648f8e7
complete
Mikejmnez Dec 15, 2022
23b0d30
api with llcrearrange
Mikejmnez Dec 17, 2022
7008773
unpin xesmf
Mikejmnez Dec 17, 2022
1a105e6
unpin binder env
Mikejmnez Dec 17, 2022
ec38eea
unpin python
Mikejmnez Dec 17, 2022
96b2cce
Merge pull request #12 from hainegroup/main
Dec 20, 2022
c2d8a06
add description to module
Mikejmnez Dec 20, 2022
6bc17fd
improve funcs definitions
Mikejmnez Dec 20, 2022
f100d59
improve definitions to appear in api
Mikejmnez Dec 20, 2022
9481c3e
formatting
Mikejmnez Dec 20, 2022
750ef39
improve documentation on the transformation api
Mikejmnez Dec 21, 2022
cafa1ce
formatting
Mikejmnez Dec 21, 2022
89d3860
formatting
Mikejmnez Dec 21, 2022
a096a24
improve description arctic_crown
Mikejmnez Dec 21, 2022
efae307
api
Mikejmnez Dec 21, 2022
0e5f6dc
move description to arctic_crown
Mikejmnez Dec 21, 2022
6b5c2fa
clarify discontinuity at 180 degrees East
Mikejmnez Dec 21, 2022
7aaeb7e
formatting
Mikejmnez Dec 21, 2022
7843443
grammar
Mikejmnez Dec 21, 2022
0c5a6af
add reference
Mikejmnez Dec 21, 2022
6b52a2a
add reference from xarray
Mikejmnez Dec 21, 2022
508e7aa
documentation
Mikejmnez Dec 21, 2022
62aea2d
fix spacing
Mikejmnez Dec 21, 2022
a130c94
improve docs
Mikejmnez Dec 21, 2022
1ec0f2d
improve notes
Mikejmnez Dec 21, 2022
b431e7b
improve docs
Mikejmnez Dec 21, 2022
97d61b0
improve text
Mikejmnez Dec 21, 2022
2e3d4de
improve text
Mikejmnez Dec 21, 2022
355a763
include p= `str` as argument - other option from pos_viewer
Mikejmnez Dec 22, 2022
f39768e
pass tests now
Mikejmnez Dec 22, 2022
e9dc833
this is now default
Mikejmnez Dec 22, 2022
04f6abb
fix failing test
Mikejmnez Dec 28, 2022
2a3ae06
Merge pull request #13 from hainegroup/main
Dec 28, 2022
447e744
remove unused
Mikejmnez Dec 28, 2022
e5437ae
create grid to inter lat/lons
Mikejmnez Dec 28, 2022
745ad6b
remove unnecessary code - prescribed vars
Mikejmnez Dec 28, 2022
671c19d
interp angles with non-periodic grid
Mikejmnez Dec 28, 2022
217a02c
add rot metrics to mates
Mikejmnez Dec 29, 2022
e974154
correct import
Mikejmnez Dec 29, 2022
a0c7f3a
rotate cosine angle
Mikejmnez Dec 29, 2022
ed6c2be
not cos but sine
Mikejmnez Dec 29, 2022
c21609b
reverse sign arct face2
Mikejmnez Dec 29, 2022
d6a7419
rotate angles
Mikejmnez Dec 29, 2022
47b6161
sine correction
Mikejmnez Dec 29, 2022
f0d72ee
rotate angles
Mikejmnez Dec 29, 2022
4436d9d
flip angles in facets
Mikejmnez Dec 29, 2022
92f2c1e
split if
Mikejmnez Dec 29, 2022
8e16de6
remove sign change
Mikejmnez Dec 29, 2022
aeb42d1
flip sign sine
Mikejmnez Dec 29, 2022
a8dbb49
apply sign change
Mikejmnez Dec 29, 2022
a0d2c7a
rotate arc face 7 sign angle
Mikejmnez Dec 29, 2022
c07c96b
do not flip sign on cos
Mikejmnez Dec 29, 2022
5908b23
remove sign change
Mikejmnez Dec 29, 2022
0f54a7b
rotate vector fields with angles
Mikejmnez Dec 29, 2022
dd773b3
reverse orientation of vector
Mikejmnez Dec 29, 2022
ca8ece1
fix bug
Mikejmnez Dec 29, 2022
c81455c
fix more
Mikejmnez Dec 29, 2022
ef6172a
fix typo
Mikejmnez Dec 29, 2022
54dd725
fix bug
Mikejmnez Dec 29, 2022
213a4d0
point to right var
Mikejmnez Dec 29, 2022
1074c7c
again fix var
Mikejmnez Dec 29, 2022
56dc2f9
only apply to multi-dim datavars
Mikejmnez Dec 29, 2022
dd14194
use the mate var
Mikejmnez Dec 29, 2022
47d7707
keep original assert attrs
Mikejmnez Dec 29, 2022
40c8f12
use dict for attrs
Mikejmnez Dec 29, 2022
55ce2c6
removed fn, now in llc_rearrange
Mikejmnez Dec 29, 2022
fd12f93
always drop
Mikejmnez Dec 29, 2022
e221883
make sure proper grid locations
Mikejmnez Dec 29, 2022
27a3e7d
formatting
Mikejmnez Dec 29, 2022
0a76507
update docs
Mikejmnez Dec 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
History
=======

v0.3.1 (2022-12-14)
-------------------
Fix tarball and wheel for new release (PR 295 by `Filipe Fernandes`_).

v0.3.0 (2022-12-12)
-------------------
Migrated master to main (PR 239 by `Mattia Almansi`_). Allow oceandataset to have dict-style access to
Expand All @@ -27,4 +31,5 @@ Initial release published in the `Journal of Open Source Software`_.
.. _`Ali Siddiqui`: https://github.com/asiddi24
.. _`Miguel Jimenez Urias`: https://github.com/Mikejmnez
.. _`Wenrui Jiang`: https://github.com/MaceKuailv
.. _`Filipe Fernandes`: https://github.com/ocefpaf
.. _`Journal of Open Source Software`: https://joss.theoj.org
4 changes: 2 additions & 2 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: rise-environment
channels:
- conda-forge
dependencies:
- python < 3.10
- python
- numpy
- matplotlib
- pandas
Expand All @@ -12,7 +12,7 @@ dependencies:
- distributed
- bottleneck
- netCDF4
- xarray < 2022.6
- xarray
- cartopy < 0.20
- esmpy
- intake-xarray
Expand Down
2 changes: 1 addition & 1 deletion ci/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- intake-xarray
- geopy
- xesmf
- esmf < 8.4
- esmf
- xgcm < 0.7
- Ipython
- tqdm
Expand Down
Binary file modified docs/.DS_Store
Binary file not shown.
22 changes: 22 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,25 @@ Functions
utils.densjmd95
utils.densmdjwf
utils.Coriolis_parameter

LLC-transformation
==================
.. autosummary::
:toctree: generated/

llc_rearrange


Class
---------
.. autosummary::
:toctree: generated/

llc_rearrange.LLCtransformation

.. Classmethod
.. ---------
.. .. autosummary::
.. :toctree: generated/

.. llc_rearrange.LLCtransformation.arctic_crown
31 changes: 0 additions & 31 deletions oceanspy/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
geographical_aligned_velocities=["U_zonal", "V_merid"],
survey_aligned_velocities=["rot_ang_Vel", "tan_Vel", "ort_Vel"],
missing_horizontal_spacing=["dxF", "dxV", "dyF", "dyU"],
missing_cs_sn=["CS", "SN"],
)


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


def missing_cs_sn(od):
"""
Compute missing grid orientaioon.

Parameters
----------
od: OceanDataset
oceandataset used to compute

Returns
-------
od: OceanDataset
| CS: cosine of the orientation angle
| SN: sine of the orientation angle
"""
xc = _np.deg2rad(_np.array(od._ds.XC))
yc = _np.deg2rad(_np.array(od._ds.YC))
cs = _np.zeros_like(xc)
sn = _np.zeros_like(xc)
cs[0], sn[0] = _utils.find_cs_sn(yc[0], xc[0], yc[1], xc[1])
cs[-1], sn[-1] = _utils.find_cs_sn(yc[-2], xc[-2], yc[-1], xc[-1])
cs[1:-1], sn[1:-1] = _utils.find_cs_sn(yc[:-2], xc[:-2], yc[2:], xc[2:])
od._ds["CS"] = od._ds["XC"]
od._ds["CS"].values = cs

od._ds["SN"] = od._ds["XC"]
od._ds["SN"].values = sn
return od


def missing_horizontal_spacing(od):
"""
Compute missing horizontal spacing.
Expand Down
Loading