Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Godoy, William
jexio
Commits
0f610e36
Commit
0f610e36
authored
Sep 16, 2020
by
William F Godoy
Browse files
Add level file size information
parent
41369c9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/extractor/AmrexCastro.jl
View file @
0f610e36
...
...
@@ -114,6 +114,8 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
Yd
::
Array
{
Float64
,
1
}
=
[]
# output Level0 directory size
Yd_Level0
::
Array
{
Float64
,
1
}
=
[]
Yd_Level1
::
Array
{
Float64
,
1
}
=
[]
Yd_Level2
::
Array
{
Float64
,
1
}
=
[]
caseIDs
::
Array
{
String
,
1
}
=
[]
caseDirs
::
Array
{
String
,
1
}
=
[]
...
...
@@ -132,6 +134,10 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
plotFileDirs
=
helper_get_prefix_directories
(
string
(
outputDir
,
"/"
,
rootPlotName
))
plotsSize
::
Int64
=
0
plotsSizeLevel0
::
Int64
=
0
plotsSizeLevel1
::
Int64
=
0
plotsSizeLevel2
::
Int64
=
0
counter
::
Int32
=
1
# extract ncells
...
...
@@ -149,6 +155,22 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
plotsSize
+=
sizeDir
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
push!
(
caseIDs
,
caseID
)
...
...
@@ -162,7 +184,14 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
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
)
CSV
.
write
(
"plot_size.csv"
,
df
,
header
=
true
)
...
...
src/helper/helperPlot.jl
View file @
0f610e36
...
...
@@ -31,7 +31,8 @@ end
function
main
()
# 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
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment