Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisRenchon committed Jun 14, 2024
1 parent 9988f9b commit c7b7565
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions docs/src/diagnostics/users_diagnostics.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
# default diagnostics
# Using ClimaLand Diagnostics when running a simulation

When running a ClimaLand simulations, you have multiple options on how to write the outputs of that simulation.
You may want all variables, or just a selected few.
You may want instantaneous values, at the highest temporal and spatial resolution, or you may want to get averages at hourly or monthly time scale, and integrate in space
(for example soil moisture from 0 to 1 meter depth).
You may want to get more specific reductions, such as 10 days maximums, or compute a new variables that is a function of others.
You may want to get your outputs in memory in a Julia Dict, or write them in a NetCDF file.

This is where ClimaLand Diagnostics comes in for users.

In this documentation page, we first explain how to use default diagnostics and what are the defaults, and then explain how to define your own diagnostics for more advanced
users.

# Default Diagnostics

Once you have defined your model and are ready to run a simulation, and after adding ClimaDiagnostics (using ClimaDiagnostics),
you can add default diagnostics to it by doing the following steps:
Expand Down Expand Up @@ -55,4 +69,7 @@ diag_cb = ClimaDiagnostics.DiagnosticsCallback(diagnostic_handler)
sol = SciMLBase.solve(prob, ode_algo; dt = Δt, callback = diag_cb)
```

Your diagnostics have now been written in netcdf files in your output folder.
Your diagnostics have now been written in netcdf files in your output folder.

# Custom Diagnostics

0 comments on commit c7b7565

Please sign in to comment.