Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
LenkaNovak committed May 24, 2024
1 parent cfbe2f5 commit 0124216
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ steps:
slurm_mem: 20GB

- wait
- label: ":construction: Hierarchy lots"
- label: ":construction: Hierarchy plots"
key: "hierarchy_plots"
command:
- "julia --color=yes --project=experiments/ClimaEarth/ experiments/ClimaEarth/hierarchy/climate_plots.jl"
Expand Down
11 changes: 4 additions & 7 deletions experiments/ClimaEarth/hierarchy/climate_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,13 @@ for job_id in ["dry_held_suarez", "moist_held_suarez"]
end
Plots.mp4(anim, joinpath(PLOT_DIR, "anim_ta_sfc.mp4"), fps = 10)


upper_level = 10

# F2: climatology
# Figure 2: climatology
vars = ["mass_strf", "va", "ua", "ta", "egr", "wa"]
for var in vars
plot_climate(var, DATA_DIR, PLOT_DIR, job_id, reduction = reduction, interpolate_to_pressure = true)
end

# F4: storm track diagnostics: time mean maps
# Figure 4: storm track diagnostics: time mean maps
lev_st = 6
ta_zm, ta_sfc, lat, lon, z = mean_climate_data("ta", reduction, DATA_DIR, lev_i = lev_st)
va_zm, va_sfc, lat, lon, z = mean_climate_data("va", reduction, DATA_DIR, lev_i = lev_st)
Expand All @@ -68,10 +65,10 @@ for job_id in ["dry_held_suarez", "moist_held_suarez"]
color = :viridis,
ylims = (-pa_grid[1], -pa_grid[end]),
yticks = (-pa_grid, pa_grid),
)# , clims=(-1e10, 1e10))
)
png(joinpath(PLOT_DIR, "$(job_id)_heat_flux.png"))

# F5: storm track diagnostics: timeseries
# Figure 5: storm track diagnostics reduced to timeseries
lev_i, lat_s_i, lat_n_i, lon_w_i, lon_e_i = lev_st, 60, 75, 1, 30
println(
"Sectorial selevtion for timeseries: \n level: $(z[lev_i]), lat: $(lat[lat_s_i]) to $(lat[lat_n_i]), lon: $(lon[lon_w_i]) to $(lon[lon_e_i])",
Expand Down
8 changes: 4 additions & 4 deletions experiments/ClimaEarth/hierarchy/plot_helper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ get_nc_data_all = (var, red, DATA_DIR) -> begin
end

"""
mean_climate_data(var, red, DATA_DIR; lev_i = 1, spinup=1)
mean_climate_data(varname, reduction, DATA_DIR; lev_i = 1, spinup=1)
Postprocesses the climate data for the variable `var` and reduction `red` from the directory `DATA_DIR`. Returns the zonal mean and horizontal surface slice mean of the variable.
Postprocesses the climate data for the variable `varname` and `reduction` from the directory `DATA_DIR`. Returns the zonal mean and horizontal surface slice mean of the variable.
"""
mean_climate_data =
(varname, reduction, DATA_DIR; lev_i = 2, spinup = 1) -> begin
(varname, reduction, DATA_DIR; lev_i = 1, spinup = 1) -> begin

var, lat, lon, z, time = get_nc_data_all(varname, reduction, DATA_DIR)
@assert spinup < size(var, 1)
Expand All @@ -47,7 +47,7 @@ point_timeseries_data =
end

"""
plot_climate(var, DATA_DIR, PLOT_DIR; reduction = "inst")
plot_climate(var, DATA_DIR, PLOT_DIR, job_id; reduction = "inst", interpolate_to_pressure = false)
Plots the zonal mean and horizontal surface slice mean of the variable `var` from the directory `DATA_DIR` and saves the plots in the directory `PLOT_DIR`.
"""
Expand Down

0 comments on commit 0124216

Please sign in to comment.