text:
### A Pluto.jl notebook ###
# v0.16.4

using Markdown
using InteractiveUtils

# ╔═╡ 4e55fa2e-3193-11ec-3a50-2defc49cc54d
begin
	using OceanStateEstimation, MeshArrays, NCTiles, MITgcmTools, OceanColorData
	using PlutoUI, JLD2, CairoMakie
	import CairoMakie as Mkie
	"Done with packages"
end

# ╔═╡ 979a1b66-0aaa-4b8f-868c-85db76d3fb99
md"""# Interpolated Climatology Workflow

In this notebook we illustrate how `MeshArrays.jl` and `NCTiles.jl` can be used to:

- start from native-grid output from the [CBIOMES-global](https://cbiomes.readthedocs.io/en/latest/)
- read from file, derive, and interapolate new variables
- write results to CF-compliant NetCDF files

The final product is the `CBIOMES-global-alpha-climatology.nc` file which is available from [this zenodo archive](https://doi.org/10.5281/zenodo.5598417). The companion notebook, `CBIOMES_climatology_plot.jl`, let's you visualize the climatology maps interactively.

`Author: Gaël Forget`

`Date: 2021/10/25`
"""

# ╔═╡ aa41a861-7eca-4dda-92e8-bd8e96f2a21e
PlutoUI.TableOfContents()

# ╔═╡ 5fcb77a8-b234-45d9-a4bd-02bd4eb8fbd9
md"""## Typical Workflow

1. encode functions like `▶a(x,t)`, `▶b(x,t)` to derive target variables
   - input: `x` is path to input variable folder (`nctiles`); `t"` is time record
   - output: one two-dimensional field (the derivation end-result)
1. loop over target variables
   - output result to temporary storage (`jld2` files)
   - create and instantiate new netcdf files (`nc` files)
1. combine all `nc` files into one

!!! note
	- the first time, this notebook generates `half_degree_grid_coeffs.jld2` which may add $O(1')$ runtime
    - derivation methods ▶c, to ▶g illustrate different input/output setups (e.g. N inputs to M outputs)
    - to create and instantiate `nc` files, we define `NCTiles.NCT` instances and simply call `NCTiles.write()`
    - could use infinite time dimension and increment file instead to avoid reading 12 fields at once
"""

# ╔═╡ ad9d39a2-65b3-4fd9-aecd-f360ac34df0f
md"""## Configuration"""

# ╔═╡ d7d0fc22-0bd7-4c4b-9249-8084d75bb33e
md"""## Derivation Methods

The functions provided below derive the target variables listed hereafter.

| Variables [1/3] | Variables [2/3]  | Variables [3/3]  |
|:----------------|:----------------:|-----------------:|
| lon             | lat              |                  |
| SST             | SSS              | Chl              |
| MLD             | EuphoticDepth    | OceanDepth       |
| WindSpeed       | PAR              | TKE              |
| Rrs412          | Rrs443           | Rrs490           |
| Rrs510          | Rrs555           | Rrs670           |

_(note: could generate via `PrettyTables.jl` and `with__terminal` instead)_

### Interpolation, Subsampling
"""

# ╔═╡ 7a1058e4-3813-4b90-a9ee-ad5ff4eb6d6f
begin
	pth0="201805-CBIOMES-climatology/nctiles/"
	γ=GridSpec("LatLonCap",MeshArrays.GRID_LLC90)
	Γ=GridLoad(γ; option="full");
	"Done with reading grid files"
end

# ╔═╡ 3bc4c68a-360d-4dae-bf03-a630d5bc7f24
begin
	lon=[i for i=-179.75:0.5:179.75, j=-89.75:0.5:89.75]
	lat=[j for i=-179.75:0.5:179.75, j=-89.75:0.5:89.75]
	fil_coeffs=joinpath(tempdir(),"half_degree_grid_coeffs.jld2")
	if !isfile(fil_coeffs)
		(f,i,j,w,j_f,j_x,j_y)=InterpolationFactors(Γ,vec(lon),vec(lat))
		jldsave(fil_coeffs;f,i,j,w,j_f,j_x,j_y)
	end
	C=load(fil_coeffs)
	"Done with interpolation coefficients"
end

# ╔═╡ 6eb8c05c-2624-4535-906b-3e38d502c997
begin
	function ▶a(x::String,t::Int) #Γ,lon,C from calling scope
		y=basename(x)
		X=read_nctiles(x,y,γ;I=(:,:,1,t))[:,1]
		X[findall(Γ.hFacC[:,1] .== 0.)] .= NaN

		X=Interpolate(X,C["f"],C["i"],C["j"],C["w"])
		reshape(X,size(lon))
	end

	function ▶b(x::String,t::Int) #Γ,lon,C from calling scope
		y=basename(x)
		X=read_nctiles(x,y,γ;I=(:,:,t))[:,1]
		X[findall(Γ.hFacC[:,1] .== 0.)] .= NaN

		X=Interpolate(X,C["f"],C["i"],C["j"],C["w"])
		reshape(X,size(lon))
	end

	(▶a,▶b)
end

# ╔═╡ 2965efbb-a5b7-47eb-8a3b-0e8024d4b15f
md"""### Ocean Bottom Depth"""

# ╔═╡ d0c9aace-6fd1-4f04-92dc-4eede6cd47eb
function ▶c(x::String,t::Int) #Γ,lon,C from calling scope
	X=Interpolate(Γ.Depth,C["f"],C["i"],C["j"],C["w"])
	reshape(X,size(lon))
end

# ╔═╡ b8c2d4e6-7cbe-467c-bc67-4dc14b7eaf72
md"""### Remotely Sensed Reflectances"""

# ╔═╡ 9fbe6a83-9ed4-4e13-ae9b-d2742d60cc09
begin
	wvbd_out=Float64.([412, 443, 490, 510, 555, 670])
	wvbd_in=Float64.([400,425,450,475,500,525,550,575,600,625,650,675,700])
	Rirr=[["Rirr00$i" for i in 1:9];["Rirr0$i" for i in 10:13]]

	function ▶d(x::String,t::Int) #Γ,lon,C from calling scope
		tmp=fill(0.0,size(lon)...,13)
		Rrs=fill(0.0,size(lon)...,6)
		Chla=fill(0.0,size(lon)...)

		for ii in 1:length(Rirr)
			x = joinpath(pth0,"IrradianceReflectance",Rirr[ii],Rirr[ii])
			X=read_nctiles(x,Rirr[ii],γ;I=(:,:,t))[:,1]
			X[findall(Γ.hFacC[:,1] .== 0.)] .= NaN
			X=Interpolate(X,C["f"],C["i"],C["j"],C["w"])
			tmp[:,:,ii]=reshape(X,size(lon))
		end

		for i in 1:size(tmp,1), j in 1:size(tmp,2)
			Rrs[i,j,:].=RemotelySensedReflectance(tmp[i,j,:],wvbd_in,wvbd_out)
			Chla[i,j]=RrsToChla(Rrs[i,j,:])
		end

		Rrs,Chla
	end
end

# ╔═╡ 9828a5be-83f9-49f8-8f26-6f65451d021b
md"""### Chl (all phyto-plankton, 0-50m)"""

# ╔═╡ ad30d090-7e49-4ad6-adbd-bcb77cbcb2f1
begin
	w50m=similar(Γ.hFacC); w50m.=0.0
	tot_w50m=similar(Γ.hFacC[:,1]); tot_w50m.=0.0

	for f in eachindex(w50m)
		ni=Γ.hFacC.fSize[f[1]][1]
		nj=Γ.hFacC.fSize[f[1]][2]
		for i in 1:ni, j in 1:nj
			Γ.RC[f[2]].>-50.0 ? w50m[f][i,j]=Γ.hFacC[f][i,j]*Γ.DRF[f[2]] : nothing
			Γ.RC[f[2]].>-50.0 ? tot_w50m[f[1]][i,j]+=Γ.hFacC[f][i,j]*Γ.DRF[f[2]] : nothing
		end
	end

	for f in eachindex(w50m)
		w50m[f]=w50m[f]./tot_w50m[f[1]]
	end

	w50m[findall(isnan.(w50m))]=0.0

	"Done with ▶e configuration"
end

# ╔═╡ a009b061-839c-4820-bfe8-d73dcf909dfa
begin
	function ▶e(x::String,t::Int) #Γ,lon,C from calling scope
		Chla=fill(0.0,size(lon)...)

		for ii in 1:35
			ii<10 ? nam="Chl0$(ii)" : nam="Chl$(ii)"
			x = joinpath(pth0,"Chlorophyll",nam,nam)
			X=read_nctiles(x,nam,γ;I=(:,:,:,t))[:,1]

			Y=read( sum(write(X).*write(w50m),dims=3) , Γ.XC)
			Y[findall(Γ.hFacC[:,1] .== 0.)] .= NaN
			Y=Interpolate(Y,C["f"],C["i"],C["j"],C["w"])
			Y=reshape(Y,size(lon))

			Chla=Chla+Y
		end

		Chla
	end
end

# ╔═╡ a3e1631a-56cc-428f-82ad-96e20d8e70d5
md"""### Surface PAR, Euphotic Depth"""

# ╔═╡ abb34421-c340-4f22-a75f-4a23d6af03dc
function ▶f(x::String,t::Int) #Γ,lon,C from calling scope
	y=basename(x)
	X=read_nctiles(x,y,γ;I=(:,:,1,t))[:,1]
	X[findall(Γ.hFacC[:,1] .== 0.)] .= NaN

	#convert from uEin/m^2/s to Ein/m^2/day
	X=86400.0/1000000.0*X

	X=Interpolate(X,C["f"],C["i"],C["j"],C["w"])
	reshape(X,size(lon))
end

# ╔═╡ fc858f0d-fed8-4f8d-a816-46b007157207
function ▶g(x::String,t::Int) #Γ,lon,C from calling scope
	y=basename(x)
	X=read_nctiles(x,y,γ;I=(:,:,:,t))
	X=write(X)
	X[findall(isnan.(X))].=0.0

	ni=Γ.XC.grid.ioSize[1]
	nj=Γ.XC.grid.ioSize[2]
	euphotic_depth=fill(0.0,ni,nj)
	for i in 1:ni, j in 1:nj
		tmp1=X[i,j,:]; tmp2=0.01*tmp1[1]
		if tmp1[1]>0.0
			k1=minimum(findall(tmp1.<tmp2))
			tmp3=(tmp1[k1-1]-tmp2)/((tmp1[k1-1]-tmp1[k1]))
			euphotic_depth[i,j]=(1-tmp3)*Γ.RF[k1-1]+tmp3*Γ.RF[k1]
		end
	end
	X=-read(euphotic_depth,Γ.XC)

	X[findall(Γ.hFacC[:,1] .== 0.)] .= NaN
	X=Interpolate(X,C["f"],C["i"],C["j"],C["w"])
	reshape(X,size(lon))
end

# ╔═╡ ec8fb91c-1b11-4a81-8fac-08a5f3b4e9b3
md"""## Main Computation Loops

### Individual Variables
"""

# ╔═╡ 3d541a75-7d88-4343-aed1-c4639f67208d
begin
	🏁1=true
	PlutoUI.with_terminal() do
		input=["THETA","SALT","MXLDEPTH","EXFwspee","GGL90TKE"]
		output=["SST","SSS","MLD","WindSpeed","TKE"]
		▶▶ = [▶a,▶a,▶b,▶b,▶a]
		pth=fill("PhysicalOceanography",5)

		for ii in 1:length(input)
			X = joinpath(pth0,pth[ii],input[ii],input[ii])
			▶▶▶ = ▶▶[ii]
			clim=fill(0.0,size(lon)...,12)
			[clim[:,:,t]=▶▶▶(X,t) for t in 1:12]

			fil2=joinpath(tempdir(),output[ii]*"_clim.jld2")
			jldsave(fil2;clim)

			println("Done with pre-processing $(input[ii]) the 12 months")
		end
	end
end

# ╔═╡ 7e912200-f852-457d-8fea-c05997f8ae1d
begin
	🏁2=true
	PlutoUI.with_terminal() do
		input=["OceanDepth","Chl","PARF","PARF"]
		output=["OceanDepth","Chl","PAR","EuphoticDepth"]
		▶▶ = [▶c,▶e,▶f,▶g]
		pth=[fill("PhysicalOceanography",1);"Chlorophyll";fill("IrradianceReflectance",2)]

		for ii in 1:length(input)
			X = joinpath(pth0,pth[ii],input[ii],input[ii])
			▶▶▶ = ▶▶[ii]
			clim=fill(0.0,size(lon)...,12)
			[clim[:,:,t]=▶▶▶(X,t) for t in 1:12]

			fil2=joinpath(tempdir(),output[ii]*"_clim.jld2")
			jldsave(fil2;clim)

			println("Done with pre-processing $(input[ii]) the 12 months")
		end
	end
end

# ╔═╡ 9006655e-3b58-47d3-9baf-6b287e95ece1
md""" ### Remotely Sensed Reflectances"""

# ╔═╡ cffa9cb4-8ddf-4fb4-9874-cd1817fa2aad
🏁3 = let
	clim_Chl=fill(0.0,size(lon)...,12)
	clim_Rrs=[fill(0.0,size(lon)...,12) for j in 1:13]

	for t in 1:12
		(Rrs,Chl)=▶d("Chl",t)
		clim_Chl[:,:,t].=Chl
		[clim_Rrs[j][:,:,t]=Rrs[:,:,j] for j in 1:6]
	end

	fil_Chl=joinpath(tempdir(),"Chl_from_Rrs_clim.jld2")
	jldsave(fil_Chl;clim_Chl)

	fil_Rrs=joinpath(tempdir(),"Rrs_clim.jld2")
	jldsave(fil_Rrs;clim_Rrs)

