Skip to content
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

add TOA and surface radiation diagnostics #2579

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .buildkite/longruns/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,6 @@ steps:
env:
JOB_NAME: "longrun_aquaplanet_rhoe_equil_clearsky_tvinsol_0M_slabocean"


- group: "Experimental long runs"

steps:

- group: "DYAMOND"

steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,3 @@ check_conservation: true
bubble: false
job_id: "longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_tvinsol_0M_slabocean"
toml: [toml/longrun_aquaplanet_rhoe_equil_55km_nz63_gray_0M.toml]
output_default_diagnostics: false
diagnostics:
- short_name: ["ts", "ta", "thetaa", "ha", "pfull", "rhoa", "ua", "va", "wa", "hfes", "hur", "hus", "clw", "cli", "evspsbl", "rsd", "rsu", "rld", "rlu"]
reduction_time: average
period: 10days
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,3 @@ prognostic_surface: "PrognosticSurfaceTemperature"
check_conservation: true
bubble: false
job_id: "longrun_aquaplanet_rhoe_equil_clearsky_tvinsol_0M_slabocean"
output_default_diagnostics: false
diagnostics:
- short_name: ["ts", "ta", "thetaa", "ha", "pfull", "rhoa", "ua", "va", "wa", "hfes", "hur", "hus", "clw", "cli", "evspsbl", "rsd", "rsu", "rld", "rlu"]
reduction_time: average
period: 10days
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FLOAT_TYPE: "Float32"
dt_save_state_to_disk: "10days"
t_end: "10days"
dt_save_state_to_disk: "5days"
t_end: "5days"
moist: "equil"
precip_model: "0M"
surface_setup: "DefaultMoninObukhov"
Expand All @@ -14,8 +14,3 @@ prognostic_surface: "PrognosticSurfaceTemperature"
check_conservation: true
bubble: false
job_id: "aquaplanet_rhoe_equil_clearsky_tvinsol_0M_slabocean"
output_default_diagnostics: false
diagnostics:
- short_name: ["ts", "ta", "thetaa", "ha", "pfull", "rhoa", "ua", "va", "wa", "hfes", "hur", "hus", "clw", "cli", "evspsbl", "rsd", "rsu", "rld", "rlu"]
reduction_time: average
period: 10days
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,3 @@ job_id: "sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric"
moist: "equil"
toml: [toml/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric.toml]
netcdf_interpolate_z_over_msl: true
diagnostics:
- short_name: [ua, ta, hus, hfes, evspsbl, rsd, rsu, rld, rlu]
reduction_time: average
period: 12hours
10 changes: 5 additions & 5 deletions perf/flame.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ ProfileCanvas.html_file(joinpath(output_dir, "flame.html"), results)
#####

