Examples

A good place to start is the random walk model example, which is used in the Climate Model Interface documentation. The other examples, below, fall more or less into two categories :

The main language and file format of the model examples vary. The notebook collection shows how Climate Model Interface is easily to a wide range of model types, programming languages, and problem sizes.

In User Manual, the Climate Model Interface section outlines several simple ways that models can be added to the framework. The examples presented here were built in this fashion.

Trying Out The Examples is geared toward users who may want to experiment with models.

ClimateModels.RandomWalkerFunction
RandomWalker(x::AbstractModelConfig)

Random Walk in 2D over NS steps (100 by default). Result is provided as an array and a text file.

By default, RandomWalker.csv will be created in pathof(x). That folder itself is created by setup, possibly via run as below.

MC=ModelConfig(ClimateModels.RandomWalker)
run(MC)
source

Workflows That Run Models

Workflows That Replay Models

JuliaCon 2021 Presentation

Screen Shot 2021-08-31 at 2 25 04 PM

Trying Out The Examples

The examples can be most easy to run using Pluto.jl. The JuliaClimate/Notebooks webpage links to free cloud resources and directions to run notebooks on your own computer.

Alternatively, you can create a PlutoConfig to extract dependencies from the notebook, and operate the notebook via the stanndard methods – setup, build, and launch.

Or, You can run the notebooks directly from the command line interface (CLI) in a terminal window or in the Julia REPL. In this case, one may need to add packages beforehand (see Pkg.add).

include("RandomWalker.jl")

Creating Your Own

Please refer to the User Manual section, and Climate Model Interface in particular, for more on this.

A good way to start can be by 1. converting a modeling workflow (setup, build, launch) into a Pluto notebook; 2. then using the PlutoConfig data structure.

System Requirements

The pure Julia examples should immediately work on any laptop or cloud computing service.

Examples that involve Fortran, Python, or C++ should work in all linux based environments (i.e., Linux and macOS). However, those that rely on a Fortran compiler (gfortran) and / or on Netcdf libraries (libnetcdf-dev,libnetcdff-dev) will require that you e.g. install gfortran.

Tip

All requirements should be preinstalled in the JuliaClimate notebooks binder (see the JuliaClimate notebooks page for detail and directions).