end

# ╔═╡ 7015ddff-66b3-4c2c-bf9a-ccfc18c3693e
md""" ### Chl Concentration"""

# ╔═╡ 6e389492-a103-419e-8513-9f22f1be4989
🏁4 = let
	clim=fill(0.0,size(lon)...,12)
	[clim[:,:,t]=▶e("Chl",t) for t in 1:12]

	fil_Chl=joinpath(tempdir(),"Chl_clim.jld2")
	jldsave(fil_Chl;clim)
end

# ╔═╡ 4d8ded5f-cfd1-45ac-815c-b0358806e846
md"""## File Creation Loops

### Individual Variables
"""

# ╔═╡ 99fc0197-02d5-411b-a703-375fe71ca983
📁1 = let
	🏁1, 🏁2, 🏁4
	meta0=[(name="SST",units="degC",long_name="Sea Surface Temperature (0-10m)")
		(name="SSS",units="psu",long_name="Sea Surface Salinity (0-10m)")
		(name="MLD",units="m",long_name="Mixed Layer Depth")
		(name="WindSpeed",units="m/s",long_name="Surface Wind Speed")
		(name="TKE",units="m^2/s^2",long_name="Turbulent Kinetic Energy (0-10m, from GGL90)")
		(name="OceanDepth",units="m",long_name="Bathymetry")
		(name="Chl",units="mg Chl",long_name="Chorophyll a (0-50m)")
		(name="PAR",units="m",long_name="PAR at Sea Surface")
		(name="EuphoticDepth",units="m",long_name="Euphotic Depth")]

	for ii in 1:length(meta0)
		nam=meta0[ii].name
		data=load(joinpath(tempdir(),nam*"_clim.jld2"))["clim"]
		outputfile=joinpath(tempdir(),nam*"_clim.nc")

		README = ["Source: Gael Forget","Product: CBIOMES-global climatology","Version: alpha"]
		meta=(outputfile=outputfile , README=README , yearrange=(1992,2011))
		meta=merge(meta0[ii],meta)

		nct=NCT(lon,lat,data,meta)
		write(nct)
	end
end

# ╔═╡ b59d16e0-477c-44f3-8e0a-6fcedadd0a23
md"""### Remotely Sensed Reflectances"""

# ╔═╡ d30cf2f5-5918-458c-be0c-900700642974
📁2 = let
	🏁3

	meta1=[(name="Chl",units="mg/m^3",long_name="Chlorophyll a Concentration")
		(name="Rrs412",units="sr-1",long_name="Remote Sensing Reflectance at 412 nm")
		(name="Rrs443",units="sr-1",long_name="Remote Sensing Reflectance at 443 nm")
		(name="Rrs490",units="sr-1",long_name="Remote Sensing Reflectance at 490 nm")
		(name="Rrs510",units="sr-1",long_name="Remote Sensing Reflectance at 510 nm")
		(name="Rrs555",units="sr-1",long_name="Remote Sensing Reflectance at 555 nm")
		(name="Rrs670",units="sr-1",long_name="Remote Sensing Reflectance at 670 nm")]

	for ii in 1:length(meta1)
		nam=meta1[ii].name
		if ii==1
			data=load(joinpath(tempdir(),"Chl_from_Rrs_clim.jld2"))["clim_Chl"]
			outputfile=joinpath(tempdir(),"Chl_from_Rrs_clim.nc")
		else
			data=load(joinpath(tempdir(),"Rrs_clim.jld2"))["clim_Rrs"][ii-1]
			outputfile=joinpath(tempdir(),nam*"_clim.nc")
		end

		README = ["Source: Gael Forget","Product: CBIOMES-global climatology","Version: alpha"]
		meta=(outputfile=outputfile , README=README , yearrange=(1992,2011))
		meta=merge(meta1[ii],meta)

		nct=NCT(lon,lat,data,meta)
		write(nct)
	end
end

# ╔═╡ 4d29a7f6-6071-4dd3-b422-3d9c513b0d86
md"""### Combine NetCDF files"""

# ╔═╡ 8b202092-62fd-46a1-a184-5a7a3cf40c46
"""
    CBIOMES_combine_files(fil_out::String)

Take all files generated earlier and combine them into one.
"""
function CBIOMES_combine_files(fil_out::String)

list_in=["Chl","EuphoticDepth","MLD","OceanDepth","PAR",
    "Rrs412","Rrs443","Rrs490","Rrs510","Rrs555","Rrs670",
    "SSS","SST","TKE","WindSpeed"]

!isfile(fil_out) ? cp(joinpath(tempdir(),"SST_clim.nc"),fil_out) : nothing

for ii in list_in
    ds = NCTiles.Dataset(fil_out,"a")
    if !haskey(ds,ii)
        fil_in=joinpath(tempdir(),ii*"_clim.nc")
        ds_in = NCTiles.Dataset(fil_in,"r")
        tmp11=ds_in[ii][:]
        u=ds_in[ii].attrib["units"]
        ln=ds_in[ii].attrib["long_name"]
        close(ds_in)

        ##

        v = NCTiles.defVar(ds,ii,Float64,("lon","lat","t"),
        attrib = Dict("units" => u, "long_name" => ln))
        v[:] = tmp11
    end
    close(ds)
end

ds = NCTiles.Dataset(fil_out,"a")
ds.attrib["description,1"]="Source: Gael Forget"
ds.attrib["description,2"]="Product: CBIOMES-global climatology"
ds.attrib["description,3"]="Version: alpha"
if haskey(ds.attrib,"A")
    NCTiles.delete!(ds.attrib,"description")
    NCTiles.delete!(ds.attrib,"A")
    NCTiles.delete!(ds.attrib,"B")
end
close(ds)

"all set"
end

# ╔═╡ 0d28aa82-fa6f-466d-ba08-25016bce90a6
📁3 = let
	📁1, 📁2

	fil_out=joinpath(tempdir(),"CBIOMES-global-alpha-climatology.nc")
	rm(fil_out,force=true)
	CBIOMES_combine_files(fil_out)
end

# ╔═╡ 12a4b433-3722-4ebc-b75f-027539d979b0
md"""## Appendices

1. single variable test and comparison with earlier-code result
1. inspect a sample input file, and retrieve meta-data from it

"""

# ╔═╡ 8edb7bc3-c140-4e32-b626-d6333167ea06
let
	fil0="PhysicalOceanography/THETA/THETA"
	fil1=joinpath(pth0,fil0)

	SST=▶a(fil1,1)

	fig = Mkie.Figure(resolution = (900,600), backgroundcolor = :grey95)
	ax = Mkie.Axis(fig[1,1], title="SST in degC",xlabel="longitude",ylabel="latitude")
	hm1=Mkie.contourf!(ax,lon[:,1],lat[1,:],SST,levels = -2.0:2.0:34.0, tickfont = (4, :black))
	xlims!(ax, (-180.0, 180.0)); ylims!(ax, (-90.0, 90.0))
	Mkie.Colorbar(fig[1,2], hm1, height = Mkie.Relative(0.65))

md"""### Single Month Test

!!! note
	Plot below shows SST for January after interpolation to the half-degree resolution grid.

$fig
"""
end

# ╔═╡ d5ed2bcc-8034-4994-aaa7-2c5fbdfda37e
let
	🏁1

	t=11
	clim=load(joinpath(tempdir(),"SST_clim.jld2"))["clim"]
	pml=NCTiles.ncread("gridded_darwin_montly_clim_360_720_ver_0_2_6.nc","SST")

	RMSE=dropdims(sqrt.(sum((clim-pml).^2,dims=3)/12),dims=3)

	fig = Mkie.Figure(resolution = (900,600), backgroundcolor = :grey95)
	ax = Mkie.Axis(fig[1,1], title="log10(RMSE)",xlabel="longitude",ylabel="latitude")
	hm1=Mkie.contourf!(ax,lon[:,1],lat[1,:],log10.(RMSE), tickfont = (4, :black))
	xlims!(ax, (-180.0, 180.0)); ylims!(ax, (-90.0, 90.0))
	Mkie.Colorbar(fig[1,2], hm1, height = Mkie.Relative(0.65))

	md"""
	!!! note
	    Plot below shows room mean square difference from an earlier version generated with different software.

	$(fig)
	"""
end

# ╔═╡ 620ceef5-99f9-48d2-9079-3f60109d2005
begin
	📁3
	fil_out=joinpath(tempdir(),"CBIOMES-global-alpha-climatology.nc")
	NCTiles.NCDataset(fil_out,"r")
end

# ╔═╡ 1318a437-81b2-4982-8f58-9273a5cc6df9
begin
	fil0="PhysicalOceanography/THETA/THETA"
	NCTiles.NCDataset(joinpath(pth0,fil0*".0058.nc"),"r")
end

# ╔═╡ 81f1ace0-cf04-4690-82c4-0b54219a0c1d
NCTiles.NCDataset(fil_out,"r")

# ╔═╡ 9cd5900d-32f3-4a07-a4a2-071a0615c527
let
	ncvars,ncdims,fileatts = readncfile(joinpath(pth0,fil0*".0058.nc"));
	#PlutoUI.with_terminal() do
	println("\n============ A look at "*fil0*".0058.nc using readncfile ========= \n\n")
	println("- Variables defined in ncvars: \n ")
	println.(keys(ncvars))
	println("\n")
	println("- Summary for some variables: \n ")
	show(ncvars["tim"])
	println("\n")
	show(ncvars["THETA"])
	println("\n")
end

# ╔═╡ 00000000-0000-0000-0000-000000000001
PLUTO_PROJECT_TOML_CONTENTS = """
[deps]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
MITgcmTools = "62725fbc-3a66-4df3-9000-e33e85b3a198"
MeshArrays = "cb8c808f-1acf-59a3-9d2b-6e38d009f683"
NCTiles = "4c1fdd90-559f-11e9-1abf-07ceafc4ffc0"
OceanColorData = "39357346-8f20-4302-be7b-c20dcd116b7a"
OceanStateEstimation = "891f6deb-a4f5-4bc5-a2e3-1e8f649cdd2c"
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"

[compat]
CairoMakie = "~0.6.6"
JLD2 = "~0.4.15"
MITgcmTools = "~0.1.30"
MeshArrays = "~0.2.25"
NCTiles = "~0.1.13"
OceanColorData = "~0.1.1"
OceanStateEstimation = "~0.1.12"
PlutoUI = "~0.7.16"
"""

# ╔═╡ 00000000-0000-0000-0000-000000000002
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised

[[AWS]]
deps = ["Base64", "Compat", "Dates", "Downloads", "GitHub", "HTTP", "IniFile", "JSON", "MbedTLS", "Mocking", "OrderedCollections", "Retry", "Sockets", "URIs", "UUIDs", "XMLDict"]
git-tree-sha1 = "7c84c2e915feaa681f74b459cebd333ce3989cde"
uuid = "fbe9abb3-538b-5e4e-ba9e-bc94f4f92ebc"
version = "1.68.0"

