mirror of
https://git.gfz-potsdam.de/naaice/model-training.git
synced 2025-12-13 10:38:22 +01:00
Merge branch 'ml/add-iteration' into 'main'
feat: Add iteration number to transport and chemistry DataFrames See merge request naaice/model-training!2
This commit is contained in:
commit
5413be8610
@ -48,6 +48,12 @@ for file in qs_files
|
||||
# Load the RDS file
|
||||
data = qs_read(file)
|
||||
|
||||
# get basename of the file
|
||||
basename = split(file, "/")[end]
|
||||
|
||||
# get the iteration number by splitting the basename and parse the second element
|
||||
iteration = parse(Int, split(split(basename, "_")[2], ".")[1])
|
||||
|
||||
@rput data
|
||||
|
||||
R"transport <- data$T"
|
||||
@ -56,6 +62,10 @@ for file in qs_files
|
||||
@rget transport
|
||||
@rget chemistry
|
||||
|
||||
# Add iteration number to the DataFrame
|
||||
transport.iteration = fill(iteration, size(transport, 1))
|
||||
chemistry.iteration = fill(iteration, size(chemistry, 1))
|
||||
|
||||
# Append the DataFrame to the big DataFrame
|
||||
append!(df_design, transport)
|
||||
append!(df_result, chemistry)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user