Commit 0f610e36 authored by William F Godoy's avatar William F Godoy
Browse files

Add level file size information

parent 41369c9a
...@@ -114,6 +114,8 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame ...@@ -114,6 +114,8 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
Yd::Array{Float64,1} = [] Yd::Array{Float64,1} = []
# output Level0 directory size # output Level0 directory size
Yd_Level0::Array{Float64,1} = [] Yd_Level0::Array{Float64,1} = []
Yd_Level1::Array{Float64,1} = []
Yd_Level2::Array{Float64,1} = []
caseIDs::Array{String,1} = [] caseIDs::Array{String,1} = []
caseDirs::Array{String,1} = [] caseDirs::Array{String,1} = []
...@@ -132,6 +134,10 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame ...@@ -132,6 +134,10 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
plotFileDirs = helper_get_prefix_directories(string(outputDir, "/", rootPlotName)) plotFileDirs = helper_get_prefix_directories(string(outputDir, "/", rootPlotName))
plotsSize::Int64 = 0 plotsSize::Int64 = 0
plotsSizeLevel0::Int64 = 0
plotsSizeLevel1::Int64 = 0
plotsSizeLevel2::Int64 = 0
counter::Int32 = 1 counter::Int32 = 1
# extract ncells # extract ncells
...@@ -149,6 +155,22 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame ...@@ -149,6 +155,22 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
plotsSize += sizeDir plotsSize += sizeDir
push!( Yd, plotsSize) push!( Yd, plotsSize)
# Yd_Level0
sizeDirLevel0::Int64 = helper_get_directory_size(string(plotFileDir, "/Level_0"))
plotsSizeLevel0 += sizeDirLevel0
push!( Yd_Level0, plotsSizeLevel0)
# Yd_Level1
sizeDirLevel1::Int64 = helper_get_directory_size(string(plotFileDir, "/Level_1"))
plotsSizeLevel1 += sizeDirLevel1
push!( Yd_Level1, plotsSizeLevel1)
# Yd_Level2
sizeDirLevel2::Int64 = helper_get_directory_size(string(plotFileDir, "/Level_2"))
plotsSizeLevel2 += sizeDirLevel2
push!( Yd_Level2, plotsSizeLevel2)
# caseID # caseID
push!(caseIDs, caseID ) push!(caseIDs, caseID )
...@@ -162,7 +184,14 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame ...@@ -162,7 +184,14 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
data = [(Xd,Yd)] data = [(Xd,Yd)]
df::DataFrames.DataFrame = DataFrames.DataFrame( plots_cells = Xd, plots_size = Yd, caseID = caseIDs, caseDir = caseDirs) df::DataFrames.DataFrame =
DataFrames.DataFrame( plots_cells = Xd,
plots_size = Yd,
plots_size_L0 = Yd_Level0,
plots_size_L1 = Yd_Level1,
plots_size_L2 = Yd_Level2,
caseID = caseIDs,
caseDir = caseDirs)
println(df) println(df)
CSV.write("plot_size.csv", df, header=true) CSV.write("plot_size.csv", df, header=true)
......
...@@ -31,7 +31,8 @@ end ...@@ -31,7 +31,8 @@ end
function main() function main()
# modify this to the file path # modify this to the file path
filename = "/home/wgodoy/hdd_home/work/proxy_io/AmrexCastro/plot_size.csv" #filename = "/home/wgodoy/hdd_home/work/proxy_io/AmrexCastro/plot_size.csv"
filename = "/home/wgodoy/hdd_home/work/proxy_io/AmrexCastro/plot_size_case4.csv"
plot_CSV_3col(filename) plot_CSV_3col(filename)
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment