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

Use K'gari consistently #134

Merged
merged 2 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion docs/releases/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@ Next release (in development)
for testing plotting methods
(:pr:`128`).
* Update all URLs to the NCI THREDDS server
(`update notice <https://opus.nci.org.au/display/NDP/THREDDS+Upgrade>`,
(`update notice <https://opus.nci.org.au/display/NDP/THREDDS+Upgrade>`_,
:issue:`135`, :pr:`136`, :pr:`csiro-coast/emsarray-data#2`).
* Correct all references to K'gari, formerly Fraser Island
(:issue:`133`, :pr:`csiro-coast/emsarray-data#2`, :pr:`134`).
2 changes: 1 addition & 1 deletion src/emsarray/conventions/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ def wind(
import numpy
import xarray
dataset = emsarray.tutorial.open_dataset('fraser')
dataset = emsarray.tutorial.open_dataset('kgari')
face_size = dataset.ems.grid_size[dataset.ems.default_grid_kind]
flat_array = xarray.DataArray(
data=numpy.arange(face_size),
Expand Down
10 changes: 5 additions & 5 deletions src/emsarray/tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

# Bump this version as new datasets are added or as old datasets are updated.
# Should be a tag name or commit hash, something immutable.
VERSION = "v0.3.0"
VERSION = "v0.4.0"


def _make_download_url(name: str) -> str:
Expand Down Expand Up @@ -86,9 +86,9 @@ def open_dataset(name: str, **kwargs: Any) -> xarray.Dataset:
This dataset is defined on a rectangular grid with one dimensional coordinates,
handled by the :class:`.CFGrid1D` convenion.

``fraser``
``kgari``
A subset of the Great Barrier Reef 4km (GBR4) v2.0 model, part of the eReefs data.
This subset is centred around K'gari / Fraser Island.
This subset is centred around K'gari.
This dataset is defined on a curvilinear grid with two dimensional coordinates,
handled by the :class:`.CFGrid2D` convention.
Temperature, sea surface height, and current variables are included.
Expand Down Expand Up @@ -117,8 +117,8 @@ def open_dataset(name: str, **kwargs: Any) -> xarray.Dataset:
.. code-block:: python

import emsarray
fraser = emsarray.tutorial.open_dataset('fraser')
fraser.ems.plot(fraser['temp'].isel(time=0, k=-1))
kgari = emsarray.tutorial.open_dataset('kgari')
kgari.ems.plot(kgari['temp'].isel(time=0, k=-1))
"""
local_path = _fetch(name)
return emsarray.open_dataset(local_path, **kwargs)
4 changes: 2 additions & 2 deletions tests/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_plot(
datasets: pathlib.Path,
tmp_path: pathlib.Path,
):
dataset = emsarray.tutorial.open_dataset('fraser')
dataset = emsarray.tutorial.open_dataset('kgari')
temp = dataset['temp'].copy()
temp = temp.isel(time=0, k=-1)

Expand All @@ -82,7 +82,7 @@ def test_plot_no_long_name(
Test plotting a variable with no long_name attribute works.
Regression test for https://github.com/csiro-coasts/emsarray/issues/105
"""
dataset = emsarray.tutorial.open_dataset('fraser')
dataset = emsarray.tutorial.open_dataset('kgari')
temp = dataset['temp'].copy()
temp = temp.isel(time=0, k=-1)
del temp.attrs['long_name']
Expand Down
Loading