Provides access through Intake catalogs to a set of ocean models, especially the NOAA OFS models. In particular, this package is good for working with unaggregated NOAA OFS models.
Specific functionality includes:
Intake
catalog for known models to provide direct access to model output.xarray
Dataset.model_catalogs
knows how to aggregate NOAA OFS model output between nowcast and forecast files.xarray
and with cf-xarray
.
cf-xarray
will understand dimension and coordinate names, as well as a set of standard_names mapped to the variables.Intake
catalogs, such as:
xarray
To install from PyPI:
pip install model_catalogs
To install from conda with channel conda-forge:
conda install -c conda-forge model_catalogs
Install additional dependencies for full functionality and running the demonstration notebooks. Activate your Python environment, then:
$ mamba install -c conda-forge --file conda-requirements-opt.txt
or use conda
in place of mamba
if you don't have mamba
installed.
Clone the repo:
$ git clone http://github.com/NOAA-ORR-ERD/model_catalogs.git
In the model_catalogs
directory, install conda environment:
$ conda env create -f environment.yml
Install model_catalogs
into new environment (still in model_catalogs
directory):
$ conda activate model_catalogs
$ pip install -e .
Alternatively, if you have an existing environment you want to add to, clone the repo:
$ git clone http://github.com/NOAA-ORR-ERD/model_catalogs.git
$ cd model_catalogs
Make sure the desired environment is activated and then:
$ conda install -c conda-forge --file conda-requirements.txt
$ pip install -r pip-requirements.txt
Install model_catalogs
into the environment (still in model_catalogs
directory):
$ pip install -e .
To develop the code, follow instructions above for "Use provided environment" or "Use other environment" as appropriate. Then you can install additional dependencies for development and testing with
$ conda install -c conda-forge --file conda-requirements-dev.txt
Run tests that haven't been marked as "slow" with
$ pytest
Run all tests, including slow tests, with:
$ pytest --runslow
To then check code before committing and pushing it to github, locally run
$ pre-commit run --all-files
These checks can change your files so it is best to check the changes before pushing to github.
Compile the docs locally after having installed the developer packages (see "Install development packages") or after making the docs environment with
$ conda env create -f docs/environment.yml
and activating that environment.
Navigate to the docs folder and build the html documentation with
$ make html
Finally you can make sure the documentation looks right by opening "_build/html/index.html".