[[AbstractFFTs]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "485ee0867925449198280d4af84bdb46a2a404d0"
uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c"
version = "1.0.1"

[[AbstractTrees]]
git-tree-sha1 = "03e0550477d86222521d254b741d470ba17ea0b5"
uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
version = "0.3.4"

[[Adapt]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "84918055d15b3114ede17ac6a7182f68870c16f7"
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
version = "3.3.1"

[[Animations]]
deps = ["Colors"]
git-tree-sha1 = "e81c509d2c8e49592413bfb0bb3b08150056c79d"
uuid = "27a7e980-b3e6-11e9-2bcd-0b925532e340"
version = "0.4.1"

[[ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"

[[ArrayInterface]]
deps = ["Compat", "IfElse", "LinearAlgebra", "Requires", "SparseArrays", "Static"]
git-tree-sha1 = "a8101545d6b15ff1ebc927e877e28b0ab4bc4f16"
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
version = "3.1.36"

[[Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

[[Automa]]
deps = ["Printf", "ScanByte", "TranscodingStreams"]
git-tree-sha1 = "d50976f217489ce799e366d9561d56a98a30d7fe"
uuid = "67c07d97-cdcb-5c2c-af73-a7f9c32a568b"
version = "0.8.2"

[[AxisAlgorithms]]
deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"]
git-tree-sha1 = "66771c8d21c8ff5e3a93379480a2307ac36863f7"
uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950"
version = "1.0.1"

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[BinDeps]]
deps = ["Libdl", "Pkg", "SHA", "URIParser", "Unicode"]
git-tree-sha1 = "1289b57e8cf019aede076edab0587eb9644175bd"
uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
version = "1.0.2"

[[Blosc]]
deps = ["Blosc_jll"]
git-tree-sha1 = "84cf7d0f8fd46ca6f1b3e0305b4b4a37afe50fd6"
uuid = "a74b3585-a348-5f62-a45c-50e91977d574"
version = "0.7.0"

[[Blosc_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Lz4_jll", "Pkg", "Zlib_jll", "Zstd_jll"]
git-tree-sha1 = "e747dac84f39c62aff6956651ec359686490134e"
uuid = "0b7ba130-8d10-5ba8-a3d6-c5182647fed9"
version = "1.21.0+0"

[[Bzip2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "c3598e525718abcc440f69cc6d5f60dda0a1b61e"
uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
version = "1.0.6+5"

[[CEnum]]
git-tree-sha1 = "215a9aa4a1f23fbd05b92769fdd62559488d70e9"
uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
version = "0.4.1"

[[CFTime]]
deps = ["Dates", "Printf"]
git-tree-sha1 = "bca6cb6ee746e6485ca4535f6cc29cf3579a0f20"
uuid = "179af706-886a-5703-950a-314cd64e0468"
version = "0.1.1"

[[CSV]]
deps = ["Dates", "Mmap", "Parsers", "PooledArrays", "SentinelArrays", "Tables", "Unicode"]
git-tree-sha1 = "b83aa3f513be680454437a0eee21001607e5d983"
uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
version = "0.8.5"

[[Cairo]]
deps = ["Cairo_jll", "Colors", "Glib_jll", "Graphics", "Libdl", "Pango_jll"]
git-tree-sha1 = "d0b3f8b4ad16cb0a2988c6788646a5e6a17b6b1b"
uuid = "159f3aea-2a34-519c-b102-8c37f9878175"
version = "1.0.5"

[[CairoMakie]]
deps = ["Base64", "Cairo", "Colors", "FFTW", "FileIO", "FreeType", "GeometryBasics", "LinearAlgebra", "Makie", "SHA", "StaticArrays"]
git-tree-sha1 = "774ff1cce3ae930af3948c120c15eeb96c886c33"
uuid = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
version = "0.6.6"

[[Cairo_jll]]
deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "e2f47f6d8337369411569fd45ae5753ca10394c6"
uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a"
version = "1.16.0+6"

[[CatViews]]
deps = ["Random", "Test"]
git-tree-sha1 = "23d1f1e10d4e24374112fcf800ac981d14a54b24"
uuid = "81a5f4ea-a946-549a-aa7e-2a7f63a27d31"
version = "1.0.0"

[[CategoricalArrays]]
deps = ["DataAPI", "Future", "JSON", "Missings", "Printf", "Statistics", "StructTypes", "Unicode"]
git-tree-sha1 = "18d7f3e82c1a80dd38c16453b8fd3f0a7db92f23"
uuid = "324d7699-5711-5eae-9e2f-1d82baa6b597"
version = "0.9.7"

[[ChainRulesCore]]
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "0541d306de71e267c1a724f84d44bbc981f287b4"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "1.10.2"

[[ClimateModels]]
deps = ["AWS", "CFTime", "CSV", "DataFrames", "Dates", "Downloads", "Git", "Pkg", "Statistics", "Suppressor", "Test", "UUIDs", "Zarr"]
git-tree-sha1 = "dd26a3ef186f4e1959c92131192e1654e71c9dfe"
uuid = "f6adb021-9183-4f40-84dc-8cea6f651bb0"
version = "0.1.5"

[[CodecZlib]]
deps = ["TranscodingStreams", "Zlib_jll"]
git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.7.0"

[[ColorBrewer]]
deps = ["Colors", "JSON", "Test"]
git-tree-sha1 = "61c5334f33d91e570e1d0c3eb5465835242582c4"
uuid = "a2cac450-b92f-5266-8821-25eda20663c8"
version = "0.4.0"

[[ColorSchemes]]
deps = ["ColorTypes", "Colors", "FixedPointNumbers", "Random"]
git-tree-sha1 = "a851fec56cb73cfdf43762999ec72eff5b86882a"
uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
version = "3.15.0"

[[ColorTypes]]
deps = ["FixedPointNumbers", "Random"]
git-tree-sha1 = "024fe24d83e4a5bf5fc80501a314ce0d1aa35597"
uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
version = "0.11.0"

[[ColorVectorSpace]]
deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"]
git-tree-sha1 = "45efb332df2e86f2cb2e992239b6267d97c9e0b6"
uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4"
version = "0.9.7"

[[Colors]]
deps = ["ColorTypes", "FixedPointNumbers", "Reexport"]
git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40"
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
version = "0.12.8"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "31d0151f5716b655421d9d75b7fa74cc4e744df2"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "3.39.0"

[[CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"

[[Conda]]
deps = ["JSON", "VersionParsing"]
git-tree-sha1 = "299304989a5e6473d985212c28928899c74e9421"
uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d"
version = "1.5.2"

[[CondaBinDeps]]
deps = ["BinDeps", "Conda"]
git-tree-sha1 = "25f750df2893991f2c9b18425bfac6f2ce855154"
uuid = "a9693cdc-2bc8-5703-a9cd-1da358117377"
version = "0.2.0"

[[ConstructionBase]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "f74e9d5388b8620b4cee35d4c5a618dd4dc547f4"
uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
version = "1.3.0"

[[Contour]]
deps = ["StaticArrays"]
git-tree-sha1 = "9f02045d934dc030edad45944ea80dbd1f0ebea7"
uuid = "d38c429a-6771-53c6-b99e-75d170b6e991"
version = "0.5.7"

[[Crayons]]
git-tree-sha1 = "3f71217b538d7aaee0b69ab47d9b7724ca8afa0d"
uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
version = "4.0.4"

[[DataAPI]]
git-tree-sha1 = "cc70b17275652eb47bc9e5f81635981f13cea5c8"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.9.0"

[[DataFrames]]
deps = ["CategoricalArrays", "Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
git-tree-sha1 = "d50972453ef464ddcebdf489d11885468b7b83a3"
uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
version = "0.22.7"

[[DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "7d9d316f04214f7efdbb6398d545446e246eff02"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.18.10"

[[DataValueInterfaces]]
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464"
version = "1.0.0"

[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"

[[DiskArrays]]
git-tree-sha1 = "6a50d800025a1664c99a8e819e0568c75e3ac0c7"
uuid = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3"
version = "0.2.12"

[[Distances]]
deps = ["LinearAlgebra", "Statistics", "StatsAPI"]
git-tree-sha1 = "09d9eaef9ef719d2cd5d928a191dc95be2ec8059"
uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
version = "0.10.5"

[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[Distributions]]
deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"]
git-tree-sha1 = "3676697fd903ba314aaaa0ec8d6813b354edb875"
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
version = "0.23.11"

[[DocStringExtensions]]
deps = ["LibGit2"]
git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.6"

[[Downloads]]
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"

[[EarCut_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "3f3a2501fa7236e9b911e0f7a588c657e822bb6d"
uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5"
version = "2.2.3+0"

[[EllipsisNotation]]
deps = ["ArrayInterface"]
git-tree-sha1 = "8041575f021cba5a099a456b4163c9a08b566a02"
uuid = "da5c29d0-fa7d-589e-88eb-ea29b0a81949"
version = "1.1.0"

[[Expat_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "b3bfd02e98aedfa5cf885665493c5598c350cd2f"
uuid = "2e619515-83b5-522b-bb60-26c02a35a201"
version = "2.2.10+0"

[[ExprTools]]
git-tree-sha1 = "b7e3d17636b348f005f11040025ae8c6f645fe92"
uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
version = "0.1.6"

[[EzXML]]
deps = ["Printf", "XML2_jll"]
git-tree-sha1 = "0fa3b52a04a4e210aeb1626def9c90df3ae65268"
uuid = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615"
version = "1.1.0"

[[FFMPEG]]
deps = ["FFMPEG_jll"]
git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8"
uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a"
version = "0.4.1"

[[FFMPEG_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "LibVPX_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
git-tree-sha1 = "3cc57ad0a213808473eafef4845a74766242e05f"
uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
version = "4.3.1+4"

[[FFTW]]
deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"]
git-tree-sha1 = "463cb335fa22c4ebacfd1faba5fde14edb80d96c"
uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
version = "1.4.5"

[[FFTW_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea"
uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a"
version = "3.3.10+0"

[[FileIO]]
deps = ["Pkg", "Requires", "UUIDs"]
git-tree-sha1 = "3c041d2ac0a52a12a27af2782b34900d9c3ee68c"
uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
version = "1.11.1"

[[FillArrays]]
deps = ["LinearAlgebra", "Random", "SparseArrays"]
git-tree-sha1 = "502b3de6039d5b78c76118423858d981349f3823"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "0.9.7"

[[FixedPointNumbers]]
deps = ["Statistics"]
git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc"
uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
version = "0.8.4"

[[Fontconfig_jll]]
deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "35895cf184ceaab11fd778b4590144034a167a2f"
uuid = "a3f928ae-7b40-5064-980b-68af3947d34b"
version = "2.13.1+14"

[[Formatting]]
deps = ["Printf"]
git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8"
uuid = "59287772-0a20-5a39-b81b-1366585eb4c0"
version = "0.4.2"

[[FortranFiles]]
git-tree-sha1 = "f8cec967f151a65f03afd826650c6e91d8b1da16"
uuid = "c58ffaec-ab22-586d-bfc5-781a99fd0b10"
version = "0.6.0"

[[FreeType]]
deps = ["CEnum", "FreeType2_jll"]
git-tree-sha1 = "cabd77ab6a6fdff49bfd24af2ebe76e6e018a2b4"
uuid = "b38be410-82b0-50bf-ab77-7b57e271db43"
version = "4.0.0"

[[FreeType2_jll]]
deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"]
git-tree-sha1 = "cbd58c9deb1d304f5a245a0b7eb841a2560cfec6"
uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7"
version = "2.10.1+5"

[[FreeTypeAbstraction]]
deps = ["ColorVectorSpace", "Colors", "FreeType", "GeometryBasics", "StaticArrays"]
git-tree-sha1 = "19d0f1e234c13bbfd75258e55c52aa1d876115f5"
uuid = "663a7486-cb36-511b-a19d-713bb74d65c9"
version = "0.9.2"

[[FriBidi_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91"
uuid = "559328eb-81f9-559d-9380-de523a88c83c"
version = "1.0.10+0"

[[Future]]
deps = ["Random"]
uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820"

[[GeometryBasics]]
deps = ["EarCut_jll", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"]
git-tree-sha1 = "58bcdf5ebc057b085e58d95c138725628dd7453c"
uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
version = "0.4.1"

[[Gettext_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"]
git-tree-sha1 = "8c14294a079216000a0bdca5ec5a447f073ddc9d"
uuid = "78b55507-aeef-58d4-861c-77aaff3498b1"
version = "0.20.1+7"

[[Git]]
deps = ["Git_jll"]
git-tree-sha1 = "d7bffc3fe097e9589145493c08c41297b457e5d0"
uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2"
version = "1.2.1"

[[GitHub]]
deps = ["Base64", "Dates", "HTTP", "JSON", "MbedTLS", "Sockets", "SodiumSeal"]
git-tree-sha1 = "c8594dff1ed76e232d8063b2a2555335900af6f3"
uuid = "bc5e4493-9b4d-5f90-b8aa-2b2bcaad7a26"
version = "5.7.0"

[[Git_jll]]
deps = ["Artifacts", "Expat_jll", "Gettext_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "33be385f3432a5a5b7f6965af9592d4407f3167f"
uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb"
version = "2.31.0+0"

[[Glib_jll]]
deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "04690cc5008b38ecbdfede949220bc7d9ba26397"
uuid = "7746bdde-850d-59dc-9ae8-88ece973131d"
version = "2.59.0+4"

[[Graphics]]
deps = ["Colors", "LinearAlgebra", "NaNMath"]
git-tree-sha1 = "1c5a84319923bea76fa145d49e93aa4394c73fc2"
uuid = "a2bd30eb-e257-5431-a919-1863eab51364"
version = "1.1.1"

[[Graphite2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011"
uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472"
version = "1.3.14+0"

[[GridLayoutBase]]
deps = ["GeometryBasics", "InteractiveUtils", "Match", "Observables"]
git-tree-sha1 = "e2f606c87d09d5187bb6069dab8cee0af7c77bdb"
uuid = "3955a311-db13-416c-9275-1d80ed98e5e9"
version = "0.6.1"

[[Grisu]]
git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2"
uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe"
version = "1.0.2"

[[HDF5_jll]]
deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "OpenSSL_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "fd83fa0bde42e01952757f01149dd968c06c4dba"
uuid = "0234f1f7-429e-5d53-9886-15a909be8d59"
version = "1.12.0+1"

[[HTTP]]
deps = ["Base64", "Dates", "IniFile", "Logging", "MbedTLS", "NetworkOptions", "Sockets", "URIs"]
git-tree-sha1 = "14eece7a3308b4d8be910e265c724a6ba51a9798"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "0.9.16"

[[HarfBuzz_jll]]
deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Gettext_jll", "Glib_jll", "Graphite2_jll", "ICU_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"]
git-tree-sha1 = "90bed5fc61d12d10832ebf988988104888eebaca"
uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566"
version = "2.6.1+10"

[[Hyperscript]]
deps = ["Test"]
git-tree-sha1 = "8d511d5b81240fc8e6802386302675bdf47737b9"
uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91"
version = "0.0.4"

[[HypertextLiteral]]
git-tree-sha1 = "5efcf53d798efede8fee5b2c8b09284be359bf24"
uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2"
version = "0.9.2"

[[ICU_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "6ce9cf3c5490b045710d60ac3fd2fe48188846b3"
uuid = "a51ab1cf-af8e-5615-a023-bc2c838bba6b"
version = "67.1.0+3"

[[IOCapture]]
deps = ["Logging", "Random"]
git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a"
uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
version = "0.2.2"

[[IfElse]]
git-tree-sha1 = "28e837ff3e7a6c3cdb252ce49fb412c8eb3caeef"
uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
version = "0.1.0"

[[ImageCore]]
deps = ["AbstractFFTs", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Graphics", "MappedArrays", "MosaicViews", "OffsetArrays", "PaddedViews", "Reexport"]
git-tree-sha1 = "9a5c62f231e5bba35695a20988fc7cd6de7eeb5a"
uuid = "a09fc81d-aa75-5fe9-8630-4744c3626534"
version = "0.9.3"

[[ImageIO]]
deps = ["FileIO", "Netpbm", "OpenEXR", "PNGFiles", "TiffImages", "UUIDs"]
git-tree-sha1 = "a2951c93684551467265e0e32b577914f69532be"
uuid = "82e4d734-157c-48bb-816b-45c225c6df19"
version = "0.5.9"

[[Imath_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "87f7662e03a649cffa2e05bf19c303e168732d3e"
uuid = "905a6f67-0a94-5f89-b386-d35d92009cd1"
version = "3.1.2+0"

[[IndirectArrays]]
git-tree-sha1 = "012e604e1c7458645cb8b436f8fba789a51b257f"
uuid = "9b13fd28-a010-5f03-acff-a1bbcff69959"
version = "1.0.0"

[[Inflate]]
git-tree-sha1 = "f5fc07d4e706b84f72d54eedcc1c13d92fb0871c"
uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9"
version = "0.1.2"

[[IniFile]]
deps = ["Test"]
git-tree-sha1 = "098e4d2c533924c921f9f9847274f2ad89e018b8"
uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f"
version = "0.5.0"

[[IntelOpenMP_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "d979e54b71da82f3a65b62553da4fc3d18c9004c"
uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0"
version = "2018.0.3+2"

[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[Interpolations]]
deps = ["AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"]
git-tree-sha1 = "61aa005707ea2cebf47c8d780da8dc9bc4e0c512"
uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
version = "0.13.4"

[[IntervalSets]]
deps = ["Dates", "EllipsisNotation", "Statistics"]
git-tree-sha1 = "3cc368af3f110a767ac786560045dceddfc16758"
uuid = "8197267c-284f-5f27-9208-e0e47529a953"
version = "0.5.3"

[[InverseFunctions]]
deps = ["Test"]
git-tree-sha1 = "f0c6489b12d28fb4c2103073ec7452f3423bd308"
uuid = "3587e190-3f89-42d0-90ee-14403ec27112"
version = "0.1.1"

[[InvertedIndices]]
git-tree-sha1 = "bee5f1ef5bf65df56bdd2e40447590b272a5471f"
uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f"
version = "1.1.0"

[[IrrationalConstants]]
git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151"
uuid = "92d709cd-6900-40b7-9082-c6be49f344b6"
version = "0.1.1"

[[Isoband]]
deps = ["isoband_jll"]
git-tree-sha1 = "f9b6d97355599074dc867318950adaa6f9946137"
uuid = "f1662d9f-8043-43de-a69a-05efc1cc6ff4"
version = "0.1.1"

[[IterTools]]
git-tree-sha1 = "05110a2ab1fc5f932622ffea2a003221f4782c18"
uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
version = "1.3.0"

[[IteratorInterfaceExtensions]]
git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856"
uuid = "82899510-4779-5014-852e-03e436cf321d"
version = "1.0.0"

[[JLD2]]
deps = ["DataStructures", "FileIO", "MacroTools", "Mmap", "Pkg", "Printf", "Reexport", "TranscodingStreams", "UUIDs"]
git-tree-sha1 = "46b7834ec8165c541b0b5d1c8ba63ec940723ffb"
uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
version = "0.4.15"

[[JLLWrappers]]
deps = ["Preferences"]
git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e"
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
version = "1.3.0"

[[JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "8076680b162ada2a031f707ac7b4953e30667a37"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.2"

[[KernelDensity]]
deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"]
git-tree-sha1 = "591e8dc09ad18386189610acafb970032c519707"
uuid = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b"
version = "0.6.3"

[[LAME_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c"
uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d"
version = "3.100.1+0"

[[LZO_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6"
uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac"
version = "2.10.1+0"

[[LaTeXStrings]]
git-tree-sha1 = "c7f1c695e06c01b95a67f0cd1d34994f3e7db104"
uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
version = "1.2.1"

[[LazyArtifacts]]
deps = ["Artifacts", "Pkg"]
uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3"

[[LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"

[[LibCURL_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"

[[LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"

[[LibVPX_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "12ee7e23fa4d18361e7c2cde8f8337d4c3101bc7"
uuid = "dd192d2f-8180-539f-9fb4-cc70b1dcf69a"
version = "1.10.0+0"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[Libffi_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "761a393aeccd6aa92ec3515e428c26bf99575b3b"
uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490"
version = "3.2.2+0"

[[Libgcrypt_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"]
git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae"
uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4"
version = "1.8.7+0"

[[Libgpg_error_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9"
uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8"
version = "1.42.0+0"

[[Libiconv_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778"
uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531"
version = "1.16.1+1"

[[Libmount_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73"
uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9"
version = "2.35.0+0"

[[Libuuid_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066"
uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700"
version = "2.36.0+0"

[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[LogExpFunctions]]
deps = ["ChainRulesCore", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"]
git-tree-sha1 = "6193c3815f13ba1b78a51ce391db8be016ae9214"
uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
version = "0.3.4"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[Lz4_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "5d494bc6e85c4c9b626ee0cab05daa4085486ab1"
uuid = "5ced341a-0733-55b8-9ab6-a4889d929147"
version = "1.9.3+0"

[[MITgcmTools]]
deps = ["ClimateModels", "DataFrames", "Dates", "MeshArrays", "NetCDF", "OrderedCollections", "Pkg", "Printf", "SparseArrays", "Suppressor", "UUIDs"]
git-tree-sha1 = "b6dafe8035481b72f6780365cdba17b05d9a346e"
uuid = "62725fbc-3a66-4df3-9000-e33e85b3a198"
version = "0.1.30"

[[MKL_jll]]
deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"]
git-tree-sha1 = "5455aef09b40e5020e1520f551fa3135040d4ed0"
uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7"
version = "2021.1.1+2"

[[MacroTools]]
deps = ["Markdown", "Random"]
git-tree-sha1 = "5a5bc6bf062f0f95e62d0fe0a2d99699fed82dd9"
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
version = "0.5.8"

[[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", "Packing", "PlotUtils", "PolygonOps", "Printf", "Random", "RelocatableFolders", "Serialization", "Showoff", "SignedDistanceFields", "SparseArrays", "StaticArrays", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "UnicodeFun"]
git-tree-sha1 = "56b0b7772676c499430dc8eb15cfab120c05a150"
uuid = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
version = "0.15.3"

[[MakieCore]]
deps = ["Observables"]
git-tree-sha1 = "7bcc8323fb37523a6a51ade2234eee27a11114c8"
uuid = "20f20a25-4f0e-4fdf-b5d1-57303727442b"
version = "0.1.3"

[[MappedArrays]]
git-tree-sha1 = "e8b359ef06ec72e8c030463fe02efe5527ee5142"
uuid = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900"
version = "0.4.1"

[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[Match]]
git-tree-sha1 = "5cf525d97caf86d29307150fcba763a64eaa9cbe"
uuid = "7eb4fadd-790c-5f42-8a69-bfa0b872bfbf"
version = "1.1.0"

[[MathTeXEngine]]
deps = ["AbstractTrees", "Automa", "DataStructures", "FreeTypeAbstraction", "GeometryBasics", "LaTeXStrings", "REPL", "RelocatableFolders", "Test"]
git-tree-sha1 = "70e733037bbf02d691e78f95171a1fa08cdc6332"
uuid = "0a4f8689-d25c-4efe-a92b-7142dfc1aa53"
version = "0.2.1"

[[MbedTLS]]
deps = ["Dates", "MbedTLS_jll", "Random", "Sockets"]
git-tree-sha1 = "1c38e51c3d08ef2278062ebceade0e46cefc96fe"
uuid = "739be429-bea8-5141-9913-cc70e7f3736d"
version = "1.0.3"

[[MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"

[[MeshArrays]]
deps = ["CatViews", "Dates", "NearestNeighbors", "Pkg", "Printf", "SparseArrays", "Statistics", "Unitful"]
git-tree-sha1 = "ce9cd0c5862dab7dcb449ac0484a9cd726ccd59c"
uuid = "cb8c808f-1acf-59a3-9d2b-6e38d009f683"
version = "0.2.25"

[[Missings]]
deps = ["DataAPI"]
git-tree-sha1 = "f8c673ccc215eb50fcadb285f522420e29e69e1c"
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
version = "0.4.5"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[Mocking]]
deps = ["Compat", "ExprTools"]
git-tree-sha1 = "29714d0a7a8083bba8427a4fbfb00a540c681ce7"
uuid = "78c3b35d-d492-501b-9361-3d52fe80e533"
version = "0.7.3"

[[MosaicViews]]
deps = ["MappedArrays", "OffsetArrays", "PaddedViews", "StackViews"]
git-tree-sha1 = "b34e3bc3ca7c94914418637cb10cc4d1d80d877d"
uuid = "e94cdb99-869f-56ef-bcf0-1ae2bcbe0389"
version = "0.3.3"

[[MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"

[[NCDatasets]]
deps = ["CFTime", "DataStructures", "Dates", "NetCDF_jll", "Printf"]
git-tree-sha1 = "5da406d9624f25909a6f556bd8d5c1deaa189ee6"
uuid = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
version = "0.11.7"

[[NCTiles]]
deps = ["Dates", "MeshArrays", "NCDatasets", "NetCDF", "Pkg", "Printf"]
git-tree-sha1 = "2d0660cf32a021cb6eb99490d97c2776f9bdc258"
uuid = "4c1fdd90-559f-11e9-1abf-07ceafc4ffc0"
version = "0.1.13"

[[NaNMath]]
git-tree-sha1 = "bfe47e760d60b82b66b61d2d44128b62e3a369fb"
uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
version = "0.3.5"

[[NearestNeighbors]]
deps = ["Distances", "StaticArrays"]
git-tree-sha1 = "16baacfdc8758bc374882566c9187e785e85c2f0"
uuid = "b8a86587-4115-5ab1-83bc-aa920d37bbce"
version = "0.4.9"

[[NetCDF]]
deps = ["BinDeps", "CondaBinDeps", "DiskArrays", "Formatting", "Libdl"]
git-tree-sha1 = "dda7b49694d15d7d1a1ba1d7c2a9142777028bd5"
uuid = "30363a11-5582-574a-97bb-aa9a979735b9"
version = "0.10.3"

[[NetCDF_jll]]
deps = ["Artifacts", "HDF5_jll", "JLLWrappers", "LibCURL_jll", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Pkg", "Zlib_jll", "nghttp2_jll"]
git-tree-sha1 = "0cf4d1bf2ef45156aed85c9ac5f8c7e697d9288c"
uuid = "7243133f-43d8-5620-bbf4-c2c921802cf3"
version = "400.702.400+0"

[[Netpbm]]
deps = ["FileIO", "ImageCore"]
git-tree-sha1 = "18efc06f6ec36a8b801b23f076e3c6ac7c3bf153"
uuid = "f09324ee-3d7c-5217-9330-fc30815ba969"
version = "1.0.2"

[[NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"

[[Observables]]
git-tree-sha1 = "fe29afdef3d0c4a8286128d4e45cc50621b1e43d"
uuid = "510215fc-4207-5dde-b226-833fc4488ee2"
version = "0.4.0"

[[OceanColorData]]
deps = ["Distributions", "NetCDF"]
git-tree-sha1 = "63abcf2fbbf20e52204a4e7529514a6bd10e5b76"
uuid = "39357346-8f20-4302-be7b-c20dcd116b7a"
version = "0.1.1"

[[OceanStateEstimation]]
deps = ["Downloads", "FortranFiles", "MITgcmTools", "MeshArrays", "Pkg", "Statistics"]
git-tree-sha1 = "649d102b549b31d1ee5fc7c068c9a8b92692b044"
uuid = "891f6deb-a4f5-4bc5-a2e3-1e8f649cdd2c"
version = "0.1.12"

[[OffsetArrays]]
deps = ["Adapt"]
git-tree-sha1 = "c0e9e582987d36d5a61e650e6e543b9e44d9914b"
uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
version = "1.10.7"

[[Ogg_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "7937eda4681660b4d6aeeecc2f7e1c81c8ee4e2f"
uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051"
version = "1.3.5+0"

[[OpenEXR]]
deps = ["Colors", "FileIO", "OpenEXR_jll"]
git-tree-sha1 = "327f53360fdb54df7ecd01e96ef1983536d1e633"
uuid = "52e1d378-f018-4a11-a4be-720524705ac7"
version = "0.3.2"

[[OpenEXR_jll]]
deps = ["Artifacts", "Imath_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"]
git-tree-sha1 = "923319661e9a22712f24596ce81c54fc0366f304"
uuid = "18a262bb-aa17-5467-a713-aee519bc75cb"
version = "3.1.1+0"

[[OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "15003dcb7d8db3c6c857fda14891a539a8f2705a"
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
version = "1.1.10+0"

[[OpenSpecFun_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1"
uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e"
version = "0.5.5+0"

[[Opus_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720"
uuid = "91d4177d-7536-5919-b921-800302f37372"
version = "1.3.2+0"

[[OrderedCollections]]
git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.4.1"

[[PCRE2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15"

[[PCRE_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488"
uuid = "2f80f16e-611a-54ab-bc61-aa92de5b98fc"
version = "8.44.0+0"

[[PDMats]]
deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse", "Test"]
git-tree-sha1 = "95a4038d1011dfdbde7cecd2ad0ac411e53ab1bc"
uuid = "90014a1f-27ba-587c-ab20-58faa44d9150"
version = "0.10.1"

[[PNGFiles]]
deps = ["Base64", "CEnum", "ImageCore", "IndirectArrays", "OffsetArrays", "libpng_jll"]
git-tree-sha1 = "33ae7d19c6ba748d30c0c08a82378aae7b64b5e9"
uuid = "f57f5aa1-a3ce-4bc8-8ab9-96f992907883"
version = "0.3.11"

[[Packing]]
deps = ["GeometryBasics"]
git-tree-sha1 = "1155f6f937fa2b94104162f01fa400e192e4272f"
uuid = "19eb6ba3-879d-56ad-ad62-d5c202156566"
version = "0.4.2"

[[PaddedViews]]
deps = ["OffsetArrays"]
git-tree-sha1 = "646eed6f6a5d8df6708f15ea7e02a7a2c4fe4800"
uuid = "5432bcbf-9aad-5242-b902-cca2824c8663"
version = "0.5.10"

[[Pango_jll]]
deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "9a336dee51d20d1ed890c4a8dca636e86e2b76ca"
uuid = "36c8627f-9965-5494-a995-c6b170f724f3"
version = "1.42.4+10"

[[Parsers]]
deps = ["Dates"]
git-tree-sha1 = "bfd7d8c7fd87f04543810d9cbd3995972236ba1b"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "1.1.2"

[[Pixman_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "b4f5d02549a10e20780a24fce72bea96b6329e29"
uuid = "30392449-352a-5448-841d-b1acce4e97dc"
version = "0.40.1+0"

[[Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[PkgVersion]]
deps = ["Pkg"]
git-tree-sha1 = "a7a7e1a88853564e551e4eba8650f8c38df79b37"
uuid = "eebad327-c553-4316-9ea0-9fa01ccd7688"
version = "0.1.1"

[[PlotUtils]]
deps = ["ColorSchemes", "Colors", "Dates", "Printf", "Random", "Reexport", "Statistics"]
git-tree-sha1 = "b084324b4af5a438cd63619fd006614b3b20b87b"
uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043"
version = "1.0.15"

[[PlutoUI]]
deps = ["Base64", "Dates", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "Random", "Reexport", "UUIDs"]
git-tree-sha1 = "4c8a7d080daca18545c56f1cac28710c362478f3"
uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
version = "0.7.16"

[[PolygonOps]]
git-tree-sha1 = "77b3d3605fc1cd0b42d95eba87dfcd2bf67d5ff6"
uuid = "647866c9-e3ac-4575-94e7-e3d426903924"
version = "0.1.2"

[[PooledArrays]]
deps = ["DataAPI", "Future"]
git-tree-sha1 = "a193d6ad9c45ada72c14b731a318bedd3c2f00cf"
uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720"
version = "1.3.0"

[[Preferences]]
deps = ["TOML"]
git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a"
uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.2.2"

[[PrettyTables]]
deps = ["Crayons", "Formatting", "Markdown", "Reexport", "Tables"]
git-tree-sha1 = "574a6b3ea95f04e8757c0280bb9c29f1a5e35138"
uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
version = "0.11.1"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[ProgressMeter]]
deps = ["Distributed", "Printf"]
git-tree-sha1 = "afadeba63d90ff223a6a48d2009434ecee2ec9e8"
uuid = "92933f4c-e287-5a05-a399-4b506db050ca"
version = "1.7.1"

[[QuadGK]]
deps = ["DataStructures", "LinearAlgebra"]
git-tree-sha1 = "78aadffb3efd2155af139781b8a8df1ef279ea39"
uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
version = "2.4.2"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[Ratios]]
deps = ["Requires"]
git-tree-sha1 = "01d341f502250e81f6fec0afe662aa861392a3aa"
uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439"
version = "0.4.2"

[[Reexport]]
git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b"
uuid = "189a3867-3050-52da-a836-e630ba90ab69"
version = "1.2.2"

[[RelocatableFolders]]
deps = ["SHA", "Scratch"]
git-tree-sha1 = "df2be5142a2a3db2da37b21d87c9fa7973486bfd"
uuid = "05181044-ff0b-4ac5-8273-598c1e38db00"
version = "0.1.2"

[[Requires]]
deps = ["UUIDs"]
git-tree-sha1 = "4036a3bd08ac7e968e27c203d45f5fff15020621"
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
version = "1.1.3"

[[Retry]]
git-tree-sha1 = "41ac127cd281bb33e42aba46a9d3b25cd35fc6d5"
uuid = "20febd7b-183b-5ae2-ac4a-720e7ce64774"
version = "0.4.1"

[[Rmath]]
deps = ["Random", "Rmath_jll"]
git-tree-sha1 = "bf3188feca147ce108c76ad82c2792c57abe7b1f"
uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa"
version = "0.7.0"

[[Rmath_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "68db32dff12bb6127bac73c209881191bf0efbb7"
uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f"
version = "0.3.0+0"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[SIMD]]
git-tree-sha1 = "9ba33637b24341aba594a2783a502760aa0bff04"
uuid = "fdea26ae-647d-5447-a871-4b548cad5224"
version = "3.3.1"

[[ScanByte]]
deps = ["Libdl", "SIMD"]
git-tree-sha1 = "9cc2955f2a254b18be655a4ee70bc4031b2b189e"
uuid = "7b38b023-a4d7-4c5e-8d43-3f3097f304eb"
version = "0.3.0"

[[Scratch]]
deps = ["Dates"]
git-tree-sha1 = "0b4b7f1393cff97c33891da2a0bf69c6ed241fda"
uuid = "6c6a2e73-6563-6170-7368-637461726353"
version = "1.1.0"

[[SentinelArrays]]
deps = ["Dates", "Random"]
git-tree-sha1 = "f45b34656397a1f6e729901dc9ef679610bd12b5"
uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c"
version = "1.3.8"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[SharedArrays]]
deps = ["Distributed", "Mmap", "Random", "Serialization"]
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"

[[Showoff]]
deps = ["Dates", "Grisu"]
git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de"
uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f"
version = "1.0.3"

[[SignedDistanceFields]]
deps = ["Random", "Statistics", "Test"]
git-tree-sha1 = "d263a08ec505853a5ff1c1ebde2070419e3f28e9"
uuid = "73760f76-fbc4-59ce-8f25-708e95d2df96"
version = "0.4.0"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[SodiumSeal]]
deps = ["Base64", "Libdl", "libsodium_jll"]
git-tree-sha1 = "80cef67d2953e33935b41c6ab0a178b9987b1c99"
uuid = "2133526b-2bfb-4018-ac12-889fb3908a75"
version = "0.1.1"

[[SortingAlgorithms]]
deps = ["DataStructures", "Random", "Test"]
git-tree-sha1 = "03f5898c9959f8115e30bc7226ada7d0df554ddd"
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
version = "0.3.1"

[[SparseArrays]]
deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[SpecialFunctions]]
deps = ["OpenSpecFun_jll"]
git-tree-sha1 = "d8d8b8a9f4119829410ecd706da4cc8594a1e020"
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
version = "0.10.3"

[[StackViews]]
deps = ["OffsetArrays"]
git-tree-sha1 = "46e589465204cd0c08b4bd97385e4fa79a0c770c"
uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15"
version = "0.1.1"

[[Static]]
deps = ["IfElse"]
git-tree-sha1 = "e7bc80dc93f50857a5d1e3c8121495852f407e6a"
uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
version = "0.4.0"

[[StaticArrays]]
deps = ["LinearAlgebra", "Random", "Statistics"]
git-tree-sha1 = "3c76dde64d03699e074ac02eb2e8ba8254d428da"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "1.2.13"

[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[StatsAPI]]
git-tree-sha1 = "1958272568dc176a1d881acb797beb909c785510"
uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0"
version = "1.0.0"

[[StatsBase]]
deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"]
git-tree-sha1 = "eb35dcc66558b2dda84079b9a1be17557d32091a"
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
version = "0.33.12"

[[StatsFuns]]
deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"]
git-tree-sha1 = "95072ef1a22b057b1e80f73c2a89ad238ae4cfff"
uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
version = "0.9.12"

[[StructArrays]]
deps = ["Adapt", "DataAPI", "StaticArrays", "Tables"]
git-tree-sha1 = "2ce41e0d042c60ecd131e9fb7154a3bfadbf50d3"
uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
version = "0.6.3"

[[StructTypes]]
deps = ["Dates", "UUIDs"]
git-tree-sha1 = "d24a825a95a6d98c385001212dc9020d609f2d4f"
uuid = "856f2bd8-1eba-4b0a-8007-ebc267875bd4"
version = "1.8.1"

[[SuiteSparse]]
deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"]
uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"

[[Suppressor]]
git-tree-sha1 = "a819d77f31f83e5792a76081eee1ea6342ab8787"
uuid = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
version = "0.2.0"

[[TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"

[[TableTraits]]
deps = ["IteratorInterfaceExtensions"]
git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39"
uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c"
version = "1.0.1"

[[Tables]]
deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "TableTraits", "Test"]
git-tree-sha1 = "fed34d0e71b91734bf0a7e10eb1bb05296ddbcd0"
uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
version = "1.6.0"

[[Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"

[[TensorCore]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6"
uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50"
version = "0.1.1"

[[Test]]
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[TiffImages]]
deps = ["ColorTypes", "DataStructures", "DocStringExtensions", "FileIO", "FixedPointNumbers", "IndirectArrays", "Inflate", "OffsetArrays", "PkgVersion", "ProgressMeter", "UUIDs"]
git-tree-sha1 = "016185e1a16c1bd83a4352b19a3b136224f22e38"
uuid = "731e570b-9d59-4bfa-96dc-6df516fadf69"
version = "0.5.1"

[[TranscodingStreams]]
deps = ["Random", "Test"]
git-tree-sha1 = "216b95ea110b5972db65aa90f88d8d89dcb8851c"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version = "0.9.6"

[[URIParser]]
deps = ["Unicode"]
git-tree-sha1 = "53a9f49546b8d2dd2e688d216421d050c9a31d0d"
uuid = "30578b45-9adc-5946-b283-645ec420af67"
version = "0.4.1"

[[URIs]]
git-tree-sha1 = "97bbe755a53fe859669cd907f2d96aee8d2c1355"
uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
version = "1.3.0"

[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[UnicodeFun]]
deps = ["REPL"]
git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf"
uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1"
version = "0.4.1"

[[Unitful]]
deps = ["ConstructionBase", "Dates", "LinearAlgebra", "Random"]
git-tree-sha1 = "a981a8ef8714cba2fd9780b22fd7a469e7aaf56d"
uuid = "1986cc42-f94f-5a68-af5c-568840ba703d"
version = "1.9.0"

[[VersionParsing]]
git-tree-sha1 = "e575cf85535c7c3292b4d89d89cc29e8c3098e47"
uuid = "81def892-9a0e-5fdd-b105-ffc91e053289"
version = "1.2.1"

[[WoodburyMatrices]]
deps = ["LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "de67fa59e33ad156a590055375a30b23c40299d3"
uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6"
version = "0.5.5"

[[XML2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "1acf5bdf07aa0907e0a37d3718bb88d4b687b74a"
uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"
version = "2.9.12+0"

[[XMLDict]]
deps = ["EzXML", "IterTools", "OrderedCollections"]
git-tree-sha1 = "d9a3faf078210e477b291c79117676fca54da9dd"
uuid = "228000da-037f-5747-90a9-8195ccbf91a5"
version = "0.4.1"

[[XSLT_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"]
git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a"
uuid = "aed1982a-8fda-507f-9586-7b0439959a61"
version = "1.1.34+0"

[[Xorg_libX11_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"]
git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527"
uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc"
version = "1.6.9+4"

[[Xorg_libXau_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "4e490d5c960c314f33885790ed410ff3a94ce67e"
uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec"
version = "1.0.9+4"

[[Xorg_libXdmcp_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "4fe47bd2247248125c428978740e18a681372dd4"
uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05"
version = "1.1.3+4"

[[Xorg_libXext_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"]
git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3"
uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3"
version = "1.3.4+4"

[[Xorg_libXrender_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"]
git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96"
uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa"
version = "0.9.10+4"

[[Xorg_libpthread_stubs_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "6783737e45d3c59a4a4c4091f5f88cdcf0908cbb"
uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74"
version = "0.1.0+3"

[[Xorg_libxcb_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"]
git-tree-sha1 = "daf17f441228e7a3833846cd048892861cff16d6"
uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b"
version = "1.13.0+3"

[[Xorg_xtrans_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "79c31e7844f6ecf779705fbc12146eb190b7d845"
uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10"
version = "1.4.0+3"

[[Zarr]]
deps = ["AWS", "Blosc", "CodecZlib", "DataStructures", "Dates", "DiskArrays", "HTTP", "JSON", "OffsetArrays", "Pkg"]
git-tree-sha1 = "18ac3fd29790edeee42bfed5020b12ae61a029d0"
uuid = "0a941bbe-ad1d-11e8-39d9-ab76183a1d99"
version = "0.6.3"

[[Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"

[[Zstd_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "cc4bf3fdde8b7e3e9fa0351bdeedba1cf3b7f6e6"
uuid = "3161d3a3-bdf6-5164-811a-617609db77b4"
version = "1.5.0+0"

[[isoband_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "a1ac99674715995a536bbce674b068ec1b7d893d"
uuid = "9a68df92-36a6-505f-a73e-abb412b6bfb4"
version = "0.2.2+0"

[[libass_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"]
git-tree-sha1 = "acc685bcf777b2202a904cdcb49ad34c2fa1880c"
uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0"
version = "0.14.0+4"

[[libfdk_aac_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "7a5780a0d9c6864184b3a2eeeb833a0c871f00ab"
uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280"
version = "0.1.6+4"

[[libpng_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"]
git-tree-sha1 = "94d180a6d2b5e55e447e2d27a29ed04fe79eb30c"
uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f"
version = "1.6.38+0"

[[libsodium_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "848ab3d00fe39d6fbc2a8641048f8f272af1c51e"
uuid = "a9144af2-ca23-56d9-984f-0d03f7b5ccf8"
version = "1.0.20+0"

[[libvorbis_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"]
git-tree-sha1 = "c45f4e40e7aafe9d086379e5578947ec8b95a8fb"
uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a"
version = "1.3.7+0"

[[nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"

[[p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"

[[x264_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "d713c1ce4deac133e3334ee12f4adff07f81778f"
uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a"
version = "2020.7.14+2"

[[x265_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "487da2f8f2f0c8ee0e83f39d13037d6bbf0a45ab"
uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76"
version = "3.0.0+3"
"""

# ╔═╡ Cell order:
# ╟─979a1b66-0aaa-4b8f-868c-85db76d3fb99
# ╟─aa41a861-7eca-4dda-92e8-bd8e96f2a21e
# ╟─5fcb77a8-b234-45d9-a4bd-02bd4eb8fbd9
# ╟─ad9d39a2-65b3-4fd9-aecd-f360ac34df0f
# ╟─4e55fa2e-3193-11ec-3a50-2defc49cc54d
# ╟─d7d0fc22-0bd7-4c4b-9249-8084d75bb33e
# ╟─7a1058e4-3813-4b90-a9ee-ad5ff4eb6d6f
# ╟─3bc4c68a-360d-4dae-bf03-a630d5bc7f24
# ╟─6eb8c05c-2624-4535-906b-3e38d502c997
# ╟─2965efbb-a5b7-47eb-8a3b-0e8024d4b15f
# ╟─d0c9aace-6fd1-4f04-92dc-4eede6cd47eb
# ╟─b8c2d4e6-7cbe-467c-bc67-4dc14b7eaf72
# ╟─9fbe6a83-9ed4-4e13-ae9b-d2742d60cc09
# ╟─9828a5be-83f9-49f8-8f26-6f65451d021b
# ╟─ad30d090-7e49-4ad6-adbd-bcb77cbcb2f1
# ╟─a009b061-839c-4820-bfe8-d73dcf909dfa
# ╟─a3e1631a-56cc-428f-82ad-96e20d8e70d5
# ╟─abb34421-c340-4f22-a75f-4a23d6af03dc
# ╟─fc858f0d-fed8-4f8d-a816-46b007157207
# ╟─ec8fb91c-1b11-4a81-8fac-08a5f3b4e9b3
# ╟─3d541a75-7d88-4343-aed1-c4639f67208d
# ╟─7e912200-f852-457d-8fea-c05997f8ae1d
# ╟─9006655e-3b58-47d3-9baf-6b287e95ece1
# ╟─cffa9cb4-8ddf-4fb4-9874-cd1817fa2aad
# ╟─7015ddff-66b3-4c2c-bf9a-ccfc18c3693e
# ╟─6e389492-a103-419e-8513-9f22f1be4989
# ╟─4d8ded5f-cfd1-45ac-815c-b0358806e846
# ╟─99fc0197-02d5-411b-a703-375fe71ca983
# ╟─b59d16e0-477c-44f3-8e0a-6fcedadd0a23
# ╟─d30cf2f5-5918-458c-be0c-900700642974
# ╟─4d29a7f6-6071-4dd3-b422-3d9c513b0d86
# ╟─8b202092-62fd-46a1-a184-5a7a3cf40c46
# ╟─0d28aa82-fa6f-466d-ba08-25016bce90a6
# ╟─12a4b433-3722-4ebc-b75f-027539d979b0
# ╟─8edb7bc3-c140-4e32-b626-d6333167ea06
# ╟─d5ed2bcc-8034-4994-aaa7-2c5fbdfda37e
# ╟─620ceef5-99f9-48d2-9079-3f60109d2005
# ╟─1318a437-81b2-4982-8f58-9273a5cc6df9
# ╟─81f1ace0-cf04-4690-82c4-0b54219a0c1d
# ╟─9cd5900d-32f3-4a07-a4a2-071a0615c527
# ╟─00000000-0000-0000-0000-000000000001
# ╟─00000000-0000-0000-0000-000000000002


text:
include("../RLAlgorithms.jl")
using .RLAlgorithms
using Plots
using Flux

struct BehaviorModel{L11, L12, L2}
    l1obs::L11
    l1cmd::L12
    l2out::L2
    scale::Float32
end

(m::BehaviorModel)(s, dh, dr) = m.l2out(m.l1obs(s) .* m.l1cmd(vcat(dh, dr) .* m.scale))
Flux.@functor BehaviorModel

function BehaviorModel(nO, nA)
    l1obs = Dense(nO, 32, σ)
    l1cmd = Dense(2, 32, σ)
    l2out = Chain(
        Dense(32, 32, relu),
        Dense(32, nA)
    )
    return BehaviorModel(l1obs, l1cmd, l2out, 2f-2)
end

function act(model, s, dh, dr, nA, ϵ)
    rand() <= ϵ && return rand(1:nA)
    return Flux.onecold(model(s, dh, dr))
end

function episode(env, model, dh, dr, nA, maxt, maxreward, ϵ)
    traj = Vector{Tuple{Vector{Float32}, Int64, Float32}}()
    totr = 0f0
    reset!(env)
    for _ in 1:maxt
        s = copy(env.current)
        a = act(model, s, dh, dr, nA, ϵ)
        _, r, done = step!(env, a)
        push!(traj, (s, a, r))
        dh = max(dh - 1f0, 1f0)
        dr = min(dr - r, maxreward)
        totr += r
        done && break
    end
    return totr, traj
end

function run!(model, opt, env, maxreward;
        epochs=100, maxt=100, minibatchsize=32,
        best=25, trajs=50, trainiters=200, ϵ=1.0)
    rewards = zeros(Float32, epochs)
    memory = UDRLMemory{Float32, Int64, Float32}(
        length(env.observationspace), maxreward, 10*trajs, minibatchsize
    )
    nA = length(env.actionspace)
    ps = params(model)

    for i in 1:epochs
        for j in 1:trajs
            dh, dr = command(memory, best)
            totr, traj = episode(env, model, dh, dr, nA, maxt, maxreward, ϵ)
            insert!(memory, totr, traj)
        end

        @loop trainiters Flux.train!(ps, [sample(memory, nA)], opt) do obss, dhs, drs, tars
            Flux.logitcrossentropy(model(obss, dhs, drs), tars)
        end
        ϵ = max(min(ϵ * 0.99, 0.05), 0.01)

        dh, dr = command(memory, 1)
        rewards[i] = episode(env, model, dh, dr, nA, maxt, maxreward, 0.0)[1]
    end
    return rewards
end

env = CartPole{Float32}()

model = BehaviorModel(length(env.observationspace), length(env.actionspace))

r = run!(model, ADAM(0.01), env, 100f0)
plt = plot(r, labels="Reward")
display(plt)
#savefig(plt, "udrl")

ext: jl


text:
using OrdinaryDiffEq
using Trixi

###############################################################################
# semidiscretization of the linear advection equation

advectionvelocity = (1.0, 1.0)
# advectionvelocity = (0.2, -0.3)
equations = LinearScalarAdvectionEquation2D(advectionvelocity)

initial_condition = initial_condition_gauss

# you can either use a single function to impose the BCs weakly in all
# 2*ndims == 4 directions or you can pass a tuple containing BCs for each direction
boundary_conditions = BoundaryConditionDirichlet(initial_condition)
solver = DGSEM(polydeg=3, surface_flux=flux_lax_friedrichs)

coordinates_min = (-5.0, -5.0)
coordinates_max = ( 5.0,  5.0)
mesh = StructuredMesh((16, 16), coordinates_min, coordinates_max, periodicity=false)

semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver,
                                    boundary_conditions=boundary_conditions)

###############################################################################
# ODE solvers, callbacks etc.

tspan = (0.0, 5.0)
ode = semidiscretize(semi, tspan)

summary_callback = SummaryCallback()

analysis_interval = 100
analysis_callback = AnalysisCallback(semi, interval=analysis_interval,
                                     extra_analysis_integrals=(entropy,))

alive_callback = AliveCallback(analysis_interval=analysis_interval)

save_solution = SaveSolutionCallback(interval=100,
                                     save_initial_solution=true,
                                     save_final_solution=true,
                                     solution_variables=cons2prim)

stepsize_callback = StepsizeCallback(cfl=1.6)

callbacks = CallbackSet(summary_callback,
                        analysis_callback, alive_callback,
                        save_solution,
                        stepsize_callback);
###############################################################################
# run the simulation

sol = solve(ode, CarpenterKennedy2N54(williamson_condition=false),
            dt=stepsize_callback(ode), # solve needs some value here but it will be overwritten by the stepsize_callback
            save_everystep=false, callback=callbacks);
summary_callback() # print the timer summary


text:
# Rectangular Full Packed Matrices

type SymmetricRFP{T<:BlasFloat} <: AbstractMatrix{T}
    data::Vector{T}
    transr::Char
    uplo::Char
end

function Ac_mul_A_RFP{T<:BlasFloat}(A::Matrix{T})
    n = size(A, 2)
    C = LAPACK.sfrk!('N', 'U', 'T', 1.0, A, 0.0, Array(T, div(n*(n+1),2)))
    SymmetricRFP(C, 'N', 'U')
end

type TriangularRFP{T<:BlasFloat} <: AbstractMatrix{T}
    data::Vector{T}
    transr::Char
    uplo::Char
end
TriangularRFP(A::Matrix) = TriangularRFP(trttf!('N', 'U', A), 'N', 'U')

full(A::TriangularRFP) = (A.uplo=='U' ? triu! : tril!)(LAPACK.tfttr!(A.transr, A.uplo, A.data))

type CholeskyDenseRFP{T<:BlasFloat} <: Factorization{T}
    data::Vector{T}
    transr::Char
    uplo::Char
end

cholfact!{T<:BlasFloat}(A::SymmetricRFP{T}) = CholeskyDenseRFP(LAPACK.pftrf!(A.transr, A.uplo, copy(A.data)), A.transr, A.uplo)
cholfact{T<:BlasFloat}(A::SymmetricRFP{T}) = cholfact!(copy(A))

copy(A::SymmetricRFP) = SymmetricRFP(copy(A.data), A.transr, A.uplo)

# Least squares
\(A::CholeskyDenseRFP, B::VecOrMat) = LAPACK.pftrs!(A.transr, A.uplo, A.data, copy(B))

inv(A::CholeskyDenseRFP)=LAPACK.pftri!(A.transr, A.uplo, copy(A.data))

max_stars_repo_name: jakebolewski/julia

max_issues_repo_name: jakebolewski/julia

max_forks_repo_name: jakebolewski/julia


text:
#=
Copyright (c) 2015, Intel Corporation
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
  this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
=#

module ConstPromoteTest
using ParallelAccelerator

#ParallelAccelerator.DomainIR.set_debug_level(4)
#ParallelAccelerator.ParallelIR.set_debug_level(4)
#ParallelAccelerator.CGen.set_debug_level(4)
#ParallelAccelerator.set_debug_level(4)

@acc function example(x::Array{Float64,1})
    #println("in ",x)
    return x.^2
end

function test1()
    return example([-3.0,2.6,0.2])
end

end

using Base.Test

println("Testing constant promotion for pointwise operations...")
@test_approx_eq ConstPromoteTest.test1() [9.0,6.76,0.04]
println("Done testing constant promotion.")


text:
function _add_node_to_data(node, indent = 0, data = Vector{NamedTuple{(:level, :status, :x1, :x2, :sf), Tuple{Int,String,Float64,Float64,String}}}(undef, 0))
    push!(data, (level=indent, status=node.data.status==0 ? "Default" : node.data.status==1 ? "Runtime dispatch" : "Garbage collection", x1=node.data.span.start, x2=node.data.span.stop+.9, sf=string(node.data.sf)))
    for child in node
        _add_node_to_data(child, indent+1, data)
    end
    data
end

function _plotflamegraph(node; kwargs...)
    data =_add_node_to_data(node)

    return data |> VegaLite.@vlplot(
        mark={type=:rect, stroke="#505050"},
        transform=[{calculate="datum.level+0.9", as=:level2}],
        selection={grid={type=:interval, bind=:scales},
            highlight={type=:single, on=:mouseover, empty=:none},
            select={type=:multi, empty=:none}},
        x={:x1, axis=nothing},
        x2=:x2,
        y={"level:q", axis=nothing},
        y2={"level2:q"},
        fillOpacity={condition=[
                {selection=:highlight, value=0.6},
                {selection=:select, value=0.5}
            ],
            value=1},
        strokeWidth={condition=[
            {selection=:highlight, value=0.5},
            {selection=:select, value=0.5}
            ],
            value=0},
        width=get(kwargs, :width, width(_options)),
        height=get(kwargs, :height, height(_options)),
        color={"status:n", legend={title=nothing, orient=:bottom}},
        tooltip=:sf,
        title="Profile Results"
    )
end

"""
    ProfileVega.view(data=Profile.fetch(); kwargs...)

View profiling results. See [FlameGraphs](https://github.com/timholy/FlameGraphs.jl)
for options for `kwargs`.
"""
function view(data::Vector{UInt64}=Profile.fetch(); kwargs...)
    g = FlameGraphs.flamegraph(data; filter(x -> !(x[1] in fieldnames(Options)), kwargs)...)

    return _plotflamegraph(g; kwargs...)
end

"""
    @profview f(args...)

Clear the Profile buffer, profile `f(args...)`, and view the result graphically.
"""
macro profview(ex, args...)
    return quote
        Profile.clear()
        Profile.@profile $(esc(ex))
        view(;$(esc.(args)...))
    end
end

max_stars_repo_name: davidanthoff/ProfileVega

max_issues_repo_name: davidanthoff/ProfileVega

max_forks_repo_name: davidanthoff/ProfileVega


text:
"""
The structure for storing a projection-based representation of differential ideal
(see Section https://arxiv.org/abs/2111.00991)
"""
struct PBRepresentation
    y_names::Array{String} # variables with finite orders in the profile
    u_names::Array{String} # variables with infinite orders in the profile
    param_names::Array{String} # scalar parameters
    profile::Dict{String, Int} # the profile restricted on the y-variables
    projections::Dict{String, <:MPolyElem}

    function PBRepresentation(ode::ODE, io_equations)
        if length(keys(io_equations)) > length(ode.y_vars)
            throw(DomainError("This projection-based representation is not a charset, not yet implemented"))
        end
        y_names = map(var_to_str, ode.y_vars)
        u_names = map(var_to_str, ode.u_vars)
        param_names = map(var_to_str, ode.parameters)
        old_ring = parent(first(values(io_equations)))
        new_varnames = filter(
            v -> (v in param_names) || decompose_derivative(v, vcat(y_names, u_names)) != nothing,
            map(var_to_str, gens(old_ring))
        )
        newring, _ = Nemo.PolynomialRing(base_ring(old_ring), new_varnames)

        profile = Dict{String, Int}()
        projections = Dict{String, MPolyElem}()
        for (y, eq) in io_equations
            (name, ord) = decompose_derivative(var_to_str(y), y_names)
            profile[name] = ord
            projections[name] = parent_ring_change(eq, newring)
        end
        new(y_names, u_names, param_names, profile, projections)
    end

    # for testing
    function PBRepresentation(y_names, u_names, param_names, profile, projections)
        new(y_names, u_names, param_names, profile, projections)
    end
end

# -----------------------------------------------------------------------------

"""
    find_leader(vars, pbr)

Among the variables `vars`, determines the leading derivative if the y-variable
(if exists) with respect to the ordering defined by the PB-representation
(see Remark 2.20 in https://arxiv.org/abs/2111.00991)
"""
function find_leader(vars::Array{<: MPolyElem}, pbr::PBRepresentation)
    y_ders = filter(v -> decompose_derivative(var_to_str(v), pbr.y_names) != nothing, vars)
    if length(y_ders) == 0
        return nothing
    end
    y_ders_ext = [(decompose_derivative(var_to_str(y), pbr.y_names), y) for y in y_ders]
    return sort(
        y_ders_ext, rev = true,
        by = p -> (
            p[1][2] - pbr.profile[p[1][1]],
            findfirst(n -> n == p[1][1], pbr.y_names)
        )
    )[1][2]
end

# -----------------------------------------------------------------------------

"""
    common_ring(poly, pbr)

For a polynomail `poly` in the same differential variables as `pbr`, finds
a polynomial ring sufficient for carrying out the reduction and the
corresponding differentiation mapping on the variables
"""
function common_ring(poly::MPolyElem, pbr::PBRepresentation)
    max_ords = Dict{String, Int}(v => 0 for v in vcat(pbr.y_names, pbr.u_names))
    new_params = Array{String, 1}()
    for v in vars(poly)
        d = decompose_derivative(var_to_str(v), vcat(pbr.y_names, pbr.u_names))
        if d != nothing
            max_ords[d[1]] = max(d[2], max_ords[d[1]])
        elseif !(var_to_str(v) in pbr.param_names)
            @warn "New variable $(var_to_str(v)), treating as a scalar parameter"
            push!(new_params, var_to_str(v))
        end
    end

    max_offset = max([max_ords[y] - pbr.profile[y] for y in pbr.y_names]...)

    varnames = Array{String, 1}()
    for y in pbr.y_names
        append!(varnames, ["$(y)_$h" for h in 0:(max_offset + pbr.profile[y])])
    end
    for u in pbr.u_names
        append!(
                varnames,
                ["$(u)_$h" for h in 0:max(max_ords[u],
                max_offset + max([difforder(p, u) for p in values(pbr.projections)]...))]
        )
    end
    append!(varnames, pbr.param_names)
    append!(varnames, new_params)

    newring, _ = StructuralIdentifiability.Nemo.PolynomialRing(base_ring(parent(poly)), varnames)
    derivation = Dict{MPolyElem, MPolyElem}()
    for v in varnames
        d = decompose_derivative(v, vcat(pbr.y_names, pbr.u_names))
        if d == nothing
            derivation[str_to_var(v, newring)] = zero(newring)
        else
            der = "$(d[1])_$(d[2] + 1)"
            if der in varnames
                derivation[str_to_var(v, newring)] = str_to_var(der, newring)
            else
                derivation[str_to_var(v, newring)] = zero(newring)
            end
        end
    end
    return (newring, derivation)
end

# -----------------------------------------------------------------------------

"""
    lc_univariate(f, x)

Computes the leading coefficient of `f` viewed as a univariate polynomail in variable `x`
"""
function lc_univariate(f::MPolyElem, x::MPolyElem)
    FieldType = typeof(one(base_ring(parent(f))))
    dict_result = Dict{Array{Int,1}, FieldType}()
    x_ind = findfirst(v -> v == x, gens(parent(f)))
    cur_deg = 0
    for (monom, coef) in zip(exponent_vectors(f), coefficients(f))
        if monom[x_ind] > cur_deg
            cur_deg = monom[x_ind]
            dict_result = Dict{Array{Int, 1}, FieldType}()
        end
        if monom[x_ind] == cur_deg
            monom[x_ind] = 0
            dict_result[monom] = coef
        end
    end
    return dict_to_poly(dict_result, parent(f))
end

# -----------------------------------------------------------------------------

"""
    pseudodivision(f, g, x)

Computes the result of pseudodivision of `f` by `g` as univariate polynomials in `x`
"""
function pseudodivision(f::MPolyElem, g::MPolyElem, x::MPolyElem)
    result = f
    lcg = lc_univariate(g, x)
    while Nemo.degree(result, x) >= Nemo.degree(g, x)
        degdiff = Nemo.degree(result, x) - Nemo.degree(g, x)
        result = lcg * result - lc_univariate(result, x) * x^degdiff * g
        lcgcd = gcd(result, lcg)
        if total_degree(lcgcd) != 0
            result = divexact(result, lcgcd)
        end
    end
    return result
end

# -----------------------------------------------------------------------------

function diff(p::MPolyElem, derivation::Dict{<: MPolyElem, <: MPolyElem}, i::Int)
    if i == 0
        return p
    end
    if i == 1
        return sum([derivative(p, x) * derivation[x] for x in vars(p)])
    end
    return diff(diff(p, derivation, 1), derivation, i - 1)
end

# -----------------------------------------------------------------------------

"""
    diffreduce(diffpoly, pbr)

Computes the result of differential reduction of a differential polynomial
`diffpoly` with respect to the charset defined by a PB-representation `pbr`
"""
function diffreduce(diffpoly::MPolyElem, pbr::PBRepresentation)
    (ring, der) = common_ring(diffpoly, pbr)

    result = parent_ring_change(diffpoly, ring)
    ext_projections = Dict(y => parent_ring_change(f, ring) for (y, f) in pbr.projections)

    while true
        lead = find_leader(vars(result), pbr)
        if lead == nothing
            return result
        end
        (var, ord) = decompose_derivative(var_to_str(lead), pbr.y_names)
        if ord < pbr.profile[var]
            return result
        end
        if ord == pbr.profile[var] && Nemo.degree(result, lead) < Nemo.degree(ext_projections[var], lead)
            return result
        end
        reducer = diff(ext_projections[var], der, ord - pbr.profile[var])
        result = pseudodivision(result, reducer, lead)
    end
end

# -----------------------------------------------------------------------------

"""
    io_switch(pbr)

In a single-output pb-representation `pbr` makes the leading variable to be the first of the inputs
"""
function io_switch!(pbr::PBRepresentation)
    if length(pbr.y_names) > 1
        throw(ArgumentError("Not implemented for multiple outputs"))
    end
    diffpoly = first(values(pbr.projections))
    u = first(pbr.u_names)
    ordu = -1
    for v in vars(diffpoly)
        d = decompose_derivative(var_to_str(v), [u])
        if d != nothing
            ordu = max(d[2], ordu)
        end
    end
    y = first(pbr.y_names)
    pbr.u_names[1] = y
    pbr.y_names[1] = u
    pbr.projections[u] = diffpoly
    delete!(pbr.projections, y)
    pbr.profile[u] = ordu
    delete!(pbr.profile, y)
end


text:
#!/usr/bin/env julia

import Celeste.ParallelRun: BoundingBox, get_overlapping_fields,
                            one_node_infer, one_node_single_infer
import Celeste.SDSSIO: RunCamcolField
import Celeste.DeterministicVIImagePSF: infer_source_fft
import Celeste.DeterministicVI: infer_source

const rcfs = [
    RunCamcolField(4264,6,160),
    RunCamcolField(4264,6,161),
    RunCamcolField(4264,5,158),
    RunCamcolField(4264,5,159),
    RunCamcolField(4264,5,160),
    RunCamcolField(4264,5,161),
    RunCamcolField(4264,5,162),
    RunCamcolField(4294,6,133),
    RunCamcolField(4294,6,134),
    RunCamcolField(4294,6,135),
    RunCamcolField(4294,6,136),
    RunCamcolField(4294,6,137),
    RunCamcolField(4294,6,138),
    RunCamcolField(4294,5,135)]

const datadir = joinpath(Pkg.dir("Celeste"), "test", "data")
wd = pwd()
cd(datadir)
for rcf in rcfs
    run(`make RUN=$(rcf.run) CAMCOL=$(rcf.camcol) FIELD=$(rcf.field)`)
end
cd(wd)

"""
This benchmark optimizes all the light sources in a
one-quarter-square-degree region of sky.
"""
function benchmark_quarter_degree()
    box = BoundingBox(124.0, 124.5, 58.5, 59.0)

    wrap_single(cnti...) = one_node_single_infer(cnti...;
                                  infer_source_callback=infer_source_fft)

    warmup_box = BoundingBox(124.2, 124.21, 58.7, 58.71)
    warmup_rcfs = get_overlapping_fields(warmup_box, datadir)
    one_node_infer(warmup_rcfs,
                   datadir;
                   infer_callback=wrap_single,
                   box=warmup_box)

    rcfs = get_overlapping_fields(box, datadir)

    # resets runtime profiler *and* count for --track-allocation
    Profile.clear_malloc_data()

    if isempty(ARGS)
        @time one_node_infer(rcfs, datadir; infer_callback=wrap_single, box=box)
    elseif ARGS[1] == "--profile"
        @profile one_node_infer(rcfs, datadir; infer_callback=wrap_single, box=box)
        Profile.print(format=:flat, sortedby=:count)
    end
end

benchmark_quarter_degree()


text:
# Types for use in the rest of the package

using DataStructures: OrderedDict
using JSON

const EPS = sqrt(eps())

Dim = UInt

struct Intersect2D
  p1d1 :: Float64
  p1d2 :: Float64
  p2d1 :: Float64
  p2d2 :: Float64
end

function Base.isapprox(x::Intersect2D, y::Intersect2D; atol::Real=0, rtol::Real=rtoldefault(x,y,atol), nans::Bool=false)
  # FIXME: easy to break
  isapprox(x.p1d1, y.p1d1, atol, rtol, nans) &&
  isapprox(x.p1d2, y.p1d2, atol, rtol, nans) &&
  isapprox(x.p2d1, y.p2d1, atol, rtol, nans) &&
  isapprox(x.p2d2, y.p2d2, atol, rtol, nans)
end

PointND = Array{Float64,1}
LambdaND = Array{Float64,1}

Simplex = Array{Float64}

ProblemSpec = OrderedDict{String,Tuple{Float64,Float64}}

max_stars_repo_name: gabysbrain/multid-slicing

max_issues_repo_name: gabysbrain/multid-slicing

max_forks_repo_name: gabysbrain/multid-slicing


text:
include("poly_factorization_project.jl")

x = x_poly()
p1 = 2x^3 + 4x^2 - 3x
p2 = 2x^4 - 4x^2 - 3x + 3

@show p1*p2
@show p1^3

@show derivative(p1*p2)
@show derivative(p1)*p2 + p1*derivative(p2);

prime = 17
p = mod((7x^3 + 2x^2 + 8x + 1)*(x^2+x+1),prime)
println("Will factor this polynomial (mod $prime): ", p)
factorization = factor(p,prime)
println("Here is the factorization: ", factorization)

pr = mod(expand_factorization(factorization),prime)
println("Reconstructing: ", pr)

x = x_poly()
p1 = 2x^2+3x +(-5) #Note we need +(-5)... try later without... how to fix?
p2 = -3x^2 - 4x +6
p1+p2

extended_euclid_alg(p1*p2,p2,101)


text:
### A Pluto.jl notebook ###
# v0.10.0

using Markdown

# ╔═╡ b7d4165b-d051-441d-b4d1-251eba60a0d2
md"""
# Funciones

Temas:
1. Cómo declara una función
2. Duck-typing en Julia
3. Funciones mutantes vs. no-mutantes
4. Broadcasting
"""

# ╔═╡ 39434826-4c89-4074-9c9e-770bde3463dd
md"""
## Cómo declarar una función
Julia nos permite definir una función de varias maneras. La primera requiere de las palabras reservadas `function` y `end`
"""

# ╔═╡ 0adc05a6-8428-4722-94cc-355e65437395
function sayhi(name)
    println("Hi $name, it's great to see you!")
end

# ╔═╡ 158e67af-59ce-4d4f-8256-f635ffedf5a0
function f(x)
    x^2
end

# ╔═╡ b1bc4d5d-33b5-4698-8fb8-f4126af5463d
md"""
Y las podemos llamar así
"""

# ╔═╡ eaf96975-d1e6-4369-9fa1-8ab49b69b6d9
sayhi("C-3PO")

# ╔═╡ 7a5019b7-6ae4-4fcd-9859-118a6e000033
f(42)

# ╔═╡ e3585fc6-78ed-4ccf-a9f0-3387e41b1193
md"""
Alternativamente, las podemos declarar en una sóla línea
"""

# ╔═╡ 311a5abb-86ad-411f-9118-8827b65fb833
sayhi2(name) = println("Hi $name, it's great to see you!")

# ╔═╡ 25594aa9-0d0d-49e6-84cb-33d195e7bd62
f2(x) = x^2

# ╔═╡ 99fae709-86fd-4962-a47f-0dadfcebf9fc
sayhi2("R2D2")

# ╔═╡ c66327e0-3ac1-4078-96df-4c0132eeb5e9
f2(42)

# ╔═╡ 707831b6-e85a-4a11-9648-0af16acf71f7
md"""
Finalmente, pudimos declararlas como funciones "anónimas"
"""

# ╔═╡ c71820ac-4ae6-42a1-a1cb-d05ab25afc75
sayhi3 = name -> println("Hi $name, it's great to see you!")

# ╔═╡ 7a5b1e40-def3-4cca-9c81-73addb86aa18
f3 = x -> x^2

# ╔═╡ ca7f38ca-1b81-4425-ba04-32c40ba329cd
sayhi3("Chewbacca")

# ╔═╡ 59382902-5270-44f5-a19e-d8c296e630f3
f3(42)

# ╔═╡ 10880ded-73a9-4165-b993-623d93e08630
md"""
## Duck-typing en Julia
*"If it quacks like a duck, it's a duck."*
*"Si suena como pato, es un pato"*

En Julia, las funciones operaran con el cualquier valor que haga sentido.

Por ejemplo, `sayhi` funciona con el nombre de este personaje de tele, escrito como entero...
"""

# ╔═╡ 10205f9e-6758-44a7-a1ed-f1daae906893
sayhi(55595472)

# ╔═╡ 5d4f722a-3e68-422c-8dab-4c92be5b9804
md"""
Y `f` va a funcionar en una matriz.
"""

# ╔═╡ b9bfd357-22e7-4d75-a251-53e8379f8017
A = rand(3, 3)
A

# ╔═╡ 779781b3-5092-4559-9d61-b2e83d2b259a
f(A)

# ╔═╡ f16551eb-e665-4922-8e98-548a55872ebd
md"""
`f` funcionará con "hi" porque `*` para inputs de cadenas como concatenación.
"""

# ╔═╡ b626e299-7afd-4b62-b070-738fff6cb6cb
f("hi")

# ╔═╡ 2c44a8ae-c8e7-49ad-9de2-0537c56a6f23
md"""
Por el otro lado, `f` no funcionará sobre un vector. A diferencia de `A^2`, la cual es una operación bien definida, el signifiado de `v^2` para un vector, `v`, es ambigua.
"""

# ╔═╡ 747e9a83-7886-4b33-a8d6-fd60293b2a0a
v = rand(3)

# ╔═╡ fb3682c1-674c-4ea3-a222-103bf960cbe8
f(v)

# ╔═╡ 81a0e65a-e4fb-427b-b59c-3248eff10b61
md"""
## Funciones mutantes vs no-mutantes

Por convención, funciones seguidas por un `!` alteran, o bien mutan, sus contenidos y las que carecen de un `!` no lo hacen.

Por ejemplo, `sort` y `sort!`.

"""

# ╔═╡ 3ce811b3-19aa-4f4f-8cf5-28f0032cc878
v = [3, 5, 2]

# ╔═╡ 284c7800-9dc2-4f0c-b3c0-da82e020cdfa
sort(v)

# ╔═╡ eec63ee5-9d20-4892-92df-9d0aeecfb323
v

# ╔═╡ 99dfcd21-d511-40d5-8119-fdf943bb2708
md"""
`sort(v)` regresa el arreglo ordenado de `v`, pero `v` no cambia.

Por otro lado, si corremos `sort!(v)`, el contenido del arreglo es ordenado dentro de `v`.
"""

# ╔═╡ 11a3c01b-0ac1-4538-8103-8e7e35eadd3c
sort!(v)

# ╔═╡ 017e9146-e1ab-46c0-b6e8-e36f14965639
v

# ╔═╡ ca47c936-e9e4-4039-9ff2-3e6f6f395f89
md"""
## Broadcasting

Si ponemos `.` entre el nombre de la funcion y su lista de argumento,

le estamos diciendo a la función que se "difunda"/haga broadcasting sobre los elementos del input.

Primero veamos la diferencia entre `f()` y `f.()`.

Primero definimos una nueva matriz `A` que hará la diferencia fácil de observar
"""

# ╔═╡ 0e5e8129-b03f-4010-8e33-d57d4aa49529
A = [i + 3*j for j in 0:2, i in 1:3]

# ╔═╡ 96b1c681-280a-43b0-bc00-2abb315549f6
f(A)

# ╔═╡ ac7f99d1-0eef-43b6-a01a-0da4bf0d5ef5
md"""
Cómo se vio antes, para una matriz, `A`,
```
f(A) = A^2 = A * A
```

`f.(A)` por el otro lado va a regresar un objeto que contiene el cuadrado de `A[i, j]` en su entrada correspondiente.
"""

# ╔═╡ 5d1d011e-2399-4d33-858c-b7b7e89e81b6
B = f.(A)

# ╔═╡ b5c3116e-f7dd-4ead-a554-c539eb152a32
A[2, 2]

# ╔═╡ 9144bda4-a4d0-4c30-b551-0324c35761eb
A[2, 2]^2

# ╔═╡ 918a6647-80e5-4a5a-820c-cdaf6f835fc7
B[2, 2]

# ╔═╡ 6469d0a9-860b-4bc0-b791-40edc1cea224
md"""
Esto significa que para `v`, `f.(v)` está definido, pero no para `f(v)` :
"""

# ╔═╡ 72658881-9638-4264-8d65-5766423ace70
v = [1, 2, 3]

# ╔═╡ 5c26b16d-4d73-4b79-b5e4-3b1e20c5cd9d
f.(v)

# ╔═╡ fb497c48-76e2-4eb1-8e21-785c93f39dc4
md"""
### Ejercicios

6.1 En vez de broadcastear `f` sobre `v`,  pudimos haber hecho `v .^ 2`.

Sin declarar una nueva funcion, agrega 1 a cada elemento de una matriz de `3x3` llena de `0`'s.
"""

# ╔═╡ f681fc78-679f-45b8-ae95-14b2d9eb6366

# ╔═╡ 62c8731f-63a7-4fae-8980-0d0665cb556a
md"""

"""

# ╔═╡ 7dbb40ed-0b51-4825-bbc8-9e6f4d0c4738

# ╔═╡ be113c25-4aec-4ead-a812-50a54aa7428d
md"""
6.3 Una cifra de César recorre cada letra un número determinado de plazas más adelante en el abecedario. Un corrimiento, o shift, de 1 manda "A" a "B". Escribe una función llamada `cesar` que toma una cadena como input y un corrimiento y regresa una cadena desencriptada tal que obtengas

```julia
cesar("abc", 1)
"bcd"

cesar("hello", 4)
"lipps"
```
"""

# ╔═╡ 14e4057a-96f3-4cec-b1f0-e0c01e73dd86

# ╔═╡ Cell order:
# ╟─b7d4165b-d051-441d-b4d1-251eba60a0d2
# ╟─39434826-4c89-4074-9c9e-770bde3463dd
# ╠═0adc05a6-8428-4722-94cc-355e65437395
# ╠═158e67af-59ce-4d4f-8256-f635ffedf5a0
# ╟─b1bc4d5d-33b5-4698-8fb8-f4126af5463d
# ╠═eaf96975-d1e6-4369-9fa1-8ab49b69b6d9
# ╠═7a5019b7-6ae4-4fcd-9859-118a6e000033
# ╟─e3585fc6-78ed-4ccf-a9f0-3387e41b1193
# ╠═311a5abb-86ad-411f-9118-8827b65fb833
# ╠═25594aa9-0d0d-49e6-84cb-33d195e7bd62
# ╠═99fae709-86fd-4962-a47f-0dadfcebf9fc
# ╠═c66327e0-3ac1-4078-96df-4c0132eeb5e9
# ╟─707831b6-e85a-4a11-9648-0af16acf71f7
# ╠═c71820ac-4ae6-42a1-a1cb-d05ab25afc75
# ╠═7a5b1e40-def3-4cca-9c81-73addb86aa18
# ╠═ca7f38ca-1b81-4425-ba04-32c40ba329cd
# ╠═59382902-5270-44f5-a19e-d8c296e630f3
# ╟─10880ded-73a9-4165-b993-623d93e08630
# ╠═10205f9e-6758-44a7-a1ed-f1daae906893
# ╟─5d4f722a-3e68-422c-8dab-4c92be5b9804
# ╠═b9bfd357-22e7-4d75-a251-53e8379f8017
# ╠═779781b3-5092-4559-9d61-b2e83d2b259a
# ╟─f16551eb-e665-4922-8e98-548a55872ebd
# ╠═b626e299-7afd-4b62-b070-738fff6cb6cb
# ╟─2c44a8ae-c8e7-49ad-9de2-0537c56a6f23
# ╠═747e9a83-7886-4b33-a8d6-fd60293b2a0a
# ╠═fb3682c1-674c-4ea3-a222-103bf960cbe8
# ╟─81a0e65a-e4fb-427b-b59c-3248eff10b61
# ╠═3ce811b3-19aa-4f4f-8cf5-28f0032cc878
# ╠═284c7800-9dc2-4f0c-b3c0-da82e020cdfa
# ╠═eec63ee5-9d20-4892-92df-9d0aeecfb323
# ╟─99dfcd21-d511-40d5-8119-fdf943bb2708
# ╠═11a3c01b-0ac1-4538-8103-8e7e35eadd3c
# ╠═017e9146-e1ab-46c0-b6e8-e36f14965639
# ╟─ca47c936-e9e4-4039-9ff2-3e6f6f395f89
# ╠═0e5e8129-b03f-4010-8e33-d57d4aa49529
# ╠═96b1c681-280a-43b0-bc00-2abb315549f6
# ╟─ac7f99d1-0eef-43b6-a01a-0da4bf0d5ef5
# ╠═5d1d011e-2399-4d33-858c-b7b7e89e81b6
# ╠═b5c3116e-f7dd-4ead-a554-c539eb152a32
# ╠═9144bda4-a4d0-4c30-b551-0324c35761eb
# ╠═918a6647-80e5-4a5a-820c-cdaf6f835fc7
# ╟─6469d0a9-860b-4bc0-b791-40edc1cea224
# ╠═72658881-9638-4264-8d65-5766423ace70
# ╠═5c26b16d-4d73-4b79-b5e4-3b1e20c5cd9d
# ╟─fb497c48-76e2-4eb1-8e21-785c93f39dc4
# ╠═f681fc78-679f-45b8-ae95-14b2d9eb6366
# ╟─62c8731f-63a7-4fae-8980-0d0665cb556a
# ╠═7dbb40ed-0b51-4825-bbc8-9e6f4d0c4738
# ╟─be113c25-4aec-4ead-a812-50a54aa7428d
# ╠═14e4057a-96f3-4cec-b1f0-e0c01e73dd86

max_stars_repo_name: miguelraz/JuliaTutorials

max_issues_repo_name: miguelraz/JuliaTutorials

max_forks_repo_name: miguelraz/JuliaTutorials