From bc4bb95b17524758eac617ca266e152370678a75 Mon Sep 17 00:00:00 2001 From: gaelforget Date: Wed, 28 Aug 2024 00:19:15 -0400 Subject: [PATCH] more example of MeshArray initialization --- examples/basics.jl | 128 +++++++++++++++++++++++++++++---------------- 1 file changed, 84 insertions(+), 44 deletions(-) diff --git a/examples/basics.jl b/examples/basics.jl index 3d012ab..e36edf5 100644 --- a/examples/basics.jl +++ b/examples/basics.jl @@ -53,6 +53,38 @@ begin end end +# ╔═╡ 6da9023a-a974-4c9d-a088-5f398700336c +md"""## Create More `MeshArray`s +""" + +# ╔═╡ 8f323098-5021-46ca-9c97-122fc2a60f0d +let + γ=tmp.grid + #GridSpec("LatLonCap",MeshArrays.GRID_LLC90) + + a=fill(2.0,MeshArray(γ)) + b=a*ones(10) + c=fill(2.0,b) + d=a*ones(10) + e=a*ones(3,2) + f=ones(e) + + f=ones(γ,3) + g=zeros(γ,3,2) + h=fill(3.0,γ,3,2) +end + +# ╔═╡ 4a3f3b75-1c75-4ce5-8e75-f4dd263199cd +let + γ=tmp.grid + #γ=GridSpec("LatLonCap",MeshArrays.GRID_LLC90) + + a=fill(2.0,MeshArray(γ)) + aa=write(a) + b=ones(γ.ioSize...,2) + bb=5*read(b,γ) +end + # ╔═╡ a0a7637f-f115-4257-a140-06dc48dd5fba md"""## Tutorial @@ -394,9 +426,9 @@ version = "1.1.0" [[deps.CairoMakie]] deps = ["CRC32c", "Cairo", "Cairo_jll", "Colors", "FileIO", "FreeType", "GeometryBasics", "LinearAlgebra", "Makie", "PrecompileTools"] -git-tree-sha1 = "57b139fd3cffdb82b7cc5756e9916ff68b88a690" +git-tree-sha1 = "361dec06290d76b6d70d0c7dc888038eec9df63a" uuid = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" -version = "0.12.7" +version = "0.12.9" [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] @@ -528,9 +560,9 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[deps.Distributions]] deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "0e0a1264b0942f1f3abb2b30891f2a590cc652ac" +git-tree-sha1 = "e6c693a0e4394f8fda0e51a5bdf5aef26f8235e9" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.110" +version = "0.25.111" [deps.Distributions.extensions] DistributionsChainRulesCoreExt = "ChainRulesCore" @@ -577,15 +609,15 @@ uuid = "2e619515-83b5-522b-bb60-26c02a35a201" version = "2.6.2+0" [[deps.Extents]] -git-tree-sha1 = "94997910aca72897524d2237c41eb852153b0f65" +git-tree-sha1 = "81023caa0021a41712685887db1fc03db26f41f5" uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" -version = "0.1.3" +version = "0.1.4" [[deps.FFMPEG_jll]] deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] -git-tree-sha1 = "ab3f7e1819dba9434a3a5126510c8fda3a4e7000" +git-tree-sha1 = "8cc47f299902e13f90405ddb5bf87e5d474c0d38" uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" -version = "6.1.1+0" +version = "6.1.2+0" [[deps.FFTW]] deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] @@ -612,10 +644,15 @@ uuid = "8fc22ac5-c921-52a6-82fd-178b2807b824" version = "0.8.3" [[deps.FilePathsBase]] -deps = ["Compat", "Dates", "Mmap", "Printf", "Test", "UUIDs"] -git-tree-sha1 = "9f00e42f8d99fdde64d40c8ea5d14269a2e2c1aa" +deps = ["Compat", "Dates"] +git-tree-sha1 = "7878ff7172a8e6beedd1dea14bd27c3c6340d361" uuid = "48062228-2e41-5def-b9a4-89aafe57970f" -version = "0.9.21" +version = "0.9.22" +weakdeps = ["Mmap", "Test"] + + [deps.FilePathsBase.extensions] + FilePathsBaseMmapExt = "Mmap" + FilePathsBaseTestExt = "Test" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" @@ -721,10 +758,10 @@ uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" version = "1.0.2" [[deps.HarfBuzz_jll]] -deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] -git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3" +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"] +git-tree-sha1 = "401e4f3f30f43af2c8478fc008da50096ea5240f" uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" -version = "2.8.1+1" +version = "8.3.1+0" [[deps.HypergeometricFunctions]] deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] @@ -869,10 +906,10 @@ uuid = "82899510-4779-5014-852e-03e436cf321d" version = "1.0.0" [[deps.JLD2]] -deps = ["FileIO", "MacroTools", "Mmap", "OrderedCollections", "PrecompileTools", "Reexport", "Requires", "TranscodingStreams", "UUIDs", "Unicode"] -git-tree-sha1 = "67d4690d32c22e28818a434b293a374cc78473d3" +deps = ["FileIO", "MacroTools", "Mmap", "OrderedCollections", "PrecompileTools", "Requires", "TranscodingStreams"] +git-tree-sha1 = "049950edff105ff73918d29dbf109220ff364157" uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819" -version = "0.4.51" +version = "0.4.52" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] @@ -1041,15 +1078,15 @@ version = "0.5.13" [[deps.Makie]] deps = ["Animations", "Base64", "CRC32c", "ColorBrewer", "ColorSchemes", "ColorTypes", "Colors", "Contour", "Dates", "DelaunayTriangulation", "Distributions", "DocStringExtensions", "Downloads", "FFMPEG_jll", "FileIO", "FilePaths", "FixedPointNumbers", "Format", "FreeType", "FreeTypeAbstraction", "GeometryBasics", "GridLayoutBase", "ImageIO", "InteractiveUtils", "IntervalSets", "Isoband", "KernelDensity", "LaTeXStrings", "LinearAlgebra", "MacroTools", "MakieCore", "Markdown", "MathTeXEngine", "Observables", "OffsetArrays", "Packing", "PlotUtils", "PolygonOps", "PrecompileTools", "Printf", "REPL", "Random", "RelocatableFolders", "Scratch", "ShaderAbstractions", "Showoff", "SignedDistanceFields", "SparseArrays", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "TriplotBase", "UnicodeFun", "Unitful"] -git-tree-sha1 = "05b01e6cae68aa40f9a64339c54aba2572cce7a7" +git-tree-sha1 = "204f06860af9008fa08b3a4842f48116e1209a2c" uuid = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" -version = "0.21.7" +version = "0.21.9" [[deps.MakieCore]] deps = ["ColorTypes", "GeometryBasics", "IntervalSets", "Observables"] -git-tree-sha1 = "1753d72dcf82beb1c582826d0a51a8253a719613" +git-tree-sha1 = "b0e2e3473af351011e598f9219afb521121edd2b" uuid = "20f20a25-4f0e-4fdf-b5d1-57303727442b" -version = "0.8.5" +version = "0.8.6" [[deps.MappedArrays]] git-tree-sha1 = "2dab0221fe2b0f2cb6754eaa743cc266339f527e" @@ -1073,9 +1110,9 @@ version = "2.28.2+1" [[deps.MeshArrays]] deps = ["CatViews", "Dates", "LazyArtifacts", "NearestNeighbors", "Pkg", "Printf", "SparseArrays", "Statistics", "Unitful"] -git-tree-sha1 = "54d8b2bb9ac97f0175dea32bcdd9348573c04ec6" +git-tree-sha1 = "c1c5c8afde5293b643aea2d5ccc8554b1e593bf0" uuid = "cb8c808f-1acf-59a3-9d2b-6e38d009f683" -version = "0.3.10" +version = "0.3.11" [deps.MeshArrays.extensions] MeshArraysDataDepsExt = ["DataDeps"] @@ -1189,10 +1226,10 @@ uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" version = "0.5.5+0" [[deps.Opus_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6703a85cb3781bd5909d48730a67205f3f31a575" uuid = "91d4177d-7536-5919-b921-800302f37372" -version = "1.3.2+0" +version = "1.3.3+0" [[deps.OrderedCollections]] git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" @@ -1230,9 +1267,9 @@ version = "0.5.12" [[deps.Pango_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "cb5a2ab6763464ae0f19c86c56c63d4a2b0f5bda" +git-tree-sha1 = "e127b609fb9ecba6f201ba7ab753d5a605d53801" uuid = "36c8627f-9965-5494-a995-c6b170f724f3" -version = "1.52.2+0" +version = "1.54.1+0" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] @@ -1265,9 +1302,9 @@ version = "1.4.1" [[deps.PlutoUI]] deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] -git-tree-sha1 = "ab55ee1510ad2af0ff674dbcced5e94921f867a9" +git-tree-sha1 = "eba4810d5e6a01f612b948c9fa94f905b49087b0" uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" -version = "0.7.59" +version = "0.7.60" [[deps.PolygonOps]] git-tree-sha1 = "77b3d3605fc1cd0b42d95eba87dfcd2bf67d5ff6" @@ -1696,10 +1733,10 @@ uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" version = "3.9.0+0" [[deps.libass_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] -git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47" +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "e17c115d55c5fbb7e52ebedb427a0dca79d4484e" uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" -version = "0.15.1+0" +version = "0.15.2+0" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] @@ -1707,10 +1744,10 @@ uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" version = "5.8.0+1" [[deps.libfdk_aac_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8a22cf860a7d27e4f3498a0fe0811a7957badb38" uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" -version = "2.0.2+0" +version = "2.0.3+0" [[deps.libpng_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] @@ -1747,23 +1784,24 @@ uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" version = "17.4.0+2" [[deps.x264_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "4fea590b89e6ec504593146bf8b988b2c00922b2" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "35976a1216d6c066ea32cba2150c4fa682b276fc" uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" -version = "2021.5.5+0" +version = "10164.0.0+0" [[deps.x265_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "ee567a171cce03570d77ad3a43e90218e38937a9" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "dcc541bb19ed5b0ede95581fb2e41ecf179527d2" uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" -version = "3.5.0+0" +version = "3.6.0+0" """ # ╔═╡ Cell order: # ╟─0358ae4b-f941-4254-aa10-6c37bb09c464 # ╟─b1f3ac4b-5f75-40fa-b125-186556ece946 -# ╟─1a714fba-2a8e-11ec-182f-8f85cc17b02a -# ╟─dec3cc17-bd5d-4fb0-a85c-df71a679264b +# ╟─6da9023a-a974-4c9d-a088-5f398700336c +# ╠═8f323098-5021-46ca-9c97-122fc2a60f0d +# ╠═4a3f3b75-1c75-4ce5-8e75-f4dd263199cd # ╟─a0a7637f-f115-4257-a140-06dc48dd5fba # ╟─54030bff-45f7-43b1-b19f-7c0cd05a02ae # ╟─1fc99fca-3440-4765-b11d-e10eb560aff7 @@ -1781,6 +1819,8 @@ version = "3.5.0+0" # ╠═6dfd7770-0197-4e74-ab27-bb666709c5d6 # ╟─2c29ba59-ffc9-4763-8405-250029016ca5 # ╠═169f9cdd-28f1-4574-ade4-237eab46a541 +# ╟─1a714fba-2a8e-11ec-182f-8f85cc17b02a +# ╟─dec3cc17-bd5d-4fb0-a85c-df71a679264b # ╟─58f95665-9687-4b4f-af99-1239818f71a3 # ╟─62f2dc32-456e-4e8a-8c4a-3a0ae236af13 # ╟─00000000-0000-0000-0000-000000000001