Skip to content

Commit 44353be

Browse files
author
Barbie
committed
documentation progress using documenter
1 parent 118adb1 commit 44353be

File tree

5 files changed

+32
-24
lines changed

5 files changed

+32
-24
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
.DS_Store
2+
3+
docs/build

README.md

+13-19
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
# Dar_One
2-
a zero-D environment in julia powered by Darwin and MITgcm
32

43
Built off of Gael Forget's MITgcmTools! (https://github.com/gaelforget/MITgcmTools.jl)
54

6-
# Setup
7-
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
135

146
## Overview of program structure
157

168
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
9+
- [Dar_One](https://github.com/barbara42/Dar_One) - Julia interface for organizing experiments and setting up parameters for model runs
1810
- `MITgcm_path` variable should point to darwin3
1911
- [darwin3](https://github.com/darwinproject/darwin3) - MITgcm source code set up to include all things Darwin
2012
- `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))
2113

14+
15+
Dar_One can be run in one of two ways.
16+
1) In a **docker container** using the dar_one_docker image, where all dependencies are handled for you
17+
2) On your local machine, where you have to set up the environment, download dependencies, etc
18+
- this is more time consuming, and I strongly recommend using the docker image
19+
- instructions for local setup are below
20+
2221
# Setting up with docker
2322

2423
(1) Download and install [docker desktop](https://www.docker.com/).
@@ -37,22 +36,17 @@ Dar_One is a Julia interface for using the [MITgcm](https://mitgcm.org/) with a
3736
- this runs the container in interactive mode (`-i`) with terminal access (`-t`)
3837
- you should see the prompt change to `root@some-number:/dar_one_docker#`
3938

40-
You're now ready for the [beginner tutorial](beginner_tutorial/README.md)!
39+
You're now ready for the [beginner tutorial](beginner_tutorial)!
4140
# Setting up on local machine
4241

4342
If you have a windows machine, abandon all hope or dual boot linux
4443

45-
TODO!
44+
TODO
4645

4746
# Contributing
4847

49-
We have three main branches
50-
- main
51-
- test
52-
- dev
53-
54-
All other branches are feature branches. Once a feature has been implemented, tested, and documented you can make a pull request to merge it into the `dev` branch. From there, it will be deployed (hopefully in the future). If the deploy passes, it will automatically get merged into the `test` branch.
48+
We have three main branches: `main`, `test`, and `dev`.
5549

56-
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`.
50+
All other branches are feature branches. Once a feature has been implemented, tested, and documented you can make a pull request to merge it into the `dev` branch.
5751

58-
`main` is the most recent and stable version of the code. This branch is used for the docker image.
52+
`main` is the most stable version of the code. This branch is used for the docker image.

beginner_tutorial/README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,10 @@ for [local machine setup](../README.md/#setting-up-on-local-machine). (HIGHLY re
99

1010
If you're using dar_one_docker...
1111
- you don't have to do anything! I already built the mitgcm executable for the docker container
12-
- the executable is called `mitgcmuv` and lives in the `darwin3/verification/dar_one_config/build` directory
12+
- the executable is called `mitgcmuv` and lives in the `darwin3/verification/dar_one_config/build` directory
13+
14+
If you're doing it locally...
15+
- run `julia how-to-build.jl`
16+
- TODO: more info and troubleshooting to come
17+
18+
## Running

src/DarOneTools.jl

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ include("ReadFiles.jl")
1010
include("ModelSteps.jl")
1111
include("NamelistHelpers.jl")
1212

13+
export MITgcm_path, base_configuration, filexe
14+
1315
# Types
1416
export MITgcm_config, MITgcm_namelist
1517

@@ -23,9 +25,6 @@ export update_param, update_tracers, update_tracer, update_temperature, update_d
2325
export create_MITgcm_config, dar_one_run
2426
export tracer_name_to_id, tracer_id_to_name
2527

26-
27-
export MITgcm_path, base_configuration, filexe
28-
2928
#export pause, stop, clock, monitor, train, help
3029
export verification_experiments, read_namelist, write_namelist
3130
export read_mdsio, read_meta, read_available_diagnostics

src/NamelistHelpers.jl

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ using NCDatasets
99
# export tracer_name_to_id
1010
# export update_diagnostic_freq
1111
# export update_temperature
12+
"""
13+
update_param(file_name, group_name, param_name, new_param_value, config_obj)
14+
15+
Speficy a parameter to update
1216
17+
Arguments:
18+
- TODO
19+
"""
1320
function update_param(file_name, group_name, param_name, new_param_value, config_obj)
1421
rundir = joinpath(config_obj.folder, config_obj.ID, "run")
1522
# read the contents of the data file into a namelist
@@ -87,7 +94,7 @@ end
8794
"""
8895
tracer_name_to_id(name)
8996
90-
Return the int in the tracer name. i.e. tracer_name_to_id("TRAC21") will return 21
97+
Return the int in the tracer name. i.e. `tracer_name_to_id("TRAC21")` will return 21
9198
"""
9299
function tracer_name_to_id(name)
93100
return parse(Int64, name[5:6])

0 commit comments

Comments
 (0)