Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into ah/calibrate
  • Loading branch information
adelinehillier committed Apr 5, 2022
2 parents e3c12c3 + 3dd370b commit 449a72a
Show file tree
Hide file tree
Showing 29 changed files with 95 additions and 95 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "OceanLearning"
name = "ParameterEstimocean"
uuid = "eca81dc5-87a6-4430-aec8-c76695404a43"
license = "MIT"
authors = ["Adeline Hillier <[email protected]>", "Gregory L. Wagner <[email protected]>", "Navid C. Constantinou <[email protected]>", "and co-contributors"]
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# OceanLearning.jl
# ParameterEstimocean.jl

A Julia package that leverages [Oceananigans.jl](http://github.com/CliMA/Oceananigans.jl/) and [EnsembleKalmanProcesses.jl](https://github.com/CliMA/EnsembleKalmanProcesses.jl) to calibrate ocean turbulence parametrizations.

Continuous Integration: [![Build Status](https://github.com/CliMA/OceanLearning.jl/workflows/CI/badge.svg)](https://github.com/CliMA/OceanLearning.jl/actions?query=workflow%3ACI+branch%3Amaster)
Continuous Integration: [![Build Status](https://github.com/CliMA/ParameterEstimocean.jl/workflows/CI/badge.svg)](https://github.com/CliMA/ParameterEstimocean.jl/actions?query=workflow%3ACI+branch%3Amaster)

Code Coverage: [![codecov](https://codecov.io/gh/CliMA/OceanLearning.jl/branch/main/graph/badge.svg?token=cPeTALmiPU)](https://codecov.io/gh/CliMA/OceanLearning.jl)
Code Coverage: [![codecov](https://codecov.io/gh/CliMA/ParameterEstimocean.jl/branch/main/graph/badge.svg?token=cPeTALmiPU)](https://codecov.io/gh/CliMA/ParameterEstimocean.jl)

Stable Release Documentation: [![Build Status](https://img.shields.io/badge/documentation-stable%20release-blue)](https://clima.github.io/OceanLearning.jl/stable)
Stable Release Documentation: [![Build Status](https://img.shields.io/badge/documentation-stable%20release-blue)](https://clima.github.io/ParameterEstimocean.jl/stable)

Latest Documentation: [![Build Status](https://img.shields.io/badge/documentation-in%20development-orange)](https://clima.github.io/OceanLearning.jl/dev)
Latest Documentation: [![Build Status](https://img.shields.io/badge/documentation-in%20development-orange)](https://clima.github.io/ParameterEstimocean.jl/dev)

Zenodo: [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5762810.svg)](https://doi.org/10.5281/zenodo.5762810)

Expand All @@ -20,7 +20,7 @@ registry so you need to install via Github. To install a tagged version of the p

```julia
julia>]
(v1.6) pkg> add https://github.com/CliMA/OceanLearning.jl#v0.6.0
(v1.6) pkg> add https://github.com/CliMA/ParameterEstimocean.jl#v0.6.0
(v1.6) pkg> instantiate
```

Expand All @@ -29,7 +29,7 @@ install the version on the `#main` branch (or any other branch or commit), e.g.

```julia
julia>]
(v1.6) pkg> add https://github.com/CliMA/OceanLearning.jl#main
(v1.6) pkg> add https://github.com/CliMA/ParameterEstimocean.jl#main
(v1.6) pkg> instantiate
```

Expand All @@ -38,4 +38,4 @@ julia>]

The code is citable via [zenodo](https://zenodo.org). Please cite as:

> Adeline Hillier, Gregory L. Wagner, and Navid C. Constantinou. (2022). CliMA/OceanLearning.jl: OceanLearning.jl v0.10.2 (Version v0.10.2). Zenodo. [http://doi.org/10.5281/zenodo.5762810](http://doi.org/10.5281/zenodo.5762810)
> Adeline Hillier, Gregory L. Wagner, and Navid C. Constantinou. (2022). CliMA/ParameterEstimocean.jl: ParameterEstimocean.jl v0.10.2 (Version v0.10.2). Zenodo. [http://doi.org/10.5281/zenodo.5762810](http://doi.org/10.5281/zenodo.5762810)
12 changes: 6 additions & 6 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
pushfirst!(LOAD_PATH, joinpath(@__DIR__, "..")) # add OceanLearning to environment stack
pushfirst!(LOAD_PATH, joinpath(@__DIR__, "..")) # add ParameterEstimocean to environment stack

using
Documenter,
Literate,
CairoMakie, # so that Literate.jl does not capture precompilation output or warnings
Distributions,
OceanLearning
ParameterEstimocean

# Gotta set this environment variable when using the GR run-time on CI machines.
# This happens when examples, e.g., use Plots.jl to make plots and movies.
Expand Down Expand Up @@ -46,7 +46,7 @@ Timer(t -> println(" "), 0, interval=240)
format = Documenter.HTML(
collapselevel = 2,
prettyurls = get(ENV, "CI", nothing) == "true",
canonical = "https://clima.github.io/OceanLearning/dev/",
canonical = "https://clima.github.io/ParameterEstimocean/dev/",
)

pages = [
Expand All @@ -73,8 +73,8 @@ pages = [
]

makedocs(
sitename = "OceanLearning.jl",
modules = [OceanLearning],
sitename = "ParameterEstimocean.jl",
modules = [ParameterEstimocean],
format = format,
pages = pages,
doctest = true,
Expand All @@ -83,7 +83,7 @@ makedocs(
checkdocs = :exports
)

deploydocs( repo = "github.com/CliMA/OceanLearning.jl",
deploydocs( repo = "github.com/CliMA/ParameterEstimocean.jl",
versions = ["stable" => "v^", "v#.#.#", "dev" => "dev"],
forcepush = true,
devbranch = "main",
Expand Down
4 changes: 2 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# OceanLearning.jl Documentation
# ParameterEstimocean.jl Documentation

## Overview

OceanLearning provides a framework to calibrate turbulence closure parametrizations for ocean models.
ParameterEstimocean provides a framework to calibrate turbulence closure parametrizations for ocean models.
6 changes: 3 additions & 3 deletions docs/src/installation_instructions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation instructions

You can install the latest version of OceanLearning.jl via the built-in
You can install the latest version of ParameterEstimocean.jl via the built-in
package manager (by pressing `]` in the Julia REPL command prompt) to add the package and also to
instantiate/build all the required dependencies

Expand All @@ -12,7 +12,7 @@ To install a tagged version of the package, e.g., v0.6.0, use

```julia
julia>]
(v1.6) pkg> add https://github.com/CliMA/OceanLearning.jl#v0.6.0
(v1.6) pkg> add https://github.com/CliMA/ParameterEstimocean.jl#v0.6.0
(v1.6) pkg> instantiate
```

Expand All @@ -21,6 +21,6 @@ install the version on the `#main` branch (or any other branch or commit), e.g.

```julia
julia>]
(v1.6) pkg> add https://github.com/CliMA/OceanLearning.jl#main
(v1.6) pkg> add https://github.com/CliMA/ParameterEstimocean.jl#main
(v1.6) pkg> instantiate
```
20 changes: 10 additions & 10 deletions docs/src/library/internals.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
# Private types and functions

Documentation for `OceanLearning.jl`'s internal interface.
Documentation for `ParameterEstimocean.jl`'s internal interface.

## OceanLearning
## ParameterEstimocean

```@autodocs
Modules = [OceanLearning]
Modules = [ParameterEstimocean]
Public = false
Pages = ["OceanLearning.jl"]
Pages = ["ParameterEstimocean.jl"]
```

## Transformations

```@autodocs
Modules = [OceanLearning.Transformations]
Modules = [ParameterEstimocean.Transformations]
Public = false
Pages = ["Transformations.jl"]
```

## Observations

```@autodocs
Modules = [OceanLearning.Observations]
Modules = [ParameterEstimocean.Observations]
Public = false
```

## Ensemble Simulations

```@autodocs
Modules = [OceanLearning.EnsembleSimulations]
Modules = [ParameterEstimocean.EnsembleSimulations]
Public = false
```

## Parameters

```@autodocs
Modules = [OceanLearning.Parameters]
Modules = [ParameterEstimocean.Parameters]
Public = false
```

## Inverse Problems

```@autodocs
Modules = [OceanLearning.InverseProblems]
Modules = [ParameterEstimocean.InverseProblems]
Public = false
```

## EnsembleKalmanInversions

```@autodocs
Modules = [OceanLearning.EnsembleKalmanInversions]
Modules = [ParameterEstimocean.EnsembleKalmanInversions]
Public = false
```
18 changes: 9 additions & 9 deletions docs/src/library/public.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
# Public Documentation

Documentation for `OceanLearning.jl`'s public interface.
Documentation for `ParameterEstimocean.jl`'s public interface.

See the Internals section of the manual for internal package docs covering all submodules.

## OceanLearning
## ParameterEstimocean

```@autodocs
Modules = [OceanLearning]
Modules = [ParameterEstimocean]
Private = false
```

## Transformations

```@autodocs
Modules = [OceanLearning.Transformations]
Modules = [ParameterEstimocean.Transformations]
Private = false
```

## Observations

```@autodocs
Modules = [OceanLearning.Observations]
Modules = [ParameterEstimocean.Observations]
Private = false
```

## Ensemble Simulations

```@autodocs
Modules = [OceanLearning.EnsembleSimulations]
Modules = [ParameterEstimocean.EnsembleSimulations]
Private = false
```

## Parameters

```@autodocs
Modules = [OceanLearning.Parameters]
Modules = [ParameterEstimocean.Parameters]
Private = false
```

## Inverse Problems

```@autodocs
Modules = [OceanLearning.InverseProblems]
Modules = [ParameterEstimocean.InverseProblems]
Private = false
```

## EnsembleKalmanInversions

```@autodocs
Modules = [OceanLearning.EnsembleKalmanInversions]
Modules = [ParameterEstimocean.EnsembleKalmanInversions]
Private = false
```
8 changes: 4 additions & 4 deletions examples/calibrate_zonally_averaged_baroclinic_adjustment.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Calibration of Gent-McWilliams to a baroclinic adjustment problem
pushfirst!(LOAD_PATH, joinpath(@__DIR__, ".."))

using OceanLearning
using ParameterEstimocean
using Oceananigans
using Oceananigans.Units
using Oceananigans.Models.HydrostaticFreeSurfaceModels: SliceEnsembleSize
Expand Down Expand Up @@ -37,7 +37,7 @@ close(file)
field_names = (:b, :c, :u, :v)
forward_map_names = (:b, :c)

using OceanLearning.Transformations: Transformation
using ParameterEstimocean.Transformations: Transformation

transformation = (b = ZScore(),
c = ZScore(),
Expand Down Expand Up @@ -108,10 +108,10 @@ priors = (

free_parameters = FreeParameters(priors)

using OceanLearning.Observations: FieldTimeSeriesCollector
using ParameterEstimocean.Observations: FieldTimeSeriesCollector

simulation_fields = fields(simulation.model)
collected_fields = NamedTuple(name => simulation_fields[name] for name in OceanLearning.Observations.forward_map_names(observations))
collected_fields = NamedTuple(name => simulation_fields[name] for name in ParameterEstimocean.Observations.forward_map_names(observations))
time_series_collector = FieldTimeSeriesCollector(collected_fields, observation_times(observations), architecture=CPU())

calibration = InverseProblem(observations, simulation, free_parameters; time_series_collector)
Expand Down
6 changes: 3 additions & 3 deletions examples/calibrate_zonally_averaged_channel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

# ```julia
# using Pkg
# pkg"add OceanLearning, Oceananigans, Distributions, CairoMakie"
# pkg"add ParameterEstimocean, Oceananigans, Distributions, CairoMakie"
# ```

using OceanLearning
using OceanLearning.Observations: FieldTimeSeriesCollector
using ParameterEstimocean
using ParameterEstimocean.Observations: FieldTimeSeriesCollector

using Oceananigans
using Oceananigans.Units
Expand Down
8 changes: 4 additions & 4 deletions examples/exploring_priors.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# # Specifying and fine-tuning prior distributions
#
# This example shows how to specify priors in `OceanLearning`
# This example shows how to specify priors in `ParameterEstimocean`
# and illustrates some of their properties.
#
# ## Install dependencies
Expand All @@ -9,12 +9,12 @@

# ```julia
# using Pkg
# pkg"add OceanLearning, Oceananigans, Distributions, CairoMakie"
# pkg"add ParameterEstimocean, Oceananigans, Distributions, CairoMakie"
# ```
#
# Then we import packages

using OceanLearning
using ParameterEstimocean
using CairoMakie
using Distributions

Expand All @@ -31,7 +31,7 @@ using Distributions
#
# # Prior flavors
#
# `OceanLearning` supports three types of prior
# `ParameterEstimocean` supports three types of prior
# distributions. The normal prior distribution is provided by `Distributions.jl`,

normal_prior = Normal(0.1, 0.1)
Expand Down
8 changes: 4 additions & 4 deletions examples/intro_to_inverse_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

# ```julia
# using Pkg
# pkg"add OceanLearning, Oceananigans, Distributions, CairoMakie"
# pkg"add ParameterEstimocean, Oceananigans, Distributions, CairoMakie"
# ```

# First we load few things

using OceanLearning
using ParameterEstimocean

using Oceananigans
using Oceananigans.Architectures: arch_array
Expand All @@ -30,7 +30,7 @@ using JLD2

# We reuse some utilities from a previous example to build observations:

examples_path = joinpath(pathof(OceanLearning), "..", "..", "examples")
examples_path = joinpath(pathof(ParameterEstimocean), "..", "..", "examples")
include(joinpath(examples_path, "intro_to_observations.jl"))
data_path = generate_synthetic_observations()
observations = SyntheticObservations(data_path, field_names=:b, transformation=ZScore())
Expand Down Expand Up @@ -137,7 +137,7 @@ free_parameters = FreeParameters(priors)
# We visualize our prior distributions by plotting a huge number
# of samples:

using OceanLearning.Parameters: unconstrained_prior, transform_to_constrained
using ParameterEstimocean.Parameters: unconstrained_prior, transform_to_constrained

Nsamples = 50000000

Expand Down
4 changes: 2 additions & 2 deletions examples/intro_to_observations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

# ```julia
# using Pkg
# pkg"add OceanLearning, Oceananigans, CairoMakie"
# pkg"add ParameterEstimocean, Oceananigans, CairoMakie"
# ```

# First we load few things

using OceanLearning
using ParameterEstimocean
using Oceananigans
using Oceananigans.Units
using Oceananigans.TurbulenceClosures: ConvectiveAdjustmentVerticalDiffusivity
Expand Down
Loading

0 comments on commit 449a72a

Please sign in to comment.