Skip to content

Commit

Permalink
Merge pull request #28 from FourierFlows/FixTypedProbMultilayerQG
Browse files Browse the repository at this point in the history
Fix Problem type in MultilayerQG
  • Loading branch information
glwagner committed Sep 3, 2019
2 parents bf6dc6b + 3fffda7 commit 2dcf03c
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 170 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ os:
- linux

julia:
- 1.1
# - nightly
- 1.2
- nightly

matrix:
allow_failures:
Expand All @@ -19,7 +19,7 @@ after_success:
jobs:
include:
- stage: "Documentation"
julia: 1.0
julia: 1.2
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.instantiate();
Expand Down
64 changes: 38 additions & 26 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ version = "0.5.6"

[[CSTParser]]
deps = ["Tokenize"]
git-tree-sha1 = "376a39f1862000442011390f1edf5e7f4dcc7142"
git-tree-sha1 = "c69698c3d4a7255bc1b4bc2afc09f59db910243b"
uuid = "00ebfdb7-1f24-5e51-bd34-a7502290713f"
version = "0.6.0"
version = "0.6.2"

[[CodecZlib]]
deps = ["BinaryProvider", "Libdl", "Test", "TranscodingStreams"]
git-tree-sha1 = "36bbf5374c661054d41410dc53ff752972583b9b"
deps = ["BinaryProvider", "Libdl", "TranscodingStreams"]
git-tree-sha1 = "05916673a2627dd91b4969ff8ba6941bc85a960e"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.5.2"
version = "0.6.0"

[[ColorTypes]]
deps = ["FixedPointNumbers", "Random"]
Expand All @@ -46,10 +46,10 @@ uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
version = "0.8.0"

[[Colors]]
deps = ["ColorTypes", "FixedPointNumbers", "InteractiveUtils", "Printf", "Reexport", "Test"]
git-tree-sha1 = "9f0a0210450acb91c730b730a994f8eef1d3d543"
deps = ["ColorTypes", "FixedPointNumbers", "InteractiveUtils", "Printf", "Reexport"]
git-tree-sha1 = "c9c1845d6bf22e34738bee65c357a69f416ed5d1"
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
version = "0.9.5"
version = "0.9.6"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
Expand Down Expand Up @@ -105,16 +105,16 @@ uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
version = "0.6.1"

[[FourierFlows]]
deps = ["FFTW", "Interpolations", "JLD2", "LinearAlgebra", "Random", "Reexport", "Statistics"]
git-tree-sha1 = "1addb960281c1cbd44156975ebb8e21a99f79232"
deps = ["Coverage", "FFTW", "Interpolations", "JLD2", "LinearAlgebra", "Printf", "Random", "Reexport", "Requires", "Statistics"]
git-tree-sha1 = "e430df633d39e02e772856e6cb745b99b069de19"
uuid = "2aec4490-903f-5c70-9b11-9bed06a700e1"
version = "0.3.0"
version = "0.3.1"

[[HTTP]]
deps = ["Base64", "Dates", "IniFile", "MbedTLS", "Sockets"]
git-tree-sha1 = "03ddc88af7f2d963fac5aa9f3ac8e11914d68a78"
git-tree-sha1 = "c4a527dba1d26add0e85946e1a53f42a1b343acc"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "0.8.4"
version = "0.8.5"

[[IniFile]]
deps = ["Test"]
Expand All @@ -139,10 +139,10 @@ uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
version = "0.1.2"

[[JSON]]
deps = ["Dates", "Distributed", "Mmap", "Sockets", "Test", "Unicode"]
git-tree-sha1 = "1f7a25b53ec67f5e9422f1f551ee216503f4a0fa"
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "b34d7cef7b337321e97d22242c3c2b91f476748e"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.20.0"
version = "0.21.0"

[[LaTeXStrings]]
deps = ["Compat"]
Expand All @@ -164,20 +164,20 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[MacroTools]]
deps = ["CSTParser", "Compat", "DataStructures", "Test"]
git-tree-sha1 = "daecd9e452f38297c686eba90dba2a6d5da52162"
deps = ["CSTParser", "Compat", "DataStructures", "Test", "Tokenize"]
git-tree-sha1 = "d6e9dedb8c92c3465575442da456aec15a89ff76"
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
version = "0.5.0"
version = "0.5.1"

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

