diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7f715a..30ac34f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,6 @@ jobs: version: - '1.6' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'. - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. - - 'nightly' os: - ubuntu-latest arch: diff --git a/Project.toml b/Project.toml index a143c3d..324499a 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "NCTiles" uuid = "4c1fdd90-559f-11e9-1abf-07ceafc4ffc0" authors = ["Gael Forget", "Lauren Milechin"] -version = "0.1.14" +version = "0.1.15" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" @@ -14,6 +14,6 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" [compat] MeshArrays = "0.2" -NCDatasets = "0.9, 0.10, 0.11" +NCDatasets = "0.9, 0.10, 0.11, 0.12" NetCDF = "0.8, 0.9, 0.10, 0.11" julia = "1.2" diff --git a/examples/Example5.jl b/examples/Example5.jl index 3c680f1..3efe9cd 100644 --- a/examples/Example5.jl +++ b/examples/Example5.jl @@ -106,8 +106,8 @@ function ClimArray_to_MeshArray(C::ClimArray) nlon=length(tmp.dims[1][:]) nlat=length(tmp.dims[2][:]) - XC = MeshArray(tmp.dims[1][:]*ones(1,nlon)) - YC = MeshArray(ones(nlat,1)*tmp.dims[2][:]') + XC = MeshArray(collect(tmp.dims[1][:])*ones(1,nlon)) + YC = MeshArray(ones(nlat,1)*collect(tmp.dims[2][:])') Γ = (XC=XC,YC=YC) MeshArray(C.data;meta=m),Γ diff --git a/src/write.jl b/src/write.jl index 40b6e45..7dca191 100644 --- a/src/write.jl +++ b/src/write.jl @@ -407,7 +407,7 @@ Add dimension data to predefined dimensions in a NetCDF file. """ function addDimData(ds,dimvar::NCvar) atts = merge(Dict(("units" =>dimvar.units)),dimvar.atts) - defVar(ds,dimvar.name,dimvar.values[:],(dimvar.name,),attrib=atts) + defVar(ds,dimvar.name,collect(dimvar.values[:]),(dimvar.name,),attrib=atts) end """ diff --git a/test/Manifest.toml b/test/Manifest.toml deleted file mode 100644 index 2fcdd09..0000000 --- a/test/Manifest.toml +++ /dev/null @@ -1,194 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -[[Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[BinDeps]] -deps = ["Compat", "Libdl", "SHA", "URIParser"] -git-tree-sha1 = "12093ca6cdd0ee547c39b1870e0c9c3f154d9ca9" -uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee" -version = "0.8.10" - -[[CFTime]] -deps = ["Dates", "Printf"] -git-tree-sha1 = "90eddf050a4d4b35520f87b9ba82302643706a1e" -uuid = "179af706-886a-5703-950a-314cd64e0468" -version = "0.0.3" - -[[CatViews]] -deps = ["Random", "Test"] -git-tree-sha1 = "23d1f1e10d4e24374112fcf800ac981d14a54b24" -uuid = "81a5f4ea-a946-549a-aa7e-2a7f63a27d31" -version = "1.0.0" - -[[Compat]] -deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] -git-tree-sha1 = "ed2c4abadf84c53d9e58510b5fc48912c2336fbb" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "2.2.0" - -[[Conda]] -deps = ["JSON", "VersionParsing"] -git-tree-sha1 = "9a11d428dcdc425072af4aea19ab1e8c3e01c032" -uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d" -version = "1.3.0" - -[[CondaBinDeps]] -deps = ["BinDeps", "Compat", "Conda", "Libdl"] -git-tree-sha1 = "3b868935adf4ce2115f5487e789553507739014c" -uuid = "a9693cdc-2bc8-5703-a9cd-1da358117377" -version = "0.1.0" - -[[DataAPI]] -git-tree-sha1 = "674b67f344687a88310213ddfa8a2b3c76cc4252" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.1.0" - -[[DataStructures]] -deps = ["InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "b7720de347734f4716d1815b00ce5664ed6bbfd4" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.17.9" - -[[Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[DelimitedFiles]] -deps = ["Mmap"] -uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" - -[[Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" - -[[Formatting]] -deps = ["Printf"] -git-tree-sha1 = "a0c901c29c0e7c763342751c0a94211d56c0de5c" -uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" -version = "0.4.1" - -[[InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[JSON]] -deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "b34d7cef7b337321e97d22242c3c2b91f476748e" -uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.0" - -[[LibGit2]] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" - -[[Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[LinearAlgebra]] -deps = ["Libdl"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - -[[Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[MeshArrays]] -deps = ["CatViews", "Printf", "SparseArrays", "Statistics"] -git-tree-sha1 = "37f08e9b7ea8b1dfd1d982ba8c11572ed8d1c677" -uuid = "cb8c808f-1acf-59a3-9d2b-6e38d009f683" -version = "0.2.5" - -[[Missings]] -deps = ["DataAPI"] -git-tree-sha1 = "de0a5ce9e5289f27df672ffabef4d1e5861247d5" -uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "0.4.3" - -[[Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" - -[[NCDatasets]] -deps = ["BinDeps", "CFTime", "Compat", "CondaBinDeps", "DataStructures", "Dates", "Libdl", "Missings", "Printf", "Random"] -git-tree-sha1 = "6c0398c68c2f1957a8368b8cc6c8f9ee98ad5738" -uuid = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" -version = "0.9.5" - -[[NetCDF]] -deps = ["BinDeps", "CondaBinDeps", "Formatting", "Libdl"] -git-tree-sha1 = "df78e4daf6148d9ca4657bfd44cb2c14d5cf7b05" -uuid = "30363a11-5582-574a-97bb-aa9a979735b9" -version = "0.8.2" - -[[OrderedCollections]] -deps = ["Random", "Serialization", "Test"] -git-tree-sha1 = "c4c13474d23c60d20a67b217f1d7f22a40edf8f1" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.1.0" - -[[Parsers]] -deps = ["Dates", "Test"] -git-tree-sha1 = "0139ba59ce9bc680e2925aec5b7db79065d60556" -uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "0.3.10" - -[[Pkg]] -deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" - -[[Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[Random]] -deps = ["Serialization"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" - -[[Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[SharedArrays]] -deps = ["Distributed", "Mmap", "Random", "Serialization"] -uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" - -[[Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - -[[SparseArrays]] -deps = ["LinearAlgebra", "Random"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - -[[Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[Test]] -deps = ["Distributed", "InteractiveUtils", "Logging", "Random"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[URIParser]] -deps = ["Test", "Unicode"] -git-tree-sha1 = "6ddf8244220dfda2f17539fa8c9de20d6c575b69" -uuid = "30578b45-9adc-5946-b283-645ec420af67" -version = "0.4.0" - -[[UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" - -[[VersionParsing]] -git-tree-sha1 = "80229be1f670524750d905f8fc8148e5a8c4537f" -uuid = "81def892-9a0e-5fdd-b105-ffc91e053289" -version = "1.2.0" diff --git a/test/testutils.jl b/test/testutils.jl index 998945c..ab2855b 100644 --- a/test/testutils.jl +++ b/test/testutils.jl @@ -186,8 +186,9 @@ end Create test data on a simple, coarse-grained Earth grid. """ function maketestdata() - lon=-180:20:180; lat=-90:20:90; - depth = 5:10:100 + lon=collect(-180:20:180) + lat=collect(-90:20:90) + depth = collect(5:10:100) n1,n2,n3 = (length(lon),length(lat),length(depth)) timeinterval = 1 @@ -231,8 +232,8 @@ function maketestdata() dep = -1 .* collect([-5 -15 -25 -35 -45 -55 -65 -75.0049972534180 -85.0250015258789 -95.0950012207031 -105.309997558594 -115.870002746582 -127.150001525879 -139.740005493164 -154.470001220703 -172.399993896484 -194.735000610352 -222.710006713867 -257.470001220703 -299.929992675781 -350.679992675781 -409.929992675781 -477.470001220703 -552.710021972656 -634.734985351563 -722.400024414063 -814.469970703125 -909.739990234375 -1007.15502929688 -1105.90502929688 -1205.53503417969 -1306.20495605469 -1409.15002441406 -1517.09497070313 -1634.17504882813 -1765.13500976563 -1914.15002441406 -2084.03491210938 -2276.22509765625 -2491.25000000000 -2729.25000000000 -2990.25000000000 -3274.25000000000 -3581.25000000000 -3911.25000000000 -4264.25000000000 -4640.25000000000 -5039.25000000000 -5461.25000000000 -5906.25000000000]') tile_ex = Dict(["tilesize" => tilesize, "grid" => grid, - "dims" => [NCvar("i_c","1",tilesize[1],1:tilesize[1],Dict("long_name" => "Cartesian coordinate 1"),NCDatasets), - NCvar("j_c","1",tilesize[2],1:tilesize[2],Dict("long_name" => "Cartesian coordinate 2"),NCDatasets), + "dims" => [NCvar("i_c","1",tilesize[1],collect(1:tilesize[1]),Dict("long_name" => "Cartesian coordinate 1"),NCDatasets), + NCvar("j_c","1",tilesize[2],collect(1:tilesize[2]),Dict("long_name" => "Cartesian coordinate 2"),NCDatasets), NCvar("dep_c","m",size(dep),dep,Dict("long_name" => "depth","standard_name" => "depth","positive" => "down"),NCDatasets), NCvar("tim","days since 1992-1-1 0:0:0",Inf,time_steps,Dict(("long_name" => "time","standard_name" => "time")),NCDatasets)], "fnamestile2d" => fnamestile2d