Skip to content

ClimaLand Model User Experience #1186

@kmdeck

Description

@kmdeck

Purpose

Improve the user experience of climaland by

  • creating a simpler interface which allows running a default simulation in a few lines of code, while also allowing complete control over parameterizations used if the user wants to change these
  • improving the documentation

Philosophy

The “model” object encodes the spatially discretized equations. It specifies a set of ODEs and also necessarily provides some information about what tendencies are implicit vs explicit, and how to create a Jacobian. Because it specifies the ODEs, it must define the parameters, prognostic variables, time dependent forcing, etc. It also depends on the domain because the equations are spatially discretized already.

A “simulation” contains the model, timestepper, diagnostics (and other callbacks not specified by the model independently), and current time/state of the system Y. Right now we do the latter using the SciML’s integrator, but this is heavy for what we need.

These two concepts should be distinct.

The simulation interface should be easily used in the majority of tutorials and experiment scripts. The model interface we develop should as well, with the possible exception of standalone soil model examples not forced by atmospheric data, for which our current constructors may be better suited. We should develop an interface that we want to use as developers.

Results and deliverables

Running a default simulation:

FT = Float64
start_date = DateTime("2000-03-01")
stop_date = DateTime("2010-03-01")
Δt = 450.0
domain = ClimaLand.ModelSetup.global_domain(FT; comms_ctx)
params = LP.LandParameters(FT)
forcing = ClimaLand.ModelSetup.era5_forcing(FT) # This currently depends on start_date, stop_date, but perhaps those should live in then simulation only, and not the model.
model = LandModel(domain, forcing; params)
simulation = LandSimulation(FT, start_date, stop_date, Δt, model; outdir)
solve!(simulation)
plot!(simulation)

Changing e.g. a single parameterization in the soil model

soil = EnergyHydrology(domain; params, runoff_scheme = NewRunoffScheme(params))
model = LandModel(domain, forcing; params, soil)

Task breakdown

Reviewers

@kmdeck @braghiere @juliasloan25 @ph-kev @imreddyTeja

Sub-issues

Metadata

Metadata

Labels

SDISoftware Design Issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions