Closed sandreza closed 3 years ago
Actually, this may be due to the fact that what I grabbed are the time-averaged statistics as opposed to the instantaneous. This would explain the factor of two discrepancies in the slope as compared to the expected budget, as well as initial transient
That was indeed the case. Using statistics.nc (instead of averaged_statistcs.nc)
using NCDatasets, Statistics, Plots
files = [
pwd() * "/three_layer_constant_fluxes_cubic_hr48_Qu0.0e+00_Qb1.0e-08_f1.0e-04_Nh256_Nz128_free_convection_2days_Qb1e-8.nc",
pwd() * "/checkthis.nc"
]
file = files[2]
ds = Dataset(file,"r")
field = ds["T"]
t = ds["time"][:]
meanT = zeros(length(t))
key = keys(field)
for i in eachindex(t)
meanT[i] = mean(field[:,i])
end
plot(t, meanT)
αg = 0.00196133
for i in 2:length(t)
println(αg * (meanT[i-1] - meanT[i]) / (t[i] - t[i-1]))
end
yielded
Maybe we should use time_averaged_statistics.nc
and instantaneous_statistics.nc
as filenames?
Yeah I'd be on board with these clearer names.
Same here!
These names are now in use on the master branch (switch was made in PR #56).
Plotting the mean buoyancy in time for some of the 2Day suite simulations seems to not satisfy the mean buoyancy budget. In particular
yields a plot that isn't a straight line