@@ -24,17 +24,15 @@ root_path = joinpath(pwd(), "snowy_land_longrun_gpu")
24
24
# outdir = "snowy_land_longrun_gpu-3761-alpha1/output_active" # on local
25
25
# outdir = "snowy_land_longrun_gpu-3771-new_default/output_active"
26
26
# outdir = "snowy_land_longrun_gpu-3761-new_default/output_active" # on local
27
- outdir = " snowy_land_longrun_gpu-3777-alpha2/output_active " # on local
27
+ outdir = " snowy_land_longrun_gpu-3785 "
28
28
root_path = outdir
29
29
30
- short_names = [" lhf" , " shf" , " lwu" , " swu" , " lwn" , " swn" ]
30
+ short_names = [" lhf" , " shf" , " lwu" , " swu" ] # , "lwn", "swn"]
31
31
title_stubs = Dict (
32
- " lhf" => " Latent heat flux" ,
33
- " shf" => " Sensible heat flux" ,
34
- " lwu" => " Upward longwave radiation" ,
35
- " swu" => " Upward shortwave radiation" ,
36
- " lwn" => " Net longwave radiation" ,
37
- " swn" => " Net shortwave radiation" ,
32
+ " lhf" => " LE" ,# "Latent heat flux",
33
+ " shf" => " H" ,# "Sensible heat flux",
34
+ " lwu" => " LWᵤ" ,# "Upward longwave radiation",
35
+ " swu" => " SWᵤ" ,# "Upward shortwave radiation",
38
36
)
39
37
# Define levels for contour colorbars
40
38
levels_dict = Dict (
@@ -55,7 +53,7 @@ function compute_global_average(masked_var)
55
53
land_data = ClimaAnalysis. apply_oceanmask (masked_var). data
56
54
lat_data = masked_var. dims[latitude_name]
57
55
mask = .~ isnan .(land_data)
58
- nlon = length (masked_var. dims[lon_name])µ
56
+ nlon = length (masked_var. dims[lon_name])
59
57
resized_lat_data = transpose (repeat (lat_data, 1 , nlon))
60
58
61
59
return sum (land_data[mask] .* cosd .(resized_lat_data[mask])) /
@@ -206,13 +204,13 @@ function make_paper_figures(
206
204
xgridvisible = false , # don't show lat grid
207
205
ygridvisible = false , # don't show lon grid
208
206
height = 235 ,
209
- ylabel = " $(sim_var . attributes[ " long_name " ]) $units_label " , # plot variable label on y-axis for leftmost column (sim)
207
+ ylabel = " $title_stub $units_label " , # plot variable label on y-axis for leftmost column (sim)
210
208
ylabelvisible = true ,
211
209
ylabelpadding = 0 ,
212
210
),
213
211
:cb => ClimaAnalysis. Utils. kwargs (
214
212
vertical = false , # horizontal colorbar
215
- label = " $(sim_var . attributes[ " long_name " ]) $units_label " ,
213
+ label = " $title_stub $units_label " ,
216
214
labelsize = 20 ,
217
215
flipaxis = false , # label underneath colorbar
218
216
height = 15 ,
@@ -234,7 +232,7 @@ function make_paper_figures(
234
232
contour = viz. contour2D_on_globe! (
235
233
fig,
236
234
sim_var_annual_average,
237
- # ylabel = "$(sim_var.attributes["long_name"]) $units_label", # plot variable label on y-axis for leftmost column (sim)
235
+ # ylabel = "$title_stub $units_label", # plot variable label on y-axis for leftmost column (sim)
238
236
p_loc = (fig_row, 1 ), # plot in the first column
239
237
plot_colorbar = false ,
240
238
mask = viz. oceanmask (),
@@ -255,7 +253,7 @@ function make_paper_figures(
255
253
xgridvisible = false , # don't show lat grid
256
254
ygridvisible = false , # don't show lon grid
257
255
height = 235 ,
258
- ylabel = " $(sim_var . attributes[ " long_name " ]) $units_label " , # plot variable label on y-axis for leftmost column (sim)
256
+ ylabel = " $title_stub $units_label " , # plot variable label on y-axis for leftmost column (sim)
259
257
ylabelpadding = - 5 ,
260
258
ylabelvisible = true ,
261
259
# limits = clims,
@@ -264,7 +262,7 @@ function make_paper_figures(
264
262
)
265
263
Makie. Colorbar (
266
264
fig[fig_row + 1 , 1 ],
267
- label = " $(sim_var . attributes[ " long_name " ]) $units_label " ,
265
+ label = " $title_stub $units_label " ,
268
266
labelsize = 20 ,
269
267
vertical = false , # horizontal colorbar
270
268
flipaxis = false , # label underneath colorbar
@@ -293,7 +291,7 @@ function make_paper_figures(
293
291
levels,
294
292
p_loc = (fig_row, 2 ), # plot in the first column
295
293
plot_colorbar = true ,
296
- # colorbar_label = "$(sim_var.attributes["long_name"]) $units_label",
294
+ # colorbar_label = "$title_stub $units_label",
297
295
mask = viz. oceanmask (),
298
296
cmap_extrema = clims,
299
297
more_kwargs = Dict (
@@ -310,7 +308,7 @@ function make_paper_figures(
310
308
),
311
309
:cb => ClimaAnalysis. Utils. kwargs (
312
310
vertical = false , # horizontal colorbar
313
- label = " $(sim_var . attributes[ " long_name " ]) $units_label " ,
311
+ label = " $title_stub $units_label " ,
314
312
labelsize = 20 ,
315
313
flipaxis = false , # label underneath colorbar
316
314
height = 15 ,
@@ -359,7 +357,7 @@ function make_paper_figures(
359
357
)
360
358
Makie. Colorbar (
361
359
fig[fig_row + 1 , 2 ],
362
- label = " $(sim_var . attributes[ " long_name " ]) $units_label " ,
360
+ label = " $title_stub $units_label " ,
363
361
labelsize = 20 ,
364
362
vertical = false , # horizontal colorbar
365
363
flipaxis = false , # label underneath colorbar
@@ -386,7 +384,7 @@ function make_paper_figures(
386
384
bias_title =
387
385
fig_row == 1 ?
388
386
CairoMakie. rich (" ClimaLand vs ERA5 bias" , fontsize = 28 ) : " " # title of the figure
389
- bias_colorbar_label = " $(sim_var . attributes[ " long_name " ]) $units_label "
387
+ bias_colorbar_label = " $title_stub $units_label "
390
388
viz. plot_bias_on_globe! (
391
389
fig,
392
390
sim_var_annual_average,
@@ -510,11 +508,11 @@ function make_paper_figures(
510
508
511
509
512
510
end
513
- save_name = joinpath (root_path, " combined_figures.pdf " )
511
+ save_name = joinpath (root_path, " combined_figures.png " )
514
512
save_name =
515
- plot_bias ? joinpath (root_path, " combined_figures_bias.pdf " ) : save_name
513
+ plot_bias ? joinpath (root_path, " combined_figures_bias.png " ) : save_name
516
514
save_name =
517
- plot_seasonal ? joinpath (root_path, " combined_figures_seasonal.pdf " ) :
515
+ plot_seasonal ? joinpath (root_path, " combined_figures_seasonal.png " ) :
518
516
save_name
519
517
CairoMakie. save (save_name, fig)
520
518
@show save_name
0 commit comments