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

Create running_example_configurations.md #3334

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions docs/src/running_example_configurations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Introduction
To ensure reporoducibility, packages are managed using (Pkg.jl)[pkgdocs.julialang.org]. If we want to run a configurations from
`ClimaAtmos/config/`, we will need to load the packages listed in `ClimaAtmos/examples/Project.toml`.
This can be done one of two ways:
1) Within the Julia REPL
2) Using the Julia command line interface (CLI)
The latter option is particularlly useful when submitting jobs to a remote machine, such as a High-Performance Cluster (HPC).

## Environment setup:
### REPL
Change to the ClimaAtmos directory
`$ cd ~/ClimaAtmos.jl`
invoke Julia
`$ julia`
open the built-in package manager
`julia> ]`
`@v1.10) pkg>`
Above we see the base Julia environment (for Julia version v1.10).
We can activate the project environment in the current directory with
`@v1.10) pkg> activate .`
`(ClimaAtmos) pkg>`
Note, however, that this is the "bare bones" environment available in base directory of ClimaAtmos.
To run an example configuration without error, we activate the example environment with
` @v1.10) pkg> activate ./examples`
Next, instantiate the environment
`(examples) pkg> instantiate`
This will install and precompile the necssary packages and their dependencies.

### CLI
(TODO)
`julia --project=$EXAMPLES $DRIVER --config_file $CONFIG`

## Creating a simulation
```import ClimaAtmos as CA
import ClimaComms
ClimaComms.@import_required_backends

simulation = CA.get_simulation(CA.AtmosConfig("myconfig.yml"))```

## Running simulation
`CA.solve_atmos!(simulation)`
Loading