[[MbedTLS]]
deps = ["BinaryProvider", "Dates", "Distributed", "Libdl", "Random", "Sockets", "Test"]
git-tree-sha1 = "2d94286a9c2f52c63a16146bb86fd6cdfbf677c6"
deps = ["BinaryProvider", "Dates", "Libdl", "Random", "Sockets"]
git-tree-sha1 = "85f5947b53c8cfd53ccfa3f4abae31faa22c2181"
uuid = "739be429-bea8-5141-9913-cc70e7f3736d"
version = "0.6.8"
version = "0.7.0"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
Expand All @@ -193,6 +193,12 @@ git-tree-sha1 = "c4c13474d23c60d20a67b217f1d7f22a40edf8f1"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.1.0"

[[Parsers]]
deps = ["Dates", "Test"]
git-tree-sha1 = "ef0af6c8601db18c282d092ccbd2f01f3f0cd70b"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "0.3.7"

[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Expand Down Expand Up @@ -233,6 +239,12 @@ git-tree-sha1 = "7b1d07f411bc8ddb7977ec7f377b97b158514fe0"
uuid = "189a3867-3050-52da-a836-e630ba90ab69"
version = "0.2.0"

[[Requires]]
deps = ["Test"]
git-tree-sha1 = "f6fbf4ba64d295e146e49e021207993b6b48c7d1"
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
version = "0.5.2"

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

Expand Down Expand Up @@ -271,15 +283,15 @@ deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[Tokenize]]
git-tree-sha1 = "0de343efc07da00cd449d5b04e959ebaeeb3305d"
git-tree-sha1 = "dfcdbbfb2d0370716c815cbd6f8a364efb6f42cf"
uuid = "0796e94c-ce3b-5d07-9a54-7f471281c624"
version = "0.5.4"
version = "0.5.6"

[[TranscodingStreams]]
deps = ["Random", "Test"]
git-tree-sha1 = "a25d8e5a28c3b1b06d3859f30757d43106791919"
git-tree-sha1 = "7c53c35547de1c5b9d46a4797cf6d8253807108c"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version = "0.9.4"
version = "0.9.5"

[[URIParser]]
deps = ["Test", "Unicode"]
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
environment:
matrix:
- julia_version: 1
- julia_version: 1.2
- julia_version: nightly

platform:
Expand Down
14 changes: 7 additions & 7 deletions examples/multilayerqg_2layer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ nsubs = 250 # number of time-steps for plotting
# (nsteps must be multiple of nsubs)

# Physical parameters
Lx = 2π # domain size
mu = 5e-2 # bottom drag
beta = 5 # the y-gradient of planetary PV
Lx = 2π # domain size
μ = 5e-2 # bottom drag
beta = 5 # the y-gradient of planetary PV

nlayers = 2 # these choice of parameters give the
f0, g = 1, 1 # desired PV-streamfunction relations
Expand All @@ -38,7 +38,7 @@ x, y = gridpoints(gr)
k0, l0 = gr.k[2], gr.l[2] # fundamental wavenumbers

# Initialize problem
prob = MultilayerQG.Problem(nlayers=nlayers, nx=nx, Lx=Lx, f0=f0, g=g, H=H, rho=rho, U=U, dt=dt, stepper=stepper, mu=mu, beta=beta)
prob = MultilayerQG.Problem(nlayers=nlayers, nx=nx, Lx=Lx, f0=f0, g=g, H=H, rho=rho, U=U, dt=dt, stepper=stepper, μ=μ, beta=beta)
sol, cl, pr, vs, gr = prob.sol, prob.clock, prob.params, prob.vars, prob.grid

# Files
Expand Down Expand Up @@ -103,14 +103,14 @@ function plot_output(prob, fig, axs; drawcolorbar=false)
end

sca(axs[5])
plot(mu*E.t[E.i], E.data[E.i][1][1], ".", color="b", label=L"$KE_1$")
plot(mu*E.t[E.i], E.data[E.i][1][2], ".", color="r", label=L"$KE_2$")
plot(μ*E.t[E.i], E.data[E.i][1][1], ".", color="b", label=L"$KE_1$")
plot(μ*E.t[E.i], E.data[E.i][1][2], ".", color="r", label=L"$KE_2$")
xlabel(L"\mu t")
ylabel(L"KE")
# legend()

sca(axs[6])
plot(mu*E.t[E.i], E.data[E.i][2][1], ".", color="k", label=L"$PE_{3/2}$")
plot(μ*E.t[E.i], E.data[E.i][2][1], ".", color="k", label=L"$PE_{3/2}$")
xlabel(L"\mu t")
ylabel(L"PE")
# legend()
Expand Down

0 comments on commit 2dcf03c

Please sign in to comment.