Package: model-catalogs
model_catalogsProvides 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:Sets up anIntakecatalog for known models to provide direct access to model output.Provides access to model output as anxarrayDataset.Models are known by their catalog files; see sethere. They includeNOAA OFS Models:CBOFSCIOFSCREOFSDBOFSGOMOFSLEOFSLMHOFSLOOFSNGOFS2NYOFSSFBOFSTBOFSWCOFSFull 3D fields, or regularly gridded or 2D versions when availableGFS modelsGlobal GOFS HYCOMRTOFS modelsMultiple time ranges and sources of model output are provided when known. For example for the NOAA OFS models there are both forecast and historical sources for all models, and some have others as well.model_catalogsknows how to aggregate NOAA OFS model output between nowcast and forecast files.Known models have cleaned up and filled-in metadata so they are easy to work with inxarrayand withcf-xarray.cf-xarraywill understand dimension and coordinate names, as well as a set of standard_names mapped to the variables.Metadata about models is included in theIntakecatalogs, such as:polygon boundary of numerical domaingrid parametersarguments for optimal read-in withxarrayCan request the availability of each model source.InstallationPyPITo install from PyPI:pip install model_catalogsconda-forgeTo install from conda with channel conda-forge:conda install -c conda-forge model_catalogsInstall Optional DependenciesInstall additional dependencies for full functionality and running the demonstration notebooks. Activate your Python environment, then:$mambainstall-cconda-forge--fileconda-requirements-opt.txtor usecondain place ofmambaif you don't havemambainstalled.Develop PackageChoose environment approachUse provided environmentClone the repo:$gitclonehttp://github.com/NOAA-ORR-ERD/model_catalogs.gitIn themodel_catalogsdirectory, install conda environment:$condaenvcreate-fenvironment.ymlInstallmodel_catalogsinto new environment (still inmodel_catalogsdirectory):$condaactivatemodel_catalogs
$pipinstall-e.Use other environmentAlternatively, if you have an existing environment you want to add to, clone the repo:$gitclonehttp://github.com/NOAA-ORR-ERD/model_catalogs.git
$cdmodel_catalogsMake sure the desired environment is activated and then:$condainstall-cconda-forge--fileconda-requirements.txt
$pipinstall-rpip-requirements.txtInstallmodel_catalogsinto the environment (still inmodel_catalogsdirectory):$pipinstall-e.Install development packagesTo 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$condainstall-cconda-forge--fileconda-requirements-dev.txtRun testsRun tests that haven't been marked as "slow" with$pytestRun all tests, including slow tests, with:$pytest--runslowCheck precommits locally before pushingTo then check code before committing and pushing it to github, locally run$pre-commitrun--all-filesThese checks can change your files so it is best to check the changes before pushing to github.Compile docsCompile the docs locally after having installed the developer packages (see "Install development packages") or after making the docs environment with$condaenvcreate-fdocs/environment.ymland activating that environment.Navigate to the docs folder and build the html documentation with$makehtmlFinally you can make sure the documentation looks right by opening "_build/html/index.html".