Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
faebefb
feat(demo): add convert-time-data-to-json app
rouson Feb 13, 2025
a057814
fix(demo): whitespace edits
rouson Feb 18, 2025
9ed8bcf
feat(tensor-statistics): variable tensor list
rouson Feb 23, 2025
fc7b41a
fix(assertions): update to Assert 2.1.0
rouson Feb 23, 2025
8a42037
fix(histogram_t):always define frequency component
rouson Feb 24, 2025
5ea177d
fix(demo/app): update gnuplot script nomenclature
rouson Feb 24, 2025
340d881
chore(histogram_s): sum bin values iff ASSERTIONS
rouson Feb 24, 2025
0fdad59
feat(tensor-statistics): variable tensor reads
rouson Feb 24, 2025
92fda06
feat(icar_output_file): add from_lines constructor
rouson Apr 7, 2025
aab11f0
fix(convert-time-data): improve usage info output
rouson Apr 7, 2025
7a57337
feat: add training data file name abstraction
rouson Apr 8, 2025
d8395d3
feat(training_config): training file name getters
rouson Apr 8, 2025
6309a15
fix(time_data_test): fix typo
rouson Apr 8, 2025
e1d4a1b
fix(training_config):differentiate procedure names
rouson Apr 8, 2025
253d8aa
feat(NetCDF_file): add construct_from_string_name
rouson Apr 8, 2025
f004e3d
fix(train-cloud): use new training_conf proc names
rouson Apr 8, 2025
640dbed
fix(tensor-stats): read training data file names
rouson Apr 8, 2025
15205ea
fix time derivative
rouson Apr 9, 2025
3daed4e
fix(time_data_s): demo app tensor-stats assertions
rouson Apr 12, 2025
fa73348
chore: update copyright years to year range
rouson Apr 15, 2025
85786cd
refac(training_data):separate from training_config
rouson Apr 15, 2025
3f83c8b
fix(CI): add training_data_files_*
rouson Apr 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions demo/app/convert-time-data-to-json.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
! Copyright (c) 2022-2024, The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt
program convert_time_data_to_json
!! Convert icar time-step output file to JSON format
use julienne_m, only : string_t, file_t, command_line_t
use time_data_m, only : time_data_t, icar_output_file_t
implicit none

character(len=*), parameter :: usage_info = &
new_line('') // new_line('') // &
'Usage: ./build/run-fpm.sh run convert-time-data-to-json -- --input-file <string> --output-file <string>' // new_line('') // &
'where angular brackets (<>) denote user-provided input.' // &
new_line('')

associate(time_data => time_data_t(icar_output_file_t(file_t(file_path("--input-file")))))
associate(json_file => time_data%to_json())
call json_file%write_lines(file_path("--output-file"))
end associate
end associate

print *,new_line('') // "______ convert-time-data-to-json done _______"

contains

function file_path(flag) result(string)
character(len=*), intent(in) :: flag
type(string_t) string
character(len=:), allocatable :: flag_value
type(command_line_t) command_line

flag_value = command_line%flag_value(flag)
if (len(flag_value)==0) error stop usage_info
string = string_t(flag_value)
end function

end program
4 changes: 2 additions & 2 deletions demo/app/plot-normalized-histograms.gnu
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ set logscale y 10
set key font ",20"
set title "Input-Tensor Histograms Mapped to the Interval [0,1]" font "Arial,20"

plot for [col=2:8] 'training_inputs_stats.plt' using 1:col with linespoints title columnheader
plot for [col=2:8] 'inputs_stats.plt' using 1:col with linespoints title columnheader
pause mouse any "Plot 1 of 2. Press any key to continue.\n"

set title "Output-Tensor Histograms Mapped to the Interval [0,1]" font "Arial,20"

plot for [col=2:6] 'training_outputs_stats.plt' using 1:col with linespoints title columnheader
plot for [col=2:6] 'outputs_stats.plt' using 1:col with linespoints title columnheader
pause mouse any "Plot 2 of 2. Press any key to exit.\n"
4 changes: 2 additions & 2 deletions demo/app/plot-raw-histograms.gnu
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set term png size 2600, 1200

set output "input-tensor-histograms.png"
set multiplot layout 3,3
do for [name in "potential-temperature pressure qc qr qs qv temperature"] {
do for [name in "potential_temperature pressure qc qr qs qv temperature"] {
filename = name . ".plt"
set title sprintf("Histogram for %s",name)
plot filename using 1:2 with linespoints title columnheader
Expand All @@ -14,7 +14,7 @@ unset multiplot

set output "output-tensor-histograms.png"
set multiplot layout 3,2
do for [name in "dptdt dqcdt dqrdt dqsdt dqvdt"] {
do for [name in "dpotential_temperature_dt dqc_dt dqr_dt dqs_dt dqv_dt"] {
filename = name . ".plt"
set title sprintf("Histogram for %s",name)
plot filename using 1:2 with linespoints title columnheader
Expand Down
Loading