allocs_limit = Dict()
allocs_limit["flame_perf_target"] = 201560
allocs_limit["flame_perf_target_tracers"] = 234032
allocs_limit["flame_perf_target"] = 275_800
allocs_limit["flame_perf_target_tracers"] = 305_776
allocs_limit["flame_perf_target_edmfx"] = 7_005_552
allocs_limit["flame_perf_diagnostics"] = 108_785_416
allocs_limit["flame_perf_diagnostics"] = 108_858_808
allocs_limit["flame_perf_target_diagnostic_edmfx"] = 531_000
allocs_limit["flame_sphere_baroclinic_wave_rhoe_equilmoist_expvdiff"] =
4_018_252_656
allocs_limit["flame_perf_target_frierson"] = 8_030_551_088
allocs_limit["flame_perf_target_threaded"] = 1_276_864
allocs_limit["flame_perf_target_callbacks"] = 386_584
allocs_limit["flame_perf_target_callbacks"] = 394_984
allocs_limit["flame_perf_gw"] = 3_268_961_856
allocs_limit["flame_perf_target_prognostic_edmfx_aquaplanet"] = 445_664
allocs_limit["flame_gpu_implicit_barowave_moist"] = 4178384
allocs_limit["flame_gpu_implicit_barowave_moist"] = 4_178_384
# Ideally, we would like to track all the allocations, but this becomes too
# expensive there is too many of them. Here, we set the default sample rate to
# 1, but lower it to a smaller value when we expect the job to produce lots of
Expand Down
117 changes: 45 additions & 72 deletions post_processing/ci_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -447,26 +447,38 @@ function make_plots(
simdir = SimDir(simulation_path)

reduction = "average"
short_names_3D = ["ua", "ta", "hus", "rsd", "rsu", "rld", "rlu"]
short_names_sfc = ["hfes", "evspsbl"]
short_names_3D = ["ua", "ta", "hus"]
short_names_2D = [
"rsdt",
"rsds",
"rsut",
"rsus",
"rlds",
"rlut",
"rlus",
"hfes",
"evspsbl",
]
available_periods = ClimaAnalysis.available_periods(
simdir;
short_name = short_names_3D[1],
reduction,
)
if "10d" in available_periods
if "30d" in available_periods
period = "30d"
elseif "10d" in available_periods
period = "10d"
elseif "1d" in available_periods
period = "1d"
elseif "12h" in available_periods
period = "12h"
elseif "1h" in available_periods
period = "1h"
end
vars_3D = [
get(simdir; short_name, reduction, period) |> ClimaAnalysis.average_lon for short_name in short_names_3D
]
vars_sfc = [
vars_2D = [
get(simdir; short_name, reduction, period) for
short_name in short_names_sfc
short_name in short_names_2D
]
make_plots_generic(
simulation_path,
Expand All @@ -476,75 +488,24 @@ function make_plots(
)
make_plots_generic(
simulation_path,
vars_sfc,
vars_2D,
time = LAST_SNAP,
output_name = "summary_sfc",
)
end

function make_plots(
::Union{
Val{:aquaplanet_rhoe_equil_clearsky_tvinsol_0M_slabocean},
Val{:longrun_aquaplanet_rhoe_equil_clearsky_tvinsol_0M_slabocean},
Val{
:longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_tvinsol_0M_slabocean,
},
},
simulation_path,
)
simdir = SimDir(simulation_path)


reduction = "average"
period = "10d"
short_names_3D = [
"ta",
"thetaa",
"rhoa",
"ua",
"va",
"wa",
"hur",
"hus",
"clw",
"cli",
"rsd",
"rsu",
"rld",
"rlu",
]
short_names_sfc = ["hfes", "evspsbl", "ts"]
vars_3D = [
get(simdir; short_name, reduction, period) |> ClimaAnalysis.average_lon for short_name in short_names_3D
]
vars_sfc = [
get(simdir; short_name, reduction, period) for
short_name in short_names_sfc
]
make_plots_generic(
simulation_path,
vars_3D,
time = LAST_SNAP,
more_kwargs = YLOGSCALE,
)
make_plots_generic(
simulation_path,
vars_sfc,
time = LAST_SNAP,
output_name = "summary_sfc",
output_name = "summary_2D",
)
end

AquaplanetPlots = Union{
Val{:sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res},
Val{:aquaplanet_rhoe_equil_clearsky_tvinsol_0M_slabocean},
Val{:mpi_sphere_aquaplanet_rhoe_equilmoist_clearsky},
Val{:longrun_aquaplanet_rhoe_equil_55km_nz63_gray_0M},
Val{:longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_0M},
Val{:longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_diagedmf_diffonly_0M},
Val{:longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_diagedmf_0M},
Val{:longrun_aquaplanet_rhoe_equil_55km_nz63_allsky_diagedmf_0M},
Val{:longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_tvinsol_0M_earth},
Val{:longrun_aquaplanet_rhoe_equil_highres_allsky_ft32},
Val{:longrun_aquaplanet_rhoe_equil_clearsky_tvinsol_0M_slabocean},
Val{:longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_tvinsol_0M_slabocean},
Val{:longrun_aquaplanet_dyamond},
Val{:longrun_aquaplanet_amip},
}
Expand All @@ -553,25 +514,37 @@ function make_plots(::AquaplanetPlots, simulation_path)
simdir = SimDir(simulation_path)

reduction = "average"
short_names_3D = ["ua", "ta", "hus", "rsd", "rsu", "rld", "rlu"]
short_names_sfc = ["hfes", "evspsbl"]
short_names_3D = ["ua", "ta", "hus"]
short_names_2D = [
"rsdt",
"rsds",
"rsut",
"rsus",
"rlds",
"rlut",
"rlus",
"hfes",
"evspsbl",
]
available_periods = ClimaAnalysis.available_periods(
simdir;
short_name = short_names_3D[1],
reduction,
)
if "10d" in available_periods
if "30d" in available_periods
period = "30d"
elseif "10d" in available_periods
period = "10d"
elseif "1d" in available_periods
period = "1d"
elseif "12h" in available_periods
period = "12h"
elseif "1h" in available_periods
period = "1h"
end
vars_3D = [
get(simdir; short_name, reduction, period) |> ClimaAnalysis.average_lon for short_name in short_names_3D
]
vars_sfc =
[get(simdir; short_name, reduction) for short_name in short_names_sfc]
vars_2D =
[get(simdir; short_name, reduction) for short_name in short_names_2D]
make_plots_generic(
simulation_path,
vars_3D,
Expand All @@ -580,9 +553,9 @@ function make_plots(::AquaplanetPlots, simulation_path)
)
make_plots_generic(
simulation_path,
vars_sfc,
vars_2D,
time = LAST_SNAP,
output_name = "summary_sfc",
output_name = "summary_2D",
)
end

Expand Down
45 changes: 41 additions & 4 deletions src/diagnostics/default_diagnostics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,19 @@ end
# Radiation mode #
##################
function default_diagnostics(::RRTMGPI.AbstractRRTMGPMode, t_end; output_writer)
rad_diagnostics = ["rsd", "rsu", "rld", "rlu"]
rad_diagnostics = [
"rsd",
"rsdt",
"rsds",
"rsu",
"rsut",
"rsus",
"rld",
"rlds",
"rlu",
"rlut",
"rlus",
]

average_func = frequency_averages(t_end)

Expand All @@ -187,12 +199,37 @@ function default_diagnostics(
t_end;
output_writer,
)
rad_diagnostics =
["rsd", "rsu", "rld", "rlu", "rsdcs", "rsucs", "rldcs", "rlucs"]
rad_diagnostics = [
"rsd",
"rsdt",
"rsds",
"rsu",
"rsut",
"rsus",
"rld",
"rlds",
"rlu",
"rlut",
"rlus",
]
rad_clearsky_diagnostics = [
"rsdcs",
"rsdscs",
"rsucs",
"rsutcs",
"rsuscs",
"rldcs",
"rldscs",
"rlucs",
"rlutcs",
]

average_func = frequency_averages(t_end)

return [average_func(rad_diagnostics...; output_writer)...]
return [
average_func(rad_diagnostics...; output_writer)...,
average_func(rad_clearsky_diagnostics...; output_writer)...,
]
end

##################
Expand Down
Loading
Loading