https://github.com/clima/climadiagnostics.jl

A framework to define and output observables and statistics from CliMA simulations

https://github.com/clima/climadiagnostics.jl

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.4%) to scientific vocabulary

Keywords

climate data julia
Last synced: 9 months ago · JSON representation

Repository

A framework to define and output observables and statistics from CliMA simulations

Basic Info
Statistics
  • Stars: 9
  • Watchers: 4
  • Forks: 2
  • Open Issues: 16
  • Releases: 29
Topics
climate data julia
Created almost 4 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog License

README.md

Shows the logo of ClimaDiagnostics, with a globe and magnifying glasses ClimaDiagnostics.jl [![CI](https://github.com/CliMA/ClimaDiagnostics.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/CliMA/ClimaDiagnostics.jl/actions/workflows/CI.yml) [![Downstream](https://github.com/CliMA/ClimaDiagnostics.jl/actions/workflows/Downstream.yml/badge.svg)](https://github.com/CliMA/ClimaDiagnostics.jl/actions/workflows/Downstream.yml) [![codecov](https://codecov.io/gh/CliMA/ClimaDiagnostics.jl/graph/badge.svg?token=sbYkr5ydzp)](https://codecov.io/gh/CliMA/ClimaDiagnostics.jl) [![Docs](https://img.shields.io/badge/docs_are_here-click_me!-blue.svg)](https://clima.github.io/ClimaDiagnostics.jl/dev/)

ClimaDiagnostics.jl provides a simple framework to add diagnostics to CliMA simulations.

ClimaDiagnostics.jldefines two important concepts: - DiagnosticVariable: A recipe to compute a diagnostic from the integrator alongside with names, units, comments. - ScheduledDiagnostic: When to compute and output the DiagnosticVariable and what type of accumulation to perform.

To add the diagnostics to a simulation from a list of ScheduledDiagnostics, just redefine your integrator with IntegratorWithDiagnostics(integrator, scheduled_diagnostics).

The documentation is rich and comprehensive, please find more information there.

ClimaDiagnostics.jl Developer Guidelines

These guidelines aim to ensure consistent code quality, maintainability, and a smooth collaborative workflow for ClimaDiagnostics.jl. Please, read these guidelines even if you are familiar with other CliMA packages as there may be some differences.

Tests and environments

We prioritize well-tested code to guarantee ClimaDiagnostics.jl functions reliably. Here are some principles we follow:

Tests are collected in the test folder and are exclusively there

This means that: - All the tests can be run with Pkg.test(); - There are no special tests in the Buildkite pipeline; - In fact, we use Buildkite only to run Pkg.test() with MPI/GPUs.

There are no checked Manifest.toml files

While checking in Manifest.toml files ensures reproducibility, it also introduces some nuisance, including: - lot of git/repository noise just for "up deps"; - multiple environments that have to be managed; - busywork to keep the manifests updated.

In this repository, we have three environments: - project, - documentation, - buildkite.

The project environment defines the test dependencies in its extras (to reduce the number of environments and to avoid the "cannot merge projects" problem). The buildkite environment, in .buildkite, contains everything that is required to test ClimaDiagnostics.jl in its most general configuration (ie, including CUDA.jl and MPI.jl). As the name suggests, this is the (only) environment used by our Buildkite pipeline.

:note: Please, open an issue if you find workflow problems/friction with this system.

Running tests

ClimaDiagnostics.jl defines the test dependencies directly in the main Project.toml. This means that the package can be tested simply by running ] test in a Julia REPL, as shown below:

Start a Julia session in the ClimaDignostics directory: sh julia --project Enter Pkg mode by typing ]. This will change the prompt. Run test.

When doing so, Julia will start a new temporary environment where the tests are run in isolation. Tests are running checking for in-bounds and for deprecations, and this can result in code invalidation and new precompilation.

Note, the project environment does not contain the test dependencies. Therefore, you will find that some dependencies are missing if you try "manually" run the test in a REPL. There are two ways around this: 1. Using TestEnv. Install TestEnv in your base environment (julia -e 'using Pkg; Pkg.add("TestEnv")'). Then, when you want to use the test dependencies, activate it from your REPL with using TestEnv; TestEnv.activate(). This will bump you to an environment where the test dependencies are available. 2. Use the .buildkite environment.

:note: Please, open an issue if you find workflow problems/friction with this system.

Code Formatting with JuliaFormatter.jl

One of the tests consists in checking that the code is uniformly formatted. We use JuliaFormatter.jl to achieve consistent formatting. Here's how to use it:

You can either install in your base environment with sh julia -e 'using Pkg; Pkg.add("JuliaFormatter")' or use it from within the TestEnv or the .buildkite environments (see previous section).

Then, you can format the package running: julia using JuliaFormatter; format(".") or just with format(".") if the package is already imported.

The rules for formatting are defined in the .JuliaFormatter.toml.

If you are used to formatting from the command line instead of the REPL, you can install JuliaFormatter in your base environment and call sh julia -e 'using JuliaFormatter; format(".")' You could also define a shell alias sh alias julia_format_here="julia -e 'using JuliaFormatter; format(\".\")'"

:note: Please, open an issue if you find workflow problems/friction with this system.

Documentation

Documentation is generated with Documenter.jl. We strive to have complete and up-to-date information.

To generate documentation, run sh julia --project=docs docs/make.jl

Please, update the documentation if you add new features or change the behavior of existing ones.

Pull Request (PR) and commits

Here's how to structure your contributions effectively:

  • Descriptive Title: Briefly summarize the changes your PR introduces. Commit titles should preferably be under 50 characters, start with a capital latter, and use imperative verbs (e.g., "Remove superfluous function call").
  • Detailed Description: Explain the purpose of your changes. Focus on the intent.
  • Breaking Changes: If your PR introduces breaking changes, highlight them clearly in the description.

Your pull request can contain one or multiple commits. In either cases, it is important that each commit is atomic (meaning that each commit represents a single logical change).

Please, squash commits that represent a single logical change (e.g., do not have two commits when the second just fixes the first).

Pull requests are not merged, but rebased, ensuring a linear history (this is handled automatically by GitHub).

Owner

  • Name: Climate Modeling Alliance
  • Login: CliMA
  • Kind: organization
  • Email: clima@caltech.edu

An alliance of scientists, engineers and applied mathematicians, dedicated to pioneering a new, data-informed approach to climate modeling

GitHub Events

Total
  • Create event: 23
  • Commit comment event: 12
  • Release event: 6
  • Issues event: 17
  • Watch event: 2
  • Delete event: 2
  • Issue comment event: 46
  • Push event: 220
  • Pull request review event: 57
  • Pull request review comment event: 40
  • Pull request event: 39
Last Year
  • Create event: 23
  • Commit comment event: 12
  • Release event: 6
  • Issues event: 17
  • Watch event: 2
  • Delete event: 2
  • Issue comment event: 46
  • Push event: 220
  • Pull request review event: 57
  • Pull request review comment event: 40
  • Pull request event: 39

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 10
  • Total pull requests: 17
  • Average time to close issues: 4 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 5
  • Total pull request authors: 6
  • Average comments per issue: 0.3
  • Average comments per pull request: 2.35
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 9
  • Pull requests: 16
  • Average time to close issues: 20 days
  • Average time to close pull requests: 20 days
  • Issue authors: 5
  • Pull request authors: 6
  • Average comments per issue: 0.22
  • Average comments per pull request: 1.06
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • Sbozzolo (19)
  • charleskawczynski (5)
  • ph-kev (3)
  • imreddyTeja (2)
  • ychnli (1)
  • akshaysridhar (1)
  • szy21 (1)
  • JuliaTagBot (1)
Pull Request Authors
  • Sbozzolo (53)
  • AlexisRenchon (6)
  • dependabot[bot] (6)
  • charleskawczynski (6)
  • ph-kev (5)
  • nefrathenrici (2)
  • github-actions[bot] (1)
  • imreddyTeja (1)
  • juliasloan25 (1)
Top Labels
Issue Labels
bug (1) documentation (1)
Pull Request Labels
dependencies (7) github_actions (2) Kaizen :recycle: (1) :mag: Inference (1) bug (1)

Packages

  • Total packages: 1
  • Total downloads:
    • julia 108 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 29
juliahub.com: ClimaDiagnostics

A framework to define and output observables and statistics from CliMA simulations

  • Versions: 29
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 108 Total
Rankings
Dependent repos count: 9.6%
Average: 24.2%
Dependent packages count: 38.7%
Last synced: 10 months ago

Dependencies

.github/workflows/CI.yml actions
  • actions/checkout v4 composite
  • codecov/codecov-action v4 composite
  • julia-actions/cache v1 composite
  • julia-actions/julia-buildpkg latest composite
  • julia-actions/julia-processcoverage latest composite
  • julia-actions/julia-runtest latest composite
  • julia-actions/setup-julia latest composite
.github/workflows/CompatHelper.yml actions
  • julia-actions/setup-julia latest composite
.github/workflows/Documentation.yml actions
  • actions/checkout v4 composite
  • julia-actions/setup-julia latest composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/Invalidations.yml actions
  • actions/checkout v4 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-invalidations v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/Downgrade.yml actions
  • actions/checkout v4 composite
  • julia-actions/cache v2 composite
  • julia-actions/julia-buildpkg latest composite
  • julia-actions/julia-downgrade-compat v1 composite
  • julia-actions/julia-runtest latest composite
  • julia-actions/setup-julia latest composite
.github/workflows/Downstream.yml actions
  • actions/checkout v4 composite
  • julia-actions/cache v2 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/setup-julia v1 composite