-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce TimeVaryingInput2D
#465
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# This file is machine-generated - editing it directly is not advised | ||
|
||
julia_version = "1.10.1" | ||
julia_version = "1.10.0" | ||
manifest_format = "2.0" | ||
project_hash = "5f713b750235cf07465e21e92a6bd2f152ad3358" | ||
|
||
|
@@ -273,9 +273,9 @@ version = "0.5.7" | |
|
||
[[deps.ClimaCore]] | ||
deps = ["Adapt", "BandedMatrices", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "KrylovKit", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "Unrolled"] | ||
git-tree-sha1 = "bc6a0154e3bcc1657d3a75f697e216fb70121969" | ||
git-tree-sha1 = "844afbd6a7c4f112f974e0031ebf4fb13d0b4157" | ||
uuid = "d414da3d-4745-48bb-8d80-42e94e092884" | ||
version = "0.13.2" | ||
version = "0.13.1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is this downgraded? |
||
weakdeps = ["Krylov"] | ||
|
||
[deps.ClimaCore.extensions] | ||
|
@@ -299,9 +299,9 @@ weakdeps = ["ClimaParams"] | |
|
||
[[deps.ClimaParams]] | ||
deps = ["DocStringExtensions", "TOML", "Test"] | ||
git-tree-sha1 = "ec67949db856e01df4cbf7d6ddafefeda02f93ee" | ||
git-tree-sha1 = "323dd6c5423caf31f0da81bb9c288683cbdafb01" | ||
uuid = "5c42b081-d73a-476f-9059-fd94b934656c" | ||
version = "0.10.3" | ||
version = "0.10.2" | ||
|
||
[[deps.ClimaTimeSteppers]] | ||
deps = ["ClimaComms", "Colors", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "KernelAbstractions", "Krylov", "LinearAlgebra", "LinearOperators", "NVTX", "SciMLBase", "StaticArrays"] | ||
|
@@ -379,7 +379,7 @@ weakdeps = ["Dates", "LinearAlgebra"] | |
[[deps.CompilerSupportLibraries_jll]] | ||
deps = ["Artifacts", "Libdl"] | ||
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" | ||
version = "1.1.0+0" | ||
version = "1.0.5+1" | ||
|
||
[[deps.CompositionsBase]] | ||
git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" | ||
|
@@ -394,9 +394,9 @@ version = "0.1.2" | |
|
||
[[deps.ConcurrentUtilities]] | ||
deps = ["Serialization", "Sockets"] | ||
git-tree-sha1 = "6cbbd4d241d7e6579ab354737f4dd95ca43946e1" | ||
git-tree-sha1 = "9c4708e3ed2b799e6124b5673a712dda0b596a9b" | ||
uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" | ||
version = "2.4.1" | ||
version = "2.3.1" | ||
|
||
[[deps.ConstructionBase]] | ||
deps = ["LinearAlgebra"] | ||
|
@@ -1495,7 +1495,7 @@ version = "0.3.24+0" | |
[[deps.OpenBLAS_jll]] | ||
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] | ||
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" | ||
version = "0.3.23+4" | ||
version = "0.3.23+2" | ||
|
||
[[deps.OpenLibm_jll]] | ||
deps = ["Artifacts", "Libdl"] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# Bucket | ||
|
||
```@meta | ||
CurrentModule = ClimaLand.Regridder | ||
CurrentModule = ClimaLand.Regridders | ||
``` | ||
|
||
## Functions | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should also add any other functions you want to include in this module's API here - maybe just |
||
|
||
```@docs | ||
ClimaLand.Regridder.hdwrite_regridfile_rll_to_cgll | ||
ClimaLand.Regridder.swap_space | ||
ClimaLand.Regridders.hdwrite_regridfile_rll_to_cgll | ||
ClimaLand.Regridders.swap_space | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# This file is machine-generated - editing it directly is not advised | ||
|
||
julia_version = "1.10.1" | ||
julia_version = "1.10.0" | ||
manifest_format = "2.0" | ||
project_hash = "960bdc0a1ed4b3f2aee66ed2e0c02065769614a9" | ||
|
||
|
@@ -330,9 +330,9 @@ version = "0.5.7" | |
|
||
[[deps.ClimaCore]] | ||
deps = ["Adapt", "BandedMatrices", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "KrylovKit", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "Unrolled"] | ||
git-tree-sha1 = "bc6a0154e3bcc1657d3a75f697e216fb70121969" | ||
git-tree-sha1 = "844afbd6a7c4f112f974e0031ebf4fb13d0b4157" | ||
uuid = "d414da3d-4745-48bb-8d80-42e94e092884" | ||
version = "0.13.2" | ||
version = "0.13.1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here, packages are downgraded. I just updated everything today so you probably don't need to modify the manifests |
||
weakdeps = ["Krylov"] | ||
|
||
[deps.ClimaCore.extensions] | ||
|
@@ -356,9 +356,9 @@ weakdeps = ["ClimaParams"] | |
|
||
[[deps.ClimaParams]] | ||
deps = ["DocStringExtensions", "TOML", "Test"] | ||
git-tree-sha1 = "ec67949db856e01df4cbf7d6ddafefeda02f93ee" | ||
git-tree-sha1 = "323dd6c5423caf31f0da81bb9c288683cbdafb01" | ||
uuid = "5c42b081-d73a-476f-9059-fd94b934656c" | ||
version = "0.10.3" | ||
version = "0.10.2" | ||
|
||
[[deps.ClimaTimeSteppers]] | ||
deps = ["ClimaComms", "Colors", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "KernelAbstractions", "Krylov", "LinearAlgebra", "LinearOperators", "NVTX", "SciMLBase", "StaticArrays"] | ||
|
@@ -453,7 +453,7 @@ weakdeps = ["Dates", "LinearAlgebra"] | |
[[deps.CompilerSupportLibraries_jll]] | ||
deps = ["Artifacts", "Libdl"] | ||
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" | ||
version = "1.1.0+0" | ||
version = "1.0.5+1" | ||
|
||
[[deps.CompositionsBase]] | ||
git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" | ||
|
@@ -468,9 +468,9 @@ version = "0.1.2" | |
|
||
[[deps.ConcurrentUtilities]] | ||
deps = ["Serialization", "Sockets"] | ||
git-tree-sha1 = "6cbbd4d241d7e6579ab354737f4dd95ca43946e1" | ||
git-tree-sha1 = "9c4708e3ed2b799e6124b5673a712dda0b596a9b" | ||
uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" | ||
version = "2.4.1" | ||
version = "2.3.1" | ||
|
||
[[deps.ConstructionBase]] | ||
deps = ["LinearAlgebra"] | ||
|
@@ -1793,7 +1793,7 @@ version = "0.3.24+0" | |
[[deps.OpenBLAS_jll]] | ||
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] | ||
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" | ||
version = "0.3.23+4" | ||
version = "0.3.23+2" | ||
|
||
[[deps.OpenEXR]] | ||
deps = ["Colors", "FileIO", "OpenEXR_jll"] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,21 +68,12 @@ outdir = joinpath( | |
"experiments/standalone/Bucket/artifacts_temporalmap", | ||
) | ||
!ispath(outdir) && mkpath(outdir) | ||
# Use separate output directory for CPU and GPU runs to avoid race condition | ||
device_suffix = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. likewise here |
||
typeof(ClimaComms.context().device) <: ClimaComms.CPUSingleThreaded ? | ||
"cpu" : "gpu" | ||
regrid_dir = joinpath( | ||
pkgdir(ClimaLand), | ||
"experiments/standalone/Bucket/$device_suffix/regrid-temporal/", | ||
) | ||
!ispath(regrid_dir) && mkpath(regrid_dir) | ||
|
||
t0 = 0.0; | ||
# run for 50 days to test monthly file update | ||
tf = 50 * 86400; | ||
Δt = 3600.0; | ||
|
||
|
||
function setup_prob(t0, tf, Δt) | ||
# We set up the problem in a function so that we can make multiple copies (for profiling) | ||
|
||
|
@@ -108,8 +99,7 @@ function setup_prob(t0, tf, Δt) | |
|
||
surface_space = bucket_domain.space.surface | ||
# Construct albedo parameter object using temporal map | ||
albedo = | ||
PrescribedSurfaceAlbedo{FT}(regrid_dir, ref_time, t0, surface_space) | ||
albedo = PrescribedSurfaceAlbedo{FT}(ref_time, t0, surface_space) | ||
|
||
bucket_parameters = BucketModelParameters(FT; albedo, z_0m, z_0b, τc) | ||
|
||
|
@@ -148,7 +138,6 @@ function setup_prob(t0, tf, Δt) | |
ref_time, | ||
) | ||
|
||
|
||
model = BucketModel( | ||
parameters = bucket_parameters, | ||
domain = bucket_domain, | ||
|
@@ -262,6 +251,9 @@ F_sfc = [ | |
]; | ||
|
||
# save prognostic state to CSV - for comparison between GPU and CPU output | ||
device_suffix = | ||
typeof(ClimaComms.context().device) <: ClimaComms.CPUSingleThreaded ? | ||
"cpu" : "gpu" | ||
open(joinpath(outdir, "tf_state_$device_suffix.txt"), "w") do io | ||
writedlm(io, hcat(T_sfc[end][:], W[end][:], Ws[end][:], σS[end][:]), ',') | ||
end; | ||
|
@@ -310,6 +302,3 @@ for (i, (field_ts, field_name)) in enumerate( | |
end | ||
outfile = joinpath(outdir, string("ts_$device_suffix.png")) | ||
CairoMakie.save(outfile, fig_ts) | ||
|
||
# delete regrid directory | ||
rm(regrid_dir, recursive = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can just update to 1.10.2 and use that across land/atmos/coupler now