diff --git a/Project.toml b/Project.toml index 0228fab..897b77d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ClimateModels" uuid = "f6adb021-9183-4f40-84dc-8cea6f651bb0" authors = ["gaelforget "] -version = "0.2.21" +version = "0.3.0" [deps] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" diff --git a/docs/src/API.md b/docs/src/API.md index a616c82..e7de41e 100644 --- a/docs/src/API.md +++ b/docs/src/API.md @@ -3,16 +3,12 @@ ## Data Structures -`ModelConfig` is the main concrete type of `AbstractModelConfig`. +- `ModelConfig` is the main concrete type of `AbstractModelConfig`; used in the [examples](@ref examples). +- `PlutoConfig` let's us ingest any [Pluto.jl](https://github.com/fonsp/Pluto.jl/wiki) notebook easily via `ClimateModels`' [Notebooks Methods](@ref notebook_methods). ```@docs ModelConfig ModelConfig(::Function) -``` - -`PlutoConfig` is also concrete type of `AbstractModelConfig`. It is provided to use [Pluto.jl](https://github.com/fonsp/Pluto.jl/wiki) notebooks via the interface (see [Notebooks Methods](@ref notebook_methods)). - -```@docs PlutoConfig ``` @@ -25,27 +21,26 @@ launch log ``` -Also provided : [`pathof`](@ref), [`joinpath`](@ref), [`readdir`](@ref), [`show`](@ref), [`clean`](@ref), and [`@ModelRun`](@ref) +Also provided : [`pathof`](@ref), [`joinpath`](@ref), [`cd`](@ref), [`readdir`](@ref), [`show`](@ref), [`clean`](@ref), and [`@ModelRun`](@ref) ## [Notebook Methods](@id notebook_methods) -The `setup` method for `PlutoConfig` uses `unroll` to pre-process notebook codes. - ```@docs setup(::PlutoConfig) -notebooks.update(::PlutoConfig) +update(::PlutoConfig) notebooks.open(::PlutoConfig) -notebooks.unroll -notebooks.reroll ``` +!!! note + `setup` and `update` use `unroll` and `reroll` internally to process notebooks. + ## More ### Simplified API ```@docs -@ModelRun ModelRun +@ModelRun ``` ### Utility Functions @@ -53,6 +48,7 @@ ModelRun ```@docs pathof joinpath +cd readdir show clean diff --git a/docs/src/examples.md b/docs/src/examples.md index 23a0d86..8570fb7 100644 --- a/docs/src/examples.md +++ b/docs/src/examples.md @@ -1,21 +1,19 @@ # [Examples](@id examples) -A good place to start is the [random walk model](RandomWalker.html) example. It is also presented in greater detail in the [Climate Model Interface](@ref) section to further illustrate how things work. - -```@docs -RandomWalker -``` - -The examples broadly fall into two categories : +A good place to start is the [random walk model](RandomWalker.html) example, which is used in the [Climate Model Interface](@ref) documentation. The other examples, below, fall more or less into two categories : - [Workflows That Run Models](@ref run_model_examples) - [Workflows That Replay Models](@ref replay_model_examples) -For each model listed below, the main language or file format is indicated. Models are sorted by increasing problem size. Thus, the included notebook collection illustrates that the [Climate Model Interface](@ref run_model_examples) is applicable to a wide range of model types, programming languages, and problem sizes. +The main language and file format of the model examples vary. The notebook collection shows how [Climate Model Interface](@ref run_model_examples) is easily to a wide range of model types, programming languages, and problem sizes. In [User Manual](@ref manual), the [Climate Model Interface](@ref) 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](@ref) is geared toward users who may want to run or experiment with models. +[Trying Out The Examples](@ref) is geared toward users who may want to experiment with models. + +```@docs +RandomWalker +``` ## [Workflows That Run Models](@id run_model_examples) @@ -35,6 +33,15 @@ In [User Manual](@ref manual), the [Climate Model Interface](@ref) section outli - [ECCO version 4](https://JuliaOcean.github.io/OceanStateEstimation.jl/dev/examples/ECCO_standard_plots.html) (NetCDF) ➭ [code link](https://raw.githubusercontent.com/gaelforget/OceanStateEstimation.jl/master/examples/ECCO/ECCO_standard_plots.jl) - [Pathway Simulations](https://gaelforget.github.io/MITgcmTools.jl/dev/examples/HS94_particles.html) (binary, jld2) ➭ [code link](https://raw.githubusercontent.com/gaelforget/MITgcmTools.jl/master/examples/HS94_particles.jl) + +## JuliaCon 2021 Presentation + +- [notebook view (html)](ClimateModelsJuliaCon2021.html) +- [notebook source (jl)](https://github.com/gaelforget/ClimateModels.jl/blob/master/docs/src/ClimateModelsJuliaCon2021.jl) +- [video recording (mp4)](https://youtu.be/XR5hKCja0uw) + +[![Screen Shot 2021-08-31 at 2 25 04 PM](https://user-images.githubusercontent.com/20276764/131556274-48f3df13-0608-4cd0-acf9-c3e29894a32c.png)](https://youtu.be/XR5hKCja0uw) + ## Trying Out The Examples The examples can be most easy to run using [Pluto.jl](https://github.com/fonsp/Pluto.jl). The [JuliaClimate/Notebooks](https://juliaclimate.github.io/Notebooks) webpage links to free cloud resources and directions to run notebooks on your own computer. diff --git a/docs/src/functionalities.md b/docs/src/functionalities.md index cc06b9a..841a949 100644 --- a/docs/src/functionalities.md +++ b/docs/src/functionalities.md @@ -17,53 +17,51 @@ tmp=joinpath(tempdir(),"notebook.jl") cp(fil,tmp,force=true) ``` -Here we document key functionalities offered in `ClimateModels.jl` - -- Climate model interface -- Pluto notebook integration -- Tracked worklow framework -- File access and cloud support -- Plotting recipes and examples +Here are key functionalities offered in `ClimateModels.jl`. ## Climate Model Interface The interface ties the [`ModelConfig`](@ref) data structure with methods like [`setup`](@ref), [`build`](@ref), and [`launch`](@ref). In return, it provides standard methods to deal with inputs and outputs, as well as capabilities described below. -The [`ModelRun`](@ref) method provides the capability to deploy models in streamlined fashion -- with just one code line, or just one click. It executes all three steps at once ([`setup`](@ref), [`build`](@ref), and [`launch`](@ref)). - -For example, let's use [`RandomWalker`](@ref) as the model main function. +The [`ModelRun`](@ref) method, or just `run`, streamlines the process. It executes all three steps at once ([`setup`](@ref), [`build`](@ref), and [`launch`](@ref)). For example, let's use [`RandomWalker`](@ref) as the model. ```@example 1 fun=ClimateModels.RandomWalker +nothing # hide ``` -With the simplified [`ModelConfig`](@ref) constructor, we can then just write any of the following: +With the simplified [`ModelConfig`](@ref) constructors, we can just write any of the following: -```@example 2 +``` ModelRun(ModelConfig(model=fun)) -run(ModelConfig(fun)) -nothing # hide ``` -Or via the `@ModelRun` macro: +or + +```@example 2 +MC=run(ModelConfig(fun)) +log(MC) +``` + +or ```@example 1 @ModelRun ClimateModels.RandomWalker -nothing # hide ``` -By design of our interface, **it is required** that function `fun` receives a `ModelConfig` as its sole input argument. +By design of the `ClimateModels` interface, **it is required** that `fun` receives a `ModelConfig` as its sole input argument. **This requirement is easily satisfied** in practice. -In practice, **this requirement is easily satisfied**. Input parameters can be specified to `ModelConfig` via the `inputs` keyword argument, or via files instead. See [Parameters](@ref). +Input parameters can be specified via the `inputs` keyword argument, or via files. See [Parameters](@ref). -Often one may prefer to break things down though. Let's start with defining the model: +### Breaking Things Down + +Let's start with defining the model: ```@example 2 MC=ModelConfig(model=fun) -nothing # hide ``` -The sequence of calls within `ModelRun` can then be expanded as shown below. In practice, `setup` typically handles files and software, `build` may compile a chosen model configuration, and `launch` takes care of the main computation. +The sequence of calls within `ModelRun` is expanded below. In practice, `setup` typically handles files and software, `build` gets the model ready, and `launch` starts the model computation. ```@example 2 setup(MC) @@ -88,7 +86,7 @@ pathof(MC) readdir(MC) ``` -The `log` subfolder was created earlier by [`setup`](@ref). The [`log`](@ref) function retrieves the workflow log. +The `log` subfolder was created earlier by [`setup`](@ref). The [`log`](@ref) function can then retrieve the workflow log. ```@example 2 log(MC) @@ -127,7 +125,7 @@ As shown in the [Parameters](@ref) example: ### Parameters -In this example, we illustrate how one can interact with model parameters, rerun a model, and keep track of these workflow steps, +Let's now mofdify model parameters, then rerun a model, and keep track of these workflow steps. After an initial model run of 100 steps, duration `NS` is extended to 200 time steps. The [`put!`](@ref) and [`launch`](@ref) sequence then reruns the model. @@ -165,16 +163,16 @@ Any Pluto notebook is easily integrated to the `ClimateModels.jl` framework via ```@example 3 filename=joinpath(tempdir(),"notebook.jl") -PC=PlutoConfig(filename) +PC=PlutoConfig(filename,(linked_model="MC",)) run(PC) readdir(PC) ``` -This functionality reformats the Pluto notebook via [`unroll`](@ref) and runs the notebook code in the notebook environment. All files get copied into `pathof(PC)` as before. This approach provides a simple way to run in batch mode model configurations documented in notebooks. +The Pluto notebook gets split up into main code (1) and environment (2). This approach provides a simple way to go from model documentation, in notebook format, to large simulations run, done in batch mode. -If a notebook itself contains a `ModelConfig` called `MC` then the corresponding folder is linked into the `PlutoConfig` folder at the end. This feature (ilustrated just above) makes it easy to trace back where the `MC` output files are. +Files get copied into `pathof(PC)` as before. If `notebook.jl` contains a `ModelConfig`, let's call it `MC`, then the `pathof(MC)` folder can be linked into `pathof(PC)` at the end. This feature is controlled by `linked_model` as illustrated just before. A data input folder can be specified via the `data_folder` key. This will result in the specified folder getting linked into `pathof(PC)` before running the notebook. -The [`update`](@ref) method for a [`PlutoConfig`](@ref) adds a simple method for updating notebook dependencies. This is a routine maintanance operation, which is often followed by rerunning the notebook to detect potential updating issues. +[`update`](@ref) provides a simple method for updating notebook dependencies. Such routine maintanance is often followed by rerunning the notebook to detect potential updating issues. ```@example 3 update(PlutoConfig(filename)) @@ -184,9 +182,9 @@ nothing # hide ## Files and Cloud Support -There are various ways that numerical model output gets archived, distributed, and retrieved. In some cases downloading data from the web can be most convenient. In others we would compute in the cloud and just download final results for plotting. +Numerical model output often gets archived, distributed, and retrieved over the web. Some times, downloading data is most convenient. In other cases, it is preferable to compute in the cloud and just download final results. -`ClimateModels.jl` leverages standard Julia packages to read common file formats. [Downloads.jl](https://github.com/JuliaLang/Downloads.jl), [NetCDF.jl](https://github.com/JuliaGeo/NetCDF.jl), [DataFrames.jl](https://github.com/JuliaData/DataFrames.jl), [CSV.jl](https://github.com/JuliaData/CSV.jl), and [TOML.jl](https://github.com/JuliaLang/TOML.jl) are direct dependencies of `ClimateModels.jl`. This makes it easy to read and write such files. +`ClimateModels.jl` has examples for most common file formats. These are handled via [Downloads.jl](https://github.com/JuliaLang/Downloads.jl), [NetCDF.jl](https://github.com/JuliaGeo/NetCDF.jl), [DataFrames.jl](https://github.com/JuliaData/DataFrames.jl), [CSV.jl](https://github.com/JuliaData/CSV.jl), and [TOML.jl](https://github.com/JuliaLang/TOML.jl). ```@example 1 fil=joinpath(pathof(mc),"run02.csv") @@ -198,4 +196,5 @@ CSV.File(fil) |> DataFrame summary(ans) # hide ``` -For examples with [NetCDF](https://github.com/JuliaGeo/NetCDF.jl) and [Zarr](https://github.com/meggart/Zarr.jl), please refer to [IPCC notebook](../examples/IPCC.html) (NetCDF) and [CMIP6 notebok](../examples/CMIP6.html) (Zarr). +!!! note + For more examples with [NetCDF.jl](https://github.com/JuliaGeo/NetCDF.jl) and [Zarr.jl](https://github.com/meggart/Zarr.jl), please look at [IPCC notebook](../examples/IPCC.html) and [CMIP6 notebok](../examples/CMIP6.html). diff --git a/docs/src/index.md b/docs/src/index.md index f3ffa4a..21ac23c 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,13 +1,10 @@ # ClimateModels.jl -This package provides a uniform interface to climate models of varying complexity and completeness. Models that range from low dimensional to whole Earth System models can be run and/or analyzed via this framework. - -It also supports e.g. cloud computing workflows that start from previous model output available over the internet. Version control, using _git_, is included to allow for workflow documentation and reproducibility. - -The [JuliaCon 2021 Presentation](https://youtu.be/XR5hKCja0uw) provides a brief (8') overview and demo of the package. - -Please refer to [User Manual](@ref manual), [Examples](@ref examples), and [API Reference](@ref api) for more detail. - +`ClimateModels.jl` provides a uniform interface to climate models of varying complexity and completeness. It is aimed at any model from highly simplified to whole Earth System models. + + +`ClimateModels.jl` also supports workflows that leverage model output available online. Version control, using _git_, allows for easy workflow documentation and reproducibility. + ### [Table Of Contents](@id main-contents) ```@contents @@ -16,12 +13,10 @@ Pages = [ "examples.md", "API.md", ] -Depth = 2 +Depth = 1 ``` -- **JuliaCon 2021 Presentation** - - [video recording (mp4)](https://youtu.be/XR5hKCja0uw) - - [notebook view (html)](ClimateModelsJuliaCon2021.html) - - [notebook source (jl)](https://github.com/gaelforget/ClimateModels.jl/blob/master/docs/src/ClimateModelsJuliaCon2021.jl) +### Video -[![Screen Shot 2021-08-31 at 2 25 04 PM](https://user-images.githubusercontent.com/20276764/131556274-48f3df13-0608-4cd0-acf9-c3e29894a32c.png)](https://youtu.be/XR5hKCja0uw) +- [JuliaCon 2021 Presentation](https://youtu.be/XR5hKCja0uw) (8') +- [JuliaCon 2023 Presentation](https://youtu.be/_Y6mNrN7eWA?si=gP_BITSTLHhFC20N) (20') diff --git a/examples/FaIR_module.jl b/examples/FaIR_module.jl index 9b2b767..759230b 100644 --- a/examples/FaIR_module.jl +++ b/examples/FaIR_module.jl @@ -32,7 +32,6 @@ Concrete type of `AbstractModelConfig` for `FaIR` model. Base.@kwdef struct FaIR_config <: AbstractModelConfig model :: String = "FaIR" configuration :: String = "rcp45" - options :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() inputs :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() outputs :: OrderedDict{Any,Any} = OrderedDict(:C=>Float64[],:F=>Float64[],:T=>Float64[]) status :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() @@ -95,4 +94,4 @@ function plot(scenarios,temperatures) f end -end \ No newline at end of file +end diff --git a/examples/Hector_module.jl b/examples/Hector_module.jl index d884fb9..26b8c61 100644 --- a/examples/Hector_module.jl +++ b/examples/Hector_module.jl @@ -19,7 +19,6 @@ Concrete type of `AbstractModelConfig` for `Hector` model. Base.@kwdef struct Hector_config <: AbstractModelConfig model :: String = "Hector" configuration :: String = "hector_ssp245.ini" - options :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() inputs :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() outputs :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() status :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() diff --git a/examples/Oceananigans.jl b/examples/Oceananigans.jl index 67776f3..d62bdaa 100644 --- a/examples/Oceananigans.jl +++ b/examples/Oceananigans.jl @@ -16,33 +16,46 @@ end # ╔═╡ cd09078c-61e1-11ec-1253-536acf09f901 begin - using ClimateModels, JLD2, PlutoUI, CairoMakie, Oceananigans, JLD2 -end - -# ╔═╡ 78559b4f-03c5-44f3-b48e-9f3986f13a3c -module myinclude - using ClimateModels - include("Oceananigans_module.jl") + using ClimateModels, JLD2, PlutoUI, CairoMakie, Oceananigans, JLD2, Downloads end # ╔═╡ a5f3898b-5abe-4230-88a9-36c5c823b951 md"""# Non-Hydrostatic Model (Julia) -[Oceananigans.jl](https://clima.github.io/OceananigansDocumentation/stable/) is a fast and friendly fluid flow solver written in Julia that can simulate the incompressible Boussinesq equations, shallow water equations, or hydrostatic Boussinesq equations with a free surface. The model configuration used in this notebook is based off of their [ocean\_wind\_mixing\_and\_convection](https://clima.github.io/OceananigansDocumentation/stable/generated/ocean_wind_mixing_and_convection/) example. +[Oceananigans.jl](https://clima.github.io/OceananigansDocumentation/stable/) is a fast and friendly fluid flow solver written in Julia that can simulate the incompressible Boussinesq equations, shallow water equations, or hydrostatic Boussinesq equations with a free surface. + +The model configuration used in this notebook simulates a daily cycle in seawater termperature for a small ocean patch. It is based off of the [ocean\_wind\_mixing\_and\_convection](https://clima.github.io/OceananigansDocumentation/stable/generated/ocean_wind_mixing_and_convection/) example. """ # ╔═╡ 42495d5e-2c2b-4260-85d5-2d7c5f53e70d -md"""## Select mode run duration +md"""## Select Model Run Duration Nhours = $(@bind Nhours PlutoUI.Select([1,24,48,72],default=1)) hours !!! note - Each change to `Nhours` will reset the computation which may take several minutes to complete -- patience is good. + Each change to _Nhours_ will reset the computation which may take several minutes to complete -- patience is good. """ # ╔═╡ 5ae22c8a-17d9-446e-b0cd-d4af7c9834c8 md"""## Main Computation""" +# ╔═╡ da276d16-9078-4433-85ed-80d502e78a86 +md"""## Extend Model Run Duration + +Add one more hour and rerun ? $(@bind one_more_hour PlutoUI.CheckBox(default=false)) + +!!! note + Each click to _one more hour_ will rerun the model after adding one hour to the run duration. The model will restart from the latest checkpoint (which could be the same as before). +""" + +# ╔═╡ 6c2db333-19e5-468f-aecf-aeb58c66f53c +md"""## Scan Run Folder""" + +# ╔═╡ 78559b4f-03c5-44f3-b48e-9f3986f13a3c +module myinclude + include("Oceananigans_module.jl") +end + # ╔═╡ 3d0c51dd-a018-42f8-8493-b8439baa94f8 begin demo=myinclude.demo @@ -51,7 +64,10 @@ end # ╔═╡ 193a8750-39bd-451f-8e22-4af1b25be22b begin - MC=demo.Oceananigans_config(configuration="ocean_wind_mixing_and_convection",inputs=Dict("Nh" => Nhours)) + checkpoint_url="https://zenodo.org/record/8322234/files/model_checkpoint_iteration42423.jld2" + MC=demo.Oceananigans_config(configuration="daily_cycle", + inputs=Dict("Nh" => 144+Nhours, "checkpoint" => checkpoint_url) + ) ✔1="Model Configuation Defined" end @@ -63,7 +79,7 @@ begin ✔1 demo.setup(MC) demo.build(MC) - ✔2="Done with `setup` and `buid`" + ✔2="Done with setup and build" end # ╔═╡ 98d35bec-ba79-4e43-a79e-68714d88a1ff @@ -76,14 +92,19 @@ end # ╔═╡ be6b4de1-1e6d-42b0-ba3e-12a9fa2c140d begin ✔3 - #MC.inputs["Nh"]=72 - #simulation2=demo.build_simulation(MC.outputs["model"],MC.inputs["Nh"],pathof(MC)) - #demo.run!(simulation2, pickup=true) + if one_more_hour + MC.inputs["Nh"]=MC.inputs["Nh"]+1 + put!(MC,demo.rerun) + launch(MC) + ✔4="Done with rerun" + else + ✔4="Skipped rerun" + end end # ╔═╡ 851a7116-a781-4f86-887f-99dcf0a21ea2 begin - ✔3 + ✔4 nt=demo.nt_from_jld2(MC) PlutoUI.with_terminal() do @@ -110,7 +131,7 @@ demo.xz_plot(MC,tt) # ╔═╡ 1b932395-501f-42ba-940c-9512bdace2b8 begin T,S,w,νₑ=demo.tz_slice(MC,nt=nt) - md"""## Time-Depth Plots + md"""## Plot Time vs Depth Here we compute the model mean (rhs plots) or root mean squared (lhs column) for each level and time step. """ @@ -121,30 +142,33 @@ tz_fig=demo.tz_plot(MC,T,S,w,νₑ) #save(joinpath(pathof(MC),"tz_4days.png"), tz_fig) + + # ╔═╡ 00000000-0000-0000-0000-000000000001 PLUTO_PROJECT_TOML_CONTENTS = """ [deps] CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" ClimateModels = "f6adb021-9183-4f40-84dc-8cea6f651bb0" +Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" Oceananigans = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09" PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" [compat] -CairoMakie = "~0.8.5" -ClimateModels = "~0.2.7" -JLD2 = "~0.4.22" -Oceananigans = "~0.67.1" -PlutoUI = "~0.7.39" +CairoMakie = "~0.10.8" +ClimateModels = "~0.2.21" +JLD2 = "~0.4.33" +Oceananigans = "~0.87.1" +PlutoUI = "~0.7.52" """ # ╔═╡ 00000000-0000-0000-0000-000000000002 PLUTO_MANIFEST_TOML_CONTENTS = """ # This file is machine-generated - editing it directly is not advised -julia_version = "1.9.1" +julia_version = "1.9.3" manifest_format = "2.0" -project_hash = "431360059c17ba2e122fc1fb809196688674b4fb" +project_hash = "e43646d3033bc10a1b65a52c804c90fede46fc3b" [[deps.AbstractFFTs]] deps = ["LinearAlgebra"] @@ -157,6 +181,11 @@ weakdeps = ["ChainRulesCore", "Test"] AbstractFFTsChainRulesCoreExt = "ChainRulesCore" AbstractFFTsTestExt = "Test" +[[deps.AbstractLattices]] +git-tree-sha1 = "f35684b7349da49fcc8a9e520e30e45dbb077166" +uuid = "398f06c4-4d28-53ec-89ca-5b2656b7603d" +version = "0.2.1" + [[deps.AbstractPlutoDingetjes]] deps = ["Pkg"] git-tree-sha1 = "91bd53c39b9cbfb5ef4b015e8b582d344532bd0a" @@ -189,14 +218,36 @@ uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" version = "1.1.1" [[deps.ArrayInterface]] -deps = ["IfElse", "LinearAlgebra", "Requires", "SparseArrays", "Static"] -git-tree-sha1 = "d84c956c4c0548b4caf0e4e96cf5b6494b5b1529" +deps = ["Adapt", "LinearAlgebra", "Requires", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "f83ec24f76d4c8f525099b2ac475fc098138ec31" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "3.1.32" +version = "7.4.11" + + [deps.ArrayInterface.extensions] + ArrayInterfaceBandedMatricesExt = "BandedMatrices" + ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" + ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" + ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" + ArrayInterfaceTrackerExt = "Tracker" + + [deps.ArrayInterface.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +[[deps.Atomix]] +deps = ["UnsafeAtomics"] +git-tree-sha1 = "c06a868224ecba914baa6942988e2f2aade419be" +uuid = "a9b6321e-bd34-4604-b9c9-b65b8de01458" +version = "0.1.0" + [[deps.Automa]] deps = ["TranscodingStreams"] git-tree-sha1 = "ef9997b3d5547c48b41c7bd8899e812a917b409d" @@ -216,10 +267,10 @@ uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9" version = "0.4.7" [[deps.BFloat16s]] -deps = ["LinearAlgebra", "Test"] -git-tree-sha1 = "4af69e205efc343068dc8722b8dfec1ade89254a" +deps = ["LinearAlgebra", "Printf", "Random", "Test"] +git-tree-sha1 = "dbf84058d0a8cbbadee18d25cf606934b22d7c66" uuid = "ab4f0b2a-ad5b-11e8-123f-65d77653426b" -version = "0.1.0" +version = "0.4.2" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" @@ -241,6 +292,21 @@ git-tree-sha1 = "ed2e76c1c3c43fd9d0cb9248674620b29d71f2d1" uuid = "179af706-886a-5703-950a-314cd64e0468" version = "0.1.2" +[[deps.CRC32c]] +uuid = "8bf52ea8-c179-5cab-976a-9e18b702a9bc" + +[[deps.CRlibm]] +deps = ["CRlibm_jll"] +git-tree-sha1 = "32abd86e3c2025db5172aa182b982debed519834" +uuid = "96374032-68de-5a5b-8d9e-752f78720389" +version = "1.0.1" + +[[deps.CRlibm_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e329286945d0cfc04456972ea732551869af1cfc" +uuid = "4e9b3aee-d8a1-5a3d-ad8b-7d824db253f0" +version = "1.0.1+0" + [[deps.CSV]] deps = ["CodecZlib", "Dates", "FilePathsBase", "InlineStrings", "Mmap", "Parsers", "PooledArrays", "PrecompileTools", "SentinelArrays", "Tables", "Unicode", "WeakRefStrings", "WorkerUtilities"] git-tree-sha1 = "44dbf560808d49041989b8a96cae4cffbeb7966a" @@ -248,16 +314,28 @@ uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" version = "0.10.11" [[deps.CUDA]] -deps = ["AbstractFFTs", "Adapt", "BFloat16s", "CEnum", "CompilerSupportLibraries_jll", "DataStructures", "ExprTools", "GPUArrays", "GPUCompiler", "LLVM", "LazyArtifacts", "Libdl", "LinearAlgebra", "Logging", "Printf", "Random", "Random123", "RandomNumbers", "Reexport", "Requires", "SparseArrays", "SpecialFunctions", "TimerOutputs"] -git-tree-sha1 = "8c665cc72fc741376951d27ca08c7b782d852626" +deps = ["AbstractFFTs", "Adapt", "BFloat16s", "CEnum", "CUDA_Driver_jll", "CUDA_Runtime_Discovery", "CUDA_Runtime_jll", "ExprTools", "GPUArrays", "GPUCompiler", "KernelAbstractions", "LLVM", "LazyArtifacts", "Libdl", "LinearAlgebra", "Logging", "Preferences", "Printf", "Random", "Random123", "RandomNumbers", "Reexport", "Requires", "SparseArrays", "SpecialFunctions", "UnsafeAtomicsLLVM"] +git-tree-sha1 = "35160ef0f03b14768abfd68b830f8e3940e8e0dc" uuid = "052768ef-5323-5732-b1bb-66c8b64840ba" -version = "3.3.6" +version = "4.4.0" -[[deps.CUDAKernels]] -deps = ["Adapt", "CUDA", "Cassette", "KernelAbstractions", "SpecialFunctions", "StaticArrays"] -git-tree-sha1 = "81f76297b63c67723b1d60f5e7e002ae3393974b" -uuid = "72cfdca4-0801-4ab0-bf6a-d52aa10adc57" -version = "0.3.0" +[[deps.CUDA_Driver_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] +git-tree-sha1 = "498f45593f6ddc0adff64a9310bb6710e851781b" +uuid = "4ee394cb-3365-5eb0-8335-949819d2adfc" +version = "0.5.0+1" + +[[deps.CUDA_Runtime_Discovery]] +deps = ["Libdl"] +git-tree-sha1 = "bcc4a23cbbd99c8535a5318455dcf0f2546ec536" +uuid = "1af6417a-86b4-443c-805f-a4643ffb695f" +version = "0.2.2" + +[[deps.CUDA_Runtime_jll]] +deps = ["Artifacts", "CUDA_Driver_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"] +git-tree-sha1 = "5248d9c45712e51e27ba9b30eebec65658c6ce29" +uuid = "76a88914-d11a-5bdc-97e0-2f5a05c973a2" +version = "0.6.0+0" [[deps.Cairo]] deps = ["Cairo_jll", "Colors", "Glib_jll", "Graphics", "Libdl", "Pango_jll"] @@ -266,10 +344,10 @@ uuid = "159f3aea-2a34-519c-b102-8c37f9878175" version = "1.0.5" [[deps.CairoMakie]] -deps = ["Base64", "Cairo", "Colors", "FFTW", "FileIO", "FreeType", "GeometryBasics", "LinearAlgebra", "Makie", "SHA"] -git-tree-sha1 = "387e0102f240244102814cf73fe9fbbad82b9e9e" +deps = ["Base64", "Cairo", "Colors", "FFTW", "FileIO", "FreeType", "GeometryBasics", "LinearAlgebra", "Makie", "PrecompileTools", "SHA"] +git-tree-sha1 = "30562a68ded3dabe80109caf6b4de73a48ac27bc" uuid = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" -version = "0.8.13" +version = "0.10.8" [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] @@ -283,11 +361,6 @@ git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" version = "0.5.1" -[[deps.Cassette]] -git-tree-sha1 = "a70f220ea09ec61401745ff338f8fb340420165c" -uuid = "7057c7e9-c182-5462-911a-8362d720325c" -version = "0.3.11" - [[deps.ChainRulesCore]] deps = ["Compat", "LinearAlgebra", "SparseArrays"] git-tree-sha1 = "e30f2f4e20f7f186dc36529910beaedc60cfa644" @@ -296,9 +369,9 @@ version = "1.16.0" [[deps.ClimateModels]] deps = ["CSV", "DataFrames", "Dates", "Downloads", "Git", "NetCDF", "OrderedCollections", "Pkg", "Statistics", "Suppressor", "TOML", "Test", "UUIDs"] -git-tree-sha1 = "f1451b5b8af53b3944b2c336800197ab19c5da13" +git-tree-sha1 = "c4a6540873747572d4f568f07b61bcbf64b1ede2" uuid = "f6adb021-9183-4f40-84dc-8cea6f651bb0" -version = "0.2.19" +version = "0.2.21" [[deps.CodecZlib]] deps = ["TranscodingStreams", "Zlib_jll"] @@ -336,6 +409,23 @@ git-tree-sha1 = "fc08e5930ee9a4e03f84bfb5211cb54e7769758a" uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" version = "0.12.10" +[[deps.Combinatorics]] +git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" +uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" +version = "1.0.2" + +[[deps.CommonDataModel]] +deps = ["CFTime", "DataStructures", "Dates", "Preferences", "Printf"] +git-tree-sha1 = "2678b3fc170d582655a14d22867b031b6e43c2d4" +uuid = "1fbeeb36-5f17-413c-809b-666fb144f157" +version = "0.2.4" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools", "Test"] +git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.0" + [[deps.Compat]] deps = ["UUIDs"] git-tree-sha1 = "e460f044ca8b99be31d35fe54fc33a5c33dd8ed7" @@ -349,7 +439,18 @@ weakdeps = ["Dates", "LinearAlgebra"] [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.2+0" +version = "1.0.5+0" + +[[deps.ConstructionBase]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "fe2838a593b5f776e1597e086dcd47560d94e816" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.3" +weakdeps = ["IntervalSets", "StaticArrays"] + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseStaticArraysExt = "StaticArrays" [[deps.Contour]] git-tree-sha1 = "d05d9e7b7aedff4e5b51a029dced05cfb6125781" @@ -362,10 +463,10 @@ uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" version = "4.1.1" [[deps.CubedSphere]] -deps = ["Elliptic", "Printf", "Rotations", "TaylorSeries", "Test"] -git-tree-sha1 = "d5b15ff3bc2073a864f38a09b446a3b735a96125" +deps = ["Elliptic", "FFTW", "Printf", "ProgressBars", "SpecialFunctions", "TaylorSeries", "Test"] +git-tree-sha1 = "131498c78453d02b4821d8b93f6e44595399f19f" uuid = "7445602f-e544-4518-8976-18f8e8ae6cdb" -version = "0.2.1" +version = "0.2.3" [[deps.DataAPI]] git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c" @@ -393,6 +494,22 @@ version = "1.0.0" deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +[[deps.DelaunayTriangulation]] +deps = ["DataStructures", "EnumX", "ExactPredicates", "Random", "SimpleGraphs"] +git-tree-sha1 = "a1d8532de83f8ce964235eff1edeff9581144d02" +uuid = "927a84f5-c5f4-47a5-9785-b46e178433df" +version = "0.7.2" +weakdeps = ["MakieCore"] + + [deps.DelaunayTriangulation.extensions] + DelaunayTriangulationMakieCoreExt = "MakieCore" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + [[deps.DiffRules]] deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" @@ -405,6 +522,16 @@ git-tree-sha1 = "7e8dcba9d1d1ba8aa576f7d899d42e04d76431b2" uuid = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3" version = "0.3.15" +[[deps.Distances]] +deps = ["LinearAlgebra", "Statistics", "StatsAPI"] +git-tree-sha1 = "b6def76ffad15143924a2199f72a5cd883a2e8a9" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.9" +weakdeps = ["SparseArrays"] + + [deps.Distances.extensions] + DistancesSparseArraysExt = "SparseArrays" + [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" @@ -425,9 +552,9 @@ version = "0.25.100" [[deps.DocStringExtensions]] deps = ["LibGit2"] -git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b" +git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.8.6" +version = "0.9.3" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] @@ -451,6 +578,22 @@ git-tree-sha1 = "71c79e77221ab3a29918aaf6db4f217b89138608" uuid = "b305315f-e792-5b7a-8f41-49f472929428" version = "1.0.1" +[[deps.EnumX]] +git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" +uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" +version = "1.0.4" + +[[deps.ErrorfreeArithmetic]] +git-tree-sha1 = "d6863c556f1142a061532e79f611aa46be201686" +uuid = "90fa49ef-747e-5e6f-a989-263ba693cf1a" +version = "0.5.2" + +[[deps.ExactPredicates]] +deps = ["IntervalArithmetic", "Random", "StaticArraysCore", "Test"] +git-tree-sha1 = "276e83bc8b21589b79303b9985c321024ffdf59c" +uuid = "429591f6-91af-11e9-00e2-59fbe8cec110" +version = "2.2.5" + [[deps.Expat_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "4558ab818dcceaab612d1bb8c19cee87eda2b83c" @@ -491,6 +634,12 @@ git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea" uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" version = "3.3.10+0" +[[deps.FastRounding]] +deps = ["ErrorfreeArithmetic", "LinearAlgebra"] +git-tree-sha1 = "6344aa18f654196be82e62816935225b3b9abe44" +uuid = "fa42c844-2597-5d31-933b-ebd51ab2693f" +version = "0.3.1" + [[deps.FileIO]] deps = ["Pkg", "Requires", "UUIDs"] git-tree-sha1 = "299dc33549f68299137e51e6d49a13b5b1da9673" @@ -507,10 +656,31 @@ version = "0.9.20" uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[deps.FillArrays]] -deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] -git-tree-sha1 = "f372472e8672b1d993e93dada09e23139b509f9e" +deps = ["LinearAlgebra", "Random"] +git-tree-sha1 = "a20eaa3ad64254c61eeb5f230d9306e937405434" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.5.0" +version = "1.6.1" +weakdeps = ["SparseArrays", "Statistics"] + + [deps.FillArrays.extensions] + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" + +[[deps.FiniteDiff]] +deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"] +git-tree-sha1 = "c6e4a1fbe73b31a3dea94b1da449503b8830c306" +uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" +version = "2.21.1" + + [deps.FiniteDiff.extensions] + FiniteDiffBandedMatricesExt = "BandedMatrices" + FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" + FiniteDiffStaticArraysExt = "StaticArrays" + + [deps.FiniteDiff.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [[deps.FixedPointNumbers]] deps = ["Statistics"] @@ -530,6 +700,16 @@ git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" version = "0.4.2" +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "0.10.36" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + [[deps.FreeType]] deps = ["CEnum", "FreeType2_jll"] git-tree-sha1 = "cabd77ab6a6fdff49bfd24af2ebe76e6e018a2b4" @@ -544,9 +724,9 @@ version = "2.10.4+0" [[deps.FreeTypeAbstraction]] deps = ["ColorVectorSpace", "Colors", "FreeType", "GeometryBasics"] -git-tree-sha1 = "b5c7fe9cea653443736d264b85466bad8c574f4a" +git-tree-sha1 = "38a92e40157100e796690421e34a11c107205c86" uuid = "663a7486-cb36-511b-a19d-713bb74d65c9" -version = "0.9.9" +version = "0.10.0" [[deps.FriBidi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -571,10 +751,10 @@ uuid = "46192b85-c4d5-4398-a991-12ede77f4527" version = "0.1.5" [[deps.GPUCompiler]] -deps = ["ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "TimerOutputs", "UUIDs"] -git-tree-sha1 = "4ed2616d5e656c8716736b64da86755467f26cf5" +deps = ["ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "Scratch", "TimerOutputs", "UUIDs"] +git-tree-sha1 = "72b2e3c2ba583d1a7aa35129e56cf92e07c083e3" uuid = "61eb1bfa-7361-4325-ad38-22787b887f55" -version = "0.12.9" +version = "0.21.4" [[deps.GeoInterface]] deps = ["Extents"] @@ -717,6 +897,12 @@ git-tree-sha1 = "3d09a9f60edf77f8a4d99f9e015e8fbf9989605d" uuid = "905a6f67-0a94-5f89-b386-d35d92009cd1" version = "3.1.7+0" +[[deps.IncompleteLU]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "6c676e79f98abb6d33fa28122cad099f1e464afe" +uuid = "40713840-3770-5561-ab4c-a76e7d0d7895" +version = "0.2.1" + [[deps.IndirectArrays]] git-tree-sha1 = "012e604e1c7458645cb8b436f8fba789a51b257f" uuid = "9b13fd28-a010-5f03-acff-a1bbcff69959" @@ -733,6 +919,11 @@ git-tree-sha1 = "9cc2baf75c6d09f9da536ddf58eb2f29dedaf461" uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" version = "1.4.0" +[[deps.IntegerMathUtils]] +git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.2" + [[deps.IntelOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "ad37c091f7d7daf900963171600d7c1c5c3ede32" @@ -749,6 +940,12 @@ git-tree-sha1 = "721ec2cf720536ad005cb38f50dbba7b02419a15" uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" version = "0.14.7" +[[deps.IntervalArithmetic]] +deps = ["CRlibm", "FastRounding", "LinearAlgebra", "Markdown", "Random", "RecipesBase", "RoundingEmulator", "SetRounding", "StaticArrays"] +git-tree-sha1 = "5ab7744289be503d76a944784bac3f2df7b809af" +uuid = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253" +version = "0.20.9" + [[deps.IntervalSets]] deps = ["Dates", "Random"] git-tree-sha1 = "8e59ea773deee525c99a8018409f64f19fb719e6" @@ -765,9 +962,9 @@ uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" version = "1.3.0" [[deps.IrrationalConstants]] -git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151" +git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.1.1" +version = "0.2.2" [[deps.Isoband]] deps = ["isoband_jll"] @@ -780,6 +977,12 @@ git-tree-sha1 = "4ced6667f9974fc5c5943fa5e2ef1ca43ea9e450" uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" version = "1.8.0" +[[deps.IterativeSolvers]] +deps = ["LinearAlgebra", "Printf", "Random", "RecipesBase", "SparseArrays"] +git-tree-sha1 = "1169632f425f79429f245113b775a0e3d121457c" +uuid = "42fd0dbc-a981-5370-80f2-aaf504508153" +version = "0.9.2" + [[deps.IteratorInterfaceExtensions]] git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" uuid = "82899510-4779-5014-852e-03e436cf321d" @@ -822,10 +1025,16 @@ uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" version = "2.1.91+0" [[deps.KernelAbstractions]] -deps = ["Adapt", "Cassette", "InteractiveUtils", "MacroTools", "SpecialFunctions", "StaticArrays", "UUIDs"] -git-tree-sha1 = "16fa699be33b67bc4e65f6516f9e956df8e7d885" +deps = ["Adapt", "Atomix", "InteractiveUtils", "LinearAlgebra", "MacroTools", "PrecompileTools", "Requires", "SparseArrays", "StaticArrays", "UUIDs", "UnsafeAtomics", "UnsafeAtomicsLLVM"] +git-tree-sha1 = "4c5875e4c228247e1c2b087669846941fb6e0118" uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c" -version = "0.7.3" +version = "0.9.8" + + [deps.KernelAbstractions.extensions] + EnzymeExt = "EnzymeCore" + + [deps.KernelAbstractions.weakdeps] + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" [[deps.KernelDensity]] deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"] @@ -841,15 +1050,15 @@ version = "3.100.1+0" [[deps.LLVM]] deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Printf", "Unicode"] -git-tree-sha1 = "f044a2796a9e18e0531b9b3072b0019a61f264bc" +git-tree-sha1 = "8695a49bfe05a2dc0feeefd06b4ca6361a018729" uuid = "929cbde3-209d-540e-8aea-75f648917ca0" -version = "4.17.1" +version = "6.1.0" [[deps.LLVMExtra_jll]] deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"] -git-tree-sha1 = "070e4b5b65827f82c16ae0916376cb47377aa1b5" +git-tree-sha1 = "c35203c1e1002747da220ffc3c0762ce7754b08c" uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" -version = "0.0.18+0" +version = "0.0.23+0" [[deps.LLVMOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -935,15 +1144,33 @@ git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066" uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" version = "2.36.0+0" +[[deps.LightXML]] +deps = ["Libdl", "XML2_jll"] +git-tree-sha1 = "e129d9391168c677cd4800f5c0abb1ed8cb3794f" +uuid = "9c8b4983-aa76-5018-a973-4c85ecc9e179" +version = "0.9.0" + +[[deps.LineSearches]] +deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] +git-tree-sha1 = "7bbea35cec17305fc70a0e5b4641477dc0789d9d" +uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" +version = "7.2.0" + [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +[[deps.LinearAlgebraX]] +deps = ["LinearAlgebra", "Mods", "Permutations", "Primes", "SimplePolynomials"] +git-tree-sha1 = "558a338f1eeabe933f9c2d4052aa7c2c707c3d52" +uuid = "9b3f67b0-2d00-526e-9884-9e4938f8fb88" +version = "0.1.12" + [[deps.LogExpFunctions]] deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "5ab83e1679320064c29e8973034357655743d22d" +git-tree-sha1 = "7d6dd4e9212aebaeed356de34ccf262a3cd415aa" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.25" +version = "0.3.26" [deps.LogExpFunctions.extensions] LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" @@ -970,10 +1197,18 @@ uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" version = "2023.2.0+0" [[deps.MPI]] -deps = ["Distributed", "DocStringExtensions", "Libdl", "MPICH_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "Pkg", "Random", "Requires", "Serialization", "Sockets"] -git-tree-sha1 = "d56a80d8cf8b9dc3050116346b3d83432b1912c0" +deps = ["Distributed", "DocStringExtensions", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "PkgVersion", "PrecompileTools", "Requires", "Serialization", "Sockets"] +git-tree-sha1 = "32cafbe56c7f0b7160a1a6c492773af66c0b722f" uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195" -version = "0.19.2" +version = "0.20.14" + + [deps.MPI.extensions] + AMDGPUExt = "AMDGPU" + CUDAExt = "CUDA" + + [deps.MPI.weakdeps] + AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" [[deps.MPICH_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] @@ -987,23 +1222,29 @@ git-tree-sha1 = "781916a2ebf2841467cda03b6f1af43e23839d85" uuid = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" version = "0.1.9" +[[deps.MPItrampoline_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "6979eccb6a9edbbb62681e158443e79ecc0d056a" +uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" +version = "5.3.1+0" + [[deps.MacroTools]] deps = ["Markdown", "Random"] -git-tree-sha1 = "42324d08725e200c23d4dfb549e0d5d89dede2d2" +git-tree-sha1 = "9ee1618cbf5240e6d4e0371d6f24065083f60c48" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.10" +version = "0.5.11" [[deps.Makie]] -deps = ["Animations", "Base64", "ColorBrewer", "ColorSchemes", "ColorTypes", "Colors", "Contour", "Distributions", "DocStringExtensions", "FFMPEG", "FileIO", "FixedPointNumbers", "Formatting", "FreeType", "FreeTypeAbstraction", "GeometryBasics", "GridLayoutBase", "ImageIO", "IntervalSets", "Isoband", "KernelDensity", "LaTeXStrings", "LinearAlgebra", "MakieCore", "Markdown", "Match", "MathTeXEngine", "Observables", "OffsetArrays", "Packing", "PlotUtils", "PolygonOps", "Printf", "Random", "RelocatableFolders", "Serialization", "Showoff", "SignedDistanceFields", "SparseArrays", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "UnicodeFun"] -git-tree-sha1 = "b0323393a7190c9bf5b03af442fc115756df8e59" +deps = ["Animations", "Base64", "ColorBrewer", "ColorSchemes", "ColorTypes", "Colors", "Contour", "DelaunayTriangulation", "Distributions", "DocStringExtensions", "Downloads", "FFMPEG", "FileIO", "FixedPointNumbers", "Formatting", "FreeType", "FreeTypeAbstraction", "GeometryBasics", "GridLayoutBase", "ImageIO", "InteractiveUtils", "IntervalSets", "Isoband", "KernelDensity", "LaTeXStrings", "LinearAlgebra", "MacroTools", "MakieCore", "Markdown", "Match", "MathTeXEngine", "Observables", "OffsetArrays", "Packing", "PlotUtils", "PolygonOps", "PrecompileTools", "Printf", "REPL", "Random", "RelocatableFolders", "Setfield", "ShaderAbstractions", "Showoff", "SignedDistanceFields", "SparseArrays", "StableHashTraits", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "TriplotBase", "UnicodeFun"] +git-tree-sha1 = "e81675589ba7199a82443e87fc52e17eeceac2e8" uuid = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" -version = "0.17.13" +version = "0.19.8" [[deps.MakieCore]] deps = ["Observables"] -git-tree-sha1 = "fbf705d2bdea8fc93f1ae8ca2965d8e03d4ca98c" +git-tree-sha1 = "f56b09c8b964919373d61750c6d8d4d2c602a2be" uuid = "20f20a25-4f0e-4fdf-b5d1-57303727442b" -version = "0.4.0" +version = "0.6.5" [[deps.MappedArrays]] git-tree-sha1 = "2dab0221fe2b0f2cb6754eaa743cc266339f527e" @@ -1020,10 +1261,10 @@ uuid = "7eb4fadd-790c-5f42-8a69-bfa0b872bfbf" version = "1.2.0" [[deps.MathTeXEngine]] -deps = ["AbstractTrees", "Automa", "DataStructures", "FreeTypeAbstraction", "GeometryBasics", "LaTeXStrings", "REPL", "RelocatableFolders", "Test"] -git-tree-sha1 = "114ef48a73aea632b8aebcb84f796afcc510ac7c" +deps = ["AbstractTrees", "Automa", "DataStructures", "FreeTypeAbstraction", "GeometryBasics", "LaTeXStrings", "REPL", "RelocatableFolders", "Test", "UnicodeFun"] +git-tree-sha1 = "8f52dbaa1351ce4cb847d95568cb29e62a307d93" uuid = "0a4f8689-d25c-4efe-a92b-7142dfc1aa53" -version = "0.4.3" +version = "0.5.6" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] @@ -1045,6 +1286,11 @@ version = "1.1.0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" +[[deps.Mods]] +git-tree-sha1 = "61be59e4daffff43a8cec04b5e0dc773cbb5db3a" +uuid = "7475f97c-0381-53b1-977b-4c60186c8d62" +version = "1.3.3" + [[deps.MosaicViews]] deps = ["MappedArrays", "OffsetArrays", "PaddedViews", "StackViews"] git-tree-sha1 = "7b86a5d4d70a9f5cdf2dacb3cbe6d251d1a61dbe" @@ -1055,11 +1301,22 @@ version = "0.3.4" uuid = "14a3606d-f60d-562e-9121-12d972cd8159" version = "2022.10.11" +[[deps.Multisets]] +git-tree-sha1 = "8d852646862c96e226367ad10c8af56099b4047e" +uuid = "3b2b4ff1-bcff-5658-a3ee-dbcf1ce5ac09" +version = "0.4.4" + [[deps.NCDatasets]] -deps = ["CFTime", "DataStructures", "Dates", "NetCDF_jll", "Printf"] -git-tree-sha1 = "17e39eb5bbe564f48bdbefbd103bd3f49fcfcb9b" +deps = ["CFTime", "CommonDataModel", "DataStructures", "Dates", "NetCDF_jll", "NetworkOptions", "Printf"] +git-tree-sha1 = "4263c4220f22e20729329838bf7e94a49d1ac32f" uuid = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" -version = "0.11.9" +version = "0.12.17" + +[[deps.NLSolversBase]] +deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] +git-tree-sha1 = "a0b464d183da839699f4c79e7606d9d186ec172c" +uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" +version = "7.8.3" [[deps.NaNMath]] deps = ["OpenLibm_jll"] @@ -1074,10 +1331,10 @@ uuid = "30363a11-5582-574a-97bb-aa9a979735b9" version = "0.11.7" [[deps.NetCDF_jll]] -deps = ["Artifacts", "HDF5_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "XML2_jll", "Zlib_jll"] -git-tree-sha1 = "7f5a03e6712f5447c9c344430b8d1927a4777483" +deps = ["Artifacts", "HDF5_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Pkg", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "072f8371f74c3b9e1b26679de7fbf059d45ea221" uuid = "7243133f-43d8-5620-bbf4-c2c921802cf3" -version = "400.902.206+0" +version = "400.902.5+1" [[deps.Netpbm]] deps = ["FileIO", "ImageCore", "ImageMetadata"] @@ -1095,10 +1352,10 @@ uuid = "510215fc-4207-5dde-b226-833fc4488ee2" version = "0.5.4" [[deps.Oceananigans]] -deps = ["Adapt", "CUDA", "CUDAKernels", "Crayons", "CubedSphere", "Dates", "DocStringExtensions", "FFTW", "Glob", "InteractiveUtils", "JLD2", "KernelAbstractions", "LinearAlgebra", "Logging", "MPI", "NCDatasets", "OffsetArrays", "OrderedCollections", "PencilFFTs", "Pkg", "Printf", "Random", "Rotations", "SafeTestsets", "SeawaterPolynomials", "Statistics", "StructArrays", "Tullio"] -git-tree-sha1 = "21f37718763c44c17830f97cda80c98aacf2392b" +deps = ["Adapt", "CUDA", "Crayons", "CubedSphere", "Dates", "Distances", "DocStringExtensions", "FFTW", "Glob", "IncompleteLU", "InteractiveUtils", "IterativeSolvers", "JLD2", "KernelAbstractions", "LinearAlgebra", "Logging", "MPI", "NCDatasets", "OffsetArrays", "OrderedCollections", "PencilArrays", "PencilFFTs", "Pkg", "Printf", "Random", "Rotations", "SeawaterPolynomials", "SparseArrays", "Statistics", "StructArrays"] +git-tree-sha1 = "996eb159d0a1380d09beb7190ed0807d51ba0924" uuid = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09" -version = "0.67.1" +version = "0.87.1" [[deps.OffsetArrays]] deps = ["Adapt"] @@ -1152,6 +1409,12 @@ git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" version = "0.5.5+0" +[[deps.Optim]] +deps = ["Compat", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] +git-tree-sha1 = "963b004d15216f8129f6c0f7d187efa136570be0" +uuid = "429524aa-4258-5aef-a3af-852621145aeb" +version = "1.7.7" + [[deps.Opus_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" @@ -1182,9 +1445,9 @@ version = "0.4.0" [[deps.Packing]] deps = ["GeometryBasics"] -git-tree-sha1 = "1155f6f937fa2b94104162f01fa400e192e4272f" +git-tree-sha1 = "ec3edfe723df33528e085e632414499f26650501" uuid = "19eb6ba3-879d-56ad-ad62-d5c202156566" -version = "0.4.2" +version = "0.5.0" [[deps.PaddedViews]] deps = ["OffsetArrays"] @@ -1198,6 +1461,12 @@ git-tree-sha1 = "84a314e3926ba9ec66ac097e3635e270986b0f10" uuid = "36c8627f-9965-5494-a995-c6b170f724f3" version = "1.50.9+0" +[[deps.Parameters]] +deps = ["OrderedCollections", "UnPack"] +git-tree-sha1 = "34c0e9ad262e5f7fc75b10a9952ca7692cfc5fbe" +uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" +version = "0.12.3" + [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] git-tree-sha1 = "716e24b21538abc91f6205fd1d8363f39b442851" @@ -1205,16 +1474,30 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.7.2" [[deps.PencilArrays]] -deps = ["ArrayInterface", "JSON3", "Libdl", "LinearAlgebra", "MPI", "OffsetArrays", "Reexport", "Requires", "StaticArrays", "StaticPermutations", "Strided", "TimerOutputs"] -git-tree-sha1 = "93a9548253b593293915e11f5e7c0abe7937ca44" +deps = ["Adapt", "JSON3", "LinearAlgebra", "MPI", "OffsetArrays", "Random", "Reexport", "StaticArrayInterface", "StaticArrays", "StaticPermutations", "Strided", "TimerOutputs", "VersionParsing"] +git-tree-sha1 = "c30a7fb1e424ea572962dac493ad6c3f556695e0" uuid = "0e08944d-e94e-41b1-9406-dcf66b6a9d2e" -version = "0.12.0" +version = "0.19.0" + + [deps.PencilArrays.extensions] + PencilArraysDiffEqExt = ["DiffEqBase"] + PencilArraysHDF5Ext = ["HDF5"] + + [deps.PencilArrays.weakdeps] + DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" + HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" [[deps.PencilFFTs]] deps = ["AbstractFFTs", "FFTW", "LinearAlgebra", "MPI", "PencilArrays", "Reexport", "TimerOutputs"] -git-tree-sha1 = "c664883316c03cf75a88fe1a2b38c1a8e33fcd39" +git-tree-sha1 = "bd69f3f0ee248cfb4241800aefb705b5ded592ff" uuid = "4a48f351-57a6-4416-9ec4-c37015456aae" -version = "0.12.7" +version = "0.15.1" + +[[deps.Permutations]] +deps = ["Combinatorics", "LinearAlgebra", "Random"] +git-tree-sha1 = "6e6cab1c54ae2382bcc48866b91cf949cea703a1" +uuid = "2ae35dd2-176d-5d53-8349-f30d82d94d4f" +version = "0.4.16" [[deps.Pixman_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] @@ -1225,7 +1508,7 @@ version = "0.42.2+0" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.9.0" +version = "1.9.2" [[deps.PkgVersion]] deps = ["Pkg"] @@ -1250,17 +1533,39 @@ git-tree-sha1 = "77b3d3605fc1cd0b42d95eba87dfcd2bf67d5ff6" uuid = "647866c9-e3ac-4575-94e7-e3d426903924" version = "0.1.2" +[[deps.Polynomials]] +deps = ["LinearAlgebra", "RecipesBase", "Setfield"] +git-tree-sha1 = "6ded5b759921314670b726dc6ce479675046bc04" +uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45" +version = "4.0.1" + + [deps.Polynomials.extensions] + PolynomialsChainRulesCoreExt = "ChainRulesCore" + PolynomialsMakieCoreExt = "MakieCore" + PolynomialsMutableArithmeticsExt = "MutableArithmetics" + + [deps.Polynomials.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + MakieCore = "20f20a25-4f0e-4fdf-b5d1-57303727442b" + MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" + [[deps.PooledArrays]] deps = ["DataAPI", "Future"] git-tree-sha1 = "a6062fe4063cdafe78f4a0a81cfffb89721b30e7" uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" version = "1.4.2" +[[deps.PositiveFactorizations]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "17275485f373e6673f7e7f97051f703ed5b15b20" +uuid = "85a6dd25-e78a-55b7-8502-1745935b8125" +version = "0.2.4" + [[deps.PrecompileTools]] deps = ["Preferences"] -git-tree-sha1 = "9673d39decc5feece56ef3940e5dafba15ba0f81" +git-tree-sha1 = "03b4c25b43cb84cee5c90aa9b5ea0a78fd848d2f" uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.1.2" +version = "1.2.0" [[deps.Preferences]] deps = ["TOML"] @@ -1274,10 +1579,22 @@ git-tree-sha1 = "ee094908d720185ddbdc58dbe0c1cbe35453ec7a" uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" version = "2.2.7" +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "4c9f306e5d6603ae203c2000dd460d81a5251489" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.4" + [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +[[deps.ProgressBars]] +deps = ["Printf"] +git-tree-sha1 = "b437cdb0385ed38312d91d9c00c20f3798b30256" +uuid = "49802e3a-d2f1-5c88-81d8-b72133a6f568" +version = "1.5.1" + [[deps.ProgressMeter]] deps = ["Distributed", "Printf"] git-tree-sha1 = "d7a7aef8f8f2d537104f170139553b14dfe39fe9" @@ -1343,6 +1660,12 @@ git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" version = "0.1.0" +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + [[deps.Reexport]] git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" uuid = "189a3867-3050-52da-a836-e630ba90ab69" @@ -1350,9 +1673,9 @@ version = "1.2.2" [[deps.RelocatableFolders]] deps = ["SHA", "Scratch"] -git-tree-sha1 = "22c5201127d7b243b9ee1de3b43c408879dff60f" +git-tree-sha1 = "90bc7a7c96410424509e4263e277e43250c05691" uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" -version = "0.3.0" +version = "1.0.0" [[deps.Requires]] deps = ["UUIDs"] @@ -1360,6 +1683,12 @@ git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" uuid = "ae029012-a4dd-5104-9daa-d747884805df" version = "1.3.0" +[[deps.RingLists]] +deps = ["Random"] +git-tree-sha1 = "9712ebc42e91850f35272b48eb840e60c0270ec0" +uuid = "286e9d63-9694-5540-9e3c-4e6708fa07b2" +version = "0.2.7" + [[deps.Rmath]] deps = ["Random", "Rmath_jll"] git-tree-sha1 = "f65dcb5fa46aee0cf9ed6274ccbd597adc49aa7b" @@ -1378,16 +1707,15 @@ git-tree-sha1 = "54ccb4dbab4b1f69beb255a2c0ca5f65a9c82f08" uuid = "6038ab10-8711-5258-84ad-4b1120ba62dc" version = "1.5.1" +[[deps.RoundingEmulator]] +git-tree-sha1 = "40b9edad2e5287e05bd413a38f61a8ff55b9557b" +uuid = "5eaf0fd0-dfba-4ccb-bf02-d820a40db705" +version = "0.2.1" + [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" -[[deps.SafeTestsets]] -deps = ["Test"] -git-tree-sha1 = "36ebc5622c82eb9324005cc75e7e2cc51181d181" -uuid = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" -version = "0.0.1" - [[deps.Scratch]] deps = ["Dates"] git-tree-sha1 = "30449ee12237627992a99d5e30ae63e4d78cd24a" @@ -1395,9 +1723,9 @@ uuid = "6c6a2e73-6563-6170-7368-637461726353" version = "1.2.0" [[deps.SeawaterPolynomials]] -git-tree-sha1 = "a2c62188adfabee9dd25a8bbe6d117ec8ca74169" +git-tree-sha1 = "958ba75b90c7c8a117d041d33184134201cf8c0f" uuid = "d496a93d-167e-4197-9f49-d3af4ff8fe40" -version = "0.2.3" +version = "0.3.2" [[deps.SentinelArrays]] deps = ["Dates", "Random"] @@ -1408,6 +1736,23 @@ version = "1.4.0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +[[deps.SetRounding]] +git-tree-sha1 = "d7a25e439d07a17b7cdf97eecee504c50fedf5f6" +uuid = "3cc68bcd-71a2-5612-b932-767ffbe40ab0" +version = "0.2.1" + +[[deps.Setfield]] +deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] +git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" +uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" +version = "1.1.1" + +[[deps.ShaderAbstractions]] +deps = ["ColorTypes", "FixedPointNumbers", "GeometryBasics", "LinearAlgebra", "Observables", "StaticArrays", "StructArrays", "Tables"] +git-tree-sha1 = "0d15c3e7b2003f4451714f08ffec2b77badc2dc4" +uuid = "65257c39-d410-5151-9873-9b3e5be5013e" +version = "0.3.0" + [[deps.SharedArrays]] deps = ["Distributed", "Mmap", "Random", "Serialization"] uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" @@ -1424,6 +1769,30 @@ git-tree-sha1 = "d263a08ec505853a5ff1c1ebde2070419e3f28e9" uuid = "73760f76-fbc4-59ce-8f25-708e95d2df96" version = "0.4.0" +[[deps.SimpleGraphs]] +deps = ["AbstractLattices", "Combinatorics", "DataStructures", "IterTools", "LightXML", "LinearAlgebra", "LinearAlgebraX", "Optim", "Primes", "Random", "RingLists", "SimplePartitions", "SimplePolynomials", "SimpleRandom", "SparseArrays", "Statistics"] +git-tree-sha1 = "b608903049d11cc557c45e03b3a53e9260579c19" +uuid = "55797a34-41de-5266-9ec1-32ac4eb504d3" +version = "0.8.4" + +[[deps.SimplePartitions]] +deps = ["AbstractLattices", "DataStructures", "Permutations"] +git-tree-sha1 = "dcc02923a53f316ab97da8ef3136e80b4543dbf1" +uuid = "ec83eff0-a5b5-5643-ae32-5cbf6eedec9d" +version = "0.3.0" + +[[deps.SimplePolynomials]] +deps = ["Mods", "Multisets", "Polynomials", "Primes"] +git-tree-sha1 = "d537c31cf9995236166e3e9afc424a5a1c59ff9d" +uuid = "cc47b68c-3164-5771-a705-2bc0097375a0" +version = "0.2.14" + +[[deps.SimpleRandom]] +deps = ["Distributions", "LinearAlgebra", "Random"] +git-tree-sha1 = "3a6fb395e37afab81aeea85bae48a4db5cd7244a" +uuid = "a6525b86-64cd-54fa-8f65-62fc48bdc0e8" +version = "0.3.1" + [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" @@ -1436,6 +1805,12 @@ git-tree-sha1 = "2da10356e31327c7096832eb9cd86307a50b1eb6" uuid = "45858cf5-a6b0-47a3-bbea-62219f50df47" version = "0.1.3" +[[deps.SnoopPrecompile]] +deps = ["Preferences"] +git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" +uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" +version = "1.0.3" + [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" @@ -1450,10 +1825,20 @@ deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [[deps.SpecialFunctions]] -deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "6da46b16e6bca4abe1b6c6fa40b94beb0c87f4ac" +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "1.8.8" +version = "2.3.1" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.StableHashTraits]] +deps = ["CRC32c", "Compat", "Dates", "SHA", "Tables", "TupleTools", "UUIDs"] +git-tree-sha1 = "0b8b801b8f03a329a4e86b44c5e8a7d7f4fe10a3" +uuid = "c5dd0088-6c3f-4803-b00e-f31a60c170fa" +version = "0.3.1" [[deps.StackViews]] deps = ["OffsetArrays"] @@ -1463,9 +1848,20 @@ version = "0.1.1" [[deps.Static]] deps = ["IfElse"] -git-tree-sha1 = "a8f30abc7c64a39d389680b74e749cf33f872a70" +git-tree-sha1 = "f295e0a1da4ca425659c57441bcb59abb035a4bc" uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" -version = "0.3.3" +version = "0.8.8" + +[[deps.StaticArrayInterface]] +deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "Requires", "SnoopPrecompile", "SparseArrays", "Static", "SuiteSparse"] +git-tree-sha1 = "33040351d2403b84afce74dae2e22d3f5b18edcb" +uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" +version = "1.4.0" +weakdeps = ["OffsetArrays", "StaticArrays"] + + [deps.StaticArrayInterface.extensions] + StaticArrayInterfaceOffsetArraysExt = "OffsetArrays" + StaticArrayInterfaceStaticArraysExt = "StaticArrays" [[deps.StaticArrays]] deps = ["LinearAlgebra", "Random", "StaticArraysCore"] @@ -1500,9 +1896,9 @@ version = "1.6.0" [[deps.StatsBase]] deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "d1bf48bfcc554a3761a133fe3a9bb01488e06916" +git-tree-sha1 = "75ebe04c5bed70b91614d684259b661c9e6274a4" uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.33.21" +version = "0.34.0" [[deps.StatsFuns]] deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] @@ -1519,10 +1915,16 @@ version = "1.3.0" InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" [[deps.Strided]] -deps = ["LinearAlgebra", "TupleTools"] -git-tree-sha1 = "a7a664c91104329c88222aa20264e1a05b6ad138" +deps = ["LinearAlgebra", "StridedViews", "TupleTools"] +git-tree-sha1 = "137303f5e0a39f966b462c53ae2c5c6e34c4828b" uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" -version = "1.2.3" +version = "2.0.3" + +[[deps.StridedViews]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "59cc024139c20d1ed8400c419c6fe608637d583d" +uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" +version = "0.1.2" [[deps.StringManipulation]] git-tree-sha1 = "46da2434b41f41ac3594ee9816ce5541c6096123" @@ -1552,9 +1954,9 @@ version = "5.10.1+6" [[deps.Suppressor]] deps = ["Logging"] -git-tree-sha1 = "37d1976ca8368f6adbe1d65a4deeeda6ee7faa31" +git-tree-sha1 = "34c29aeaea1d120a3403beed6134a76f7d06ef38" uuid = "fd094767-a336-5f1f-9728-57cf17d0bbfb" -version = "0.2.4" +version = "0.2.5" [[deps.TOML]] deps = ["Dates"] @@ -1580,9 +1982,13 @@ version = "1.10.0" [[deps.TaylorSeries]] deps = ["LinearAlgebra", "Markdown", "Requires", "SparseArrays"] -git-tree-sha1 = "87baeec9ad6273ed8040a93fbbbaa039fa955f1f" +git-tree-sha1 = "50718b4fc1ce20cecf28d85215028c78b4d875c2" uuid = "6aa5eb33-94cf-58f4-a9d0-e4b2c4fc25ea" -version = "0.12.2" +version = "0.15.2" +weakdeps = ["IntervalArithmetic"] + + [deps.TaylorSeries.extensions] + TaylorSeriesIAExt = "IntervalArithmetic" [[deps.TensorCore]] deps = ["LinearAlgebra"] @@ -1617,11 +2023,10 @@ git-tree-sha1 = "aadb748be58b492045b4f56166b5188aa63ce549" uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" version = "0.1.7" -[[deps.Tullio]] -deps = ["ChainRulesCore", "DiffRules", "LinearAlgebra", "Requires"] -git-tree-sha1 = "7871a39eac745697ee512a87eeff06a048a7905b" -uuid = "bc48ee85-29a4-5162-ae0b-a64e1601d4bc" -version = "0.3.5" +[[deps.TriplotBase]] +git-tree-sha1 = "4d4ed7f294cda19382ff7de4c137d24d16adc89b" +uuid = "981d1d27-644d-49a2-9326-4793e63143c3" +version = "0.1.0" [[deps.TupleTools]] git-tree-sha1 = "3c712976c47707ff893cf6ba4354aa14db1d8938" @@ -1637,6 +2042,11 @@ version = "1.5.0" deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +[[deps.UnPack]] +git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" +uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" +version = "1.0.2" + [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" @@ -1646,6 +2056,22 @@ git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" version = "0.4.1" +[[deps.UnsafeAtomics]] +git-tree-sha1 = "6331ac3440856ea1988316b46045303bef658278" +uuid = "013be700-e6cd-48c3-b4a1-df204f14c38f" +version = "0.2.1" + +[[deps.UnsafeAtomicsLLVM]] +deps = ["LLVM", "UnsafeAtomics"] +git-tree-sha1 = "323e3d0acf5e78a56dfae7bd8928c989b4f3083e" +uuid = "d80eeb9a-aca5-4d75-85e5-170c8b632249" +version = "0.1.3" + +[[deps.VersionParsing]] +git-tree-sha1 = "58d6e80b4ee071f5efd07fda82cb9fbe17200868" +uuid = "81def892-9a0e-5fdd-b105-ffc91e053289" +version = "1.3.0" + [[deps.WeakRefStrings]] deps = ["DataAPI", "InlineStrings", "Parsers"] git-tree-sha1 = "b1be2855ed9ed8eac54e5caff2afcdb442d52c23" @@ -1810,10 +2236,12 @@ version = "3.5.0+0" # ╟─193a8750-39bd-451f-8e22-4af1b25be22b # ╟─2fd54b18-27e2-4e90-9d7d-a1057d393a78 # ╟─98d35bec-ba79-4e43-a79e-68714d88a1ff +# ╟─da276d16-9078-4433-85ed-80d502e78a86 # ╟─be6b4de1-1e6d-42b0-ba3e-12a9fa2c140d +# ╟─6c2db333-19e5-468f-aecf-aeb58c66f53c # ╟─851a7116-a781-4f86-887f-99dcf0a21ea2 # ╟─cd09078c-61e1-11ec-1253-536acf09f901 # ╟─78559b4f-03c5-44f3-b48e-9f3986f13a3c -# ╟─3d0c51dd-a018-42f8-8493-b8439baa94f8 +# ╠═3d0c51dd-a018-42f8-8493-b8439baa94f8 # ╟─00000000-0000-0000-0000-000000000001 # ╟─00000000-0000-0000-0000-000000000002 diff --git a/examples/Oceananigans_module.jl b/examples/Oceananigans_module.jl index 4ba7068..cbe3036 100644 --- a/examples/Oceananigans_module.jl +++ b/examples/Oceananigans_module.jl @@ -4,7 +4,7 @@ module demo # pth0=joinpath(tempdir(),"Oceananigans_dev01") # Pkg.activate(pth0) -using Random, Printf, JLD2, Statistics, PlutoUI +using Random, Printf, JLD2, Statistics, PlutoUI, Downloads import CairoMakie as Mkie using ClimateModels @@ -61,7 +61,7 @@ end function build_model(grid,BC,IC) - buoyancy = SeawaterBuoyancy(equation_of_state=LinearEquationOfState(α=2e-4, β=8e-4)) + buoyancy = SeawaterBuoyancy(equation_of_state=LinearEquationOfState(thermal_expansion=2e-4, haline_contraction=8e-4)) model = NonhydrostaticModel( advection = UpwindBiasedFifthOrder(), @@ -94,11 +94,11 @@ function build_simulation(model,Nh,rundir) eddy_viscosity = (; νₑ = model.diffusivity_fields.νₑ) simulation.output_writers[:slices] = JLD2OutputWriter(model, merge(model.velocities, model.tracers, eddy_viscosity), - dir = rundir, - prefix = "ocean_wind_mixing_and_convection", - field_slicer = FieldSlicer(j=Int(model.grid.Ny/2)), + dir = rundir, + filename = "daily_cycle.jld2", + indices = (:,Int(model.grid.Ny/2),:), schedule = TimeInterval(1minute), - force = true) + overwrite_existing = true) simulation.output_writers[:checkpointer] = Checkpointer(model, schedule=TimeInterval(24hour), dir = rundir, prefix="model_checkpoint") @@ -164,7 +164,7 @@ function xz_read(fil,t) end function xz_plot(MC,i;wli=missing,Tli=missing,Sli=missing,νli=missing) - fil=joinpath(pathof(MC),"ocean_wind_mixing_and_convection.jld2") + fil=joinpath(pathof(MC),"daily_cycle.jld2") t,w,T,S,νₑ=xz_read(fil,i) xw, yw, zw, xT, yT, zT=read_grid(MC) @@ -223,7 +223,7 @@ end function tz_slice(MC;nt=1,wli=missing,Tli=missing,Sli=missing,νli=missing) xw, yw, zw, xT, yT, zT=read_grid(MC) - fil=joinpath(pathof(MC),"ocean_wind_mixing_and_convection.jld2") + fil=joinpath(pathof(MC),"daily_cycle.jld2") Tall=Matrix{Float64}(undef,length(zT),nt) Sall=Matrix{Float64}(undef,length(zT),nt) wall=Matrix{Float64}(undef,length(zw),nt) @@ -280,7 +280,7 @@ function tz_plot(MC,T,S,w,νₑ;wli=missing,Tli=missing,Sli=missing,νli=missing end function nt_from_jld2(MC) - fil=joinpath(pathof(MC),"ocean_wind_mixing_and_convection.jld2") + fil=joinpath(pathof(MC),"daily_cycle.jld2") file = jldopen(fil) iterations = parse.(Int, keys(file["timeseries/t"])) times = [file["timeseries/t/$iter"] for iter in iterations] @@ -299,8 +299,7 @@ Concrete type of `AbstractModelConfig` for `Oceananigans.jl` """ Base.@kwdef struct Oceananigans_config <: AbstractModelConfig model :: String = "Oceananigans" - configuration :: String = "ocean_wind_mixing_and_convection" - options :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() + configuration :: String = "daily_cycle" inputs :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() outputs :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() status :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() @@ -320,11 +319,17 @@ function build(x::Oceananigans_config) return true end -Oceananigans_launch(x::Oceananigans_config) = run!(x.outputs["simulation"]) +Oceananigans_launch(x::Oceananigans_config) = run!(x.outputs["simulation"], pickup=true) + +function rerun(x::Oceananigans_config) + simulation=demo.build_simulation(x.outputs["model"],x.inputs["Nh"],pathof(x)) + x.outputs["simulation"]=simulation + run!(simulation, pickup=true) +end function setup(x::Oceananigans_config) - if x.configuration=="ocean_wind_mixing_and_convection" + if x.configuration=="daily_cycle" Qʰ(t) = 200.0 * (1.0-2.0*(mod(t,86400.0)>43200.0)) # W m⁻², surface heat flux (>0 means ocean cooling) u₁₀(t) = 4.0 * (1.0-0.9*(mod(t,86400.0)>43200.0)) # m s⁻¹, wind speed 10 meters above ocean surface Ev(t) = 1e-7 * (1.0-2.0*(mod(t,86400.0)>43200.0)) # m s⁻¹, evaporation rate @@ -347,6 +352,17 @@ function setup(x::Oceananigans_config) x.outputs["IC"]=IC x.outputs["BC"]=BC + if haskey(x.inputs,"checkpoint") + checkpoint_file=joinpath(x,basename(x.inputs["checkpoint"])) + if occursin("http",x.inputs["checkpoint"]) + Downloads.download(x.inputs["checkpoint"],checkpoint_file) + else + cp(x.inputs["checkpoint"],checkpoint_file) + end + end + + println("Oceananigans run directory is \n "*pathof(x)) + return true end diff --git a/examples/Speedy_module.jl b/examples/Speedy_module.jl index 7f4e6f6..0c3e14f 100644 --- a/examples/Speedy_module.jl +++ b/examples/Speedy_module.jl @@ -20,7 +20,6 @@ Concrete type of `AbstractModelConfig` for `SPEEDY` model. Base.@kwdef struct SPEEDY_config <: AbstractModelConfig model :: String = "speedy" configuration :: String = "default" - options :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() inputs :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() outputs :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() status :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() diff --git a/src/interface.jl b/src/interface.jl index 9dbbe73..9a1b9fd 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -1,5 +1,6 @@ import Base: put!, take!, pathof, joinpath, readdir, log, run +import Base.Filesystem: cd abstract type AbstractModelConfig end @@ -24,7 +25,6 @@ ID :: UUID = UUIDs.uuid4() Base.@kwdef struct ModelConfig <: AbstractModelConfig model :: Union{Function,String,Pkg.Types.PackageSpec} = "anonymous" configuration :: Union{Function,String} = "anonymous" - options :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() inputs :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() outputs :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() status :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() @@ -41,7 +41,6 @@ Generic data structure for a model configuration based on a Pluto notebook. Base.@kwdef struct PlutoConfig <: AbstractModelConfig model :: String = "anonymous" configuration :: String = "anonymous" - options :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() inputs :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() outputs :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() status :: OrderedDict{Any,Any} = OrderedDict{Any,Any}() @@ -115,6 +114,14 @@ Same as `joinpath(pathof(x),y...)` """ joinpath(x::AbstractModelConfig,y...) = joinpath(pathof(x),y...) + +""" + cd(x::AbstractModelConfig) + +Temporarily change the current working directory to `x.folder`. +""" +cd(x::AbstractModelConfig) = cd(pathof(x)) + """ readdir(x::AbstractModelConfig) @@ -599,45 +606,79 @@ function git_log_show(x :: AbstractModelConfig) p=joinpath(pathof(x),"log") q=pwd() cd(p) - stdout=joinpath(pathof(x),"tmp.txt") + stdout=tempname() @suppress run(pipeline(`$(git()) log --decorate --oneline --reverse`,stdout)) cd(q) return readlines(stdout) end + +""" + git_log_show(x :: AbstractModelConfig,y:: String) + +Show the record of git commit `y` from the `log` folder. +""" +function git_log_show(x :: AbstractModelConfig,y) + p=joinpath(pathof(x),"log") + q=pwd() + cd(p) + try + tmp=tempname() + @suppress run(pipeline(`$(git()) show $(y)`,tmp)) + println("") + println.(readlines(tmp)); + catch + println("unknown commit id") + end + cd(q) + return +end + """ log(x :: AbstractModelConfig) -Show the record of git commits that have taken place in the `log` folder. +Show the record of `git` commits that have taken place in the `log` folder. """ log(x :: AbstractModelConfig) = git_log_show(x) """ - log(x :: AbstractModelConfig, commit_msg :: String; - fil="", msg="", init=false, prm=false) + log( x :: AbstractModelConfig, y :: String; fil="", msg="", prm=false) + +Show or add a `git` commit to the `log` folder (i.e., `joinpath(x,"log")`). + +1. If no keyword is provided then `y` should be a commit ID from `log(x)` -Keyword arguments work like this +2. Keyword arguments are mutually exclusive (i.e., use only one at a time) and work like this: -- `init==true` : create `log` subfolder, initialize git, and commit initial README.md -- `prm==true` : add files found in `input` or `tracked_parameters/` (if any) to git log -- `!isempty(fil)` : commit changes to file `log/\$(fil)` with message `commit_msg`. +- `msg` is a non empty `String` : commit `msg` to `log/README.md` with message `y`. +- `fil` is a non empty `String` : commit changes to file `log/\$(fil)` with message `y`. If `log/\$(fil)` is unknown to git (i.e. commit errors out) then try adding `log/\$(fil)` first. +- `prm` is `true` : add files found in `input` or `tracked_parameters/` (if any) to git log. -and are mutually exclusive (i.e., use only one at a time). +Example: ``` MC=run(ModelConfig(ClimateModels.RandomWalker,(NS=100,))) MC.inputs[:NS]=200 msg="update tracked_parameters.toml (or skip if up to date)" -log(MC,msg,fil="tracked_parameters.toml",prm=true) +log(MC,msg,prm=true) log(MC) ``` """ -function log(x :: AbstractModelConfig, commit_msg :: String; fil="", msg="", init=false, prm=false) - init ? git_log_init(x) : nothing - prm ? git_log_prm(x) : nothing - !isempty(fil) ? git_log_fil(x :: AbstractModelConfig,fil,commit_msg) : nothing - !isempty(msg) ? git_log_msg(x :: AbstractModelConfig,msg,commit_msg) : nothing +function log(x :: AbstractModelConfig, y :: String; fil="", msg="", init=false, prm=false) + if init + git_log_init(x) + git_log_msg(x,y,y) + elseif prm + git_log_prm(x) + git_log_msg(x,y,y) + elseif !isempty(fil) + git_log_fil(x,fil,y) + elseif !isempty(msg) + git_log_msg(x,msg,y) + else + git_log_show(x,y) + end end #train(x :: AbstractModelConfig,y) = missing diff --git a/src/notebooks.jl b/src/notebooks.jl index 054b436..8b7a397 100644 --- a/src/notebooks.jl +++ b/src/notebooks.jl @@ -215,8 +215,7 @@ build(MC1) launch(MC1) ``` """ -function setup(MC::PlutoConfig;IncludeManifest=true, - AddLines=[add_symlink," ","add_symlink(:MC)"]) +function setup(MC::PlutoConfig;IncludeManifest=true,AddLines=true) default_ClimateModelSetup(MC) @@ -232,13 +231,20 @@ function setup(MC::PlutoConfig;IncludeManifest=true, for jj in ii fn=split(tmp[jj],"\"")[2] filename=joinpath(MC,fn) - fileurl=dirname(MC.model)*"/"*fn - occursin("http",MC.model) ? Downloads.download(fileurl,filename) : filename=cp(fn,filename) + occursin("http",MC.model) ? filelocation=dirname(MC.model)*"/"*fn : filelocation=joinpath(dirname(MC.model),fn) + occursin("http",MC.model) ? Downloads.download(filelocation,filename) : filename=cp(filelocation,filename,force=true) end - if !isempty(AddLines) + if AddLines&&haskey(MC.inputs,:linked_model) open(joinpath(p,"main.jl"), "a") do io - println.(Ref(io),AddLines) + println.(Ref(io),add_symlink) + end + x=MC.inputs[:linked_model] + isa(x,String) ? y=[x] : y=x + for z in y + open(joinpath(p,"main.jl"), "a") do io + println.(Ref(io),"\nadd_symlink(:$(Symbol(z)))") + end end end @@ -258,8 +264,8 @@ function setup(MC::PlutoConfig;IncludeManifest=true, rm(joinpath(p,"Manifest.toml")) end - if haskey(MC.inputs,:data) - symlink(MC.inputs[:data],joinpath(p,basename(MC.inputs[:data]))) + if haskey(MC.inputs,:data_folder) + symlink(abspath(MC.inputs[:data_folder]),joinpath(p,basename(MC.inputs[:data_folder]))) end put!(MC,notebook_launch) @@ -306,7 +312,7 @@ run(PlutoConfig(model="examples/defaults.jl")) ``` """ function update(MC::PlutoConfig) - setup(MC,AddLines=[]) + setup(MC,AddLines=false) reference_project=Pkg.project().path @@ -327,8 +333,8 @@ add_symlink= """function add_symlink(MC::Symbol) if isdefined(Main,MC)&&isa(eval(MC),AbstractModelConfig) pth1=pathof(eval(MC)) - pth2=joinpath(dirname(@__FILE__),basename(pth1)) - msg=" >> linking "*basename(pth1)*" to main run directory" + pth2=joinpath(dirname(@__FILE__),String(MC)*"."*basename(pth1)) + msg=" >> linking "*String(MC)*"."*basename(pth1)*" to main run directory" println.([" ",msg," "]) symlink(pth1,pth2) else