Skip to content

Commit

Permalink
Merge #962
Browse files Browse the repository at this point in the history
962: Fix LES domain height fetch r=ilopezgp a=ilopezgp

Fixes the LES domain height fetch. In PyCLES, the centers precede the faces:

z_half = [Δz/2, Δz + Δz/2, ..., z_max - Δz/2]
z = [Δz, 2Δz, ..., z_max]

Therefore, to get the domain height, we need to fetch the last element of z, not of z_half.

Co-authored-by: Ignacio <[email protected]>
  • Loading branch information
bors[bot] and ilopezgp authored May 2, 2022
2 parents af1fa3c + 3874328 commit c0f0431
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion driver/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ function construct_grid(namelist; FT = Float64)

les_filename = namelist["meta"]["lesfile"]
zmax = NC.Dataset(les_filename, "r") do data
Array(TC.get_nc_data(data, "zc"))[end]
Array(TC.get_nc_data(data, "zf"))[end]
end
nz = isnothing(nz) ? Int(zmax ÷ Δz) : Int(nz)
Δz = isnothing(Δz) ? FT(zmax ÷ nz) : FT(Δz)
Expand Down
2 changes: 1 addition & 1 deletion post_processing/mse_tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ all_best_mse["LES_driven_SCM"]["qt_mean"] = 3.6585461446222651e+00
all_best_mse["LES_driven_SCM"]["v_mean"] = 1.4035659850002822e+00
all_best_mse["LES_driven_SCM"]["u_mean"] = 4.8680732482495243e-01
all_best_mse["LES_driven_SCM"]["temperature_mean"] = 1.3216614383634651e-03
all_best_mse["LES_driven_SCM"]["ql_mean"] = 51870.092217716905
all_best_mse["LES_driven_SCM"]["ql_mean"] = 5.1929489010189645e+04
all_best_mse["LES_driven_SCM"]["thetal_mean"] = 1.5647910243269554e-03
#
#################################
Expand Down

0 comments on commit c0f0431

Please sign in to comment.