Skip to content

doc update #126

@aradhakrishnanGFDL

Description

@aradhakrishnanGFDL

Do we have docs about combining catalogs in the sphinx page? If not, we need one.

Here is a start

Here are some pointers to the combine_cats.py to combine intake_esm catalogs. 
https://github.com/NOAA-GFDL/CatalogBuilder/blob/main/catalogbuilder/scripts/combine_cats.py
Usage is described in this PR #58 (comment)
The other option is to use fre-cli. Here's Chris's documentation for that. 
Using fre-cli
module load fre/canopy
fre catalog --help

Usage: fre catalog [OPTIONS] COMMAND [ARGS]...

   - access fre catalog subcommands

Options:
  --help  Show this message and exit.

Commands:
  builder   - Generate .csv and .json files for catalog
  merge     - Merge two or more more catalogs into one
  validate  - Validate a catalog against catalog schema
c2b:~%>fre catalog merge --help 
Usage: fre catalog merge [OPTIONS]

  - Merge two or more more catalogs into one

Options:
  --input TEXT   Catalog json files to be merged, space-separated  [required]
  --output TEXT  Merged catalog  [required]
  --help         Show this message and exit.
fre catalog merge --input ~/catalog/catalog1.json --input ~/catalog/catalog2.json --output combined.json 
/home/c2b/catalog/catalog1.csv
/home/c2b/catalog/catalog2.csv
INFO: Schema differs
{'catalog_file': '/home/Chris.Blanton/catalog/catalog2.csv'}
We can combine since the catalog_file is the only difference
Combined catalog specification-  combined.json
Combined csv/catalog-  combined.csv

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions