Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisRenchon committed Jun 14, 2024
1 parent 512fbf7 commit 5eee178
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
7 changes: 1 addition & 6 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,7 @@ steps:
- label: "Global Bucket on CPU (temporal map albedo)"
key: "global_bucket_temporalmap_cpu"
command: "julia --color=yes --project=.buildkite experiments/standalone/Bucket/global_bucket_temporalmap.jl"
artifact_paths: "experiments/standalone/Bucket/artifacts_temporalmap/*cpu*"
- label: "Global Bucket on CPU (temporal map albedo), ClimaDiagnostics"
key: "global_bucket_temporalmap_cpu_diagnostics"
command: "julia --color=yes --project=.buildkite experiments/standalone/Bucket/global_bucket_diagnostics.jl"
artifact_paths: "experiments/*png"

artifact_paths: "experiments/standalone/Bucket/artifacts_temporalmap/*cpu*"

- group: "GPU: unit tests and global bucket"
steps:
Expand Down
9 changes: 6 additions & 3 deletions Artifacts.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[era5_land_forcing_data2021]
git-tree-sha1 = "ec424296df6b60cfe273ac8f981701fbbed0bd8a"

[land_albedo]
git-tree-sha1 = "5f7141a13994d5b334f1240e1bd5474ad44d96c4"

[soil_params_Gupta2020_2022]
git-tree-sha1 = "8e28b4274b10020b6cdd54b8e7585221379d9d33"

[[soil_params_Gupta2020_2022.download]]
sha256 = "97dcf1158cba03b1fd397262bdfaf85a523f57038c337bcce163e32664d3616b"
url = "https://caltech.box.com/shared/static/f2y23qx0lggjskftzgh7ht7fsbh36gmm.gz"

[era5_land_forcing_data2021]
git-tree-sha1 = "ec424296df6b60cfe273ac8f981701fbbed0bd8a"
2 changes: 2 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ClimaCore = "d414da3d-4745-48bb-8d80-42e94e092884"
ClimaDiagnostics = "1ecacbb8-0713-4841-9a07-eb5aa8a2d53f"
ClimaLand = "08f4d4ce-cf43-44bb-ad95-9d2d5f413532"
ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c"
ClimaTimeSteppers = "595c0a79-7f3d-439a-bc5a-b232dc3bde79"
ClimaUtilities = "b3f4f4ca-9299-4f7f-bd9b-81e1242a7513"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand All @@ -22,6 +23,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Expand Down
19 changes: 12 additions & 7 deletions test/diagnostics/diagnostics_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using ClimaUtilities
import SciMLBase
import ClimaComms
@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends
using CairoMakie
# using CairoMakie
using Dates
using DelimitedFiles
using Statistics
Expand Down Expand Up @@ -183,13 +183,15 @@ using ClimaLand:
ode_algo = CTS.ExplicitAlgorithm(timestepper)

#### ClimaDiagnostics ####
generate_output_path("output"; style = ActiveLinkStyle, context = context)
output_dir = "output/"

ClimaUtilities.OutputPathGenerator.generate_output_path(output_dir)

space = bucket_domain.space.subsurface

nc_writer = ClimaDiagnostics.Writers.NetCDFWriter(space, output_dir)

@test typeof(nc_writer) <: ClimaDiagnostics.Writers.NetCDFWriter

diags =
ClimaLand.CLD.default_diagnostics(model, 1.0; output_writer = nc_writer)

Expand All @@ -205,9 +207,12 @@ using ClimaLand:
simdir = ClimaAnalysis.SimDir("output")
println(summary(simdir))
alpha = get(simdir; short_name = "alpha")

@test typeof(alpha) <: OutputVar

alpha.dims
import ClimaAnalysis.Visualize as viz
fig = CairoMakie.Figure(size = (400, 600))
viz.plot!(fig, alpha, time = 2 * 86400)
CairoMakie.save("alpha.png", fig)
#import ClimaAnalysis.Visualize as viz
#fig = CairoMakie.Figure(size = (400, 600))
#viz.plot!(fig, alpha, time = 2 * 86400)
#CairoMakie.save("alpha.png", fig)
end

0 comments on commit 5eee178

Please sign in to comment.