Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

O5.1.5: Generalize ClimaCoupler common functions to all component models and move to ClimaUtilities.jl #39

Open
9 of 13 tasks
juliasloan25 opened this issue Apr 17, 2024 · 0 comments
Assignees
Labels
SDI 📜 Software Design Issue

Comments

@juliasloan25
Copy link
Member

juliasloan25 commented Apr 17, 2024

The Climate Modeling Alliance

Software Design Issue 📜

Purpose

There are a few modules originally developed in ClimaCoupler.jl that have become duplicated in multiple packages, namely in ClimaLSM.jl and ClimaAtmos.jl. These include the Regridder and BCReader (FileReader in ClimaLSM). Instead of having this code duplicated and slightly modified in multiple places, we should move them to a central repository, e.g. a new ClimaUtilities.jl.

Cost/Benefits/Risks

  • benefit: easier to maintain; we'll only need to update/extend code in one location rather than in all locations having the duplicate code
  • cost: each package has slightly different use cases for these utilities, so we'll need to make them more general to handle each of these cases (more developer time required)

People and Personnel

Components

  • Add functionality to new package
  • Extend modules to handle use cases of all packages currently using them
  • Remove functionality from existing packages

Inputs

The ClimaLSM versions of these modules were originally based on the ClimaCoupler implementations, but have been modified to be more suited to ClimaLSM needs. This included generalizing function names that weren't accurate in the coupler version, as well as removing unneeded and unused (in either package) functionality.

ClimaAtmos also uses the regridding functionality in postprocessing (e.g. remap_helpers.jl) and in data reads in gravity wave tests (e.g. ogw_3d.jl). The Atmos interface has diverged somewhat from our modules, so careful consideration (and collaboration with Atmos) will be needed to come up with a sufficiently general utility.

Checkpointer is another module that could be added and generalized. It works similarly to Atmos, and would enable land to use the same checkpointing feature.

Note: diagnostics should also be unified, but this will be a larger effort led by @Sbozzolo , so we do not include it in the scope of this issue.

Results and Deliverables

We should not see performance or behavior changes, and tests should remain high quality. The major changes will be ease of maintenance of this code, as well as increased readability having these utilities in one place.

Task Breakdown And Schedule

SDI Revision Log

17 April 2024: SDI moved from ClimaCoupler.jl to ClimaUtilities.jl, as this is where most of the work will be implemented

CC

@tapios @simonbyrne @cmbengue

(replaces ClimaCoupler.jl SDI CliMA/ClimaCoupler.jl#367)

Tasks

use ClimaUtilities from ClimaCoupler

  1. 🍃 leaf
    juliasloan25
  2. 🍃 leaf
    juliasloan25
  3. 🍃 leaf
    imreddyTeja
  4. 🍃 leaf
    juliasloan25
  5. 🍃 leaf enhancement
    juliasloan25
  6. 🍃 leaf enhancement
    juliasloan25

use ClimaUtilities from ClimaLand

  1. breaking change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SDI 📜 Software Design Issue
Projects
None yet
Development

No branches or pull requests

2 participants