Skip to content

Commit 118adb1

Browse files
BarbieBarbie
Barbie
authored and
Barbie
committed
separated setup and tutorial readmes
1 parent 59acda7 commit 118adb1

File tree

2 files changed

+45
-68
lines changed

2 files changed

+45
-68
lines changed

README.md

+39-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,44 @@ Built off of Gael Forget's MITgcmTools! (https://github.com/gaelforget/MITgcmToo
55

66
# Setup
77

8-
# Example
8+
Dar_One can be run in one of two ways.
9+
1) In a **docker container** using the dar_one_docker image, where all dependencies are handled for you
10+
2) On your local machine, where you have to set up the environment, download dependencies, etc
11+
- this is more time consuming, and I strongly recommend using the docker image
12+
- instructions for local setup are below
13+
14+
## Overview of program structure
15+
16+
Dar_One is a Julia interface for using the [MITgcm](https://mitgcm.org/) with a [Darwin](https://darwinproject.mit.edu/) configuration to include biogeochemical forcing for marine microbes. This means it's composed of two main parts
17+
- [Dar_One Julia](https://github.com/barbara42/Dar_One) - interface for organizing experiments and setting up parameters for model runs
18+
- `MITgcm_path` variable should point to darwin3
19+
- [darwin3](https://github.com/darwinproject/darwin3) - MITgcm source code set up to include all things Darwin
20+
- `dar_one_config` - folder for the base configuration files for Dar_One, which lives in the darwin3/verification/ folder. ([dar_one_config github](https://github.com/barbara42/dar_one_config))
21+
22+
# Setting up with docker
23+
24+
(1) Download and install [docker desktop](https://www.docker.com/).
25+
26+
(2) Get the [dar_one_docker image](https://hub.docker.com/repository/docker/birdy1123/dar_one_docker).
27+
- using the command line, run
28+
29+
`docker pull birdy1123/dar_one_docker`
30+
31+
- If you go to the "Images" tab in the docker desktop UI, you should see "birdy1123/dar_one_docker"
32+
33+
(3) Run a container based on the dar_one_docker image
34+
- using the command line, run
35+
36+
`docker run -it birdy1123/dar_one_docker`
37+
- this runs the container in interactive mode (`-i`) with terminal access (`-t`)
38+
- you should see the prompt change to `root@some-number:/dar_one_docker#`
39+
40+
You're now ready for the [beginner tutorial](beginner_tutorial/README.md)!
41+
# Setting up on local machine
42+
43+
If you have a windows machine, abandon all hope or dual boot linux
44+
45+
TODO!
946

1047
# Contributing
1148

@@ -18,4 +55,4 @@ All other branches are feature branches. Once a feature has been implemented, te
1855

1956
This branch is for people who deeply understand the code and want to beta test new features. Once apropriate testing and tutorials have been created, there will be a merge planned for `main`.
2057

21-
`main` is the most recent and stable version of the code. This branch will be deployed to cloud computing resources and publically available.
58+
`main` is the most recent and stable version of the code. This branch is used for the docker image.

beginner_tutorial/README.md

+6-66
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,12 @@
11
# Dar_One Beginner Tutorial
22

3-
This tutorial is meant to be run in one of two ways.
4-
1) In a **docker container** using the dar_one_docker image, where all dependencies are handled for you
5-
2) On your local machine, where you have to set up the environment, download dependencies, etc
6-
- this is more time consuming, and I strongly recommend using the docker image
7-
- instructions for local setup are below
3+
BEFORE YOU START:
84

9-
## Overview of program structure
5+
Follow the setup guide for using the [dar_one_docker image](../README.md/#setting-up-with-docker) or
6+
for [local machine setup](../README.md/#setting-up-on-local-machine). (HIGHLY recommend using docker over setting up your own machine)
107

11-
Dar_One is a Julia interface for using the [MITgcm](https://mitgcm.org/) with a [Darwin](https://darwinproject.mit.edu/) configuration to include biogeochemical forcing for marine microbes. This means it's composed of two main parts
12-
- [Dar_One Julia](https://github.com/barbara42/Dar_One) - interface for organizing experiments and setting up parameters for model runs
13-
- `MITgcm_path` variable should point to darwin3
14-
- [darwin3](https://github.com/darwinproject/darwin3) - MITgcm source code set up to include all things Darwin
15-
- `dar_one_config` - folder for the base configuration files for Dar_One, which lives in the darwin3/verification/ folder
8+
## Building
169

17-
# Setting up with docker
18-
19-
(1) Download and install [docker desktop](https://www.docker.com/). If you're new to docker, here's some tutorials to learn more
20-
- put
21-
- links
22-
- here
23-
24-
Building
10+
If you're using dar_one_docker...
2511
- you don't have to do anything! I already built the mitgcm executable for the docker container
26-
- the executable is called `mitgcmuv` and lives in the `darwin3/verification/dar_one_config/build` directory
27-
28-
# Setting up on local machine
29-
30-
If you have a windows machine, abandon all hope or dual boot linux
31-
32-
33-
Building
34-
35-
36-
37-
38-
39-
40-
# OLD TUTORIAL
41-
The overall workflow of this tutorial is to run
42-
- `darwin-setup.jl` (which creates the executable and sets up the proper folders on your machine)
43-
- `darwin-run.jl` (where you modify runtime parameters, and then run the model)
44-
- `darwin-plot.jl` (where we look at output)
45-
46-
**Note:** for the plots to show up, darwin-plot.jl must be run from a REPL or notebook. For example, I use VSCode and choose the "Execute active file in REPL" option in the run config.
47-
48-
## darwin-setup.jl
49-
50-
51-
To run on your local machine, make the following changes
52-
- change `MITgcm_path[1]` to point to the root directory of your local version of the darwin MITgcm
53-
- **note**: BUILD DOES NOT WORK FOR ME
54-
- run darwin-setup
55-
- copy down the `config_id` that is printed out in the terminal
56-
57-
## darwin-run.jl
58-
59-
Make the following changes
60-
- update `MITgcm_path[1]` to be the root directory of your local version of the darwin MITgcm
61-
- update `config_id` to be the config_id that was output from running darwin-setup
62-
- modifying runtime parameters
63-
- TODO
64-
65-
## darwin-plot.jl
66-
67-
Update
68-
- `config_id`
69-
- `data_folder` (TODO: more info)
70-
- `folder`
71-
72-
To see the plots this **MUST** be run from a REPL!
12+
- the executable is called `mitgcmuv` and lives in the `darwin3/verification/dar_one_config/build` directory

0 commit comments

Comments
 (0)