climate_ref.cli.datasets
#
View and ingest input datasets
The metadata from these datasets are stored in the database so that they can be used to determine which executions are required for a given diagnostic without having to re-parse the datasets.
fetch_data(ctx, registry, output_directory=None, force_cleanup=False, symlink=False, verify=True)
#
Fetch REF-specific datasets
These datasets have been verified to have open licenses and are in the process of being added to Obs4MIPs.
Source code in packages/climate-ref/src/climate_ref/cli/datasets.py
ingest(ctx, file_or_directory, source_type, solve=False, dry_run=False, n_jobs=None, skip_invalid=True)
#
Ingest a directory of datasets into the database
Each dataset will be loaded and validated using the specified dataset adapter. This will extract metadata from the datasets and store it in the database.
A table of the datasets will be printed to the console at the end of the operation.
Source code in packages/climate-ref/src/climate_ref/cli/datasets.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | |
list_(ctx, source_type=SourceDatasetType.CMIP6.value, column=None, include_files=typer.Option(False, help='Include files in the output'), limit=typer.Option(100, help='Limit the number of datasets (or files when using --include-files) to display to this number.'))
#
List the datasets that have been ingested
The data catalog is sorted by the date that the dataset was ingested (first = newest).
Source code in packages/climate-ref/src/climate_ref/cli/datasets.py
list_columns(ctx, source_type=SourceDatasetType.CMIP6.value, include_files=typer.Option(False, help='Include files in the output'))
#
Print the current climate_ref configuration
If a configuration directory is provided, the configuration will attempt to load from the specified directory.