You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/add_model.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Scenario: you want to use a new model with ``model_catalogs``. How should you go
14
14
Make a new catalog for it
15
15
-------------------------
16
16
17
-
One Intake catalog file should represent a single model domain whose sources all provide access to model output from running on the same grid. Take a look at the top of an existing catalog file to see what catalog-level metadata is set to know what should be consistent between sources in a catalog file. If the horizontal grid is different (e.g., a subset of a model domain), that should be a different catalog file. If the vertical grid is different (e.g., the output is only at the surface of a 3D model), that should be a different catalog file.
17
+
One Intake catalog file should represent a single model domain whose sources all provide access to model output from running on the same grid. Take a look at the top of an existing catalog file to see what catalog-level metadata is set to know what should be consistent between sources in a catalog file. If the horizontal grid is different (e.g., a subset of a model domain), that should be a different catalog file. If the vertical grid is different (e.g., the output is only at the surface of a 3D model), that should be a different catalog file.
18
18
19
19
What should your catalog file include?
20
20
**************************************
@@ -61,8 +61,8 @@ Freshness
61
61
62
62
The "freshness" parameters, which determine how much time can pass before different actions must be rerun, now have defaults (set in the `__init__` file) for each of the five actions that have freshness parameters associated with them. Possible parameters are:
Copy file name to clipboardExpand all lines: docs/catalog_modes.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ See all available installed catalogs with:
34
34
list(intake.cat)
35
35
```
36
36
37
-
Installed catalogs to be used with `model_catalogs` should have a specified prefix ending with an underscore so they can be easily selected from the default catalog. `model_catalogs` required the installation of [`mc-goods`](https://github.com/axiom-data-science/mc-goods), a package of model catalogs, which have the prefix "mc_".
37
+
Installed catalogs to be used with `model_catalogs` should have a specified prefix ending with an underscore so they can be easily selected from the default catalog. `model_catalogs` required the installation of [`mc-goods`](https://github.com/axiom-data-science/mc-goods), a package of model catalogs, which have the prefix "mc_".
38
38
39
39
+++
40
40
@@ -113,7 +113,7 @@ with TemporaryDirectory() as tmpdirname:
Copy file name to clipboardExpand all lines: docs/update_boundaries.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Boundaries files will be searched for automatically when `mc.setup()` is run. If the command has previously been run with the requested catalog files, then the boundaries files should already exist. If new catalog files are being used, then boundaries files will be calculated as each catalog file is handled.
4
4
5
-
Boundaries files are saved to `mc.FILE_PATH_BOUNDARIES(catalog_name)` where the `catalog_name` is determined at the top of the catalog file itself under "name".
5
+
Boundaries files are saved to `mc.FILE_PATH_BOUNDARIES(catalog_name)` where the `catalog_name` is determined at the top of the catalog file itself under "name".
6
6
7
7
If you want to calculate the boundaries separately from the call to `mc.setup()`, you can do so with
Copy file name to clipboardExpand all lines: docs/whats_new.rst
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,16 @@ v0.6.0 (unreleased)
8
8
* The "known" GOODS model catalog yaml files are no longer distributed with ``model_catalogs`` itself in order to enforce more separation between the catalog files themselves and this code. However, the package of catalogs is currently a requirement of ``model_catalogs`` and can be found at `mc-goods <https://github.com/axiom-data-science/mc-goods>`_. Note that catalog names that had names like `CBOFS-RGRID` are now called `CBOFS_RGRID` with underscores instead of hyphens. This was a necessary change for setting up the models in their own packages with entry points.
9
9
* Enforcing single threading in ``model_catalogs`` to avoid issue when using ``xr.open_mfdataset`` (which is used with `noagg` sources) in which the first time you read something in you hit an error but the second time it works. For more information check this `xarray issue <https://github.com/pydata/xarray/issues/7079>`_ or this `netcdf issue <https://github.com/Unidata/netcdf4-python/issues/1192>`_.
10
10
* User can work with a local catalog file now! See :doc:`here <catalog_modes>` for details.
11
-
11
+
12
12
* boundaries are optionally calculated when using `mc.open_catalog()`.
13
13
* boundaries are calculated the first time a catalog file is worked with through `mc.setup()`
14
-
14
+
15
15
* Removed requirement for `filetype` to be in catalog if sources in catalog do not need to be aggregated.
16
16
* LSOFS and LOOFS have new FVCOM versions. So, there are new versions of the model files:
17
-
17
+
18
18
* `lsofs.yaml` and `loofs.yaml` are still the legacy POM version of the models but no longer have source `coops-forecast-noagg`, and their metadata have been updated to reflect the end dates of the model sources.
19
19
* new catalog files `lsofs-fvcom.yaml` and `loofs-fvcom.yaml` have source `coops-forecast-noagg` that points to the new FVCOM version of the models.
20
-
20
+
21
21
* If user requests time range that is not available for a source, it will now error instead of warn.
22
22
* Bug fixed in `find_availability` so that when a source that does not have a catloc entry is checked, the Dataset is read in without extra processing and checks (including limiting the time range which otherwise would impact checking the time availability).
@@ -191,29 +197,29 @@ def open_catalog(cat_loc, return_cat=True, save_catalog=False, override=False, b
191
197
save_catalog=save_catalog,
192
198
return_cat=True,
193
199
)
194
-
200
+
195
201
ifreturn_cat:
196
202
returncat
197
203
198
204
199
205
defsetup(locs="mc_", override=False):
200
206
"""Setup reference catalogs for models.
201
-
207
+
202
208
Loops over catalogs that have been previously installed as data packages to intake that start with the string(s) in locs. The default is to read in the required GOODS model catalogs which are prefixed with `"mc_"`. Alternatively, one or more local catalog files can be input as strings or Paths.
203
-
209
+
204
210
This function calls ``open_catalog`` which reads in previously-saved model boundary information (or calculates it if not available) and saves temporary catalog files for each model (called "compiled"), then this function links those together into the returned main catalog. For some models, reading in the original catalogs applies a "today" and/or "yesterday" date Intake user parameter that supplies two example model files that can be used for examining the model output for the example times. Those are rerun each time this function is rerun, filling the parameters using the proper dates.
205
-
211
+
206
212
Note that saved compiled catalog files will be saved under the name inside the catalog, not the name of the file if you input a catalog path.
207
213
208
214
Parameters
209
215
----------
210
216
locs : str, Path, list
211
217
This can be:
212
-
218
+
213
219
* a string or Path describing where a Catalog file is located
214
220
* a string of the prefix for selecting catalogs from the default intake catalog, ``intake.cat``. It is expected to be of the form "PREFIX_CATALOGNAME" with an underscore at the end followed by the catalog name, and there could be many catalogs with that `"PREFIX_"` set up.
215
221
* a list of a combination of the previous options.
216
-
222
+
217
223
override : boolean, optional
218
224
Use `override=True` to compile the catalog files together regardless of freshness.
0 commit comments