Skip to content

Commit

Permalink
Merge pull request #134 from csiro-coasts/kgari
Browse files Browse the repository at this point in the history
Use K'gari consistently
  • Loading branch information
mx-moth authored Jun 19, 2024
2 parents 578adb8 + 012719b commit 93f420e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
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

0 comments on commit 93f420e

Please sign in to comment.