Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modern_diag_manager:: Fix for when two+ empty files #1503

Merged
merged 1 commit into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion diag_manager/fms_diag_yaml.F90
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ subroutine diag_yaml_object_init(diag_subset_output)
else
call diag_get_value_from_key(diag_yaml_id, diag_file_ids(i), "file_name", filename)
call mpp_error(NOTE, "diag_manager_mod:: the file:"//trim(filename)//" has no variables defined. Ignoring!")
if (allocated(filename)) deallocate(filename)
ignore(i) = .True.
endif
endif
Expand Down Expand Up @@ -1735,7 +1736,7 @@ subroutine fms_diag_yaml_out()
tmpstr1 = ''; tmpstr1 = string(varptr%n_diurnal)
call fms_f2c_string(vals3(key3_i)%val9, tmpstr1)
endif

if( varptr%pow_value .gt. 0) then
tmpstr1 = ''; tmpstr1 = string(varptr%pow_value)
call fms_f2c_string(vals3(key3_i)%val10, tmpstr1)
Expand Down
18 changes: 18 additions & 0 deletions test_fms/diag_manager/test_time_none.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,24 @@ test_expect_success "Testing diag manager that defined a diag file with no varia
mpirun -n 6 ../test_reduction_methods
'

cat <<_EOF > diag_table.yaml
title: test_none
base_date: 2 1 1 0 0 0
diag_files:
- file_name: test_empty_file
time_units: hours
unlimdim: time
freq: 6 hours
- file_name: test_empty_file2
time_units: hours
unlimdim: time
freq: 6 hours
_EOF

my_test_count=`expr $my_test_count + 1`
test_expect_success "Testing diag manager that defined 2 diag file with no variables (test $my_test_count)" '
mpirun -n 6 ../test_reduction_methods
'
cat <<_EOF > diag_table.yaml
title: test_none
base_date: 2 1 1 0 0 0
Expand Down
Loading