Skip to content

Commit

Permalink
remove point_timeseries_data from hierarchy plots
Browse files Browse the repository at this point in the history
  • Loading branch information
szy21 committed Mar 7, 2025
1 parent 309ca06 commit b57cbaa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
16 changes: 0 additions & 16 deletions experiments/ClimaEarth/hierarchy/climate_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,4 @@ for job_id in ["dry_held_suarez", "moist_held_suarez"]
Makie.ylims!(co_heat_flux.axis, -pa_grid[1], -pa_grid[end])
co_heat_flux.axis.yticks = (-pa_grid, string.(pa_grid))
Makie.save(joinpath(PLOT_DIR, "$(job_id)_heat_flux.png"), co_heat_flux)

# Figure 5: storm track diagnostics reduced to timeseries
# this plots the eddy heat flux and max. Eady growth rate in a sectorial selection
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])",
)

egr_all, lat, lon, z, time = get_nc_data_all("egr", reduction, DATA_DIR)
egr_t = point_timeseries_data(egr_all, [lon_w_i, lon_e_i], [lat_s_i, lat_n_i], lev_i)

vT_all, lat, lon, z, time = get_nc_data_all("vt", reduction, DATA_DIR)
va_all, lat, lon, z, time = get_nc_data_all("va", reduction, DATA_DIR)
ta_all, lat, lon, z, time = get_nc_data_all("ta", reduction, DATA_DIR)
heat_flux_all = vT_all .- va_all .* ta_all
heat_flux_t = point_timeseries_data(heat_flux_all, [lon_w_i, lon_e_i], [lat_s_i, lat_n_i], lev_i)
end
13 changes: 0 additions & 13 deletions experiments/ClimaEarth/hierarchy/plot_helper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,6 @@ mean_climate_data =
return var_time_zonal_mean, var_time_mean_sfc, lat, lon, z
end

"""
point_timeseries_data(variable, lon_i, lat_i, lev_i)
Returns the time series data for the variable `variable` at the indices `lon_i`, `lat_i`, and `lev_i`.
"""
point_timeseries_data =
(variable, lon_i, lat_i, lev_i) -> begin

variable_time_mean = mean(variable[:, lon_i[1]:lon_i[2], lat_i[1]:lat_i[2], lev_i], dims = (2, 3))[:, 1, 1]

return variable_time_mean
end

"""
plot_climate(var, DATA_DIR, PLOT_DIR, job_id; reduction = "inst", interpolate_to_pressure = false)
Expand Down

0 comments on commit b57cbaa

Please sign in to comment.