NCAR / CUPiD

CUPiD is a “one stop shop” that enables and integrates timeseries file generation, data standardization, diagnostics, and metrics from all CESM components.
https://ncar.github.io/CUPiD/
Apache License 2.0
24 stars 22 forks source link

Some notebooks only need to run for certain compsets #108

Open mnlevy1981 opened 3 months ago

mnlevy1981 commented 3 months ago

Is your feature request related to a problem? Please describe.

The general request is for some mechanism to indicate that a notebook doesn't apply to a given case configuration, so cupid-build won't add it to the web page. For example, there are some ocean BGC diagnostics that we only want to look at in some runs. More specifically -- in historical runs, CO2 increases over the course of the simulation, but CESM also provides an alternate CO2 that stays constant at the preindustrial level and a few tracers represent concentrations of carbon-based tracers at the PI levels rather than the transient levels. So we might soon have a notebook that compares these fields, but will only want to run it for HIST cases, not 1850 cases.

Describe the solution you'd like

Following the specific example above, we could have a cell in the ocean co2 notebook that recognizes if the run is over the transient period (mechanism isn't important, but I think there are some output variables that are omitted in PI runs) and then somehow indicate to CUPiD that the notebook shouldn't be included in the Jupyter Book. Maybe it could print output like DO NOT PUBLISH and then cupid-build could grep for that phrase an skip files that contain it?

Describe alternatives you've considered

We can use general_params to pass inputs to notebooks - maybe there's also a mechanism for getting output from the notebooks? Then every notebook could return a make_html variable that is True if it should be included in the book and False otherwise.