coast

A Coastal Ocean Assessment Tool built as an extendable python framework for nemo models

https://github.com/british-oceanographic-data-centre/coast

Science Score: 75.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
    Organization british-oceanographic-data-centre has institutional domain (noc.ac.uk)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.8%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

A Coastal Ocean Assessment Tool built as an extendable python framework for nemo models

Basic Info
Statistics
  • Stars: 29
  • Watchers: 6
  • Forks: 11
  • Open Issues: 141
  • Releases: 22
Created almost 6 years ago · Last pushed 8 months ago
Metadata Files
Readme License Code of conduct Citation

README.md

PyPI version Conda COAsT version Anaconda-Server Badge DOI Code style: black ```


                 ______    ___        _            _________
               .' ___  | .'   `.     / \          |  _   _  |
              / .'   \_|/  .-.  \   / _ \     .--.|_/ | | \_|
              | |       | |   | |  / ___ \   ( (`\]   | |    
              \ `.___.'\\  `-'  /_/ /   \ \_  `'.'.  _| |_   
               `.____ .' `.___.'|____| |____|[\__) )|_____|  

                      Coastal Ocean Assessment Toolbox

```

COAsT is Diagnostic and Assessment toolbox for kilometric scale regional models. It's aim is to deliver a flexible, community-ready framework for assessing kilometric scale ocean models. The focus, initially, is be on delivering novel diagnostics for processes that are emergent at the kilometric scale and with NEMO model output. The framework leans heavily on xarray.

Documentation can be found here.

PyPI version Anaconda version

Notes on Object Structure and Loading (for contributors):

COAsT is an object-orientated package, meaning that data is stored within Python object structures. In addition to data storage, these objects contain methods (subroutines) which allow for manipulation of this data. An example of such an object is the Gridded object, which allows for the storage and manipulation of (e.g.) NEMO output and domain data. It is important to understand how to load data using COAsT and the structure of the resulting objects.

A Gridded object is created and initialised by passing it the paths of the domain and data files. Ideally, the grid type should also be specified (T, U, V or F in the case of NEMO). For example, to load in data from a file containing data on a NEMO T-grid:

``` import coast

fndata = "" fndomain = "" fnconfig = "" data = coast.Gridded(fndata, fndomain, fnconfig) ```

Ideally, Gridded model output data should be in grid-specific files, i.e. containing output variables situated on a NEMO T, U, V or F grid, whereas the grid variables are in a single domain file. On loading into COAsT, only the grid specific variables appropriate for the paired data are placed into the Gridded object. A Gridded object therefore contains grid-specific data and all corresponding grid variables. One of the file names can be omitted (to get a data-only or grid only object), however functionality in this case will be limited.

Once loaded, data is stored inside the object using an xarray.dataset object. Following on from the previous code example, this can be viewed by calling:

data.dataset This reveals all netcdf-type aspects of the data and domain variables that were loaded, including dimensions, coordinates, variables and attributes. For example: ``` Dimensions: (axisnbounds: 2, tdim: 7, xdim: 297, ydim: 375, z_dim: 51)

Coordinates: time (tdim) datetime64[ns] 2007-01-01T11:58:56 ... 2007-01-31T11:58:56 longitude (ydim, xdim) float32 ... latitude (ydim, xdim) float32 ... Dimensions without coordinates: axisnbounds, tdim, xdim, ydim, zdim

Data variables: depthtbounds (zdim, axisnbounds) float32 ... sossheig (tdim, ydim, xdim) float32 ... timecounterbounds (tdim, axisnbounds) datetime64[ns] ... timeinstant (tdim) datetime64[ns] ... temperature (tdim, zdim, ydim, xdim) float32 ... e1 (ydim, xdim) float32 ... e2 (ydim, xdim) float32 ... e30 (zdim, ydim, xdim) float32 1.0 1.0 1.0 ... 1.0 1.0 Variables may be obtained in a number of ways. For example, to get temperature data, the following are all equivalent: temp = data.dataset.temperature temp = data.dataset['temperature'] temp = data['temperature'] ``` These commands will all return an xarray.dataarray object. Manipulation of this object can be done using xarray commands, for example indexing using [] or xarray.isel. Be aware that indexing will preserve lazy loading, however and direct access or modifying of the data will not. For this reason, if you require a subset of the data, it is best to index first.

The names of common grid variables are standardised within the COAsT package using JSON configuration files. For example, the following lists COAsT internal variable followed by the typical NEMO variable names:

  1. longitude [glamt / glamu / glamv / glamf]
  2. latitude [gphit / gphiu / gphiv / gphif]
  3. time [time_counter]
  4. e1 e1t / e1u / e1v / e1f
  5. e2 e1t / e1u / e1v / e1f
  6. e3_0 e3t0 / e3u0 / e3v0 / e3f0

Longitude, latitude and time are also set as coordinates. You might notice that dimensions are also standardised:

  1. x_dim The dimension for the x-axis (longitude)
  2. y_dim The dimension for the y-axis (latitude)
  3. t_dim The dimension for the time axis
  4. z_dim The dimension for the depth axis.

Wherever possible, the aim is to ensure that all of the above is consistent across the whole COAsT toolbox. Therefore, you will also find the same names and dimensions in, for example observation objects. Future objects, where applicable, will also follow these conventions. If you (as a contributor) add new objects to the toolbox, following the above template is strongly encouraged. This includes using xarray dataset/dataarray objects where possible, adopting an object oriented approach and adhering to naming conventions.

Owner

  • Name: British Oceanographic Data Centre
  • Login: British-Oceanographic-Data-Centre
  • Kind: organization
  • Email: enquiries@bodc.ac.uk
  • Location: Liverpool and Southampton

Part of the National Oceanography Centre, see https://www.bodc.ac.uk/resources for a list of our offerings

Citation (CITATION.cff)

cff-version: 1.2.0
type: software
message: "If you use this software, please cite it as below."
authors:
 - family-names: "Polton"
   given-names: "Jeff A."
   orcid: "https://orcid.org/0000-0003-0131-5250"
 - family-names: "Byrne"
   given-names: "David"
   orcid: "https://orcid.org/0000-0002-9994-3468"
 - family-names: "Wise"
   given-names: "Anthony"
   orcid: "https://orcid.org/0000-0003-2985-9516"
 - family-names: "Holt"
   given-names: "Jason"
   orcid: "https://orcid.org/0000-0002-3298-8477"
 - family-names: "Katavouta"
   given-names: "Anna"
   orcid: "https://orcid.org/0000-0002-1587-4996"
 - family-names: "Rulent"
   given-names: "Julia"
   orcid: "https://orcid.org/0000-0002-2357-4838"
 - family-names: "Barton"
   given-names: "Benjamin"
   orcid: "https://orcid.org/0000-0001-9998-2064"
 - family-names: "Gardner"
   given-names: "Thomas"
   orcid: "https://orcid.org/0000-0001-5452-5791"
 - family-names: "Cazaly"
   given-names: "Matthew"
   orcid: "https://orcid.org/0000-0002-0679-4054"
 - family-names: "Ferreira"
   given-names: "Tobias"
   orcid: "https://orcid.org/0000-0002-0888-9751"
 - family-names: "Hearn"
   given-names: "Malcolm"
 - family-names: "Jennings"
   given-names: "Rob"
 - family-names: "Luong"
   given-names: "Quyen"
 - family-names: "Loch"
   given-names: "Stephen"
 - family-names: "Gorman"
   given-names: "Luke"
   orcid: "https://orcid.org/0000-0002-2414-4311"
 - family-names: "de Mora"
   given-names: "Lee"
   orcid: "https://orcid.org/0000-0002-5080-3149"
 - family-names: "Juarez Olaya"
   given-names: "Magda"
title: "British-Oceanographic-Data-Centre/COAsT: v3.3.1"
version: v3.3.1
date-released: 2025-07-11

GitHub Events

Total
  • Issues event: 3
  • Watch event: 4
  • Member event: 1
  • Issue comment event: 4
  • Push event: 59
  • Pull request review event: 3
  • Pull request event: 6
  • Fork event: 1
  • Create event: 2
Last Year
  • Issues event: 3
  • Watch event: 4
  • Member event: 1
  • Issue comment event: 4
  • Push event: 59
  • Pull request review event: 3
  • Pull request event: 6
  • Fork event: 1
  • Create event: 2

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: about 3 hours
  • Total issue authors: 2
  • Total pull request authors: 3
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: about 3 hours
  • Issue authors: 2
  • Pull request authors: 3
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jpolton (1)
  • jasontempestholt (1)
  • jdconey (1)
Pull Request Authors
  • MagdaJuarez (2)
  • bolb-ocean (1)
  • jasontempestholt (1)
  • jpolton (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 245 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 67
  • Total maintainers: 1
pypi.org: coast

This is the Coast Ocean Assessment Tool

  • Versions: 67
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 245 Last month
Rankings
Downloads: 9.8%
Dependent packages count: 10.1%
Average: 29.0%
Dependent repos count: 67.1%
Maintainers (1)
Last synced: 7 months ago

Dependencies

conda_dev_requirements.txt pypi
  • cartopy >=0.20.2 development
  • dask >=2022.3.0 development
  • gsw >=3.4.0 development
  • lxml >=4.9.0 development
  • matplotlib >=3.5.1 development
  • netCDF4 >=1.5.8 development
  • numpy >=1.22.3 development
  • pydap >=3.2.2 development
  • requests >=2.27.1 development
  • scikit-image >=0.19.2 development
  • scikit-learn >=1.0.2 development
  • scipy >=1.8.0 development
  • spyder >=5.1.5 development
  • statsmodels >=0.13.2 development
  • utide >=0.3.0 development
  • xarray >=2022.3.0 development
requirements.txt pypi
  • PyYAML ==6.0
  • dask >=2022.3.0
  • gsw >=3.4.0
  • lxml >=4.9.0
  • matplotlib >=3.5.1
  • netCDF4 >=1.5.8
  • numpy >=1.22.3
  • oyaml ==1.0
  • pydap >=3.2.2
  • pytest ==7.1.1
  • pytest-mock ==3.7.0
  • requests >=2.27.1
  • scikit-image >=0.19.2
  • scikit-learn >=1.0.2
  • scipy >=1.8.0
  • statsmodels >=0.13.2
  • utide >=0.3.0
  • xarray >=2022.3.0
requirements_docs.txt pypi
  • docstring2md-0.4.1-py3-none-any.whl *
docker-compose.yml docker
  • coast_lite latest
.github/workflows/build_package.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v1 composite
.github/workflows/formatting.yml actions
  • actions/checkout v1 composite
  • actions/setup-python v1 composite
.github/workflows/publish_package.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v1 composite
  • fcakyon/conda-publish-action v1.3 composite
.github/workflows/push_docstrings.yml actions
  • peter-evans/repository-dispatch v2 composite
.github/workflows/push_notebooks.yml actions
  • peter-evans/repository-dispatch v2 composite
.github/workflows/unit_test_contents.yml actions
  • actions/checkout v1 composite
  • actions/setup-python v1 composite
.github/workflows/verify_package.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v1 composite
pyproject.toml pypi
setup.py pypi
.github/workflows/markdown-altimetry.yml actions
  • actions/checkout v3 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/markdown-general.yml actions
  • actions/checkout v3 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/markdown-gridded.yml actions
  • actions/checkout v3 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/markdown-profile.yml actions
  • actions/checkout v3 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/markdown-tidegauge.yml actions
  • actions/checkout v3 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/pylint_checking.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v1 composite
environment.yml pypi
  • dask >=2022.3.0
  • gsw >=3.6.17
  • jupyterlab *
  • lxml >=4.9.0
  • matplotlib >=3.5.3
  • netCDF4 ==1.5.8
  • numpy ==1.22.3
  • pydap >=3.2.2
  • pyproj >=3.5.0
  • requests >=2.27.1
  • scikit-image >=0.19.2
  • scikit-learn >=1.0.2
  • scipy >=1.8.0
  • spyder >=5.1.5
  • statsmodels >=0.13.2
  • tqdm >=4.66.1
  • utide >=0.3.0
  • xarray >=2022.3.0