-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloadingdatatut.jl
More file actions
63 lines (57 loc) · 1.8 KB
/
loadingdatatut.jl
File metadata and controls
63 lines (57 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using JLD2, Printf, Plots
using ApproxFun,OrdinaryDiffEq, Sundials
using LinearAlgebra
using Plots;# gr()
using Flux, DiffEqFlux, StaticArrays
function extract_data()
filename = "C:/Users/Collin/Documents/MIT/UROP/Rackauckas/mixed_layer_simulation_Q-100_dTdz0.010_tau0.00_profiles.jld2"
les_data = jldopen(filename, "r")
#print(keys(les_data))
#print(keys(les_data["parameters"]))
#everything but coriolis bouyancy and clousure
#important one is
#If I wanted z coordinates
z = collect(les_data["grid"]["zC"])
#@show z[1], z[end]+z[1]
#read in temperature
T = [] #temp
t_first = [] #time
Φ = [] #flux term (wT) for key purposes
tmpT = les_data["timeseries"]["T"] #output the iteration number,
for j in keys(tmpT)
push!(T, les_data["timeseries"]["T"][j])
push!(t_first, les_data["timeseries"]["t"][j])
push!(Φ, les_data["timeseries"]["wT"][j])
end
#display(t)
#
tmp_plot = []
tmp_t =[]
T_plot = []
#Φ_plot = []
i= 0.0
for j in 1:floor(Int, length(t_first) /1 * 1.0)
#for j in 22:20:22#floor(Int, length(t) /1 * 1.0)
i +=1
#days = @sprintf("%.1f", t[j]/86400)
tmp_plot =T[j][1,1,2:(end -1)]
Φ_plot =Φ[j][1,1,2:(end-1)]
push!(T_plot, tmp_plot)
push!(tmp_t, t_first[j])
#println(length(Φ[2]))
#p1 = plot(tmp_plot, z)
#p2 = plot(tmp_plot, z)
#display(plot(p2))
end
#display(i)
display(T_plot[:,1])
display(size(t_first))
##t_new = @SVector t
##t = @SVector [t_first[j] for j in 1:1153]
#p1 = plot(t_first, T_plot[:,1])
##display(plot(Φ_plot, z))
##display(plot(p2))
##println(size(Φ_plot))
#display(p1)
end
extract_data()