diff --git a/.buildkite/Manifest-v1.11.toml b/.buildkite/Manifest-v1.11.toml index b711d30feb..db18f22447 100644 --- a/.buildkite/Manifest-v1.11.toml +++ b/.buildkite/Manifest-v1.11.toml @@ -365,9 +365,9 @@ version = "0.30.1" [[deps.ClimaComms]] deps = ["Adapt", "Logging", "LoggingExtras"] -git-tree-sha1 = "40ad44466dfe0092e18c04bc02c849fe8e095d30" +git-tree-sha1 = "2a96bdd5339bdcd903867a46d1f00110f7b890cc" uuid = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d" -version = "0.6.6" +version = "0.6.7" weakdeps = ["CUDA", "MPI"] [deps.ClimaComms.extensions] @@ -399,9 +399,9 @@ version = "0.3.18" [[deps.ClimaDiagnostics]] deps = ["Accessors", "ClimaComms", "ClimaCore", "ClimaUtilities", "Dates", "NCDatasets", "OrderedCollections", "SciMLBase"] -git-tree-sha1 = "ec2ee9e870e51a9d8b76decf941f6c9d3d3b1365" +git-tree-sha1 = "e931fd003740b97fa525246a6ea7c14143d12051" uuid = "1ecacbb8-0713-4841-9a07-eb5aa8a2d53f" -version = "0.2.13" +version = "0.2.14" [[deps.ClimaParams]] deps = ["TOML"] @@ -417,9 +417,9 @@ version = "0.1.1" [[deps.ClimaTimeSteppers]] deps = ["ClimaComms", "DataStructures", "DiffEqBase", "KernelAbstractions", "Krylov", "LinearAlgebra", "LinearOperators", "NVTX", "SciMLBase", "StaticArrays"] -git-tree-sha1 = "f71d6c31fdfeaa66516ccf904a916e99904e5078" +git-tree-sha1 = "23c8346606e165aa8805f25063f24e39bd8e148d" uuid = "595c0a79-7f3d-439a-bc5a-b232dc3bde79" -version = "0.8.4" +version = "0.8.5" weakdeps = ["BenchmarkTools", "CUDA", "OrderedCollections", "PrettyTables", "StatsBase"] [deps.ClimaTimeSteppers.extensions] @@ -2153,9 +2153,9 @@ version = "0.1.0" [[deps.SciMLBase]] deps = ["ADTypes", "Accessors", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] -git-tree-sha1 = "44397dee277159f224492bcf99c442d2a907c6f5" +git-tree-sha1 = "846e89af4ec4ba471d3050a70405978cbdf70681" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.91.0" +version = "2.91.1" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" @@ -2505,9 +2505,9 @@ version = "1.0.2" [[deps.Thermodynamics]] deps = ["DocStringExtensions", "KernelAbstractions", "Random", "RootSolvers"] -git-tree-sha1 = "efe74e0344fd7fb68b831316055290d80a62d9c1" +git-tree-sha1 = "f708faaf347760e9dcd82beb1a9455c86bdf9911" uuid = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c" -version = "0.12.11" +version = "0.12.12" weakdeps = ["ClimaParams"] [deps.Thermodynamics.extensions] diff --git a/src/callbacks/get_callbacks.jl b/src/callbacks/get_callbacks.jl index e389b8e2cd..5347e3e485 100644 --- a/src/callbacks/get_callbacks.jl +++ b/src/callbacks/get_callbacks.jl @@ -33,26 +33,7 @@ function get_diagnostics(parsed_args, atmos_model, Y, p, sim_info, output_dir) num_netcdf_points = tuple(parsed_args["netcdf_interpolation_num_points"]...) else - # Estimate the number of points we need to cover the entire domain - # ncolumns is the number of local columns - tot_num_columns = - ClimaComms.nprocs(context) * Fields.ncolumns(axes(Y.c)) - if parsed_args["config"] == "plane" - num1, num2 = tot_num_columns, 0 - elseif parsed_args["config"] == "sphere" - num2 = round(Int, sqrt(tot_num_columns / 2)) - num1 = 2num2 - elseif parsed_args["config"] == "box" - num2 = round(Int, sqrt(tot_num_columns)) - num1 = num2 - elseif parsed_args["config"] == "column" - # We need at least two points horizontally because our column is - # actually a box - num1, num2 = 2, 2 - else - error("Uncaught case") - end - num_netcdf_points = (num1, num2, Spaces.nlevels(axes(Y.c))) + num_netcdf_points = default_netcdf_points(axes(Y.c), parsed_args) end z_sampling_method = diff --git a/src/compat.jl b/src/compat.jl index 76337efad4..e514141bc5 100644 --- a/src/compat.jl +++ b/src/compat.jl @@ -1,6 +1,7 @@ import ClimaCore import ClimaUtilities import ClimaCore: Domains, Spaces, Topologies +import ClimaDiagnostics import RRTMGP # To allow for backwards compatibility of ClimaCore: @@ -96,3 +97,33 @@ else WallTimeInfo = ClimaUtilities.OnlineLogging.WallTimeInfo report_walltime = ClimaUtilities.OnlineLogging.report_walltime end + +if pkgversion(ClimaDiagnostics) < v"0.2.14" + function default_netcdf_points(space, parsed_args) + # Estimate the number of points we need to cover the entire domain + # ncolumns is the number of local columns + tot_num_columns = + ClimaComms.nprocs(ClimaComms.context(space)) * + Fields.ncolumns(space) + if parsed_args["config"] == "plane" + num1, num2 = tot_num_columns, 0 + elseif parsed_args["config"] == "sphere" + num2 = round(Int, sqrt(tot_num_columns / 2)) + num1 = 2num2 + elseif parsed_args["config"] == "box" + num2 = round(Int, sqrt(tot_num_columns)) + num1 = num2 + elseif parsed_args["config"] == "column" + # We need at least two points horizontally because our column is + # actually a box + num1, num2 = 2, 2 + else + error("Uncaught case") + end + return (num1, num2, Spaces.nlevels(space)) + end +else + function default_netcdf_points(space, _) + return ClimaDiagnostics.Writers.default_num_points(space) + end +end